查询表详情
更新时间:2025-08-18
POST
http://{host}/v{version}/table?desc
查询指定表的详细信息。
权限说明
鉴权认证机制的详细内容请参见鉴权认证
请求参数
Headers 参数
除公共头域外,无其它特殊头域
URL 参数
version
string
API版本号,当前仅v1。
必选
host
string
"{实例IP}:{实例Port}"
必选
Body 参数
table
string
表的名称。
可选
database
string
库的名称。
可选
请求结构
GET /v{version}/table?desc HTTP/1.1
HOST: {Endpoint}
Authorization: {Authorization}
{
"database": "db_name",
"table": "table_name"
}
示例代码
请求示例
curl --location --request GET 'http://vdb.nXWNyPCOSLci.vdb.bj.baidubce.com/v1/table' \
--header 'Authorization: Bearer account=root&api_key=eC4bLRy2va******************************' \
--header 'Content-Type: application/json' \
--data '{
"database": "db_test",
"table": "table_test"
}'
返回响应
Headers 参数
除公共头域外,无其它特殊头域
返回参数
msg
string
返回信息
可选
code
integer
返回码
可选
table
object {9}
可选
显示子属性
隐藏子属性
database
string
库的名称
可选
table
string
表名
可选
createTime
string
创建时间
可选
description
string
表描述
可选
replication
integer
复制数,即单个表分区的副本数量(含主副本),取值范围为[1,10]。 若需要完整的高可用性特性,副本数需>=3。 注意:副本数需要小于等于数据节点(DataNode)的数量,否则无法正常建表。
可选
enableDynamicField
boolean
是否支持动态字段,默认为false。
可选
state
string
表的状态信息
可选
aliases
array
表的别名
可选
显示子属性
隐藏子属性
items
string
schema
object {0}
表的schema信息
可选
显示子属性
隐藏子属性
暂无参数
响应示例
{
"code": 0,
"msg": "Success",
"table": {
"database": "db_test",
"table":" table_test",
"createTime": "2024-02-02T12:02:08Z",
"description": "This is a testing table",
"replication": 3,
"partition": {
"partitionType": "HASH",
"partitionNum": 10
},
"enableDynamicField": false,
"state": "NORMAL",
"aliases": ["table_alias_1", "table_alias_2"],
"schema": {
"fields": [
{
"fieldName": "id",
"fieldType": "UINT64",
"primaryKey": true,
"partitionKey": true,
"autoIncrement": true,
"notNull": true
},
{
"fieldName":"title",
"fieldType":"STRING",
"notNull":true
},
{
"fieldName":"content",
"fieldType":"TEXT",
"notNull":true
},
{
"fieldName":"vector1",
"fieldType":"FLOAT_VECTOR",
"dimension":768,
"notNull":true
}
],
"indexes": [
{
"indexName":"title_idx",
"indexType":"SECONDARY",
"state":"NORMAL",
"field":"title"
},
{
"indexType":"HNSW",
"indexName":"vector1_idx",
"field":"vector1",
"autoBuild":false,
"metricType":"L2",
"params:"{"M":32,"efConstruction":200},
"state":"INVALID",
"indexMajorVersion":0
},
{
"indexName":"content_inverted_index",
"indexType":"INVERTED",
"state":"NORMAL",
"fields":["content"],
"params":{"analyzer":"DEFAULT_ANALYZER","parseMode":"COARSE_MODE"}
}
]
}
}
}
