<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<br>
<br>
<div class="moz-cite-prefix">On 02/09/2016 11:29 AM, Mohamed Sadok
Ben Jazia wrote:<br>
</div>
<blockquote
cite="mid:CAKATEKgKiL9MtTLfD+DPsH64GNhfGum-jfqEiW0wJoXtLDWpgw@mail.gmail.com"
type="cite">
<div dir="ltr"><span style="font-size:12.8px">Hello list,</span>
<div style="font-size:12.8px">I'm implementing an API for a full
virtualization solution with proxmox.</div>
</div>
</blockquote>
<br>
Isn't that the Proxmox API2 already? :-)<br>
<br>
<br>
<blockquote
cite="mid:CAKATEKgKiL9MtTLfD+DPsH64GNhfGum-jfqEiW0wJoXtLDWpgw@mail.gmail.com"
type="cite">
<div dir="ltr">
<div style="font-size:12.8px">For a simple usage (create CT,
start, reboot, ...) i need to get a ticket each API call.</div>
<div style="font-size:12.8px">As i know the ticket validity is 2
hours.</div>
</div>
</blockquote>
<br>
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.<br>
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.<br>
<br>
Would be definitively the nicer and cleaner way, in my opinion.<br>
<br>
<blockquote
cite="mid:CAKATEKgKiL9MtTLfD+DPsH64GNhfGum-jfqEiW0wJoXtLDWpgw@mail.gmail.com"
type="cite">
<div dir="ltr">
<div style="font-size:12.8px">My question is; is it better to
save the ticket and use it for 2 hours?</div>
<div style="font-size:12.8px">Are there an inconvenient when
generating a new ticket each api call even when there will be
a lot of calls?</div>
</div>
</blockquote>
<br>
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).<br>
<br>
cheers,<br>
Thomas<br>
<br>
<br>
</body>
</html>