vCloud API Programming Guide
22 VMware, Inc.
<Org .../>
<Org .../>
</OrgList>
Theresponseincludesanauthenticationtokensuppliedinthe x-vcloud-authorizationheader,andalist
oftheorganizationstowhichtheauthenticateduserhasaccess.EachOrghasaURL(initshrefattribute
value)thattheclientcanusetogetmoreinformationaboutobjectsthattheorganizationcontains.Formore
informationaboutauthentication,see“Authentication”onpage 18.
Browsing an Organization
YoucanuseanHTTPGETrequestandoneoftheOrgURLsreturnedbytheloginrequesttodiscoverthe
contentsofanorganization,asshowninExample 2‐2.(Foramorecompleteversionofthisexample,see
Example 3‐1onpage 34.)
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"
href="http://vcloud.example.com/api/v1.0/org/5" ... >
<Link ... />
<Link rel="down" type="application/vnd.vmware.vcloud.catalog+xml"
href="http://vcloud.example.com/api/v1.0/catalog/32" name="MainCatalog"/>
<Link ... />
<Link rel="down" type="application/vnd.vmware.vcloud.vdc+xml"
href="http://vcloud.example.com/api/v1.0/vdc/5" name="ExampleVdc01"/>
<Link ... />
<Link rel="down" type="application/vnd.vmware.vcloud.network+xml"
href="http://vcloud.example.com/api/v1.0/network/14" name="IsolatedOrgNet"/>
<Link rel="down" type="application/vnd.vmware.vcloud.network+xml"
href="http://vcloud.example.com/api/v1.0/network/54" name="Internet"/>
<Description>Example Corp’s Primary Organization</Description>
</Org>
Linksintheresponsewhoserelattributehasavalueofdownarereferencestoobjectsthattheorganization
contains.Example 2‐2showsthesubsetofthoseitemsthatyouwillneedforthisexercise:
AcatalognamedMainCatalog,atURLhttp://vcloud.example.com/api/v1.0/catalog/32,whereyoucan
lookforvApptemplates.
AvDCnamedExampleVdc01,atURLhttp://vcloud.example.com/api/v1.0/vdc/5,whereyoucandeploy
thevApp.
Twonetworks:onenamedInternet,atURLhttp://vcloud.example.com/api/v1.0/network/54,andone
namedIsolatedOrgNet,atURLhttp://vcloud.example.com/api/v1.0/network/14.Youcanconnect
connectthevApptoeitherofthesenetworks.
N
OTEThisexample,likeotherexamplesinthisguide,omitscertainrequiredHTTPheadersandothercontent
sothatitcanprovideaconcise,readablesubsetofanactualrequestandresponse.Formoreinformation,see
“A b o u t theExamples”onpage 19.