1.5

Table Of Contents
Example: Upload a Media Image
Request:
POST https://vcloud.example.com/api/vdc/5/media
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>
In addition to the File element that contains the upload:default URL, the response includes an Owner element
and several Link elements that the server creates.
Response:
Content-Type: application/vnd.vmware.vcloud.media+xml
201 Created
...
<Media
xmlns="http://www.vmware.com/vcloud/v1.5"
size="3121215488"
imageType="iso"
status="0"
name="database.iso"
id="urn:vcloud:media:254"
type="application/vnd.vmware.vcloud.media+xml"
href="https://vcloud.example.com/api/media/254" ... >
<Link
rel="up"
type="application/vnd.vmware.vcloud.vdc+xml"
href="https://vcloud.example.com/api/vdc/5" />
<Link
rel="remove"
href="https://vcloud.example.com/api/media/254" />
<Description>ISO database image</Description>
<Files>
<File
size="51242131"
bytesTransferred="0"
name="file">
<Link
rel="upload:default"
href="https://vcloud.example.com/transfer/.../file" />
</File>
</Files>
<Owner
...
</Owner>
</Media>
vCloud API Programming Guide
68 VMware, Inc.