[{"label":"Latest (1.0.0)","version":"latest"}]
vsphere-replication-api

Configure Replication

Description

Use this workflow to configure a replication.


1. Search for VMs that are suitable for a replication.
GET /{pairing_id}/vcenters/{vcenter_id}/vms
 - Query parameter suitable_for_replication should be true
2. Choose VMs.
3. For each VM, get disks:
GET /{pairing_id}/vcenters/{vcenter_id}/vms/{vm_id}/disks
4. Optionally, for each VM, check capabilities if replication is supported and what are the supported replication settings:
GET /{pairing_id}/vcenters/{vcenter_id}/vms/{vm_id}/capability
5. Request storage policies at the target vCenter Server:
GET /{pairing_id}/vcenters/{vcenter_id}/storage-policies
6. Choose a storage policy. If default storage policy will be used, then set destination_storage_policy_id in the resulting ConfigureReplicationSpec to null.
7. Search for possible target datastores at the target vCenter Server:
GET /{pairing_id}/vcenters/{vcenter_id}/datastores
8. Choose a target datastore.
9. Optionally check the selected target datastore’s compliance against the selected target storage policy.
POST /{pairing_id}/vcenters/{vcenter_id}/storage-policies/{storage_policy_id}/actions/check-compliance
 - Pass the chosen datastore IDs as a body to the endpoint
10. Optionally search for seeds at the target vCenter Server for the chosen target datastore from step 8:
 a. POST /{pairing_id}/vcenters/{vcenter_id}/datastores/{datastore_id}/actions/find-seeds
 - Pass spec based on the VM disks retrieved in step 3
 b. Or browse the datastore to select manually seed folder/file
POST /{pairing_id}/vcenters/{vcenter_id}/datastores/{datastore_id}/actions/browse
 - Pass spec for specific type and path of files/folders
11. Construct ConfigureReplicationSpec.
12. Create a replication.
POST /{pairing_id}/replications

Request

Request

URL

URL


post
https://{api_host}//pairings/{pairing_id}/replications
Copy

Path Parameters

Path Parameters

string
pairing_id Required

The ID of the pairing between this vSphere Replication server and the remote one.


Request Body

Request Body

array of ConfigureReplicationSpec of mimetype application/json Optional

List of replication settings to replicate VMs.

{
    "target_vc_id": "ff4a23e7-2fed-4be0-be39-479ae372badd",
    "vm_id": "VirtualMachine:vm-80:e594ad24-5f75-41e3-a276-88a2116dbed0"
}
boolean
network_compression_enabled Required

Use network compression for replication traffic.


disks Required

A VM disk with a destination path, a disk format, a storage policy, and the replication status.


boolean
lwd_encryption_enabled Required

Specify whether LWD encryption is enabled for this replication.


string
target_vc_id Required

An ID of the target VC server.


boolean
mpit_enabled Required

Point-in-time recovery enabled


integer as int64
rpo Required

Target RPO in minutes.


boolean
auto_replicate_new_disks Required

Enable automatic replication of new disks that are added to a VM that is replicated.


string
vm_id Required

The ID to the virtual machine that is going to be replicated.


boolean
quiesce_enabled Optional

A flag that defines whether the quiescing method is enabled.


integer as int32
mpit_instances Optional

Point-in-time recovery instances per day.


string
target_replication_server_id Optional

The ID of the vSphere Replication server this group resides on. In case of null, the server will be automatically determined.


integer as int32
mpit_days Optional

Point-in-time recovery days to retain instances for.


boolean
vm_data_sets_replication_enabled Optional

Flag defining if VM’s DataSets replication is enabled.

Authentication

Authentication

This operation uses the following authentication methods.

Response

Response

Response Body

Response Body

202 Accepted

Returns TaskDrResponseList of type application/json

Configure replication tasks

{
	"_meta": {
		"errors": [
			{
				"code": "string",
				"field": "string",
				"message": "string"
			}
		],
		"limit": 0,
		"links": {
			"next": {
				"href": "string"
			},
			"previous": {
				"href": "string"
			},
			"self": {
				"href": "string"
			}
		},
		"offset": 0,
		"total": 0
	},
	"list": [
		{
			"complete_time": "string",
			"description": "string",
			"description_id": "string",
			"entity": "string",
			"entity_name": "string",
			"error": {
				"details": "string",
				"message": "string"
			},
			"id": "string",
			"progress": 0,
			"queued_time": "string",
			"result": {},
			"start_time": "string",
			"status": "QUEUED"
		}
	]
}
_meta Optional

List metadata


array of Task
list Optional

Information about a task

Errors

Errors

ResponseError
400

Bad request - the server could not understand the request due to invalid syntax or invalid request body content


401

Unauthorized - the client must authenticate itself to get the requested response


ResponseError
403

Forbidden - not sufficient access rights to fulfill the request


404

Not Found - server cannot find the requested in URL resource


ResponseError
500

Internal server error - unexpected condition prevents fulfilling the request

Code Samples

Code Samples

cURL Command

curl -X POST -H "Content-Type: application/json" -d '[{"target_replication_server_id":"HmsRemoteHbrServer:HBRSRV-1924009b-0562-433d-8db9-082141ac04cd:067878e6-2ff0-41eb-928c-5e91492a7b29","target_vc_id":"ff4a23e7-2fed-4be0-be39-479ae372badd","vm_id":"VirtualMachine:vm-80:e594ad24-5f75-41e3-a276-88a2116dbed0"}]' https://{api_host}/pairings/{pairing_id}/replications
Vendor Extensions

Vendor Extensions

This operation contains the following vendor extensions defined in the spec:
x-dr-permissions:
    permissions:
        - System.View
        - Host.Hbr.HbrManagement
x-dr-remote-site-connectivity-contract:
    not-authenticated: ERROR
    server-down: ERROR


Feedback

Was this page helpful?