跳到主要内容

数据库列表

接口描述

获取数据库实例的数据库列表信息

接口地址

/cloudcanal/console/api/v1/openapi/datasource/listdbs

请求方式

POST

请求参数

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

PRIVATE(内网)
PUBLIC(公网)
bodyString

公共响应结果

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

data 参数说明

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

参数名称参数说明类型(java)不为空
dbName数据库名称,根据不同数据源决定是否为空String
schemasschema,根据不同数据源决定是否为空ArrayList
caseSensitiveType大小写敏感类型,有LOWER和UPPERString

响应示例

{
"requestId": "01c584d2-2b5c-11ec-8c7e-d9df82935fdd",
"code": "1",
"msg": "request success",
"data": [
{
"dbName": "abc",
"schemas": []
},
{
"dbName": "canal_tsdb",
"schemas": []
},
{
"dbName": "cloudcanal",
"schemas": []
},
{
"dbName": "clouddm",
"schemas": []
},
{
"dbName": "col_project",
"schemas": []
},
{
"dbName": "console",
"schemas": []
},
{
"dbName": "crm9",
"schemas": []
},
{
"dbName": "data_error",
"schemas": []
},
{
"dbName": "dingtax",
"schemas": []
},
{
"dbName": "drds_1",
"schemas": []
},
{
"dbName": "drds_2",
"schemas": []
},
{
"dbName": "from_polardb_x",
"schemas": []
},
{
"dbName": "huge_tables",
"schemas": []
},
{
"dbName": "integration_src",
"schemas": []
},
{
"dbName": "ke",
"schemas": []
},
{
"dbName": "merge_db",
"schemas": []
},
{
"dbName": "merge_db_1",
"schemas": []
},
{
"dbName": "mq_test_source",
"schemas": []
},
{
"dbName": "mysiam_test",
"schemas": []
},
{
"dbName": "no_data",
"schemas": []
},
{
"dbName": "no_table",
"schemas": []
},
{
"dbName": "nobefore",
"schemas": []
},
{
"dbName": "not_supported",
"schemas": []
},
{
"dbName": "quartz",
"schemas": []
},
{
"dbName": "tpch",
"schemas": []
},
{
"dbName": "upper_case_db",
"schemas": []
},
{
"dbName": "urge",
"schemas": []
},
{
"dbName": "zeroday",
"schemas": []
}
]
}