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

VMware vSphere Replication REST API Gateway 1.0.0

VMware vSphere Replication REST API Gateway provides API access to the vSphere Replication functionality, so that you can programmatically protect your virtual machines.

Getting started with REST API

Step 1 - Authenticate to the API Endpoint

Create a session ID using the following API:

POST Login

You have been authenticated and have retrieved your API session ID.

Step 2 - Use the session ID in subsequent calls

On subsequent API calls, include the session ID returned in step 1 using an HTTP header, as follows:

x-dr-session: MDYzYmJlZTEtMDhhMC00M2Q3LWE0YWUtNjI2Y2I3ZThjZjVi

Step 3 - Get VR Pairings

Get a list of all existing pairings by using this API:

GET Get VR Pairings

Step 4 - Create a Remote Session

Create a session in the remote vCenter Server and the Site Recovery Manager server.

a. Include the session ID using an HTTP header.

x-dr-session: MDYzYmJlZTEtMDhhMC00M2Q3LWE0YWUtNjI2Y2I3ZThjZjVi

b. Include the Authorization using an HTTP header.

Authorization: Basic <credentials>

For “Basic” authentication, construct the credentials by first combining the username and the password with a colon (aladdin:opensesame), and then by encoding the resulting string in base64 (YWxhZGRpbjpvcGVuc2VzYW1l).

Authorization: Basic YWxhZGRpbjpvcGVuc2VzYW1l
POST Create Remote Session

Step 5 - Get All Replications

You have been authenticated to the local and remote sites and have retrieved your API session ID. You can now get a list of all incoming or outgoing replications from a vCenter Server by using this API:

GET Get All Replications

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

Was this page helpful?