VRAs API
Important: This document is being phased out and does not contain up-to-date information. For updated API documentation for Zerto versions 9.5 and later, see ZVM REST API - Swagger.
You can also access Swagger from the ZVM: click the menu button () on the top right and select APIs or navigate to https://<ZVM IP>:9669/swagger/index.html in a Windows ZVM or https://<ZVM IP>/management/api/swagger/index.html in ZVM Appliance.
/v1/vras
returns information about VRAs or installs or performs actions on a specific VRA.
The following API are available:
VRAs: Change Recovery VRA APIs
Purpose | Method | URL |
---|---|---|
Information for all VRAs |
GET |
https://zvm_ip:port/v1/vras |
Information for one VRA |
GET |
https://zvm_ip:port/v1/vras/{vraIdentifier} |
Valid VRA IP configuration types |
GET |
https://zvm_ip:port/v1/vras/ipconfigurationtypes |
Valid VRA statuses |
GET |
https://zvm_ip:port/v1/vras/statuses |
Install a VRA |
POST |
https://zvm_ip:port/v1/vras |
Install VRAs on all hosts in a cluster | POST | https://zvm_ip:port/v1/vras/clusters |
Upgrade VRAs on all host in a cluster | POST | https://zvm_ip:port/v1/vras/clusters/{clusterIdentifier} |
Upgrade a VRA |
POST |
https://zvm_ip:port/v1/vras/{vraIdentifier}/upgrade |
Edit a VRA |
PUT |
https://zvm_ip:port/v1/vras/{vraIdentifier} |
Delete a VRA |
DELETE |
https://zvm_ip:port/v1/vras/{vraIdentifier} |
Uninstall all VRAs on a cluster | DELETE | https://zvm_ip:port/v1/vras/{clusterIDentifier} |
Set/Get cluster default settings | GET/POST | https://zvm_ip:port/v1/vras/clusters/{clusterIdentifier}/settings |
• | VRAs: Change Recovery VRA APIs |
HTTP Methods
GET, POST, PUT, DELETE
Security
The API is exposed over HTTPS. Client code must use the x-zerto-session HTTP authorization header.
See Also
Starting a session: Session: POST
Format
Json, XML
VRAs: GET
Returns information about VRAs.
URL
All VRAs |
https://zvm_ip:port/v1/vras |
Filtered VRAs |
https://zvm_ip:port/v1/vras?vraName={VRANAME}&status={STATUS}&vraVersion={VRAVERSION}&hostVersion={HOSTVERSION}&ipAddress={IPADDRESS}&vraGroup={VRAGROUP}&datastoreName={DATASTORENAME}&datastoreClusterName={DATASTORECLUSTERNAME}&networkName={NETWORKNAME} |
Single VRA |
https://zvm_ip:port/v1/vras/{vraIdentifier} |
Valid VRA IP configuration types Checkpoints |
https://zvm_ip:port/v1/vras/ipconfigurationtypes |
Valid VRA statuses |
https://zvm_ip:port/v1/vras/statuses |
Where:
zvm_ip |
The IP address of the Zerto Virtual Manager where the API is run. |
|
port |
The port to access the Zerto Virtual Manager. The default port is 9669. |
|
vraIdentifier |
The identifier of the VRA for which information is returned. |
|
Filters |
Filters are optional and any combination of filters is valid. When no filter is specified, all VRAs are returned. Filters are not case-sensitive. |
|
|
Filter |
Description |
|
vraName |
The name of the VRA. |
|
status |
The status of the VRA. |
|
vraVersion |
The version of the VRA. |
|
hostVersion |
The version of the host where the VRA is installed. |
|
ipAddress |
The IP address of the VRA. |
|
vraGroup |
The group the VRA belongs to. VRAs can be grouped together when VRAs use different networks so they can be grouped by network, for example when the same hypervisor manager supports two datacenters with separate networks and you are replicating from one datacenter to the second datacenter. |
|
datastoreName |
The name of the datastore the VRA uses for recovery data. |
|
datastoreClusterName |
The name of the datastore cluster the VRA uses for recovery data. |
|
networkName |
The network the VRA belongs to. |
Request Body Using Json Format
The request body is empty.
Response In Json Format
The following is an example response Json body for https://zvm_ip:port/v1/vras and, without the array statement, for https://zvm_ip:port/v1/vras/{vraIdentifier}.
[{
"DatastoreClusterName": "String content",
"DatastoreIdentifier": "String content",
"DatastoreName": "String content",
"HostIdentifier": "String content",
"HostVersion": "String content",
"IpAddress": "String content",
"Link": {
"href": "String content",
"identifier": "String content",
"rel": "String content",
"type": "String content"
},
"Link__x007B_0_x007D_": {
"href": "String content",
"rel": "String content",
"type": "String content"
},
"MemoryInGB":2147483647,
"NetworkIdentifier": "String content",
"NetworkName": "String content",
"Progress":2147483647,
"ProtectedCounters": {
"Vms":2147483647,
"Volumes":2147483647,
"Vpgs":2147483647
},
"RecoveryCounters": {
"Vms":2147483647,
"Volumes":2147483647,
"Vpgs":2147483647
},
"SelfProtectedVpgs":2147483647,
"Status":0,
"VraAlerts": {
"VraAlertsStatus":0
},
"VraGroup": "String content",
"VraIdentifier":18446744073709551615,
"VraIdentifierStr": "4238742837",
"VraName": "String content",
"VraNetworkDataApi": {
"DefaultGateway": "String content",
"SubnetMask": "String content",
"VraIPAddress": "String content",
"VraIPConfigurationTypeApi": "String content"
},
"VraVersion": "String content"
}]
The following is an example response Json body for https://zvm_ip:port/v1/vras/ipconfigurationtypes and for https://zvm_ip:port/v1/vras/statuses.
["String content"]
The following is an example response Json body for
{
"Hosts": [
{
"HostIdentifier": "String content",
"HostName": "String content"
},
{
"HostIdentifier": "String content",
"HostName": "String content"
}
]
}
https://zvm_ip:port/v1/vras/{vraIdentifier}/changeRecoveryVra/potentials?VmIdentifier={vmId}
XML Response Format
For the XML response format, see VRAs API GET Method Response Formats.
Response Values
Response values for https://zvm_ip:port/v1/vras and for https://zvm_ip:port/v1/vras/{vraIdentifier}.
Parameter | Description |
---|---|
DatastoreClusterName |
The name of the datastore cluster of the VRA virtual machine. |
DatastoreIdentifier |
The identifier of the vSphere datastore/Hyper-V storage of the VRA virtual machine. The identifier comprises the server identifier and the storage moref, with the format, serverid.moref. |
DatastoreName |
The name of the vSphere datastore/Hyper-V storage of the VRA virtual machine. |
HostVersion |
The version of the host on which the VRA is installed. |
IpAddress |
The IP address of the VRA. |
Link |
The link details. |
href |
The URL used. |
identifier |
The VRA identifier. |
rel |
The next path level of the API relative to the current path. |
type |
The API interface service. |
Link |
The link details. |
href |
The URL used. |
rel |
The next path level of the API relative to the current path. |
type |
The API interface service. |
MemoryInGB |
The amount of reserved memory allocated to the VRA when it was installed. |
NetworkIdentifier |
The identifier of the network used to access the VRA. |
NetworkName |
The name of the network used to access the VRA. |
Progress |
The percentage progress when installing the VRA. |
ProtectionCounters |
Details for a VRA on the protection site. |
Vms |
The number of VMs protected on the host with the VRA installed. |
Volumes |
The volumes used by the VRA. |
Vpgs |
The number of VPGs using the VRA. |
RecoveryCounters |
Details for a VRA on the recovery site. |
Vms |
The number of VMs recovered to the host with the VRA installed. |
Volumes |
The volumes used by the VRA. |
Vpgs |
The number of VPGs using the VRA. |
SelfProtectedVpgs |
The number of VPGs being protected and recovered on the same site. |
Status |
The status of the VRA. Possible values are (Json/XML): 0 Installed: The VRA is installed. 1 UnsupportedEsxVersion: The VRA cannot be installed on the ESX/ESXi host as the host version is not supported. 2 NotInstalled: A VRA is not installed. 3 Installing: The VRA is being installed. 4 Removing: The VRA is being removed. 5 InstallationError: The installation of the VRA failed. 6 HostPasswordChanged: The password used to access the host has changed. 7 UpdatingIpSettings: The IP settings of the VRA are updated. 8 DuringChangeHost: The host of the VRA disks is being changed. 9 HostInMaintenanceMode: The host is updated. |
VraAlerts |
Details on the VRA alert status. |
VraAlertsStatus |
The alert status of the VRA. Possible values are: 0: Normal. 1: Warning. 2: Error |
VraGroup |
The group the VRA belongs to, used when VRAs use different networks so they can be grouped by network, for example when the same vCenter Server supports two datacenters with separate networks and you are replicating from one datacenter to the second datacenter. |
VraIdentifier |
The internal VRA identifier. |
VraIdentifierStr |
The internal VRA identifier as a string. |
VraName |
The name used to identify the VRA in the UI. |
VraNetworkDataApi |
The VRA network details. |
DefaultGateway |
The default gateway for the VRA network. |
SubnetMask |
The subnet mask for the VRA network. The default value is 255.255.255.0. |
VraIPAddress |
The IP address for the VRA. |
VraIPConfigurationTypeApi |
The IP configuration used for the VRA. Possible values are: Dhcp: The VRA IP address is allocated via a DHCP server. Static: The VRA is installed with a static IP that was assigned when the VRA was installed. |
VraVersion |
The storage provisioned for the virtual machine in the recovery site. |
Response values for https://zvm_ip:port/v1/vras/statuses.
Response: Description |
Possible statuses for a VRA 0 Installed: The VRA is installed. 1 UnsupportedEsxVersion: The VRA cannot be installed on the ESX/ESXi host as the host version is not supported. 2 NotInstalled: A VRA is not installed. 3 Installing: The VRA is being installed. 4 Removing: The VRA is being removed. 5 InstallationError: The installation of the VRA failed. 6 HostPasswordChanged: The password used to access the host has changed. 7 UpdatingIpSettings: The IP settings of the VRA are updated. 8 DuringChangeHost: The host of the VRA disks is being changed. 9 HostInMaintenanceMode: The host is updated.
|
Response values for https://zvm_ip:port/v1/vras/ipconfigurationtypes.
Response: Description |
Possible IP configurations for the VRA: Dhcp: The VRA IP address is allocated via a DHCP server. Static: The VRA is installed with a static IP that was assigned when the VRA was installed. |
VRAs: POST
Installs a VRA or upgrades a specific VRA.
URL
Install VRA |
|
Upgrade a Group of VRAs |
|
Upgrade a Specific VRA |
|
Where:
zvm_ip |
The IP address of the Zerto Virtual Manager where the API is run. |
|
port |
The port to access the Zerto Virtual Manager. The default port is 9669. |
|
vraIdentifier |
The identifier of the VRA to be upgraded. |
Request Body Using Json Format
The following is an example of a request body in Json format for https://zvm_ip:port/v1/vras
.
{
"DatastoreIdentifier": "String content",
"GroupName": "String content",
"HostIdentifier": "String content",
"HostRootPassword": "String content",
"MemoryInGb":2,
"NumOfCpus":1,
"NetworkIdentifier": "String content",
"UsePublicKeyInsteadOfCredentials": Boolean,
"PopulatePostInstallation": Boolean,
"VraNetworkDataApi": {
"DefaultGateway": "String content",
"SubnetMask": "String content",
"VraIPAddress": "String content",
"VraIPConfigurationTypeApi": "String content"
}
}
The following is an example of a request body in Json format for https://zvm_ip:port/v1/vras/upgrade.
{
"VraIdentifiers":
[
"String content",
"String content",
...
"String content"
]
}
The request body for https://zvm_ip:port/v1/vras/{vraIdentifier}/upgrade is empty.
XML Request Format
For the XML request format, see VRAs API POST Method Request and Response Formats.
Request Values
Install a VRA
Request values for https://zvm_ip:port/v1/vras
Parameter |
Description |
Mandatory |
Default |
DatastoreIdentifier |
The identifier of the vSphere datastore/Hyper-V storage for the VRA virtual machine. The identifier comprises the server identifier and the storage moref, with the format, serverid.moref. |
Yes |
|
GroupName |
The group the VRA belongs to, used when VRAs use different networks so they can be grouped by network, for example when the same vCenter Server supports two datacenters with separate networks and you are replicating from one datacenter to the second datacenter. If you want to create a new VRA group, enter the name of the new group. |
No |
|
HostIdentifier |
The identifier of the host on which the VRA will be installed. |
Yes |
|
HostRootPassword |
vSphere environments: The password used to access the host for the root user. This field is only required for VMware ESXi 4.x and 5.x hosts. A value is required if UsePublicKeyInsteadOfCredentials is set to false. |
|
|
MemoryInGB |
The amount of memory to allocate to the VRA. The amount determines the maximum buffer size for the VRA for buffering IOs written by the protected virtual machines, before the writes are sent over the network to the recovery VRA. The recovery VRA also buffers the incoming IOs until they are written to the journal. If a buffer becomes full, a Bitmap Sync is performed after space is freed up in the buffer. The value can be in 1-16GB. |
|
|
NumOfCpus |
The number of vCPUs (1, 2, 3, or 4) to allocate to the VRA. Increasing the number of vCPUs is recommended if the VRA is used for Extended Journal Copy or per Zerto support recommendation. |
No | 1 |
NetworkIdentifier |
The identifier of the network to use to access the VRA. |
|
|
UsePublicKeyInsteadOfCredentials |
vSphere environments True: A password is not needed to access the host. From ESXi 5.5, by default, Zerto Virtual Manager uses a vSphere Installation Bundle, VIB, to connect to the host, which does not require a password. False: A password is needed to access the host. For ESX/i versions earlier than 5.5, this parameter must be set to false and a value specified for HostRootPassword. |
No |
True |
PopulatePostInstallation |
vSphere and Hyper-V environments Once the installation completes, the VRA is populated with VPGs. |
No |
|
VraNetworkDataApi |
The VRA network details. |
|
|
DefaultGateway |
The default gateway for the VRA network when VraIPConfigurationTypeApi is set to Static. Mandatory when VraIPConfigurationTypeApi is set to Static. |
|
|
SubnetMask |
The subnet mask for the VRA network when VraIPConfigurationTypeApi is set to Static. Mandatory when VraIPConfigurationTypeApi is set to Static. |
|
|
VraIPAddress |
The IP address for the VRA when VraIPConfigurationTypeApi is set to Static. Mandatory when VraIPConfigurationTypeApi is set to Static. |
|
|
VraIPConfigurationTypeApi |
The IP configuration used for the VRA. Possible values are: Dhcp: The VRA IP address is allocated via a DHCP server. Static: The VRA is installed with a static IP that was assigned when the VRA was installed. |
|
|
Note: If a value is not specified in the request, a null value is used. Nulls are specified in Json as null, all lowercase.:
{"DatastoreIdentifier":"8f3dc896-29d7-42d9-b67d-b0a85c520f4b.datastore-361","GroupName":"groupName","HostIdentifier":"8f3dc896-29d7-42d9-b67d-b0a85c520f4b.host-103","MemoryInGb":3,"NetworkIdentifier":"8f3dc896-29d7-42d9-b67d-b0a85c520f4b.network-108","VraNetworkDataApi": {"DefaultGateway":null,"SubnetMask":null,"VraIPAddress":null,"VraIPConfigurationTypeApi":"Dhcp"}}
The above Json can be shortened to the following, as the values are defaulted to null when not specified:
{"DatastoreIdentifier":"8f3dc896-29d7-42d9-b67d-b0a85c520f4b.datastore-361","GroupName":"groupName","HostIdentifier":"8f3dc896-29d7-42d9-b67d-b0a85c520f4b.host-103","MemoryInGb":3,"NetworkIdentifier":"8f3dc896-29d7-42d9-b67d-b0a85c520f4b.network-108","VraNetworkDataApi": {"VraIPConfigurationTypeApi":"Dhcp"}}
Upgrade a Group of VRAs
Request values for https://zvm_ip:port/v1/vras
Parameter |
Description |
VraIdentifier |
The identifier of the VRA |
/upgrade
Response In Json Format
The following is an example response Json body for:
• | https://zvm_ip:port/v1/vras |
• | https://zvm_ip:port/v1/vras/upgrade |
• | https://zvm_ip:port/v1/vras/{vraIdentifier}/upgrade |
{
"TaskIdentifier": "String content"
}
XML Response Format
For the XML response format, see VRAs API POST Method Request and Response Formats.
Response Values
Response values for:
• | https://zvm_ip:port/v1/vras |
• | https://zvm_ip:port/v1/vras/upgrade |
• | https://zvm_ip:port/v1/vras/{VraIdentifier}/upgrade |
Parameter |
Description |
TaskIdentifier |
The identifier of the task. The task identifier can be used with the Tasks API to monitor the delete action. |
The task identifier can be used with the Tasks API to monitor the installation or upgrade activity.
VRAs: PUT
Enables editing a specific VRA.
URL
Edit VRA |
https://zvm_ip:port/v1/vras/{vraIdentifier} |
Where:
zvm_ip |
The IP address of the Zerto Virtual Manager where the API is run. |
|
port |
The port to access the Zerto Virtual Manager. The default port is 9669. |
|
vraIdentifier |
The identifier of the VRA to be edited. |
Request Body Using Json Format
The following is an example of a request body in Json format for https://zvm_ip:port/v1/vras.
{
"GroupName": "String content",
"HostRootPassword": "String content",
"UsePublicKeyInsteadOfCredentials": Boolean,
"VraNetworkDataApi": {
"DefaultGateway": "String content",
"SubnetMask": "String content",
"VraIPAddress": "String content",
"VraIPConfigurationTypeApi": "String content"
}
}
XML Request Format
For the XML request format, see VRAs API PUT Method Request and Response Formats.
Request Values
Request values for https://zvm_ip:port/v1/vras
Parameter |
Description |
Mandatory |
|
GroupName |
The group the VRA belongs to, used when VRAs use different networks so they can be grouped by network, for example when the same vCenter Server supports two datacenters with separate networks and you are replicating from one datacenter to the second datacenter. If you want to create a new VRA group, enter the name of the new group. |
No |
|
HostRootPassword |
vSphere environments: The password used to access the host for the root user. This field is only required for VMware ESXi 4.x and 5.x hosts. A value is required if UsePublicKeyInsteadOfCredentials is set to false. |
|
|
UsePublicKeyInsteadOfCredentials |
vSphere environments: Optional. The default is true. True: A password is not needed to access the host. From ESXi 5.5, by default, Zerto Virtual Manager uses a vSphere Installation Bundle, VIB, to connect to the host, which does not require a password. False: A password is needed to access the host. For ESX/i versions earlier than 5.5, this parameter must be set to false and a value specified for HostRootPassword. |
|
|
VraNetworkDataApi |
The VRA network details. |
No |
|
DefaultGateway |
The default gateway for the VRA network when VraIPConfigurationTypeApi is set to Static. Mandatory when VraIPConfigurationTypeApi is set to Static. |
No |
|
SubnetMask |
The subnet mask for the VRA network when VraIPConfigurationTypeApi is set to Static. Mandatory when VraIPConfigurationTypeApi is set to Static. |
No |
|
VraIPAddress |
The IP address for the VRA when VraIPConfigurationTypeApi is set to Static. Mandatory when VraIPConfigurationTypeApi is set to Static. |
No |
|
VraIPConfigurationTypeApi |
The IP configuration used for the VRA. Possible values are: Dhcp: The VRA IP address is allocated via a DHCP server. Static: The VRA is installed with a static IP that was assigned when the VRA was installed. |
No |
|
Note: If a value is not specified in the request, a null value is used. Nulls are specified in Json as null, all lowercase.
Response In Json Format
The following is an example response Json body for https://zvm_ip:port/v1/vras/{vraIdentifier}.
{
"TaskIdentifier": "String content"
}
XML Response Format
For the XML response format, see VRAs API PUT Method Request and Response Formats.
Response Values
Parameter |
Description |
TaskIdentifier |
The identifier of the task. The task identifier can be used with the Tasks API to monitor the action. |
VRAs: DELETE
Delete a specified VRA.
Method |
URL |
DELETE |
https://zvm_ip:port/v1/vras/{vraIdentifier} |
Where:
zvm_ip |
The IP address of the Zerto Virtual Manager where the API is run. |
|
port |
The port to access the Zerto Virtual Manager. The default port is 9669. |
|
vraIdentifier |
The identifier of the VRA to be deleted. |
Request Body Using Json Format
The request body is empty.
Response In Json Format
The following is an example response Json body for https://zvm_ip:port/v1/vras/{vraIdentifier}.
{
"TaskIdentifier": "String content"
}
XML Response Format
For the XML response format, see VRAs API DELETE Method Response Formats.
Response Values
Parameter |
Description |
TaskIdentifier |
The identifier of the task. The task identifier can be used with the Tasks API to monitor the delete action. |
PowerShell Scripts
For complete PowerShell Scripts, see Examples.
VRAs: Change Recovery VRA APIs
Using the Change Recovery VRA APIs, you can change the recovery VRA for all virtual machines at once or specify the virtual machines to change.
There are two ways to run a change recovery VRA operation:
• | One-Step Operation for Changing Recovery VRA |
• | Multi-Step Operation for Changing Recovery VRA |
Privileges Required
Manage VRA
One-Step Operation for Changing Recovery VRA
Run this API to change the recovery VRA for all or specific virtual machines.
Method |
URL |
POST |
https://zvm_ip:port/v1/vras/{vraIdentifier}/changeRecoveryVra/execute |
Where:
zvm_ip |
The IP address of the Zerto Virtual Manager where the API is run. |
port |
The port to access the Zerto Virtual Manager. The default port is 9669. |
vraIdentifier |
The identifier of the VRA. |
Request Body Using Json Format
Request Body Using Json Format
The following is an example request.
{
"VmsAllocations": [
{
"VmIdentifier": "vmId",
"HostIdentifier": "hostId"
},
{
"VmIdentifier": "vmId",
"HostIdentifier": "null"
}
]
}
Parameter |
Description |
Mandatory |
Default |
||||||||||||
VmsAllocations |
An array holding VMs with the identifiers of their new target host.
|
No |
Null |
||||||||||||
VmIdentifier |
The internal virtual machine identifier. The identifier comprises the server identifier and the virtual machine moref, with the format, serverid.moref. |
No |
|
||||||||||||
HostIdentifier |
The unique identifier of the host that the VM will be recovered to. |
No |
|
Response In Json Format
The following is an example response.
{
"TaskIdentifier": "String content"
}
Parameter | Description |
TaskIdentifier | The identifier of the task that can be used with the Tasks API to monitor the ongoing status. |
Back to VRAs API
Back to All APIs
Multi-Step Operation for Changing Recovery VRA
Follow the below steps:
1. | Get a Recovery Host Identifier . |
2. | Get VRA Alert Status. |
3. | To change the Recovery VRA, first get a list of target hosts for all VMs or specific VMs: |
• | Run Get Potential Target Hosts to get a list of potential target hosts. Then, you can use that list to assign different target hosts for the VMs. |
• | Or, run Get Recommendation to get a list of VMs paired with their recommended target hosts. |
4. | Run Validate Prior to Execute to ensure the operation will work successfully. |
5. | Execute the change recovery VRA operation. |
Get a Recovery Host Identifier
Run this API to get a a list of virtual machines and their recovery host identifier. The full API can be found here: Protected VMs API.
Method | URL |
GET | https://zvm_ip:port/v1/vms |
Where:
zvm_ip | The IP address of the Zerto Virtual Manager where the API is run. |
port | The port to access the Zerto Virtual Manager. The default port is 9669. |
Parameter | Description |
RecoveryHostIdentifier | The identifier of the host that handles the replicated data. The identifier comprises the server identifier and the host moref, with the format, serverid.moref. |
Get VRA Alert Status
Run this API to get the VRA Alert Status from the VRA Alerts object. If the status is normal, you can proceed with the change recovery operation. The full API can be found here: VRAs API.
Method | URL |
GET | https://zvm_ip:port/v1/vras |
Where:
zvm_ip | The IP address of the Zerto Virtual Manager where the API is run. |
port | The port to access the Zerto Virtual Manager. The default port is 9669. |
Parameter | Description |
VraAlerts | Details on the VRA alert status. |
VraAlertsStatus | The alert status of the VRA. Possible values are: 0 or Normal 1 or Warning 2 or Error |
Get Potential Target Hosts
Run this API to get a list of potential target hosts for the VMs replicating to the specified VRA - {vraIdentifier}.
Method | URL |
GET | https://zvm_ip:port/v1/vras/{vraIdentifier}/changeRecoveryVra/potentials?VmIdentifier=<vmId> |
Where:
zvm_ip | The IP address of the Zerto Virtual Manager where the API is run. | |
port | The port to access the Zerto Virtual Manager. The default port is 9669. | |
vraIdentifier | The identifier of the VRA. | |
Filters | Filters are optional and any combination of filters is valid. Filters are not case-sensitive. | |
| Filter | Description |
| VmIdentifier | The internal virtual machine identifier. If specified, a list of potential target hosts will be returned for this VM only. |
Request Body Using Json Format
Request Body Using Json Format
The request body is empty.
Response In Json Format
The following is an example response.
{
"Hosts": [
{
"HostIdentifier": "string content",
"HostName": "string content"
},
{
"HostIdentifier": "string content,
"HostName": "string content"
}
]
}
Parameter | Description |
Hosts | A list of potential hosts that VM/s can be recovered to. If a VM was specified, only potential hosts for the VM will be returned. |
HostIdentifier | The unique identifier of the host. |
HostName | The address or DNS name of the host. |
Get Recommendation
Run this API to get a list of VMs paired with their recommended target hosts.
Method | URL |
POST | https://zvm_ip:port/v1/vras/{vraIdentifier}/changeRecoveryVra/recommendation |
Where:
zvm_ip | The IP address of the Zerto Virtual Manager where the API is run. |
port | The port to access the Zerto Virtual Manager. The default port is 9669. |
vraIdentifier | The identifier of the VRA. |
Request Body Using Json Format
Response Body Using Json Format
Request Body Using Json Format
The following is an example request.
{
"Constraints": [
"FixedVmsAllocations":
{
"VmIdentifier": "vmId",
"HostIdentifier": "hostId"
},
{
"VmIdentifier": "vmId",
"HostIdentifier": "hostId"
}
],
"VmsToCalculate": ["<vmId>","<vmId>"]
}
Parameter | Description | Mandatory | Default |
FixedVmsAllocations | An optional constraints object which contains an array of VmIdentifier and HostIdentifier pairings that will be assumed when calculating recommendations for the VMs indicated in the VmsToCalculate array. | No | Null |
VmIdentifier | The internal virtual machine identifier. The identifier comprises the server identifier and the virtual machine moref, with the format, serverid.moref. | No |
|
HostIdentifier | The unique identifier of the host that the VM will be recovered to. | No |
|
VmsToCalculate | An array of vmIds that will receive recommendations. | Yes |
|
Response Body Using Json Format
The following is an example response.
{"Recommendations": [
{
"vmRecommendation": ,
"VmIdentifier": "string content",
"HostIdentifier": "string content",
"HostName": "string content"
"Reason": "string content"
},
"vmRecommendation": ,
"VmIdentifier": "string content",
"HostIdentifier": "string content",
"HostName": "string content"
"Reason": "string content"
}
]
}
Parameter | Description |
Recommendations |
|
vmRecommendation | A list of recommended target hosts for each VM. |
VmIdentifier | The internal virtual machine identifier. The identifier comprises the server identifier and the virtual machine moref, with the format, serverid.moref. |
HostIdentifier | The unique identifier of the host that the VM will be recovered to. The response is null if a host was not successfully recommended. |
HostName | The name of the host that the VM will be recovered to. |
Reason | The reason describing why a new host could not be recommended. The response is null if a host was successfully recommended. |
Back to VRAs: Change Recovery VRA APIs
Back to VRAs API
Back to All APIs
Validate Prior to Execute
Run this API to validate the VM to target host mapping before executing the change recovery VRA operation.
Method | URL |
POST | https://zvm_ip:port/v1/vras/{vraIdentifier}/changeRecoveryVra/validate |
Where:
zvm_ip | The IP address of the Zerto Virtual Manager where the API is run. |
port | The port to access the Zerto Virtual Manager. The default port is 9669. |
vraIdentifier | The identifier of the VRA. |
Request Body Using Json Format
Response Body Using Json Format
Request Body Using Json Format
The following is an example request.
{
"VmsAllocations":[
{
"VmIdentifier": "string content",
"HostIdentifier": "string content"
},
{
"VmIdentifier": "string content",
"HostIdentifier": "string content"
}
]
}
Parameter | Description | Mandatory | Default | ||||||||||||
VmsAllocations | An array holding VMs with the identifiers of their new target host.
| Yes |
| ||||||||||||
VmIdentifier | The internal virtual machine identifier. The identifier comprises the server identifier and the virtual machine moref, with the format, serverid.moref. | Yes |
| ||||||||||||
HostIdentifier | The unique identifier of the host that the VM will be recovered to. |
|
|
Response Body Using Json Format
The following is an example response.
{
"VmsValidationResults": [
{
"VmIdentifier": "string content",
"HostIdentifier": "string content,
"Status": "VmValidationStatusEnum",
"Reason": "string content"
},
{
"VmIdentifier": "string content",
"HostIdentifier": "string content",
"Status": "VmValidationStatusEnum",
"Reason": "string content"
}
]
}
Parameter | Description |
VmsValidationResults | Array of objects containing VmIdentifier, HostIdentifier, Status, and Reason for each proposed VM and target host change. |
VmIdentifier | The internal virtual machine identifier. The identifier comprises the server identifier and the virtual machine moref, with the format, serverid.moref. |
HostIdentifier | The unique identifier of the host on which validation was requested for the VMs. |
Status | The status of the proposed change. Possible values are: 0 or Success 1 or Failure 2 or Warning |
Reason | The reason for the status in the case of a Warning or Error. |
Back to VRAs: Change Recovery VRA APIs
Back to VRAs API
Back to All APIs
Execute
Once the VM to target host mapping is set, run this API to execute the change recovery VRA operation.
Method | URL |
POST | https://zvm_ip:port/v1/vras/{vraIdentifier}/changeRecoveryVra/execute |
Where:
zvm_ip | The IP address of the Zerto Virtual Manager where the API is run. |
port | The port to access the Zerto Virtual Manager. The default port is 9669. |
vraIdentifier | The identifier of the VRA containing the VMs. |
Response In Json Format
The following is an example response.
{
"TaskIdentifier": "String content"
}
Parameter | Description |
TaskIdentifier | The identifier of the task that can be used with the Tasks API to monitor the ongoing status. |
Back to VRAs: Change Recovery VRA APIs
Back to VRAs API
Back to All APIs