EasyManua.ls Logo

VMware VCLOUD API 1.0 - API - vCloud Client Workflow Overview

VMware VCLOUD API 1.0 - API
212 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
VMware, Inc. 17
Chapter 1 Introducing the VMware vCloud API
Linksî ±provideî ±aî ±wayî ±forî ±theî ±serverî ±toî ±informî ±aî ±clientî ±aboutî ±objectî ±relationshipsî ±andî ±theî ±operationsî ±thatî ±objectsî ±
support.î ±Forî ±example,î ±aî ±containerî ±suchî ±asî ±anî ±organizationî ±orî ±catalogî ±canî ±returnî ±linksî ±toî ±theî ±objectsî ±itî ±contains,î ±
andî ±aî ±virtualî ±systemî ±(aî ±vAppî ±orî ±Vm)î ±canî ±containî ±actionî ±linksî ±
thatî ±enableî ±operationsî ±suchî ±asî ±powerî ±stateî ±changesî ±
orî ±virtualî ±deviceî ±reconfiguration.î ±Linksî ±toî ±actionsî ±andî ±containedî ±objectsî ±areî ±omittedî ±fromî ±responsesî ±ifî ±theî ±
requestî ±wasî ±madeî ±byî ±aî ±userî ±whoî ±hasî ±insufficientî ±privilegesî ±toî ±accessî ±theî ±objectî ±orî ±performî ±theî ±action.î ±Actionî ±
linksî ±areî ±alsoî ±omittedî ±whenî ±theî ±actionî ±cannot
î ±beî ±performedî ±(poweringî ±onî ±aî ±virtualî ±machineî ±thatî ±isî ±alreadyî ±
poweredî ±on,î ±forî ±example).
vCloud Client Workflow Overview
Clientsî ±ofî ±theî ±vCloudî ±APIî ±implementî ±aî ±RESTfulî ±workflow,î ±makingî ±HTTPî ±requestsî ±toî ±theî ±serverî ±andî ±retrievingî ±
theinformationtheyneedfromtheserver’sresponses.
Requests
Clientsî ±makeî ±HTTPî ±requestsî ±toî ±vCloudî ±URLs,î ±hrefî ±attributeî ±valuesî ±whichî ±areî ±typicallyî ±providedî ±byî ±theî ±serverî ±
inresponsetoGETrequestsbytheclient.EveryvCloudhasawell‐knownURLfromwhichaclientcangetthe
server’sloginURLandthelistofvCloudAPIversionsthatthe
î ±serverî ±supports,î ±alongî ±withî ±additionalî ±
information(see“AP I Versioning”onpage 147).Afteraclienthasloggedin,allvCloudAPIURLscanbe
discoveredî ±byî ±makingî ±GETî ±requestsî ±toî ±URLsî ±listedî ±inî ±theî ±loginî ±responseî ±andî ±theî ±URLsî ±containedî ±inî ±responsesî ±
toî ±thoseî ±requests.
Request Headers
Allrequestsfromauthenticatedclientsmustincludeanauthenticationheader.See“Authentication”on
page 18.
RequeststhatincludeadocumentbodymuststartwiththeappropriateHTTPContent‐Typeheader.Thetype
attributeî ±ofî ±aî ±responseî ±bodyî ±indicatesî ±theî ±contentî ±typeî ±ofî ±theî ±document.î ±Forî ±example,î ±thisî ±responseî ±fragmentî ±
indicatesî ±thatî ±theî ±
contentî ±typeî ±associatedî ±withî ±aî ±CatalogItem entityî ±isî ±
application/vnd.vmware.vcloud.catalogItem+xml.
<CatalogItem type="application/vnd.vmware.vcloud.catalogItem+xml"
href="http://vcloud.example.com/api/v1.0/catalogItem/221" name="Ubuntu Template with
vsftpd"/>
AnyrequestthatincludesaCatalogItemrequiresthefollowingContent‐Typeheader:
Content-Type: application/vnd.vmware.vcloud.catalogItem+xml
Whenitappearsas thevalueofaContent‐TypeheaderorthetypeattributeofanelementinthevCloudAPI,
thisstringiscase‐insensitiveinrequests,andcanbereturnedineithermixedcaseorlowercasecharactersin
responses.î ±
Formoreinformation,see“ContentType”onpage 142.
Request Bodies
Thisî ±releaseî ±ofî ±Cloudî ±Directorî ±usesî ±aî ±validatingî ±XMLî ±parserî ±thatî ±requiresî ±elementsî ±inî ±aî ±requestî ±bodyî ±toî ±agreeî ±
inî ±bothî ±orderî ±andî ±numberî ±withî ±theî ±schema.î ±Requestî ±bodiesî ±areî ±rejectedî ±asî ±invalidî ±unlessî ±theyî ±meetî ±theî ±
followingî ±criteria:
ïź XMLî ±namespaceî ±attributesî ±mustî ±beî ±suppliedî ±forî ±allî ±namespacesî ±representedî ±byî ±elementsî ±inî ±theî ±request.î ±
See“XMLNamespaceIdentifiers”onpage 145.
ïź Ifî ±multipleî ±namespacesî ±areî ±representedî ±inî ±theî ±request,î ±XMLî ±namespaceî ±attributesî ±mustî ±includeî ±anî ±
identifyingprefix,andthatprefixmustbeusedwithelementsfromthatnamespace.See“XML
NamespacePrefixesinRequestandResponseBodies”onpage 146.
N
OTEWhenaclientusesalinktoreferenceanobject,onlythehrefattributeisrequired.Thenameandtype
areî ±ignored.

Table of Contents

VMware VCLOUD API 1.0 - API - vCloud Client Workflow Overview