5.5

Table Of Contents
n
Verify that your browser has an installed copy of the vmware-vmrc plug-in. This plug-in is installed by
your browser whenever you use the vCloud Director Web Console to access the console of a running
virtual machine. After this plug-in is installed, you can find it in the folder where your browser stores
plug-ins.
Procedure
1 Retrieve the screen ticket.
POST a request to the acquireTicket link of the Vm.
Request:
POST https://vcloud.example.com/api/vApp/vm-4/screen/action/acquireTicket
Response:
200 OK
Content-Type: application/vnd.vmware.vcloud.screenTicket+xml
...
<ScreenTicket xmlns="http://www.vmware.com/vcloud/v1.5"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.vmware.com/vcloud/v1 ...>ticket-string
</ScreenTicket>
The ticket string itself has the following form:
mks://ip-address/VM-MoRef/ticket=encoded-ticket
n
ip-address is the IP address of the virtual machine.
n
VM-MoRef is the managed object reference of the virtual machine.
n
encoded-ticket is the encoded screen ticket. You must decode this ticket using a function such as the
Java URLDecoder or PERL url_escape before you can use it.
2 Use the ticket with the VMRC API.
The ticket is valid for 30 seconds. To use it, you must initialize the VMRC browser plug-in and use the
VMRC API, as described in the VMware Remote Console SDK documentation.
Undeploy, Power Off, and Delete the vApp
After you undeploy a vApp and power it off, you can use an HTTP DELETE request to delete the vApp
object.
A deployed vApp has a link that you can use with a POST request to undeploy the vApp and take a power
action such as powering it off or suspending it. A powered-off vApp has a link that you can use with a
DELETE request to remove the vApp.
Prerequisites
Verify that you are logged in to the vCloud API as an administrator or vApp Author.
Procedure
1 Retrieve the XML representation of the vApp.
Make a GET request to the URL in the href attribute of the VApp element that was returned when you
created the vApp from the template. See “Get Information About a vApp,” on page 34.
vCloud API Programming Guide
38 VMware, Inc.