EasyManua.ls Logo

VMware VCLOUD API 1.0 - API

VMware VCLOUD API 1.0 - API
212 pages
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. 207
B
REST,anacronymforRepresentationalStateTransfer,isatermthathasbeenwidelyemployedtodescribean
architecturalstylecharacteristicofprogramsthatrelyontheinherentpropertiesofhypermediatocreateand
modifythestateofanobjectthatisaccessibleataURL.
Thisappendixincludesthefollowing
topics:
“HowRESTWorksonpage 207
“UsingthevCloudRESTAPI”onpage 207
“ForMoreInformationAboutREST”onpage 208
How REST Works
IfaURLofsuchanobjectisknowntoaclient,theclientcanuseanHTTPGETrequesttodiscoverthe
propertiesoftheobject.ThesepropertiesaretypicallycommunicatedinastructureddocumentwithanHTTP
ContentTypeofXMLorJSON,thatprovidesarepresentationofthe
stateoftheobject.InaRESTfulworkflow,
documents(representationsofobjectstate)arepassedbackandforth(transferred)betweenaclientanda
servicewiththeexplicitassumptionthatneitherpartyneedknowanythingaboutanobjectotherthanwhatis
presentedinasinglerequestorresponse.The
URLsatwhichthesedocumentsareavailableareoften“sticky,”
inthattheypersistbeyondthelifetimeoftherequestorresponsethatincludesthem.Theothercontentofthe
documentsisnominallyvaliduntiltheexpirationdatenotedintheHTTPExpiresheader.
Using the vCloud REST API
A“RESTAPI”isinsomewaysanunfortunateterm,sincetheapplicationprogramswrittentoaRESTAPI
actuallyuseHTTPrequests(whichareoftenexecutedbyascriptorotherhigherlevellanguage)asawayof
makingwhatareessentiallyremoteprocedurecallsthatcreate,modify,ordelete
theobjectsdefinedbythe
API.ThisRESTAPI(andothers)isdefinedbyacollectionofXMLdocumentsthatrepresenttheobjectson
whichtheAPIoperates.Theoperationsthemselves(HTTPrequests)aregenerictoallHTTPclients.
TowriteaRESTfulclient,youneedtounderstandonlytheHTTP
protocolandthesemanticsofstandard
HTMLmarkup.TousethevCloudAPIeffectivelyinsuchaclient,youneedtoknowthreethings
thesetofobjectsthattheAPIsupports,andwhattheyrepresent(WhatisavDC?Howdoesitrelatetoan
organizationorcatalog?)
howtheAPIrepresentstheseobjects(WhatdoestheXMLschemaforanOrglooklike?Whatdothe
individualelementsandattributesrepresent?)
howtheclientreferstoanobjectonwhichitwantstooperate(WherearethelinkstoobjectsinavDC?
Howdoesaclientobtainandusethem?)
Toanswerthesequestions,youneedtounderstandthevCloudAPIXMLschemas.Theseschemasdefinea
numberofXMLtypes,
manyofwhichareextendedbyothertypes.ThevCloudAPIschemasalsouseand
extendtypesdefinedbytheOpenVirtualizationFormat.TheXMLelementsdefinedintheseschemas,along
withtheirattributesandcompositionrules(minimumandmaximumnumberofelementsorattributes,for
An Introduction to REST for vCloud
API Users
B

Table of Contents

Related product manuals