Peer Sites API
/v1/peersites returns a list of all peer sites of the site processing the API and pairs the site processing the API with another site. The following API are available:
• | Peersites - GET |
• | Peersites - POST |
Purpose | Method | URL |
---|---|---|
List of peer sites | GET | https://zvm_ip:port/v1/peersites |
A single peer site | GET | https://zvm_ip:port/v1/peersites/{siteIdentifier} |
The status of peer sites | GET | https://zvm_ip:port/v1/peersites/pairingstatuses |
Generate token from the destination site | POST | https://{{address}}:{{port}}/v1/peersites/generatetoken |
Generate token from the destination site | POST | https://{{address}}:{{port}}/v1/peersites/generatetoken
|
Pair to another sites | POST | https://zvm_ip:port/v1/peersites/pair |
Unpair a site | DELETE | https://zvm_ip:port/v1/peersites/{SiteIdentifier} |
HTTP Method
GET, POST, 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
Return the details of the local site: Local Site API
Return the list of all hypervisor sites: Virtualization Sites API
Format
Json, XML
Peersites - GET
Returns information about peer sites.
URL
All peer sites | https://zvm_ip:port/v1/peersites |
Filtered peer sites | https://zvm_ip:port/v1/peersites?peerName={PEERNAME}&pairingStatus={PAIRINGSTATUS}&location={LOCATION}&hostName={HOSTNAME}&port={PORT} |
Single peer site | https://zvm_ip:port/v1/peersites/{siteIdentifier} |
Valid pairing statuses | https://zvm_ip:port/v1/peersites/pairingstatuses |
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. | |
siteIdentifier | The identifier of the peer site for which information is to be returned. | |
Filters | Filters are optional and any combination of filters is valid. When no filter is specified, all peer sites are returned. Filters are not case-sensitive. | |
Filter |
Description |
|
peerName | The name of a peer site for which information is to be returned. The name is case-sensitive. | |
pairingStatus | The pairing status for which information is to be returned. | |
location | The site location, as specified in the site information, for which information is to be returned. | |
hostName | The IP address of a Zerto Virtual Manager, paired with this site, for which information is to be returned. | |
port | The port used to access peer sites for which information is to be returned. The default port is 9081. | |
Response In Json Format
The following is an example response Json body for https://zvm_ip:port/v1/peersites and for https://zvm_ip:port/v1/peersites/{siteIdentifier}.
[{
"HostName": "String content",
"IncomingThroughputInMb":1.26743233E+15,
"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"
},
"Location": "String content",
"OutgoingBandWidth":1.26743233E+15,
"PairingStatus":0,
"PeerSiteName": "String content",
"Port":9081,
"ProvisionedStorage":2147483647,
"SiteIdentifier": "String content",
"UsedStorage":2147483647,
"Version": "String content"
}]
The following is an example response Json body for https://zvm_ip:port/v1/peersites/pairingstatuses.
["String content"]
XML Response Format
For the XML response format, see Peer Sites API GET Method Request and Response Formats.
Response Values
Response values for https://zvm_ip:port/v1/peersites and for https://zvm_ip:port/v1/peersites/{siteIdentifier}
Parameter | Description |
---|---|
HostName | The address of a machine where a peer site Zerto Virtual Manager runs. |
IncomingThroughputInMb | The Mb/s for all the applications running on the virtual machines being recovered on the peer site. |
Link | The link details. |
href |
The URL used. |
identifier |
The internal site identifier. |
rel |
The next path level for the API relative to the current path. |
type |
The API interface service. |
Link__x007B_0_x007D_ | The link details. |
href |
The URL used. |
rel |
The next path level for the API relative to the current path. |
type |
The API interface service. |
Location | The site location of the peer site defined during the installation or in the Site Information dialog. |
OutgoingBandWidth | The bandwidth throttling defined for the site. |
PairingStatus | The connection status of the local site. Possible values are (Json/XML): Paired: The site is paired. Pairing: The site is in the process of being paired. Unpaired: The site is not paired. |
PeerSiteName | The name of the peer site defined during installation or in the Site Information dialog. |
Port | The port used for communication by the Zerto Virtual Managers. The default port is 9081. |
ProvisionedStorage | The storage provisioned for all of the virtual machines in all the VPGs recovered to this site. |
SiteIdentifier | The internal site identifier. |
UsedStorage | The storage used by all of the virtual machines in all the VPGs recovered to this site. |
Version | The Zerto Virtual Manager version. |
Response values for https://zvm_ip:port/v1/peersites/pairingstatuses.
Response: Description |
---|
Pairing statuses: Paired: The site is paired. Pairing: The site is in the process of being paired. Unpaired: The site is not paired. |
PowerShell Scripts
For complete PowerShell Scripts, see Examples.
Peersites - POST
Pairs the current site with another, peersite.
URL
Pair with another site | https://zvm_ip:port/v1/peersites |
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 9081. |
Request Body Using Json Format
The following is an example of a request body in Json format for https://zvm_ip:port/v1/peersites POST request.
{
"HostName": "String content"
"Port": 9081
"Token": "STS5CDTQTQG68HBPENSHGMBVWGTEPN4L9HRPA487SH7ZVZHGU9FA"
}
Request Values
Request values for https://zvm_ip:port/v1/peersites POST request.
Parameter | Description | Mandatory | |||
HostName | The address or DNS name of the Zerto Virtual Manager machine that will pair to the current site. | Yes | |||
Port | The default port used for communication between paired Zerto Virtual Managers. The default port is 9081. | Yes | |||
Token |
The generated token from the destination site.
|
Yes |
XML Request Format
For the XML request format, see Peer Sites API POST Method Request and Response Formats.
Response In Json Format
The following is an example response request Json body for https://zvm_ip:port/v1/peersites POST request.
{
"TaskIdentifier": "String content"
}
Response Values
Response values for https://zvm_ip:port/v1/peersites POST request.
Parameter | Description |
TaskIdentifier | The identifier of the pairing task. The task identifier can be used with the Tasks API to monitor the delete action. |
XML Response Format
For the XML response format, see Peer Sites API POST Method Request and Response Formats.
PowerShell Scripts
For complete PowerShell Scripts, see Examples.
Peersites - DELETE
Unpair the current site from another site paired to it.
URL
Unpair with another site | https://zvm_ip:port/v1/peersites/{SiteIdentifier} |
Where:
zvm_ip | The IP address of the Zerto Virtual Manager machine where the API is run. | |
port | The port to access the Zerto Virtual Manager. The default port is 9669. | |
SiteIdentifier | The identifier of the site to unpair. |
Request Body Using Json Format
The following is an example of a request body in Json format for https://zvm_ip:port/v1/peersites/{SiteIdentifier} DELETE request.
{
"IsKeepTargetDisks": Boolean
}
Request Values
Request values for https://zvm_ip:port/v1/peersites/{SiteIdentifier} DELETE request.
Parameter | Description | MANDATORY | Default |
IsKeepTargetDisks | True: Keep the target replica disks for any VPGs replicating between the sites as the VPGs will be deleted by unpairing the sites. This will enable faster synchronization in the event of recreating these VPGs at a later stage. False: The target replica disks for the virtual machines are deleted. |
No | False |
Response In Json Format
The following is an example response request Json body for https://zvm_ip:port/v1/peersites/{SiteIdentifier} DELETE request.
{
"TaskIdentifier": "String content"
}
Response Values
Response values for https://zvm_ip:port/v1/peersites/{SiteIdentifier} DELETE request.
Parameter | Description |
TaskIdentifier | The identifier of the pairing task. The task identifier can be used with the Tasks API to monitor the pairing action. |
XML Response Format
For the XML response format, see Peer Sites API DELETE Method Request and Response Formats.
PowerShell Scripts
For complete PowerShell Scripts, see Examples.