Cloud Director Appliance API

Cloud Director Appliance API

The Cloud Director Appliance API can be used to get and change the state information of your Cloud Director appliances. The API is only accessible on port 5480.
Note: This API only returns JSON formatted data.

Authentication

You can authenticate using the HTTP Basic auth for each request or you can use a Bearer Token, which you can retrieve from the sessions api below. For Basic auth, the "root" user must be used for authentication. No other headers are required.

Asynchronous operations

The appliance processes asynchronous operations received through a POST request. The tasks associated with these operations are unique to that appliance and are identified by the task IDs. In these cases, the server responds with an HTTP Response code 202 and an empty body. The tracking task is linked via the URI provided in the Location header.
The caller must be prepared to handle responses to API calls by inspecting the HTTP Response code.
Tasks are not persisted upon appliance reboot. Tasks are also relative to the appliance that the request was sent to – if a POST was sent to appliance A, then appliance B won't know about it and cannot be queried.

Error Conditions

All operations report errors using the following vCD error reporting rules:
  • 401: Bad Request - If user is unauthenticated or their session has expired
  • 403: Forbidden - If the user is not authorized or the entity does not exist
  • 404: Not Found - In event of incorrect request due to incorrect data or other user error

OpenAPI Design Concepts and Principles

  • vCloud OpenAPI's Content-Type is always application/json
  • Each feature has a version in the path element present in its URL.
    Note: API URL's without a version in their paths must be considered experimental, and, as such, may change in backwards incompatible ways.
  • Example of a valid API URL: https://192.0.2.10:5480/api/1.0.0/sessions

SystemSetup API Request Body - Samples

  • The SystemSetup API requires a unique request body that must match the appliance's deployment type.
  • The examples are provided here, and not with this specific api's definition below, due to a limitation in OpenApi 2.0 for support of discriminators.

{
    "applianceType": "primary",
    "storage": {
        "nfs": "192.168.100.1:/data/transfer"
    },
    "appliance": {
        "dbPassword": "vcloud",
        "ceip": true
    },
    "sysAdmin": {
        "username": "administrator",
        "password": "secret-password",
        "fullName": "cloud administrator",
        "email": "my-email@my-company.com"
    },
    "installation": {
        "name": "vcd5",
        "id": 5
    }
}

{
    "applianceType": "standby",
    "storage": {
        "nfs": "192.168.100.1:/data/transfer"
    }
}

{
    "applianceType": "cell",
    "storage": {
        "nfs": "192.168.100.1:/data/transfer"
    }
}