[{"label":"Latest (1.0.0alpha)","version":"latest"}]
vcdr

VMware Cloud Disaster Recovery API Reference latest

The VMware Cloud Disaster Recovery (DR) 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 Cloud DR'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 Cloud DR 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 Cloud DR REST API calls.

Exchange API Token for Access Token. All VMware Cloud DR 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 Cloud DR Orchestrator Name. Next, you must determine the fully-qualified domain name of your VMware Cloud DR Orchestrator. This is the same as the host name used in the VMware Cloud DR 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 Cloud DR Orchestrator name, you can make your first VMware Cloud DR REST API call. For example, this call illustrates getting all cloud file systems in your VMware Cloud DR 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 


[{"label":"Latest (1.0.0alpha)","version":"latest"}]
vcdr
Feedback

Was this page helpful?