VMware Cloud Director Availability vSphere DR and Migration API Reference
Overview
The Programming Guide provides information about the VMware Cloud Director Availability REST APIs, including how to use the API services and resources, how to authenticate and construct REST API calls.
The guide focuses on common use cases.
HTTP verbs
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.
This API closely adheres to standard HTTP and REST conventions in the HTTP verbs usage.
GET
Retrieve a resource.POST
Create a new resource.PUT
Replace an existing resource.PATCH
Update an existing resource, including partial update.DELETE
Delete an existing resource.
HTTP status codes
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.
This API closely adheres to standard HTTP and REST conventions in the HTTP status codes usage.
200 OK
The request is valid and is completed. The response includes a document body.201 Created
The request is valid. The requested object is created and can be found at the URL specified in theLocation
header.204 No Content
The request is valid and an update to an existing object is successfully applied. The response does not include a body.400 Bad Request
The request body is malformed, incomplete, or otherwise invalid. The response body includes an error that provides additional information.404 Not Found
The requested object does not exist.
Errors
When returning an error response (status code >=400), the response body contains a JSON object describing the problem.
The JSON error contains the following structure:
HTTP/1.1 403 Forbidden Content-Type: application/vnd.vmware.h4-v4.7+json;charset=UTF-8 Content-Length: 97
{ "code" : "Forbidden", "msg" : "Permission denied.", "args" : [ ], "stacktrace" : null }
code : String
A unique error identifier, for exampleNotAuthenticated
.msg : String
A detailed message.args : Array
Additional parameters.stacktrace : String
Stacktrace.
Operation IDs
By setting a value for 'operationID' in the HTTP header, you can trace an operation across all services.
Request headers
operationID
A string used as an identifier for tracing an operation in the logs across services.
Request structure
GET /config/is-configured HTTP/1.1
operationID: 2bfb7696-3aa1-49d3-bb40-d9e97df1baba
Accept: application/vnd.vmware.h4-v4.7+json;charset=UTF-8
X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI=
Host: localhost:8044
Example request
$ curl 'https://localhost:8044/config/is-configured' -i -X GET \
-H 'operationID: 2bfb7696-3aa1-49d3-bb40-d9e97df1baba' \
-H 'Accept: application/vnd.vmware.h4-v4.7+json;charset=UTF-8' \
-H 'X-VCAV-Auth: PV8CplzIzWIe9BD9ayirWT6JNgI='