A successful login request returns a Session element, which contains Link elements that reference the organizations that you are permitted to access.
Every authenticated user has an associated Session object that contains one or more Link elements. The set of Link elements in your Session is based on your role and privileges. Each of these elements includes a URL that you can use with a GET request to explore a subset of objects in the cloud.
All Session elements include a link that you can use to retrieve an OrgList element. Unless you are the system administrator, this list includes just the organization to which you logged in. For a system administrator, the list includes all organizations in the cloud.
Prerequisites
Create a login session. See Create a Session Using Basic Authentication.
Procedure
Example: Retrieve an Organization List
GET https://vcloud.example.com/api/org
The request returns an OrgList element similar to the one shown here. Additional Org elements are returned only when a system administrator makes the request.
200 OK Content-Type: application/vnd.vmware.vcloud.orgList+xml ... <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" /> <Org ... /> <Org ... /> </OrgList>