API Actions: GetLatency

API Actions: GetLatency

Supported in product version 12.25 and above
Call this API method to retrieve the latency of a replication process.

Request Syntax:

XML

POST /api/GetLatency HTTP/1.1
Host: use.your.host.name:82
X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
Content-Type: application/xml
X-Amz-Date: 20171115T202130Z
Authorization: AWS4-HMAC-SHA256 Credential= UQOPWUVNBALABCABCABC/20171115/us-east-1/cloudbasic/aws4_request, SignedHeaders=content-length;content-type;host;x-amz-content-sha256;x-amz-date, Signature=995374189c189e8e68ed3de82c1764ca11971711fb5179eeab2b19edd883dd74
 
<?xml version="1.0" encoding="utf-8"?>
<GetLatencyRequest>
    <ReplicationId>998acaec-9211-4dac-b90b-196fd1d17993</ReplicationId>
    <Period>1</Period><!-- In Hours -->
</GetLatencyRequest>

JSON

POST /api/GetLatency HTTP/1.1
Host: use.your.host.name:82
X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
Content-Type: application/json
X-Amz-Date: 20171115T202130Z
Authorization: AWS4-HMAC-SHA256 Credential= UQOPWUVNBALABCABCABC/20171115/us-east-1/cloudbasic/aws4_request, SignedHeaders=content-length;content-type;host;x-amz-content-sha256;x-amz-date, Signature=995374189c189e8e68ed3de82c1764ca11971711fb5179eeab2b19edd883dd74
 
{
	"ReplicationId": "998acaec-9211-4dac-b90b-196fd1d17993",
	"Period": "48"
}

 

Request Parameters

Parameter Description Required
ReplicationId The GUID of the replication that you would like to get latency information for Yes
Type: String
Default: None
Period The period of time in hours that you would like average latency to be calculated for
Note: In product version 12.36 and above, the time elapsed since the last successful data synchronization will be returned along with the average latency
Yes
Type: Integer
Default: None

 

Request Headers

This implementation uses only request headers that are common to all operations. For more information please see the section Common Request Headers

 

Response Syntax:

When data replication is turned on:

XML

HTTP/1.1 200
status: 200
<?xml version="1.0" encoding="utf-8"?>
<GetLatencyResponse>
    <ReplicationId>1db2be53-bf80-4999-a9d7-77f1762645c2</ReplicationId>
    <AverageLatency>0.2 secs</AverageLatency>
    <Period>Last 48 hour(s)</Period>
    <IsDataReplicationOn>true</IsDataReplicationOn>
    <TimeSinceLastDataSync>0.3 secs</TimeSinceLastDataSync><!-- (Supported in product version 12.36 and above) The time elapsed since the last successful data synchronization -->
 </GetLatencyResponse>

JSON

HTTP/1.1 200
status: 200

{
	"ReplicationId" :"998acaec-9211-4dac-b90b-196fd1d17993",
	"AverageLatency": "0.2 secs",
	"Period": "Last 48 hour(s)",
	"IsDataReplicationOn": "true",
        "TimeSinceLastDataSync": "0.3 secs"
}

When data replication is turned off:

XML

HTTP/1.1 200
status: 200
<?xml version="1.0" encoding="utf-8"?>
<GetLatencyResponse>
    <ReplicationId>1db2be53-bf80-4999-a9d7-77f1762645c2</ReplicationId>
    <Period>Last 48 hour(s)</Period>
    <IsDataReplicationOn>false</IsDataReplicationOn>
 </GetLatencyResponse>

JSON

HTTP/1.1 200
status: 200

{
	"ReplicationId" :"998acaec-9211-4dac-b90b-196fd1d17993",
	"Period": "Last 48 hour(s)",
	"IsDataReplicationOn": "false"
}

Response Parameters

Parameter Description Optional
ReplicationId The GUID of the replication that you would like to get latency information for. No
AverageLatency The average latency of the replication over the requested period of time

 

Yes
Period The period of time in hours that you would like average latency to be calculated for Yes
IsDataReplicationOn Indicates whether data replication is turned on or off for the requested replication process Yes

 

Error Response Syntax:

XML

HTTP/1.1 400
status: 400
 
<?xml version="1.0" encoding="utf-8"?>
<ErrorResponse> 
	<RequestId>request-id</RequestId> 
	<Errors> 
		<Error> Replication not found </Error> 
	</Errors> 
</ErrorResponse>

JSON

HTTP/1.1 400
status: 400

{
   "errors": [
        "Replication not found"
	],
	"requestId": 21
}