Zerto Virtual Replication APIs : VRAs API : https://zvm_ip:port/v1/vras – POST Methods
  
https://zvm_ip:port/v1/vras – POST Methods
Installs a VRA or upgrades a specific VRA.
URI
Install VRA
https://zvm_ip:port/v1/vras
Upgrade VRA
https://zvm_ip:port/v1/vras/{vraIdentifier}/upgrade
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.
Json Request Format
The following is an example request Json body for https://zvm_ip:port/v1/vras.
{
  "DatastoreIdentifier": "String content",
  "GroupName":"String content",
  "HostIdentifier":"String content",
  "HostRootPassword":"String content",
  "MemoryInGb":2147483647,
  "NetworkIdentifier":"String content",
  "UsePublicKeyInsteadOfCredentials":true,
  "VraNetworkDataApi":{
    "DefaultGateway":"String content",
    "SubnetMask":"String content",
    "VraIPAddress":"String content",
    "VraIPConfigurationTypeApi":"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
Request values for https://zvm_ip:port/v1/vras
Parameter
Description
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.
GroupName
Optional: 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.
HostIdentifier
The identifier of the host on which the VRA will be installed.
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.
NetworkIdentifier
The identifier of the network to use to access the VRA.
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.
DefaultGateway
The default gateway for the VRA network when VraIPConfigurationTypeApi is set to Static.
SubnetMask
The subnet mask for the VRA network when VraIPConfigurationTypeApi is set to Static.
VraIPAddress
The IP address for the VRA 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"}}
Json Response Format
The following is an example response Json body for https://zvm_ip:port/v1/vras and for https://zvm_ip:port/v1/vras/{VpgIdentifier}.
"String content"
XML Response Format
For the XML response format, see VRAs API POST Method Request and Response Formats.
Response Values
The response value is the task identifier which can be used with the Tasks API to monitor the delete action.