User`s guide
vCloud API REST Requests
To retrieve object representations, clients make HTTP requests to object references. The server supplies these
references as href attribute values in responses to GET requests.
Every cloud has a well-known URL from which an unauthenticated user can retrieve a SupportedVersions
document, which lists each version of the of vCloud API that the server supports. For each version, the response
lists the names and MIME types of the complex types defined in the version's XML namespace, and the version
login URL. A system administrator can use that URL to authenticate to the cloud by logging in to the System
organization. An authenticated user can discover other vCloud API URLs by making GET requests to URLs
retrieved from the login response, and the URLs contained in responses to those requests.
Requests are typically categorized in terms of the type of requested operation: create, retrieve, update, and
delete. This sequence of verbs is often abbreviated with the acronym CRUD.
Table 1-2. CRUD Operations Summary
Operation Type HTTP Verb Operation Summary
Create POST Creates a new object.
Retrieve GET Retrieves the representation of an
existing object.
Update PUT Modifies an existing object.
Delete DELETE Deletes an existing object.
vCloud API REST Responses
All responses include an HTTP status code and, unless the status code is 204 (No Content), a Content-Type
header. Response content depends on the request. Some responses include a document body, some include
only a URL, and some are empty.
Response Content
Response content depends on the requested operation. The response to a GET request is typically the complete
representation of an existing object. The response to a PUT or POST request always contains values for the
href, name, and id attributes of the object being created or updated. It also contains at most one Task element
that you can retrieve to track the progress of the operation. When the Task completes with a status of
success, a GET request to the object's href returns all properties of the object. If the Task completion status is
not success, the object is in an indeterminate state, and should be deleted.
HTTP Response Codes
A vCloud API client can expect a subset of HTTP status codes in a response.
Table 1-3. HTTP Status Codes that the vCloud API Returns
Status Code Status Description
200 OK The request is valid and was completed. The response
includes a document body.
201 Created The request is valid. The requested object was created and
can be found at the URL specified in the Location header.
202 Accepted The request is valid and a task was created to handle it. This
response is usually accompanied by a Task element.
204 No Content The request is valid and was completed. The response does
not include a body.
vCloud SDK for PHP Developer's Guide
16 VMware, Inc.