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 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.

A vCloud API client can expect a subset of HTTP status codes in a response.

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.

400 Bad Request

The request body is malformed, incomplete, or otherwise invalid.

401 Unauthorized

An authorization header was expected but not found.

403 Forbidden

The requesting user does not have adequate privileges to access one or more objects specified in the request.

404 Not Found

One or more objects specified in the request could not be found in the specified container.

405 Method Not Allowed

The HTTP method specified in the request is not supported for this object.

406 Not Acceptable

The resource identified by the request is only capable of generating response entities which have content characteristics not acceptable according to the accept headers sent in the request.

409 Conflict

The object state is not compatible with the requested operation.

415 Unsupported Media Type

The server is refusing to service the request because the entity of the request is in a format not supported by the requested resource for the requested method.

500 Internal Server Error

The request was received but could not be completed because of an internal error at the server.

504 Gateway Timeout

The server, while acting as a gateway or proxy, did not receive a timely response from the upstream server specified by the URI.