🎉 CloudCanal 上线 V6.6.0.0:开放 TDSQL PostgreSQL 链路,优化 Kudu DDL 同步能力
跳到主要内容

表列表

接口描述​

获取数据库表列表,以便创建任务时选择需要迁移同步的表

接口地址​

/cloudcanal/console/api/v1/openapi/datasource/listtables

请求方式​

POST

请求参数​

参数名称参数说明请求类型是否必须数据类型
clusterId尝试连接数据源的机器集群idbody是long
dataSourceId目标数据源idbody是long
hostType所选数据源网络类型

PRIVATE(内网)
PUBLIC(公网)
body是string
dbName数据库名称,根据不同数据源类型必填不一,关系型数据库必填body否string
schemaschema名称,根据不同数据源必填不一body否string

公共响应结果​

参数名称参数说明类型(java)不为空
code1:成功 0:失败string是
dataobject否
msgstring否
requestIdstring是

data 参数说明​

data 为一个数组,其中参数说明如下

参数名称参数说明类型(java)不为空
dbName表所属的 dbNamestring否
schemaName表所属的 schemastring否
tableName关系型数据库为表名称,消息为 topic , MongoDB 为 collection, 缓存为 namespacestring是
hasPk表是否有主键boolean否
indexMeta如果数据源为 ElasticSearch , 则可能有非 null 值string否
mqTopicPartitions如果数据源是消息中间件且支持 partition (如 Kafka、RocketMQ 等), 则表示该 topic partition值int否

响应示例​

{
"requestId": "3962501d-2bd7-11ec-b616-c1fbb3356577",
"code": "1",
"msg": "request success",
"data": [
{
"dbName": "console",
"schemaName": "",
"tableName": "alert_config_detail",
"hasPk": true,
"indexMeta": null,
"mqTopicPartitions": 0
},
{
"dbName": "console",
"schemaName": "",
"tableName": "alert_event_log",
"hasPk": true,
"indexMeta": null,
"mqTopicPartitions": 0
},
{
"dbName": "console",
"schemaName": "",
"tableName": "aliyun_sts_token",
"hasPk": true,
"indexMeta": null,
"mqTopicPartitions": 0
}
]
}
联系我们
微信二维码

扫码添加微信,获取技术支持