Product SiteDocumentation Site

14.6.10.  Ticket Action

The ticket action generates a time-sensitive authentication token for accessing a virtual machine's display. The client-provided action may optionally include a ticket representation containing a value (if the token string needs to take on a particular form), and/or an expiry time in minutes. In any case, the completion response will specify the actual ticket value and expiry used.
Example 14.19. Action to generate authentication token for a virtual machine
POST /rhevm-api/vms/5114bb3e-a4e6-44b2-b783-b3eea7d84720/ticket HTTP/1.1
Content-type: application/xml

<action>
    <ticket>
        <expiry>120</expiry>
    </ticket>
</action>

200 OK
Content-Type: application/xml

<action id="94e07552-14ba-4c27-8ce6-2cc75190d3ef"
  href="/rhevm-api/vms/5114bb3e-a4e6-44b2-b783-b3eea7d84720/ticket/
  94e07552-14ba-4c27-8ce6-2cc75190d3ef">
    <status>COMPLETE</status>
    <ticket>
        <value>5c7CSzK8Sw41</value>
        <expiry>120</expiry>
    </ticket>
    <link rel="parent"
      href="/rhevm-api/vms/5114bb3e-a4e6-44b2-b783-b3eea7d84720"/>
    <link rel="replay"
      href="/rhevm-api/vms/5114bb3e-a4e6-44b2-b783-b3eea7d84720/ticket"/>
</action>