Create Task
Last Updated:2021-05-11
Interface Description
Create a data transmission task.
Request URI
POST /v{version}/task
Parameter name | Parameter type | Required | Description | Example value | Parameter position |
---|---|---|---|---|---|
version | String | Yes | API version number | "1" | Path |
Request Body Parameters
Instructions for Data Structure of Request Body Field
Parameter name | Parameter type | Required | Description | Example value |
---|---|---|---|---|
type | String | Yes | Task Type (data transmission task: migration;), only supporting data transmission task | migration |
productType | String | Yes | Payment Type (Postpaid: postpay;), only supporting postpaid | postpay |
standard | String | Yes | Instance Specification (Large specification: Large), only supporting the large specification | Large |
sourceInstanceType | String | Yes | Source-end type (Baidu AI Cloud database: bcerds; and self-built data storage: public;) | bcerds |
targetInstanceType | String | Yes | Target type (Baidu AI Cloud database: bcerds; and self-built data storage: public;) | bcerds |
crossRegionTag | Integer | Yes | Cross-region identifier (when source-end and target types are Baidu AI Cloud databases and are cross-region: 1; and other cases: 0) | 0 |
directionType | String | Yes | Synchronization direction (One-way synchronization: single; and two-way synchronization: bidirect), only supporting one-way synchronization | single |
Response Header Parameters
No other special header fields are available, except for common header fields.
Response Body Parameters
Instructions for Data Structure of Response Body Field
Parameter name | Parameter type | Required | Description | Example value |
---|---|---|---|---|
dtsTasks | List<DtsTask> | Yes | Task ID list |
Instructions for Data Structure of DtsTaskField
Parameter name | Parameter type | Required | Description | Example value |
---|---|---|---|---|
dtsId | String | Yes | Task ID | dtsmxxyy1234 |
Request Example
POST /v1/task
<Common request header>
{
"standard" : "Large",
"sourceInstanceType" : "bcerds",
"directionType" : "single",
"targetInstanceType" : "bcerds",
"crossRegionTag" : 0,
"type" : "migration",
"productType" : "postpay"
}
Response Example
HTTP/1.1 200 OK
<Common response header>
{
"dtsTasks": [
{
"dtsId": "dtsmxxyy1234"
}
]
}
Error Code
See universal error code.