5.5

Table Of Contents
Request:
POST https://vcloud.example.com/api/catalog/32/action/upload
Content-Type: application/vnd.vmware.vcloud.media+xml
...
<?xml version="1.0" encoding="UTF-8"?>
<Media
xmlns="http://www.vmware.com/vcloud/v1.5"
name="database.iso"
size="51242131"
imageType="iso">
<Description>ISO database image</Description>
</Media>
Response:
201 Created
Content-Type: application/vnd.vmware.vcloud.catalogItem+xml
...
<CatalogItem
xmlns="http://www.vmware.com/vcloud/v1.5"
name="database.iso"
id="urn:vcloud:catalogitem:221"
href="https://vcloud.example.com/api/catalogItem/221" ... >
<Link
rel="up"
type="application/vnd.vmware.vcloud.catalog+xml"
href="https://vcloud.example.com/api/catalog/32" />
<Link
rel="down"
type="application/vnd.vmware.vcloud.metadata+xml"
href="https://vcloud.example.com/api/catalogItem/221/metadata" />
<Link
rel="edit"
type="application/vnd.vmware.vcloud.catalogItem+xml"
href="https://vcloud.example.com/api/catalogItem/221" />
<Link
rel="remove"
href="https://vcloud.example.com/api/catalogItem/221" />
<Description>Approved template for public FTP sites</Description>
<Entity
type="application/vnd.vmware.vcloud.media+xml"
name="database.iso"
href="https://vcloud.example.com/api/media/254" />
</CatalogItem>
Examine the response to the action/upload request, then make a GET request to the URL in the Entity
element of the CatalogItem to retrieve the Media object.
GET https://vcloud.example.com/api/media/254
The Media object includes an upload URL for the media file itself.
<Media ... >
...
<Files>
<File
name="database.iso"
bytesTransferred="0">
Chapter 4 Provisioning an Organization
VMware, Inc. 73