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.
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. |
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. |
This example retrieves the ExampleOrg organization listed in the OrgList element shown in Step 1.
GET https://vcloud.example.com/api/org/5
200 OK Content-Type: application/vnd.vmware.vcloud.org+xml ... <Org name="ExampleOrg" type="application/vnd.vmware.vcloud.org+xml" href="https://vcloud.example.com/api/org/5"> <Link rel="down" type="application/vnd.vmware.vcloud.catalog+xml" href="https://vcloud.example.com/api/catalog/32" name="ExampleCatalog" /> <Link rel="down" type="application/vnd.vmware.vcloud.vdc+xml" href="https://vcloud.example.com/api/vdc/5" name="ExampleVdc01" /> <Link ... /> <Link ... /> <Description>Example Corp’s Primary Organization</Description> </Org>
Links in the response whose rel attribute has a value of down are references to objects that the organization contains. This example shows the subset of those items that we reference in the Hello vCloud example: