Local Site 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/localsite returns information about the local site processing the API.

HTTP Method

Security

See Also

The following API are available:

Localsite - GET

Localsite - POST

Update vCenter Credentials used by the ZVM

Purpose Method URL
Local site information GET https://zvm_ip:port/v1/localsite
Valid pairing statuses GET https://zvm_ip:port/v1/localsite/pairingstatuses
Send Billing Data to the billing server POST https://zvm_ip:port/v1/localsite/billing/sendUsage

HTTP Method

GET, POST

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 peer sites: Peer Sites API

Return the list of all hypervisor sites: Virtualization Sites API

Localsite - GET

Returns information about local site.

URL
Local site information https://zvm_ip:port/v1/localsite
Valid pairing statuses https://zvm_ip:port/v1/localsite/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.
Format

Json, XML

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/localsite.

{
  "BandwidthThrottlingInMBs": 0.625,
  "ContactEmail": "String content",
  "ContactName": "String content",
  "ContactPhone": "String content",
  "IsReplicationToSelfEnabled": Boolean,
  "Link": {
    "href": "String content",
    "identifier": "String content",
    "rel": "String content",
    "type": "String content"
  },
  "Location": "String content",
  "SiteIdentifier": "String content",
  "SiteName": "String content",
  "SiteType": "String content",
  "UtcOffsetInMinutes":2147483647,
  "Version": "String content"
}

The following is an example response Json body for https://zvm_ip:port/v1/localsite/pairingstatuses.

["String content"]

XML Response Format

For the XML response format, see Local Site API XML Response Format.

Response Values

Response values for https://zvm_ip:port/v1/localsite.

Parameter Description
BandwidthThrottlingInMBs

The maximum allocated replication bandwidth for each VRA bandwidth group.

Note: When defined, this is the maximum bandwidth that Zerto uses from this site to all peer recovery sites.

Zerto throttles the bandwidth used so that on average, bandwidth usage from the protected site does not exceed the limit.

The response reflects the bandwidth throttling as defined for that point in time.

The bandwidth throttling is defined in the Site Settings window in the Throttling tab. The number represents megabits per second.

The bandwidth throttling values of the API are in megabytes per second. Therefore, the values are the results of the calculation X/8 MB, where X is the number of megabits stated in the Site Settings window, in the Throttling tab.

For example: Bandwidth throttling was defined as follows:

From 14:00 to 16:00: unlimited
For the rest of the day: 10 Mb/s.

The API is run at 18:00, and therefore the response will show 10/8 MB/s, or 1.25 MB/s.

A value of -1 means that the bandwidth throttling is unlimited.
   
ContactEmail The email address defined in the Zerto User Interface Site Information dialog.
ContactName The name of the contact person defined in the Zerto User Interface Site Information dialog.
ContactPhone The phone number of the contact defined in the Zerto User InterfaceSite Information dialog.
IsReplicationToSelfEnabled True: Protected virtual machines can be recovered to this protected site.
False: Protected virtual machines can only be recovered to a different recovery 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.
Location The location of the site defined during installation or in the Site Information dialog.
SiteIdentifier The internal site identifier.
SiteName The name of the site defined during installation or in the Site Information dialog.
SiteType The type of the site defined during installation or in the Site Information dialog.
UtcOffsetInMinutes The offset of the site time from UTC in minutes.
Version The Zerto Virtual Manager version.

Response values for https://zvm_ip:port/v1/localsite/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.

Localsite - POST

URL
Send Billing Data to the billing server https://zvm_ip:port/v1/localsite/billing/sendUsage

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 9071.
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/localsite/billing/sendUsage.

["String content"]

Response Values

Response values for https://zvm_ip:port/v1/localsite/billing/sendUsage.

Response: Description
Passed: Succeeded to send usage information.
Failed : Failed to send usage information.
PowerShell Scripts

For complete PowerShell Scripts, see Examples.

Update vCenter Credentials used by the ZVM

PUT request to update administrator level privileges to the vCenter server to be used by the ZVM.

Method URL
PUT https://zvm_ip:port/v1/localsite/virtualizationsettings

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.
Request Body Using Json Format

The following is an example of a Json request body for https://zvm_ip:port/v1/localsite/virtualizationsettings

{
  "Credentials": {
  "Username": "string",
  "Password": "string"
    }

Where:

Username

The user name for a user with administrator level privileges to the vCenter Server.

The name can be entered using either of the following formats:

username
(vSphere only) domain/username
Password A valid password for the given user name.
HTTP Response in Json Format

Success boolean with true=success, false=failure.