vCloud Application Director 6.0 supports REST API 2.0, the notification registration and export and import application packages REST API 1.0. All of the remaining REST APIs in REST API 1.0 are not supported.

Before you implement the REST APIs for automation purposes, verify the availability of application blueprints in the vCloud Application Director appliance user interface. You can also use the CLI to import application blueprints from vCloud Application Director 5.0 and 5.2 to the vCloud Application Director 6.0 appliance or between different vCloud Application Director 6.0 appliances.

Note

If an application blueprint is modified, create a deployment profile that includes the changes for the REST API to use.

You must download and install a REST client application in your Web browser to make HTTP requests. The REST client must use valid user credentials to access the vCloud Application Director server.

Important

You cannot simultaneously use the REST client application on a Web browser tab and log in to vCloud Application Director appliance on another Web browser tab.

Use Basic Auth to authenticate with the vCloud Application Director server. Set Content-type and Accept HTTP headers to application/json in the REST client application.

To use REST APIs in a different group you must add a special HTTP header called darwin-user-current-group. The value of the header should be the name of that group otherwise the REST API uses the current user group. Always use this header so that the REST API behavior is not affected when the current group is changed in the CLI or vCloud Application Director user interface by the logged in user. Without this header the REST API might become inconsistent.

All of the URIs in REST API 2.0 have the prefix https://ApplicationDirectorServerIP:8443/darwin/api/2.0.

The REST API manages a set of resources, all of which are uniquely identifiable through a string identifier. The API also manages a collection of these resources. For example, the URI for a single resource instance can be https://ApplicationDirectorServerIP:8443/darwin/api/2.0/ResourceTypeID. The collection of the resource might return one or more different URIs.

For a sample deployment environment instance with an ID=5, the URI is https://ApplicationDirectorServerIP:8443/darwin/api/2.0/deployment-environment/5. In this example, the URIs refer to a different collection of deployment environments https://ApplicationDirectorServerIP:8443/darwin/api/2.0/deployment-environment?page=1&page-size=5 and https://ApplicationDirectorServerIP:8443/darwin/api/2.0/cloud-provider/4/deployment-environment.

List of Resources and Corresponding URIs

Resource Name

Resource URI

Certificate

.../certificate/CertificateID

Cloud Provider Type

.../cloud-provider-type/CloudProviderTypeID

Cloud Provider

.../cloud-provider/CloudProviderID

Deployment Environment

.../deployment-environment/DeploymentEnvironmentID

Application

.../application/ ApplicationID

Application Version

.../application-version/ApplicationVersionID

Logical Template Version

…/logical-template-version/LogicalTemplateVersionID

Service Version

.../service-version/ServiceVersionID

Operating System Version

.../operating-system-version/OperatingSystemVersionID

Tag

.../tag/TagID

Deployment Profile

.../deployment-profile/DeploymentProfileID

Blueprint

.../blueprint/BlueprintID

Cloud Template

.../registered-physical-template/RegisteredPhysicalTemplateID

Deployment

.../deployment/DeploymentID

Deployment Task

.../deployment-task/DeploymentTaskID

Update Profile

.../update-profile/UpdateProfieID

Group

.../group/current

REST APIs use references to resources and resource collections wherever possible to keep the data size concise and tractable. The vCloud Application Director REST API supports the following types of references.

Resource References

Point to existing resources. They include the identifier of the resource, the name of the resource, and the relative URI used to access the resource.

List References

Point to a collection of resources. List references include only a relative URI that returns a list of resources.

External References

Point to items that are external to vCloud Application Director. They include an identifier that points to an external item such as a cloud template and the name of the external resource.

The REST APIs support the following HTTP methods.

GET

Retrieve data.

POST

Modify data, perform an action, or create an object.

PUT

Modify or replace data.

DELETE

Delete data.