获取数据库对象
用来获取某一个集群所包含的各个 database、表(以及包含的列和索引)的信息
接口URL
/api/v1/dms/sqleditor/clusters/{clusterID}/meta
请求方式
GET
Content-Type
application/json
认证方式
Bearer auth
路径变量
参数名 | 示例值 | 参数描述 |
---|---|---|
clusterID | tidb-f91e1f860d360502 | cluster ID |
成功响应示例
{
"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
},
{
"name": "PARTITION_NAME",
"dataType": "varchar(64)",
"nullable": true
},
{
"name": "JOB_INFO",
"dataType": "longtext",
"nullable": true
},
// ...
],
"indices": []
}
]
},
]
}
"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 | 调用是否成功 |