[PVE-User] PVE ticket

Thomas Lamprecht t.lamprecht at proxmox.com
Tue Feb 9 11:49:51 CET 2016



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


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://pve.proxmox.com/pipermail/pve-user/attachments/20160209/8566986f/attachment-0015.html>


More information about the pve-user mailing list