On 02/09/2016 11:29 AM, Mohamed Sadok Ben Jazia wrote:
Hello list,
I'm implementing an API for a full virtualization solution with proxmox.

Isn't that the Proxmox API2 already? :-)


For a simple usage (create CT, start, reboot, ...) i need to get a ticket each API call.
As i know the ticket validity is 2 hours.

Jokes aside, exactly, but the validity works so, that it only get's invalid if not in use for 2 hours or when logging out. So you could generate it and use it as long as valid, and if you didn't fire up an API call for 2 hours catch the invalid ticket error and request a new one.

Would be definitively the nicer and cleaner way, in my opinion.

My question is; is it better to save the ticket and use it for 2 hours?
Are there an inconvenient when generating a new ticket each api call even when there will be a lot of calls?

If you plan to fire up a few thousands API calls it would be good if you can avoid generating a new ticket each time, else you have to try it (write a simple benchmark which loops on ticket generations and simple API calls to see how your server performs).

cheers,
Thomas


_______________________________________________
pve-user mailing list
pve-user@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-user

Reply via email to