vcenter vm console tickets: create
Creates a virtual machine console ticket of a given ticket type. The created ticket is a one time use URI. The validity of the ticket is 30 minutes, if not used with in the time frame the ticket expires.
The VMRC ticket contains the IP address or the DNS resolvable name of the vCenter server. This ticket requires installation of VMware Workstation, VMware Fusion or VMRC to be installed on the machine where the ticket has to be opened. This ticket can be acquired even when the VM is turned off.
The WEBMKS ticket contains the IP address of the DNS resolvable name of the ESX server. This ticket requires user to embed this ticket in a HTML page using VMware HTML Console SDK - https://www.vmware.com/support/developer/html-console This ticket can be acquired only when the VM is turned on.
. This operation was added in vSphere API 7.0.0.2.Request:
HTTP request
POST https://{server}/rest/vcenter/vm/{vm}/console/tickets
Path Parameters
Name | Type | Description |
---|---|---|
Required | ||
vm | string | Virtual machine identifier. |
Request Body Structure:
{
"spec" : {
"type" : "VMRC"
}
}
"spec" : {
"type" : "VMRC"
}
}
Request Body Parameters:
Name | Type | Description |
---|---|---|
bold = required | ||
spec | create_spec | Specification for the console ticket to be created. |
spec.type | string | The type of virtual machine console ticket. This attribute was added in vSphere API 7.0.0.2. Defines the types of console tickets. This enumeration was added in vSphere API 7.0.0.2. Value is one of: VMRC: Virtual machine remote console ticket. This constant was added in vSphere API 7.0.0.2. WEBMKS: Web socket console ticket. This constant was added in vSphere API 7.0.0.2. |
Response:
HTTP Status Code: 200
Representation:
{
"value" : {
"ticket" : "http://myurl.com"
}
}
"value" : {
"ticket" : "http://myurl.com"
}
}
Response Type:
Name | Type | Description |
---|---|---|
bold = required | ||
value | summary | Commonly used information about the virtual machine console ticket. |
value.ticket | URI | Console ticket URI. This attribute was added in vSphere API 7.0.0.2. |
Errors:
HTTP Status Code | Type | Description |
---|---|---|
500 | error | if the system reports an error while responding to the request. |
400 | invalid_argument | if the {@link CreateSpec#type) field contains a value that is not supported by the server. |
400 | not_allowed_in_current_state | if the virtual machine is powered off and requested ticket type is WEBMKS |
404 | not_found | if the virtual machine is not found. |
500 | resource_inaccessible | if the virtual machine's configuration or execution state cannot be accessed. |
503 | service_unavailable | if the system is unable to communicate with a service to complete the request. |
401 | unauthenticated | if the user can not be authenticated. |
403 | unauthorized | if the user doesn't have the required privileges. |