vCloud API Programming Guide
42 VMware, Inc.
Upload OVF to Create a vApp Template
AvCloudAPIclientthathasaccesstoanOVFpackagecanuseasimpleworkflowtouploadthepackageand
createavApptemplate.
1TheclientPOSTsaninitialrequestthatspecifiesanameforthetemplate,atransferformatforthedata,
andanoptionaldescription.
2Theserverreturnsan
unresolved(status="0")vAppTemplatedocumentthatincludesanuploadURL
fortheOVFpackage.
3TheclientusesanHTTPPUTrequesttouploadtheOVFpackagedescriptor(the .ovffile)totheupload
URL.
4TheserverreadsthedescriptorandconstructsacompletevAppTemplatedocument(onethatincludesan
uploadURLfor
eachfilelistedintheReferencessectionofthedescriptor).Whiletheserverisconstructing
thisdocument,theclientmakesperiodicrequestsforitandexaminestheresponseforadditionalupload
URLs.WhentheresponsecontainsanyuploadURLsbeyondtheonereturnedinStep2,templateis
complete
5Theclient
usesHTTPPUTrequeststouploadeachofthefiles.
6IftheOVFpackageincludesamanifestfile,theentireuploadisvalidatedagainstthecontentsofthe
manifestfile.
EnableavAppTemplatefor
Download
POSTAPI‐URL/vAppTemplate/
vAppTemplate‐id/action/enableDownload
None Task
DisableavAppTemplate
forDownload
POSTAPI‐URL/vAppTemplate/
vAppTemplate‐id/action/disableDownload
None 204No
Content
Uploada MediaImage POSTAPI‐URL/vdc/id/media Media Media
CopyorMoveaMedia
Image
POSTAPI‐URL/vdc/id/action/cloneMedia CloneMediaParams Media
CopyorMoveavApp
Template
POSTAPI‐URL
/vdc/id/action/
cloneVAppTemplate
CloneVAppTemplateParams VAppTemplate
CopyorMoveavApp POSTAPI‐URL/vdc/id/action/cloneVApp CloneVAppParams VApp
ChangetheNameor
Descriptionofa
vAppTemplate
PUTAPI‐URL/vAppTemplate/vappTemplate‐id VAppTemplate Task
ChangetheNameor
DescriptionofavApp
PUTAPI‐URL/vApp/vapp‐id VApp Tas k
ChangetheNameor
DescriptionofaMedia
Image
PUTAPI‐URL/media/id Media Task
DeleteavAppTemplate,
vApp,orMediaImage
DELETEobject‐URL None Task
AddanItemtoaCatalog POSTAPI‐URL/catalog/id/catalogItems CatalogItem CatalogItem
RemoveanItemfroma
Catalog
DELETEAPI‐URL/
catalog/id/catalogItem/id
None 204Nocontent
ControlAccesstoCatalogs POST
API‐URL/catalog/id/action/
controlAccess
ControlAccessParams ControlAccess
Params
Table 4-1. Summary of Provisioning Requests (Continued)
Operation Request Request Body Response