1.5

Table Of Contents
Procedure
1 Find the uploadVappTemplate link in the target vDC.
Retrieve the XML representation of the vDC using a request like the one shown in the request portion of
“Example: Deployment Information in a vDC,” on page 30. The response contains an
uploadVappTemplate link, which has the following form:
<Link
rel="add"
type="application/vnd.vmware.vcloud.uploadVAppTemplateParams+xml"
href="https://vcloud.example.com/api/vdc/5/action/uploadVAppTemplate" />
2 Create an UploadVAppTemplateParams element that specifies a name for the template.
The Description element is optional. Using it to provide a concise description of this object is a best
practice. See the request portion of “Example: Initiating the Upload,” on page 57.
3 (Optional) If the OVF package includes a manifest, include a manifestRequired="true" attribute in the
UploadVAppTemplateParams element.
Some OVF packages include a manifest document, which provides a checksum for each file in the package.
When the UploadVAppTemplateParams element includes a manifestRequired="true" attribute, the set of
File elements returned after you upload the OVF descriptor includes one for the manifest itself.
4 Make an HTTP POST request to the uploadVAppTemplate link that you retrieved in Step 1, supplying the
UploadVAppTemplateParams element in the request body.
See the request portion of “Example: Initiating the Upload,” on page 57.
5 Examine the response.
The response, a VAppTemplate element, contains a File element that specifies an upload URL for the
package's OVF descriptor. See the response portion of “Example: Initiating the Upload,” on page 57.
The server creates a new VAppTemplate object in the target vDC and returns the object's XML representation in
the response. See the response portion of “Example: Initiating the Upload,” on page 57.
Example: Initiating the Upload
This example assumes an OVF package that has no manifest.
Request:
POST https://vcloud.example.com/api/vdc/5/action/uploadVAppTemplate
Content-Type: application/vnd.vmware.vcloud.uploadVAppTemplateParams+xml
...
<?xml version="1.0" encoding="UTF-8"?>
<UploadVAppTemplateParams
name="Ubuntu Template"
xmlns="http://www.vmware.com/vcloud/v1.5"
xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1">
<Description>Ubuntu vApp Template</Description>
</UploadVAppTemplateParams>
Response:
201 Created
Content-Type: application/vnd.vmware.vcloud.vAppTemplate+xml
...
<VAppTemplate
xmlns="http://www.vmware.com/vcloud/v1.5"
xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1"
Chapter 4 Provisioning an Organization with vApps, Templates, and Media
VMware, Inc. 57