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
| 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
| 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
Default Value en-us |
| 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
| 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. |
| 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
|
| 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
|
| 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 |
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.
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot