Updated on 2026-09-07 GMT+08:00

Querying Task Progress in Batches

Function

This API is used to query the full progress and incremental delay information in batches based on the task ID.

Debugging

You can debug the API in API Explorer to support automatic authentication. API Explorer can automatically generate and debug example SDK code.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions. For details about the required permissions, see Permissions and Supported Actions.

URI

POST /v3/{project_id}/jobs/batch-progress

Table 1 URI parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID of a tenant in a region.

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

Constraints

N/A

Range

N/A

Default Value

N/A

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

Content-Type

Yes

String

Definition

MIME type of the request body. Use the default value application/json. For APIs used to upload objects or images, the value varies depending on the flow type.

Constraints

N/A

Range

application/json

Default Value

application/json

X-Auth-Token

Yes

String

Definition

User token obtained from IAM. It is a response to the API for obtaining a user token. This API is the only one that does not require authentication. The token is the value of X-Subject-Token in the response header.

Constraints

N/A

Range

N/A

Default Value

N/A

X-Language

No

String

Definition

Request language type.

Constraints

N/A

Range

  • en-us: English
  • zh-cn: Chinese

Default Value

en-us

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

jobs

Yes

Array of strings

Definition

Task IDs for querying task progress in batches. This parameter is used to specify one or more tasks whose progress needs to be queried.

Constraints

N/A

Range

N/A

Default Value

N/A

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

count

Integer

Definition

Total number of returned task progress records, which is consistent with the length of the results array.

Constraints

N/A

Range

N/A

results

Array of objects

Definition

Response body set for querying the migration progress in batches.

For details, see Table 5.

Table 5 Data structure description of field results

Parameter

Type

Description

job_id

String

Definition

Task ID, which uniquely identifies a data replication task and serves as the identifier for operations such as query, modification, and deletion.

Constraints

N/A

Range

N/A

progress

String

Definition

Migration percentage, which indicates the data migration progress of the current task.

Constraints

The value -1 indicates that the task has not entered the migration state.

Range

0–100

incre_trans_delay

String

Definition

Incremental migration delay (unit: s). When the task is in the incremental phase, this parameter indicates the delay in data synchronization between the source and destination databases.

Constraints

The value -1 indicates that the task is not in the incremental phase.

Range

N/A

incre_trans_delay_millis

String

Definition

Incremental migration delay (unit: ms). The definition of this parameter is the same as that of incre_trans_delay, but it provides more accurate delay information in milliseconds.

Constraints

The value -1 indicates that the task is not in the incremental phase.

Range

N/A

task_mode

String

Definition

Task mode, which specifies the execution mode of the data replication task.

Constraints

In the single-active DR scenario, only FULL_INCR_TRANS (full+incremental) is available.

Range

  • FULL_TRANS: full migration. Only historical data is migrated. After the migration is complete, the task ends.
  • INCR_TRANS: incremental migration. Only incremental data is synchronized. This mode applies to continuous synchronization scenarios.
  • FULL_INCR_TRANS: full+incremental migration. Historical data is migrated first, and then incremental data is continuously synchronized. This mode applies to smooth switchover scenarios.

transfer_status

String

Definition

Current transfer status of the task, which indicates the running phase of the data migration task. It can be used to determine whether the task is progressing properly.

Constraints

N/A

Range

  • CREATING: The task is being created.
  • CREATE_FAILED: The task failed to be created.
  • CONFIGURATION: The task is being configured.
  • WAITING_FOR_START: The task is waiting to be started.
  • RELEASE_RESOURCE_COMPLETE: The task is stopped.
  • DELETED: The task is deleted.
  • INCRE_TRANSFER_STARTED: The incremental migration is in progress.
  • INCRE_TRANSFER_FAILED: The incremental migration failed.
  • FULL_TRANSFER_STARTED: The full migration is in progress.
  • FULL_TRANSFER_COMPLETE: The full migration is complete.
  • PAUSING: The task is paused.
  • FULL_TRANSFER_FAILED: The full migration failed.

process_time

String

Definition

Migration time. The value is a Unix timestamp in milliseconds, indicating the time when the task progress was last updated.

Constraints

N/A

Range

N/A

remaining_time

String

Definition

Estimated remaining time, in seconds.

Constraints

N/A

Range

N/A

progress_map

Map<String>

Definition

Data, structure, and index migration progress information body.

For details, see Table 6.

error_code

String

Definition

Error code returned if the task fails.

Constraints

N/A

Range

The value is in the format of DRS.XXXXXX.

error_msg

String

Definition

Error message returned if the task fails.

Constraints

N/A

Range

N/A

apply_rows_rate

Long

Definition

Requests per second (RPS) of incremental migration.

Constraints

The value -1 indicates that the task has not entered the incremental state.

Range

N/A

apply_bytes_rate

Long

Definition

Network traffic of incremental migration.

Constraints

The value -1 indicates that the task has not entered the incremental state.

Range

N/A

Table 6 Data structure description of field progress_map

Parameter

Type

Description

completed

String

Definition

Completion progress, in percentage, for example, 94% or 100%.

Constraints

N/A

Range

N/A

remaining_time

String

Definition

Estimated remaining time of the subtask.

Constraints

N/A

Range

N/A

Example Request

Example of querying the DR progress:

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

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

Example Response

Status code: 200

OK

  • Example response 1 for querying the DR progress:
    {
      "count" : 1,
      "results" : [ {
        "progress" : "100",
        "job_id" : "8d0e8e36-a618-490d-8a46-8c61ac9jb502",
        "incre_trans_delay" : "0",
        "task_mode" : "FULL_INCR_TRANS",
        "transfer_status" : "INCRE_TRANSFER_STARTED",
        "process_time" : "1608274919000",
        "remaining_time" : "0"
      } ]
    }
  • Example response 2 for querying the DR progress:
    {
      "count" : 2,
      "results" : [ {
        "progress" : "100",
        "job_id" : "edae91cb-5892-49b6-a529-4921fb26jb21",
        "incre_trans_delay" : "0",
        "task_mode" : "FULL_INCR_TRANS",
        "transfer_status" : "INCRE_TRANSFER_STARTED",
        "process_time" : "1594864576000",
        "remaining_time" : "10"
      }, {
        "progress" : "0",
        "job_id" : "f95c5d83-d0c9-42bd-b295-38c31cd1jb15",
        "incre_trans_delay" : "-1",
        "task_mode" : "FULL_INCR_TRANS",
        "transfer_status" : "FULL_TRANSFER_COMPLETE",
        "process_time" : "0",
        "remaining_time" : "0",
        "progress_map" : {
          "struct" : {
            "completed" : "94%",
            "remaining_time" : null
          },
          "data" : {
            "completed" : "100%",
            "remaining_time" : null
          },
          "index" : {
            "completed" : "100%",
            "remaining_time" : null
          }
        }
      } ]
    }

Status Code

Status Code

Description

202

Accepted

400

Bad Request

For other statuses, see Status Code.

Error Code

For details, see Error Code.