Starting Tasks in Batches
Function
- This API is used to start MySQL to MySQL synchronization task in batches.
- Learn how to authorize and authenticate this API before using it.
URI
- URI format
PATH:/v3/{project_id}/jobs/batch-starting
Method: POST
- Parameter description
Table 1 Parameter description Name
Mandatory
Description
project_id
Yes
Specifies the project ID of a tenant in a region. For details, see Obtaining a Project ID.
- Header description
Table 2 Header description Name
Mandatory
Description
X-Auth-Token
Yes
Specifies the user token obtained from IAM. For details, see Authentication.
X-Language
Yes
Specifies the request language type. The value is case-insensitive, such as en-us.
Content-Type
Yes
Specifies the content type. The value is application/json.
After all configurations are complete, call the API for starting a task to ensure that the task ID is the ID of the task to be started.
- Request example
/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/batch-starting
Request
- Parameter description
Table 3 Parameter description Name
Mandatory
Type
Description
jobs
Yes
List<StartInfoV3>
Specifies the tasks to be started.
For details, see Table 4.
Table 4 StartInfoV3 field description Name
Mandatory
Type
Description
job_id
Yes
String
Specifies the task ID, which must be unique.
start_time
No
String
Specifies the time when a task is started. The value is in timestamp format.
If this parameter is left empty, the task is started immediately by default.
- Request example
{
"jobs": [
{
"job_id": "9a470239-2308-4bb5-a6bc-1040402fjb21"
},
{
"job_id": "dbb8127c-b093-4b94-b764-7161e151jb2s",
"start_time": "1599202771816"
}
]
} Normal Response
- Parameter description
Table 5 Parameter description Name
Type
Description
results
List<StartJobResp>
Indicates the response body set of the tasks to be started.
For details, see Table 6.
count
Integer
Indicates the total number of records.
Table 6 StartJobResp field description Name
Type
Description
id
String
Indicates the task ID.
status
String
Indicates the response status of the task after being started.
The value can be success or failed.
error_code
String
Indicates the task error code.
error_msg
String
Indicates the task error message.
- Response example
{
"jobs": [
{
"id": "9a470239-2308-4bb5-a6bc-1040402fjb21",
"status": "success"
},
{
"id": "dbb8127c-b093-4b94-b764-7161e151jb2s",
"status": "success"
}
],
"count": 2
} Abnormal Response
For details, see Abnormal Request Results.
Last Article: Querying the Full Task Progress and Incremental Task Delay
Next Article: Permissions Policies and Supported Actions
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.