5.1

Table Of Contents
The response code indicates whether the request succeeded, or how it failed.
n
If the request is successful, the server returns HTTP response code 200 (OK) and headers that include an
authorization header of the following form:
x-vcloud-authorization:
token
This header must be included in each subsequent vCloud API request.
n
If the authentication header is missing, the server returns HTTP response code 403.
n
If the credentials supplied in the authentication header are invalid, or if the token has expired, the server
returns HTTP response code 401. The token expires after a configurable interval of client inactivity. The
default is 30 minutes after the token is created. After the token expires, you must log in again to obtain a
new token.
Find a Catalog and a vDC
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.
After you log in, you can make a GET request to your organization's URL to retrieve the XML representation
of the organization. This representation shows the organization's attributes and contents, including links to its
catalogs and vDCs.
Prerequisites
Verify that you are logged in to the vCloud API as a system administrator or member of an organization in
the cloud.
Procedure
1 Examine the list of organizations to which you have access.
Make a GET request to the URL in the href value of the orgList link, which is present in the response to
all login requests.
GET https://vcloud.example.com/api/org/
Unless you are a system administrator, the response to this request is an OrgList element containing a
single Org element, which represents your organization.
<OrgList
xmlns="http://www.vmware.com/vcloud/v1.5"
type="application/vnd.vmware.vcloud.orgList+xml"
href="https://vcloud.example.com/api/org">
<Org
type="application/vnd.vmware.vcloud.org+xml"
name="ExampleOrg"
href="https://vcloud.example.com/api/org/5" />
</OrgList>
2 Retrieve the representation of your organization.
See the request portion of “Example: Retrieve the Contents of an Organization,” on page 26.
3 Examine the response to find the links to the organization's catalogs and vDCs.
See the response portion of “Example: Retrieve the Contents of an Organization,” on page 26.
Example: Retrieve the Contents of an Organization
This example retrieves the ExampleOrg organization listed in the OrgList element shown in Step 1.
vCloud API Programming Guide
26 VMware, Inc.