VMware Cloud Provider Lifecycle Manager API

1.4

VMware Cloud Provider Lifecycle Manager API overview

The VMware Cloud Provider Lifecycle Manager API is a single REST API that provides functionality to deploy and manage products supported by VMware Cloud Provider Lifecycle Manager: VMware Cloud Director, vCloud Usage Meter and vRealize Operations Manager Tenant App.

The API works similarly for each product and thus provides similar functionality and experience.

In order to get started with the VMware Cloud Provider Lifecycle Manager API, VMware Cloud Provider Lifecycle Manager should be set up and running first. A REST client (e.g. Postman) is recommended to be used to interact with the API directly, if the API is not integrated within existing scripts or automation.

Generally, each API call requires that a valid JSESSION token is passed as a header 'JSESSIONID'.
The token has to be retrieved once via API call and is then valid for a certain time (default 15 minutes).

Retrieve Build and API version

VMware Cloud Provider Lifecycle Manager API supports API versioning, so that new functionality can be introduced with new API versions. Old API versions might get deprecated eventually.

In order to make sure the latest API version is used, the following API request can be made to retrieve version information.

Method: GET

URL: https://{{host}}:{{port}}/api/about

The response contains version information about the VMware Cloud Provider Lifecycle Manager, as well as the supported API versions.

Authentication

To get a valid JSESSIONID from VMware Cloud Provider Lifecycle Manager, the following request should be executed.

Method: POST
URL: https://{{host}}:{{port}}/api/v2/session

Headers: "Content-Type": "application/json"

Body:

{  
    "username": "{{VCPLCM_USER}}",  
    "password": "{{VCPLCM_PASSWORD}}"  
}  

If the provided credentials can be validated successfully, the JSESSIONID is returned in the response body.

Example response:

{  
    "JSESSIONID":"123ABC456DEF789GHI"  
}  

Authentication with OAUTH token

An alternative authentication approach to the JSESSIONID is to acquire an oauth token and providing it with every subsequent REST request.
To retrieve a token, the following request should be executed:

Method: POST
URL: https://{{host}}:{{port}}/api/v2/login

Headers: "Content-Type": "application/json"

Body:

{  
    "username": "{{VCPLCM_USER}}",  
    "password": "{{VCPLCM_PASSWORD}}"  
}  

If the provided credentials can be validated successfully, the token is returned in the response body.

Example response:

{  
    "token": "123ABC456DEF789GHI_123ABC456DEF789GHI-123ABC456DEF789GHI_123ABC456DEF789GHI"  
}  

This token should be provided with the Authorization header in all subsequent requests:
Header: "Authorization": "Bearer <the_token>"

About VMware Cloud Provider Lifecycle Manager API

After acquiring a valid session ID, other API requests can be performed to interact with VMware Cloud Provider Lifecycle Manager.
The API is versioned, having the API version specified in the URL. Check the unversioned and unauthenticated "about" request to retrieve the latest available version.

The VMware Cloud Provider Lifecycle Manager API is structured in the following categories:

  • Datacenter: Requests to register, modify an existing datacenter component (vCenter, NSX-T or vROPS) in VCP LCM.
  • Environment: Requests to deploy or register products using VCP LCM, as well as retrieving information about deployed instances.
  • Product: Requests to perform day-2 operations for deployed products, such as upgrade, manage certificates or manage nodes.
  • Task: Requests to retrieve or cancel tasks in VCP LCM.
 

Related Documentation