5.5

Table Of Contents
n
You know the URL of the target VDC that will receive the upload. Retrieve the XML representation of
your organization to see a list of the VDCs that it contains.
Review the contents of the Envelope element in the descriptor file of your OVF package. Several properties
in this file have implications for the InstantiateOvfParams request body you must construct to initiate the
upload.
Procedure
1 Retrieve the XML representation of the target VDC.
2 Examine the response to locate the Link element that contains the URL for creating a vApp from an
OVF package.
This element has a rel attribute value of add and a type attribute value of
application/vnd.vmware.vcloud.instantiateOvfParams+xml, as shown here:
<Link
rel="add"
type="application/vnd.vmware.vcloud.instantiateOvfParams+xml"
href="https://vcloud.example.com/api/vdc/44/action/instantiateOvf" />
3 Create an InstantiateOvfParams request body.
See the request portion of “Example: Create a vApp From an OVF Package,” on page 99.
4 POST the InstantiateOvfParams to the instantiateOvf URL you retrieved in Step 2
See the request portion of “Example: Create a vApp From an OVF Package,” on page 99.
5 Examine the response.
The response, a VApp element, contains a File element that specifies an upload URL for the OVF
descriptor. See the response portion of “Example: Create a vApp From an OVF Package,” on page 99
6 Upload the OVF descriptor.
Make a PUT request to the upload URL in the VApp. The upload URL for the OVF descriptor is in a Link
element with the following form:
<Link
rel="upload:default"
href="https://vcloud.example.com/transfer/.../descriptor.ovf" />
Supply the OVF descriptor as the request body. The OVF descriptor contains a single Envelope element.
7 Retrieve the remaining upload URLs
a Retrieve the VApp.
b Verify that the value of the ovfDescriptorUploaded attribute is true.
c Examine the VApp to find the upload URLs for the files referenced in the OVF descriptor.
These URLs are contained in Link elements where rel="upload:default".
8 Upload the referenced files.
You can follow the progress of the upload by retrieving the vApp and noting the progress of the
embedded Task.
After all of the referenced files are uploaded, the VApp element no longer includes an embedded Task. The
vApp is placed in the power and deployment state that the values of the powerOn and deploy attributes
specify in the request body.
vCloud API Programming Guide
98 VMware, Inc.