VMware, Inc. 141
8
ThevCloud APIrepresentsobjectsinavCloudasXMLdocumentsinwhichobjectpropertiesareencodedas
elementsandattributeswithtypedvaluesandanexplicitobjecthierarchydefinedbyanXMLschema.This
chapterprovidesreferenceinformationabouthowthevCloud APIusesXMLtorepresentvCloudobjects.
Thischapterincludes
thefollowingtopics:
“A b o u t ObjectRepresentations”onpage 141
“CommonDatatypes”onpage 142
“CommonAttributes”onpage 143
“CommonElements”onpage 146
“A P I Versioning”onpage 147
“Extensibility”onpage 148
About Object Representations
ClientprogramsofRESTfulWebservicesmustbeabletorequestobjectrepresentationsfromtheserver,parse
theserver’sresponsestoextracttheinformationtheycontain,andcomposerequeststhat,inmanycases,are
basedontheinformationextractedfromaresponse.Developersofsuchclientsmustunderstandthestructure
of
eachrepresentationthatmightbepartofarequestorresponse,aswellasanyrequirementsthatthenetwork
protocol(HTTP)placesonclient‐serverinteraction.Inthisguide,referenceinformationoneachobject
representationincludestheXMLschemaoftheelementthatrepresentstheobject,theobjecttype(encoded
as
theMIMEcontenttypeoftherequestorresponse),andaprototypeoftheobjectreference(aURL).
Schema
EachvCloud APIobjectisdefinedinanXMLschemadocument.Someobjectsaredefinedintheirownschema
documents.Othersaredefinedinthecontextofthelargerschemainwhichtheyareused.Stillothersare
definedinacommonschemadocument,fromwhichotherschemasinherit.Thisguidepresents
reference
informationaboutXMLschemasintabularform,asshowninTable 8‐1.
XML Representations in the
vCloud API
8
Table 8-1. Schema Reference Table Columns
Name Min Max Type Description
Nameofanelementor
attributecontained.
Elementnamesbegin
withanuppercase
character.Attribute
namesbeginwitha
lowercasecharacter.
Minimumnumberof
thisattributeor
elementrequiredby
theschema.
Maximumnumberof
thisattributeor
elementallowedbythe
schema.Avalueofn
meansthatthe
maximum
numberis
unlimited.
Typeoftheattributeor
element,eithera
primitiveXML
datatypeoracomplex
typedefinedbythe
vCloud API.
Descriptionofthe
attributeorelement