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

Starting Tasks in Batches

Function

This API is used to start real-time migration, synchronization, and disaster recovery tasks in batches.

Debugging

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

Constraints

  • This API can be called only after all tasks are configured. For details, see Task Creation Process.
  • In the dual-active DR scenario, this operation can be performed only when the forward task status is INCRE_TRANSFER_STARTED and RPO&RTO is less than 60s. For backward tasks, this operation can be performed only after all tasks are configured. The parent task does not support this operation.
  • When a yearly/monthly task created using APIs is started, an order is created and automatically paid.

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-starting

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 objects

Definition

Request list for starting tasks in batches. This parameter is used to specify one or more tasks to be started.

For details, see Table 4.

Table 4 Data structure description of field jobs

Parameter

Mandatory

Type

Description

job_id

Yes

String

Definition

Migration 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

Default Value

N/A

is_only_init_task

No

Boolean

Definition

Whether to support task initialization only. This parameter specifies whether only initialization is performed when a task is started.

Constraints

  • This function is available only to whitelisted users. To use this function, you need to submit a service ticket.

Range

  • true: only task initialization

  • false: normal task startup

Default Value

false

start_time

No

String

Definition

Task start time, which specifies when the task is started. The timestamp is accurate to milliseconds, for example, 1608188903063. If the value is empty, the task is started immediately.

Constraints

N/A

Range

N/A

Default Value

N/A. If the value is empty, the task is started immediately.

Response Parameters

Status code: 202

Table 5 Response body parameters

Parameter

Type

Description

results

Array of objects

Definition

Returned list of real-time DR tasks that are started in batches, which includes the result of each task.

For details, see Table 6.

count

Integer

Definition

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

Constraints

N/A

Range

N/A

Table 6 StartJobResp

Parameter

Type

Description

id

String

Definition

Migration 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

status

String

Definition

Task status, which indicates the execution result of a single task in a batch.

Constraints

N/A

Range

  • success: The task is successfully started.
  • failed: The task failed to be started.

order_id

String

Definition

Order ID.

NOTE:

This parameter is returned for yearly/monthly tasks created using APIs.

Constraints

N/A

Range

N/A

error_code

String

Definition

Error code returned if the pre-check fails.

Constraints

N/A

Range

The value is in the format of DRS.XXXXXX.

error_msg

String

Definition

Error message returned if the pre-check fails.

Constraints

N/A

Range

N/A

Example Request

Starting specified DR tasks in batches

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

{
  "jobs" : [ {
    "job_id" : "140b5236-88ad-43c8-811c-1268453jb101"
  } ]
}

Example Response

Status code: 202

Accepted

{
  "count" : 1,
  "results" : [ {
    "id" : "140b5236-88ad-43c8-811c-1268453jb101",
    "status" : "success"
  } ]
}

Status Code

Status Code

Description

202

Accepted

400

Bad Request

For other statuses, see Status Code.

Error Code

For details, see Error Code.