VMware Live Cyber Recovery API Reference

VMware Live Cyber Recovery API Reference

The VMware Live Cyber Recovery (VLCR, formerly known as VMware Cloud Disaster Recovery) REST API provides access to the service’s major components, including the cloud file system, protected sites, protected VMs, protection groups, protection group snapshots, and Recovery SDDCs. This Preview release of the API contains only a subset of VMware Live Cyber Recovery's full functionality. Specifically, you can use this API to get a full list of each component type (listed above), and then get specific details about individual components.

Obtain an API Token. In order to use VMware Live Cyber Recovery APIs, you must obtain a VMware Cloud Services Platform (CSP) API Token from your web browser after logging in to the following page: https://console.cloud.vmware.com/csp/gateway/portal/#/user/tokens. The API token is then used to obtain an access token, which is used for all subsequent VMware Live Cyber Recovery REST API calls.

Exchange API Token for Access Token. All VMware Live Cyber Recovery API calls require a valid access token, which can be acquired programmatically using the following POST command where you pass the previously generated API token (“refresh token” and “API token” are used synonymously).

 curl -s -X POST \\
      -H "Content-Type: application/json" \\
      -H "Accept: application/json" \\
      https://console.cloud.vmware.com/csp/gateway/am/api/auth/api-tokens/authorize?refresh_token={refresh-token} 

This CSP API is defined at: https://console.cloud.vmware.com/csp/gateway/am/api/swagger-ui.html#/Authentication/getAccessTokenByApiRefreshTokenUsingPOST

VMware Live Cyber Recovery Orchestrator Name. Next, you must determine the fully-qualified domain name of your VMware Live Cyber Recovery Orchestrator. This is the same as the host name used in the VMware Live Cyber Recovery web-based UI, which takes the form of vcdr-xxx-xxx-xxx-xxx.app.vcdr.vmware.com.

Example API Call. Using your access token and your VMware Live Cyber Recovery Orchestrator name, you can make your first VMware Live Cyber Recovery REST API call. For example, this call illustrates getting all cloud file systems in your VMware Live Cyber Recovery organization.

 curl -s -X GET -H  "x-da-access-token: {access-token}" \\
      https://vcdr-xxx-xxx-xxx-xxx.app.vcdr.vmware.com/api/vcdr/v1alpha/cloud-file-systems 

To get more detailed information on a particular cloud file system, provide the cloud file system ID (provided by the above call) as follows.

 curl -s -X GET -H  "x-da-access-token: {access-token}" \\
      https://vcdr-xxx-xxx-xxx-xxx.app.vcdr.vmware.com/api/vcdr/v1alpha/cloud-file-systems/30326566-2201-3121-9cb9-42c6e465647c