Browsing An Organization - VMware VCLOUD API 1.0 - API Programming Manual

Table of Contents

Advertisement

vCloud API Programming Guide
<Org .../>
<Org .../>
</OrgList>
The response includes an authentication token supplied in the x-vcloud-authorization header, and a list 
of the organizations to which the authenticated user has access. Each Org has a URL (in its href attribute 
value) that the client can use to get more information about objects that the organization contains. For more 
information about authentication, see "Authentication" on page 18.
N
   This example, like other examples in this guide, omits certain required HTTP headers and other content 
OTE
so that it can provide a concise, readable subset of an actual request and response. For more information, see 
"About the Examples" on page 19.

Browsing an Organization

You can use an HTTP GET request and one of the Org URLs returned by the login request to discover the 
contents of an organization, as shown in Example
Example 3‐1 on page
Example 2-2. 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 ... />
<Link rel="down" type="application/vnd.vmware.vcloud.catalog+xml"
<Link ... />
<Link rel="down" type="application/vnd.vmware.vcloud.vdc+xml"
<Link ... />
<Link rel="down" type="application/vnd.vmware.vcloud.network+xml"
<Link rel="down" type="application/vnd.vmware.vcloud.network+xml"
<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. Example
A catalog named MainCatalog, at URL http://vcloud.example.com/api/v1.0/catalog/32, where you can 
look for vApp templates.
A vDC named ExampleVdc01, at URL http://vcloud.example.com/api/v1.0/vdc/5, where you can deploy 
the vApp.
Two networks: one named Internet, at URL http://vcloud.example.com/api/v1.0/network/54, and one 
named IsolatedOrgNet, at URL http://vcloud.example.com/api/v1.0/network/14. You can connect 
connect the vApp to either of these networks.
22
34.)
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/vdc/5" name="ExampleVdc01"/>
href="http://vcloud.example.com/api/v1.0/network/14" name="IsolatedOrgNet"/>
href="http://vcloud.example.com/api/v1.0/network/54" name="Internet"/>
2‐2 shows the subset of those items that you will need for this exercise: 
2‐2. (For a more complete version of this example, see 
VMware, Inc.

Advertisement

Table of Contents
loading

Table of Contents