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

Querying the DR Initialization Progress in Batches

Function

This API is used to query the DR initialization progress in batches based on the task ID. Virtual IDs cannot be queried.

URI

POST /v3/{project_id}/jobs/batch-struct-process

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 body for querying tasks in batches.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

results

Array of objects

DR initialization progresses queried in batches.

For details, see Table 5.

count

Integer

Total number.

Table 5 Data structure description of field results

Parameter

Type

Description

job_id

String

Task ID.

error_code

String

Error code.

error_message

String

Error message.

struct_process

Object

Information about the DR initialization progress.

For details, see Table 6.

Table 6 Data structure description of field struct_process

Parameter

Type

Description

create_time

String

Data generation time.

result

Array of objects

Comparison result.

For details, see Table 7.

Table 7 Data structure description of field result

Parameter

Type

Description

type

String

Object type.

status

Integer

Status

src_count

Integer

Number of source objects.

dst_count

Integer

Number of destination objects.

start_time

Long

Start time.

end_time

Long

End time.

Example Request

Example of querying details about DR initialization objects in batches:

https://{endpoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/batch-struct-process

{
  "jobs" : [ "0ea5c5a0-e1b5-4421-80a9-7c9ff27jb502" ]
}

Example Response

Status code: 200

OK

{
  "count" : 1,
  "results" : [ {
    "job_id": "8ee21a0b-fff5-46b4-a6dd-6c54d5djb201",
    "struct_process" : {
      "result" : [ {
        "type" : "table",
        "status" : 2,
        "src_count" : 0,
        "dst_count" : 0,
        "start_time" : 1608097599000,
        "end_time" : 1608097600000
      }, {
        "type" : "view",
        "status" : 2,
        "src_count" : 0,
        "dst_count" : 0,
        "start_time" : 1608097599000,
        "end_time" : 1608097600000
      }, {
        "type" : "table_structure",
        "status" : 2,
        "src_count" : 0,
        "dst_count" : 0,
        "start_time" : 1608097599000,
        "end_time" : 1608097600000
      }, {
        "type" : "database",
        "status" : 2,
        "src_count" : 1,
        "dst_count" : 1,
        "start_time" : 1608097599000,
        "end_time" : 1608097600000
      }, {
        "type" : "function",
        "status" : 2,
        "src_count" : 0,
        "dst_count" : 0,
        "start_time" : 1608097599000,
        "end_time" : 1608097600000
      }, {
        "type" : "procedure",
        "status" : 2,
        "src_count" : 0,
        "dst_count" : 0,
        "start_time" : 1608097599000,
        "end_time" : 1608097600000
      }, {
        "type" : "table_indexs",
        "status" : 2,
        "src_count" : 0,
        "dst_count" : 0,
        "start_time" : 1608097599000,
        "end_time" : 1608097600000
      } ],
      "create_time" : "1608429670521"
    }
  } ]
}

Status Code

Status Code

Description

200

OK

Error Code

For details, see Error Code.