1.5

Table Of Contents
Example: Versions Request and Response
The api/versions request does not need to be authenticated. The response, a small subset of which is shown
here, includes a VersionInfo element for each API version that the server supports. Each VersionInfo element
contains:
n
A LoginUrl element that contains the URL to which a client can make a login request to access that version
of the vCloud API. See “Logging In,” on page 24.
n
MediaTypeMapping elements for each complex type supported by that version of the vCloud API.
Request:
GET http://vcloud.example.com/api/versions
Response:
200 OK
Content-Type: text/xml
...
<SupportedVersions
xmlns="http://www.vmware.com/vcloud/versions"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.vmware.com/vcloud/versions
http://vcloud.example.com/api/versions/schema/versions.xsd">
<VersionInfo>
<Version>1.0</Version>
<LoginUrl>https://vcloud.example.com/api/login</LoginUrl>
<MediaTypeMapping>
<MediaType>application/vnd.vmware.vcloud.catalog+xml</MediaType>
<ComplexTypeName>CatalogType</ComplexTypeName>
<SchemaLocation>http://vcloud.example.com/api/v1.0/schema/master.xsd</SchemaLocation>
</MediaTypeMapping>
<MediaTypeMapping>
...
</MediaTypeMapping>
</VersionInfo>
<VersionInfo>
<Version>1.5</Version>
<LoginUrl>https://vcloud.example.com/api/sessions</LoginUrl>
<MediaTypeMapping>
<MediaType>application/vnd.vmware.vcloud.catalog+xml</MediaType>
<ComplexTypeName>CatalogType</ComplexTypeName>
<SchemaLocation>http://vcloud.example.com/api/v1.5/schema/master.xsd</SchemaLocation>
</MediaTypeMapping>
<MediaTypeMapping>
...
</MediaTypeMapping>
...
</VersionInfo>
</SupportedVersions>
NOTE You can use the URL in the SchemaLocation element with a GET request to retreive the file in which that
complex type is defined. For example:
GET http://vcloud.example.com/api/v1.5/schema/master.xsd
Chapter 3 Exploring a Cloud
VMware, Inc. 43