Updated on 2024-08-23 GMT+08:00

Querying RPO and RTO in Batches

Function

This API is used to query Recovery Point Objective (RPO) and Recovery Time Objective (RTO).

URI

POST /v3/{project_id}/jobs/batch-rpo-and-rto

Table 1 Path parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID of a tenant in a region

For details about how to obtain the project ID, see Obtaining a Project ID.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

Content-Type

Yes

String

The content type.

The default value is application/json.

X-Auth-Token

Yes

String

User token obtained from IAM.

X-Language

No

String

Request language type

Default value: en-us

Values:

  • en-us
  • zh-cn
Table 3 Request body parameters

Parameter

Mandatory

Type

Description

jobs

Yes

Array of strings

Request for querying the IDs of RPO and RTO tasks in batches.

Response Parameters

Status code: 202

Table 4 Response body parameters

Parameter

Type

Description

count

Integer

Total number.

results

Array of objects

Response body set for querying RPO and RTO in batches.

For details, see Table 5.

Table 5 Data structure description of field results

Parameter

Type

Description

job_id

String

Task ID.

rpo_info

Object

RPO information.

For details, see Table 6.

rto_info

Object

RTO information.

For details, see Table 6.

error_code

String

Error code.

error_msg

String

Error message.

Table 6 Data structure description of fields rpo_info and rto_info

Parameter

Type

Description

check_point

String

Check point.

delay

String

Delay (unit: ms).

gtid_set

String

GTID.

time

String

Current time. The format is yyyy-MM-dd HH:mm:ss.

Example Request

Example of querying RPO and RTO in batches:

https://{endpoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/batch-rpo-and-rto

{
  "jobs" : [ "8d0e8e36-a618-490d-8a46-8c61ac9jb502" ]
}

Example Response

Status code: 202

Accepted

{
  "count" : 1,
  "results" : [ {
    "job_id" : "8d0e8e36-a618-490d-8a46-8c61ac9jb502",
    "rpo_info" : {
      "delay" : "0",
      "time" : "2020-12-18 15:47:05",
      "gtid_set" : "NA",
      "check_point" : "mysql-bin.000514:197"
    },
    "rto_info" : {
      "delay" : "0",
      "time" : "2020-12-18 15:47:05",
      "gtid_set" : "NA",
      "check_point" : "mysql-bin.000514:197"
    }
  } ]
}

Status Code

Status Code

Description

202

Accepted

400

Bad Request

Error Code

For details, see Error Code.