vCloud API Programming Guide
Discovering the Contents of an Organization, Catalog, or vDC
The vCloud API defines three principal containers: organizations, catalogs, and vDCs. A client can use an
HTTP GET request to discover the contents of any of them.
List the Organizations in a vCloud
The response to a login request includes a list of the organizations to which the authenticated user has access.
If an authenticated client needs to retrieve this list, it can make a GET request to the URL shown in the href
attribute of the OrgList that was returned in the response to its original login request. To retrieve the OrgList
returned in Example 2‐1 on page
GET http://vcloud.example.com/api/v1.0/org/
For more information, see "Logging In and Getting an Organization List" on page 21.
List the Contents of an Organization
A vCloud organization is a high‐level abstraction that provides a unit of administration for objects and
resources. As viewed by a user, an organization (represented by an Org element) can contain Catalog,
Network, and vDC elements. If there are any queued, running, or recently completed tasks owned by a member
of the organization, it also contains a TasksList element. As viewed by an administrator, an organization also
contains users, groups, and other information. For more information, see "Org" on page 151 and "AdminOrg"
on page 180.
A client can obtain a list of organizations in a vCloud by logging in to the server to get an OrgList (see
"Authentication" on page 18). This lists includes only those organizations to which the logged‐in user has
access. The client can use a URL from this list to make an HTTP GET request that returns an Org document in
the response body. This document, a representation of the organization object, includes links to objects that the
organization contains and metadata about the organization itself. Example
response.
Example 3-1. List the Contents of an Organization
Request:
GET http://vcloud.example.com/api/v1.0/org/5
Response:
200 OK
Content-Type: application/vnd.vmware.vcloud.org+xml
...
<Org name="ExampleOrg" type="application/vnd.vmware.vcloud.org+xml"
<Link rel="down" type="application/vnd.vmware.vcloud.catalog+xml"
<Link rel="down" type="application/vnd.vmware.vcloud.controlAccess+xml"
<Link rel="controlAccess" type="application/vnd.vmware.vcloud.controlAccess+xml"
<Link rel="down" type="application/vnd.vmware.vcloud.catalog+xml"
<Link rel="down" type="application/vnd.vmware.vcloud.controlAccess+xml"
<Link rel="controlAccess" type="application/vnd.vmware.vcloud.controlAccess+xml"
<Link rel="down" type="application/vnd.vmware.vcloud.vdc+xml"
<Link rel="down" type="application/vnd.vmware.vcloud.tasksList+xml"
34
21, an authenticated client would issue the following request:
href="http://vcloud.example.com/api/v1.0/org/5" ...>
href="http://vcloud.example.com/api/v1.0/catalog/32" name="MainCatalog"/>
href="http://vcloud.example.com/api/v1.0/catalog/32/controlAccess/"/>
href="http://vcloud.example.com/api/v1.0/catalog/32/action/controlAccess/"/>
href="http://vcloud.example.com/api/v1.0/catalog/37" name="Shared Catalog"/>
href="http://vcloud.example.com/api/v1.0/catalog/37/controlAccess/"/>
href="http://vcloud.example.com/api/v1.0/catalog/37/action/controlAccess/"/>
href="http://vcloud.example.com/api/v1.0/vdc/5" name="ExampleVdc01"/>
href="http://vcloud.example.com/api/v1.0/tasksList/5"/>
3‐1 shows such a request and
VMware, Inc.