After you initiate the upload of a file referenced by a vApp template, you can monitor the progress of the upload by periodically retrieving the vApp template and tracking the value of the file's bytesTransferred attribute.

To monitor the progress of an upload, you can watch the bytesTransferred attribute of the file. Each File element in the template includes a bytesTransferred attribute whose value indicates the number of bytes that the server received.

Verify that you initiated the upload of a file referenced by the vApp template.

1

Make a GET request specifying the URL of the vApp template.

See the request portion of Example: Monitoring the Progress of an Upload.

2

Compare the values of the size and the bytesTransferred attributes of each File element.

When these two values are equal, the file transfer is complete.

After all the files are uploaded, the response includes final values for the bytesTransferred attribute of each File, and a Task that tracks the events leading up to resolution of the template with the uploaded files, as shown in Example: Monitoring the Progress of an Upload.

Request:

GET https://vcloud.example.com/api/vAppTemplate/vappTemplate-268

The complete VAppTemplate body is returned. This example omits most of it for clarity.

Response:

200 OK
Content-Type: application/vnd.vmware.vcloud.vAppTemplate+xml
...
<VAppTemplate
   ...
   name="Ubuntu Template"
   id="urn:vcloud:vapptemplate:268"
   href="https://vcloud.example.com/api/vAppTemplate/vappTemplate-268"
   type="application/vnd.vmware.vcloud.vAppTemplate+xml" ... >
   ...
   <Files>
      ...
      <File
         size="1950489088"
         bytesTransferred="500000000"
         name="disk0.vmdk">
         <Link
            rel="upload:default"
            href="https://vcloud.example.com/transfer/.../disk0.vmdk"/>
      </File>
   </Files>
   ...
</VAppTemplate>