获取最新数据库对象
用来获取某一个集群所包含的各个 database、表(以及包含的列和索引)的信息,相对于获取数据库对象先查 cache 再查集群,本接口会直接查集群
接口URL
/api/v1/dms/sqleditor/clusters/{clusterID}/meta
请求方式
POST
路径变量
参数名 | 示例值 | 参数描述 |
---|---|---|
clusterID | tidb-d1590298fecd3afe | cluster ID |
认证方式
Bearer auth
成功响应示例
{
"Data": {
"dbs": [
{
"name": "INFORMATION_SCHEMA",
"tables": [
{
"name": "ANALYZE_STATUS",
"columns": [
{
"name": "TABLE_SCHEMA",
"dataType": "varchar(64)",
"nullable": true
},
{
"name": "TABLE_NAME",
"dataType": "varchar(64)",
"nullable": true
},
...
],
"indices": []
},
...
]
},
...
{
"name": "test",
"tables": []
}
]
},
"Success": true
}
参数名 | 示例值 | 参数类型 | 参数描述 |
---|---|---|---|
Data | - | Object | - |
Data.dbs | - | Array | 数据库列表 |
Data.dbs.name | INFORMATION_SCHEMA | String | 数据库名 |
Data.dbs.tables | - | Array | 数据库表格列表 |
Data.dbs.tables .name |
ANALYZE_STATUS | String | 表名 |
Data.dbs.tables .columns |
- | Array | 列的列表 |
Data.dbs.tables .columns.name |
TABLE_SCHEMA | String | 列名 |
Data.dbs.tables .columns.dataType |
varchar(64) | String | 列类型 |
Data.dbs.tables .columns.nullable |
true | Boolean | 列是否可为空 |
Data.dbs.tables .indices |
- | Array | - |
Success | true | Boolean | 调用是否成功 |