vCloud API clients and vCloud Director servers communicate over HTTPS, exchanging XML representations of vCloud API objects.

This simplified example of a RESTful workflow includes requests that discover and deploy a particular vApp, in this case, an FTP server with a connection to the public Internet.

These examples assume that you have access to a catalog that includes a vApp template with certain characteristics and an organization network that supports connections to the public Internet. The workflow and examples are flexible, and can accommodate various vApp templates and cloud capabilities.

If you want to run the Hello vCloud examples, verify that the following conditions are met.

You have the login credentials of a user with the vApp Author role.

Your organization contains at least one VDC that has at least one network. For information about creating VDCs and networks, see Managing an Organization.

Your organization contains a catalog in which at least one vApp template is available. For information about adding a vApp template to a catalog, see Provisioning an Organization.

1

To begin using the API, you request the system to create a Session object. In this request, you supply your credentials in an Authorization header of the form prescribed by the identity provider that your organization uses. The response includes an authorization token, which you must include in subsequent requests.

2

Before you can deploy a vApp, you must find a vApp template in one of your organization's catalogs and a VDC in your organization to use for the deployment.

3

You can make a GET request to a catalog URL to retrieve a list of vApp templates and media images referenced by the catalog.

4

You can examine the list of items in a catalog to find items of interest based on the values of their name and type attributes. You must retrieve a catalog item to get a Description and a usable reference to the underlying object.

5

To deploy your template as a vApp, you must specify an organization VDC to deploy it in and an organization VDC network to connect it to.

6

To create a vApp from a vApp template, you must bind the template's abstract resource requirements, such as network connections, storage resources, memory, and CPU capacity, to appropriate resources in the target VDC. This binding operation is called instantiation.

7

When you instantiate a vApp template, the server returns the URL of the resulting vApp. You can use this URL with a GET request to retrieve information that you can use to connect to the vApp, modify its configuration, and operate it.

8

After a vApp is powered on, you can retrieve a screen ticket from one of its virtual machines. You use that ticket with the VMRC browser plug-in to gain access to the console of the virtual machine.

9

After you undeploy a vApp and power it off, you can use an HTTP DELETE request to delete the vApp object.

10

To log out and terminate a vCloud API session, delete the Session you created when you logged in.