EasyManuals Logo

VMware VCLOUD API 1.0 - API User Manual

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
Page #17 background imageLoading...
Page #17 background image
VMware, Inc. 17
Chapter 1 Introducing the VMware vCloud API
Linksprovideawayfortheservertoinformaclientaboutobjectrelationshipsandtheoperationsthatobjects
support.Forexample,acontainersuchasanorganizationorcatalogcanreturnlinkstotheobjectsitcontains,
andavirtualsystem(avApporVm)cancontainactionlinks
thatenableoperationssuchaspowerstatechanges
orvirtualdevicereconfiguration.Linkstoactionsandcontainedobjectsareomittedfromresponsesifthe
requestwasmadebyauserwhohasinsufficientprivilegestoaccesstheobjectorperformtheaction.Action
linksarealsoomittedwhentheactioncannot
beperformed(poweringonavirtualmachinethatisalready
poweredon,forexample).
vCloud Client Workflow Overview
ClientsofthevCloudAPIimplementaRESTfulworkflow,makingHTTPrequeststotheserverandretrieving
theinformationtheyneedfromtheserversresponses.
Requests
ClientsmakeHTTPrequeststovCloudURLs,hrefattributevalueswhicharetypicallyprovidedbytheserver
inresponsetoGETrequestsbytheclient.EveryvCloudhasawellknownURLfromwhichaclientcangetthe
serversloginURLandthelistofvCloudAPIversionsthatthe
serversupports,alongwithadditional
information(see“AP I Versioning”onpage 147).Afteraclienthasloggedin,allvCloudAPIURLscanbe
discoveredbymakingGETrequeststoURLslistedintheloginresponseandtheURLscontainedinresponses
tothoserequests.
Request Headers
Allrequestsfromauthenticatedclientsmustincludeanauthenticationheader.SeeAuthentication”on
page 18.
RequeststhatincludeadocumentbodymuststartwiththeappropriateHTTPContentTypeheader.Thetype
attributeofaresponsebodyindicatesthecontenttypeofthedocument.Forexample,thisresponsefragment
indicatesthatthe
contenttypeassociatedwithaCatalogItem entityis
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"/>
AnyrequestthatincludesaCatalogItemrequiresthefollowingContentTypeheader:
Content-Type: application/vnd.vmware.vcloud.catalogItem+xml
Whenitappearsas thevalueofaContentTypeheaderorthetypeattributeofanelementinthevCloudAPI,
thisstringiscaseinsensitiveinrequests,andcanbereturnedineithermixedcaseorlowercasecharactersin
responses.
Formoreinformation,see“ContentTypeonpage 142.
Request Bodies
ThisreleaseofCloudDirectorusesavalidatingXMLparserthatrequireselementsinarequestbodytoagree
inbothorderandnumberwiththeschema.Requestbodiesarerejectedasinvalidunlesstheymeetthe
followingcriteria:
XMLnamespaceattributesmustbesuppliedforallnamespacesrepresentedbyelementsintherequest.
See“XMLNamespaceIdentifiers”onpage 145.
Ifmultiplenamespacesarerepresentedintherequest,XMLnamespaceattributesmustincludean
identifyingprefix,andthatprefixmustbeusedwithelementsfromthatnamespace.See“XML
NamespacePrefixesinRequestandResponseBodies”onpage 146.
N
OTEWhenaclientusesalinktoreferenceanobject,onlythehrefattributeisrequired.Thenameandtype
areignored.

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the VMware VCLOUD API 1.0 - API and is the answer not in the manual?

VMware VCLOUD API 1.0 - API Specifications

General IconGeneral
BrandVMware
ModelVCLOUD API 1.0 - API
CategorySoftware
LanguageEnglish

Related product manuals