The VMware Cloud Director API Programming Guide includes many examples of HTTP requests and responses. These examples show the workflow and content associated with operations such as browsing, provisioning, and managing your cloud and its contents, and operating virtual systems.
The vCloud Air Compute Service Programming Guide includes many examples of HTTP requests and responses. These examples show the workflow and content associated with operations such as browsing, provisioning, and managing your tenant organization and the compute, networking, and storage functionality that is available to it.
Example requests generally conform to the rules listed in Request Bodies. Most example responses show only those elements and attributes that are relevant to the operation being discussed. Ellipses (…) indicate omitted content within response bodies. Several additional conventions apply.
- The HTTP
Accept
header, which is required in all requests, is omitted from most examples. See API Versions for more about this header and how it is used by the VMware Cloud Director API. - Authorization headers such as
x-vcloud-authorization
are omitted from most examples. See VMware Cloud Director API REST Requests for more about how authorization headers are used by the VMware Cloud Director API. - All other request headers required by the VMware Cloud Director API are included in example requests that are not fragments of some larger example. Although the examples show these strings using the character case in which the implementation defines them, header names and values are case-insensitive, and can be submitted or returned in any character case. Other HTTP headers, such as
Date
,Content-Length
, andServer
, are omitted because they are not relevant to the specifics of any example. - The XML version and encoding header
is included in example requests but omitted from example responses.<?xml version="1.0" encoding="UTF-8"?>
- In most examples, object IDs shown in href attribute values appear as small integers, for example
vapp-7
ororg/3
. In the VMware Cloud Director API that VMware Cloud Director supports, object IDs are universal unique identifiers (UUIDs) as defined by RFC 4122, for examplevapp-f5e185a4-7c00-41f1-8b91-0e552d538101
ororg/89a1a8f9-c518-4f53-960c-950db9e3a1fd
. Examples that show Role or Right objects use the actual UUIDs for roles and rights, which are invariant across installations. - When you access an object represented by the VMware Cloud Director API through the Compute Service in vCloud Air Virtual Private Cloud OnDemand, the access to the object is expressed in the URL returned as the href of the object. The URL has the form API-URL/object-type/id, where
- API-URL has a form that includes the vCloud Air region, such as https://vCloud-Air-region.vchs.vmware.com/api/compute/api
- object-type is a string indicating the type of the object
- id is the object ID
REST API examples in vCloud Air Compute Service Programming Guide | Compute Service API |
---|---|
https://vcloud.example.com/api/... |
https://vCloud-Air-region.vchs.vmware.com/api/compute/api Such as https://uk-slough-1-6.vchs.vmware.com/api/compute/api/... or https://us-virginia-1-4.vchs.vmware.com/api/compute/api/... |
Required Roles and Rights
Where a topic includes an example, it specifies a prerequisite role that normally has the rights required to run the example. Some examples can be run by roles with fewer rights, or different rights. The prerequisite role might include more rights than the minimum subset required.