修改同步对象记录
更新时间:2023-10-12
接口说明
获取修改同步对象历史记录
请求URI
Plain Text
1 POST /v{version}/task/schema/schemaUpdateList
2 Host: dts.baidubce.com
3 Content-Type: application/json
4 Authorization: string
参数名称 | 参数类型 | 是否必须 | 描述 | 示例值 | 参数位置 |
---|---|---|---|---|---|
version | String | 是 | API版本号 | "1" | Path |
请求体参数
参数名称 | 参数类型 | 是否必须 | 描述 | 示例值 | 参数位置 |
---|---|---|---|---|---|
dtsId | String | 是 | dts任务id | dtsmxxxx | Request Body 参数 |
响应头参数
除公共头域,无其它特殊头域。
响应体参数
响应体字段数据结构说明
参数名称 | 参数类型 | 描述 | 示例值 |
---|---|---|---|
taskList | List<Task> | 修改历史列表 |
Task字段数据结构说明
参数名称 | 参数类型 | 描述 | 示例值 |
---|---|---|---|
taskId | String | 任务ID | dtsmxxyy1234 |
updateTime | String | 更新时间,utc时间 | 2023-05-18 03:27:09 |
status | String | 任务状态 | checkPass |
oldSchema | List<Schema> | 旧的库表映射 | |
newSchema | List<Schema> | 新的库表映射 |
Schema字段数据结构说明
参数名称 | 参数类型 | 描述 | 示例值 |
---|---|---|---|
type | String | 类型 | "db"、"table" |
src | String | 源端库表 | db1.table1 |
dst | String | 目标端库表 | db2.table2 |
where | String | 行过滤 | id > 10 AND status = "success" |
field | Field | 列映射 | Field |
Field字段数据结构说明
参数名称 | 参数类型 | 描述 | 示例值 |
---|---|---|---|
mapping | List<MappingItem> | 列映射 |
MappingItem字段数据结构说明
参数名称 | 参数类型 | 描述 | 示例值 |
---|---|---|---|
from | String | 修改之前的列名 | field_1 |
to | String | 修改之后的列名 | field_2 |
请求示例
JSON
1POST /v1/task/schema/schemaUpdateList
2Host: dts.baidubce.com
3Content-Type: application/json
4Authorization: bce-auth-v1/5a6f0606bf5e48f29dd132aa76aa5182/2017-06-12T13:13:05Z/1800/content-type;host;x-bce-date/8baeafe6bfc35b0cf6205e87e4ce6c0dbb442375951ace4d16e6c7a4dab95943
5<公共请求头>
6{
7 "dtsId" : "dtsmxxxxxxxxxx",
8}
响应示例
JSON
1HTTP/1.1 200 OK
2<公共响应头>
3
4{
5 "taskList": [
6 {
7 "taskId": "dtsmyfsdfdsafsfm",
8 "updateTime": "2023-05-18 03:27:09",
9 "status": "checkPass",
10 "oldSchema": [
11 {
12 "type": "table",
13 "src": "db1.table1",
14 "dst": "db2.table2",
15 "where": "",
16 "field": null
17 }
18 ],
19 "newSchema": [
20 {
21 "type": "table",
22 "src": "db1.table1",
23 "dst": "db2.table2",
24 "where": "",
25 "field": null
26 },
27 {
28 "type": "table",
29 "src": "db3.table3",
30 "dst": "db3.table3",
31 "where": "",
32 "field": null
33 }
34 ]
35 }
36 ]
37}
错误码
请参考通用错误码