Query Task List
Last Updated:2021-05-11
Interface Description
View a list of all data transmission tasks.
Request URI
POST /v{version}/task/list
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 | migration |
marker | String | No | Paging parameter. You don’t need to set for the first request and use nextMarker in the last response in the subsequent request | dtsmxxxyyyzzz |
maxKeys | Integer | No | Paging parameter, the number of data per page, and 10 by default | 15 |
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 |
---|---|---|---|---|
task | List<Task> | Yes | Task array | |
nextMarker | String | Yes | The paging parameter and the next page marker | dtsmxxxyyy |
maxKeys | Integer | Yes | The paging parameter and the maximum number of data | 10 |
truncated | Boolean | Yes | Whether truncate is required or not | false |
Instructions for Data Structure of Task Field
Parameter name | Parameter type | Required | Description | Example value |
---|---|---|---|---|
dtsId | String | Yes | Task ID | dtsmxxyy1234 |
taskName | String | Yes | Task name | dtsmxxyy1234 |
status | String | Yes | Task status (unConfig:means that after creating tasks, you can enter the not configured state, which only contains dtsID information; ready: means after configuring tasks, you can enter the not started state, which contains all information of the task; checking: means after clicking Start, you can enter the checking state; checkPass: means you can start the task only after you pass the pre-check; checkFailed: means the pre-check fails. When you start the task, you can enter the pre-check status, and if you fail to check, enter this state so that you can modify the task or terminate the task directly; running: means after passing the pre-check, you can enter this state, including data migration or data synchronization; stopping: means you cannot operate the task; stopped: means starting from this state can achieve resuming from the breakpoint, i.e., modifying a data synchronization object after the pause; stopCheckFailed: means the pre-check of a new synchronized object fails. When adding the synchronized object, you can enter the pre-check state, and if you fail to check, you can return to the paused state, but you can view and check failure reasons; runFailed: means that the run failed. In case of exception during running, you can enter this state, in case of a recoverable error, you can continue to start after recovery, and in case of an unrecoverable error, you can only terminate the task; and finished: means the task is finished, including finishing the task manually, or automatically after finishing the task, or an unrecoverable error occurs.) | finished |
dataType | DataType | Yes | ||
region | String | Yes | Region | bj |
createTime | String | Yes | Creation Time | 2020-12-10T13: 24: 10Z |
srcConnection | Connection | Yes | ||
dstConnection | Connection | Yes | ||
schemaMapping | SchemaMapping | Yes | ||
runningTime | Integer | Yes | Duration of tasks run | 20 |
subStatus | List<SubStatus> | Yes | Subtask status | |
dynamicInfo | DynamicInfo | Yes | ||
errmsg | String | Yes | Error information returned when failed to execute, and an empty string in case of successful implementation | |
sdkRealtimeProgress | String | Yes | (Limited to data subscription) Task real-time progress, and UTC format | |
granularity | String | Yes | The granularity of transmission tasks, which is only divided into an instance level and a database level | dbtb |
subDataScope | SubDataScope | Yes | (Limited to data subscription) Data scope of subscription channel | |
payInfo | PayInfo | Yes | Payment information | |
lockStatus | String | Yes | Whether tasks are locked or not, with values: unlock, lockExpiration | unlock |
dtsIdPos | String | Yes | The forward task ID of two-way synchronization tasks | dtsmxxyy1234 |
dtsIdNeg | String | Yes | The backward task ID of two-way synchronization tasks | dtsmxxyy1234 |
dtsTaskPos | DtsTaskPos | Yes | Forward task Information of two-way synchronization tasks | |
dtsTaskNeg | DtsTaskNeg | Yes | Backward task Information of two-way synchronization tasks |
Instructions for Data Structure of Connection Field
Parameter name | Parameter type | Required | Description | Example value |
---|---|---|---|---|
instanceType | String | No | Instance Type | bcerds |
region | String | No | Region | bj |
dbType | String | No | Database type | mysql |
dbUser | String | No | Access account of database | dts_trans |
dbPass | String | No | Access password of database | |
dbPort | Integer | No | Access port of database | 3306 |
dbHost | String | No | database ip or host name | 192.168.1.1 |
instanceId | String | No | Instance ID | rdsmfgdti3d53f5 |
field_whitelist | String | No | Column filter (whitelist) | |
field_blacklist | String | No | Column filter (blacklist) |
Instruction for Data Structure of Schema Field
Parameter name | Parameter type | Required | Description | Example value |
---|---|---|---|---|
type | String | No | The types of objects to be transmitted, whose value includes: db (database), table, view, function, and procedure | table |
src | String | No | The schema name of source database | test.table_src |
dst | String | No | The schema name of target database | test.table_dst |
where | String | No | where filtering condition |
Instructions for Data Structure of SubStatus Field
Parameter name | Parameter type | Required | Description | Example value |
---|---|---|---|---|
s | String | Yes | Structure | running |
b | String | Yes | Total | running |
i | String | Yes | Increment | running |
Instruction for Data Structure of DynamicInfo Field
Parameter name | Parameter type | Required | Description | Example value |
---|---|---|---|---|
schema | List<DynamicInfoSchema> | Yes | ||
base | List<DynamicInfoBase> | Yes | ||
increment | List<DynamicInfoIncrement> | Yes |
Instruction for Data Structure of DynamicInfoSchema Field
Parameter name | Parameter type | Required | Description | Example value |
---|---|---|---|---|
current | String | Yes | The number of schema migrated | 800 |
count | String | Yes | The total number of schema migrated | 1000 |
speed | String | Yes | Migration rate | 500 |
expectFinishTime | String | Yes | Predicted time remaining (s) | 20 |
Instructions for Data Structure of DynamicInfoBase Field
Parameter name | Parameter type | Required | Description | Example value |
---|---|---|---|---|
current | String | Yes | Line number of data migrated | 800 |
count | String | Yes | Total line number of data migrated | 1000 |
speed | String | Yes | Migration rate | 500 |
expectFinishTime | String | Yes | Predicted remaining time (s) | 20 |
Instructions for Data Structure of DynamicInfoIncrement Field
Instructions for Data Structure of SubDataScope Field
Parameter name | Parameter type | Required | Description | Example value |
---|---|---|---|---|
startTime | String | Yes | Start time | |
endTime | String | Yes | End time |
Instructions for Data Structure of PayInfo Field
Parameter name | Parameter type | Required | Description | Example value |
---|---|---|---|---|
productType | String | Yes | Payment method: Prepay and postpay | postpay |
sourceInstanceType | String | Yes | Source-end instance type (OnBce: Baidu AI Cloud database; and OffBce: Self-built data storage) | OnBce |
targetInstanceType | String | Yes | Target instance type (OnBce: Baidu AI Cloud database; and OffBce: Self-built data storage) | OnBce |
crossRegionTag | Integer | Yes | Cross-region identifier (0: Intra-region; and 1: Cross-region) | 0 |
createTime | Long | Yes | Resource create time, and UNIX time stamp (msec) | 1607606657000 |
standard | String | Yes | Specification (Large: Large specification; and the large specification is only supported) | Large |
endTime | Long | Yes | UNIX time stamp (msec) | 1607606657000 |
Instructions for Data Structure of DtsTaskPos Field
Instructions for Data Structure of DtsTaskNeg Field
Request Example
POST /v1/task/list
<Common request header>
{
"maxKeys" : 15,
"marker" : "dtsmxxxyyyzzz",
"type" : "migration"
}
Response Example
HTTP/1.1 200 OK
<Common response header>
{
"nextMarker" : "dtsmxxxyyy",
"task" : [ {
"subDataScope" : {
"startTime" : "startTime",
"endTime" : "endTime"
},
"schemaMapping" : [ {
"dst" : "test.table_dst",
"src" : "test.table_src",
"where" : "where",
"type" : "table"
}, {
"dst" : "test.table_dst",
"src" : "test.table_src",
"where" : "where",
"type" : "table"
} ],
"dataType" : [ "base", "base" ],
"dtsId" : "dtsmxxyy1234",
"errmsg" : "errmsg",
"runningTime" : 20,
"dtsIdNeg" : "dtsmxxyy1234",
"subStatus" : [ {
"b" : "running",
"s" : "running",
"i" : "running"
}, {
"b" : "running",
"s" : "running",
"i" : "running"
} ],
"dtsIdPos" : "dtsmxxyy1234",
"sdkRealtimeProgress" : "sdkRealtimeProgress",
"lockStatus" : "unlock",
"createTime" : "2020-12-10T13: 24: 10Z",
"granularity" : "dbtb",
"dtsTaskNeg" : { },
"taskName" : "dtsmxxyy1234",
"region" : "bj",
"srcConnection" : {
"dbPass" : "dbPass",
"dbPort" : 3306,
"instanceId" : "rdsmfgdti3d53f5",
"instanceType" : "bcerds",
"dbUser" : "_dts_trans_",
"field_whitelist" : "field_whitelist",
"dbType" : "mysql",
"dbHost" : "192.168.1.1",
"field_blacklist" : "field_blacklist",
"region" : "bj"
},
"dynamicInfo" : {
"schema" : [ {
"expectFinishTime" : "20",
"current" : "800",
"count" : "1000",
"speed" : "500"
}, {
"expectFinishTime" : "20",
"current" : "800",
"count" : "1000",
"speed" : "500"
} ],
"increment" : [ [ { }, { } ], [ { }, { } ] ],
"base" : [ {
"expectFinishTime" : "20",
"current" : "800",
"count" : "1000",
"speed" : "500"
}, {
"expectFinishTime" : "20",
"current" : "800",
"count" : "1000",
"speed" : "500"
} ]
},
"payInfo" : {
"standard" : "Large",
"sourceInstanceType" : "OnBce",
"createTime" : 1607606657000,
"targetInstanceType" : "OnBce",
"crossRegionTag" : 0,
"endTime" : 1607606657000,
"productType" : "postpay"
},
"dtsTaskPos" : { },
"status" : "finished"
}, {
"subDataScope" : {
"startTime" : "startTime",
"endTime" : "endTime"
},
"schemaMapping" : [ {
"dst" : "test.table_dst",
"src" : "test.table_src",
"where" : "where",
"type" : "table"
}, {
"dst" : "test.table_dst",
"src" : "test.table_src",
"where" : "where",
"type" : "table"
} ],
"dataType" : [ "base", "base" ],
"dtsId" : "dtsmxxyy1234",
"errmsg" : "errmsg",
"runningTime" : 20,
"dtsIdNeg" : "dtsmxxyy1234",
"subStatus" : [ {
"b" : "running",
"s" : "running",
"i" : "running"
}, {
"b" : "running",
"s" : "running",
"i" : "running"
} ],
"dtsIdPos" : "dtsmxxyy1234",
"sdkRealtimeProgress" : "sdkRealtimeProgress",
"lockStatus" : "unlock",
"createTime" : "2020-12-10T13: 24: 10Z",
"granularity" : "dbtb",
"dtsTaskNeg" : { },
"taskName" : "dtsmxxyy1234",
"region" : "bj",
"srcConnection" : {
"dbPass" : "dbPass",
"dbPort" : 3306,
"instanceId" : "rdsmfgdti3d53f5",
"instanceType" : "bcerds",
"dbUser" : "_dts_trans_",
"field_whitelist" : "field_whitelist",
"dbType" : "mysql",
"dbHost" : "192.168.1.1",
"field_blacklist" : "field_blacklist",
"region" : "bj"
},
"dynamicInfo" : {
"schema" : [ {
"expectFinishTime" : "20",
"current" : "800",
"count" : "1000",
"speed" : "500"
}, {
"expectFinishTime" : "20",
"current" : "800",
"count" : "1000",
"speed" : "500"
} ],
"increment" : [ [ { }, { } ], [ { }, { } ] ],
"base" : [ {
"expectFinishTime" : "20",
"current" : "800",
"count" : "1000",
"speed" : "500"
}, {
"expectFinishTime" : "20",
"current" : "800",
"count" : "1000",
"speed" : "500"
} ]
},
"payInfo" : {
"standard" : "Large",
"sourceInstanceType" : "OnBce",
"createTime" : 1607606657000,
"targetInstanceType" : "OnBce",
"crossRegionTag" : 0,
"endTime" : 1607606657000,
"productType" : "postpay"
},
"dtsTaskPos" : { },
"status" : "finished"
} ],
"maxKeys" : 10,
"truncated" : false
}
Error Code
See universal error code.