跳到主要内容

查看 Collection 详情

Describes the details of a collection.

GET
/v1/vector/collections/describe
集群 Endpoint

该 API 的 Base URL 格式如下:

https://${CLUSTER_ENDPOINT}

📘说明
export CLUSTER_ENDPOINT=""
参数
Authorizationstringheaderrequired

认证令牌。应为具备适当权限的 API 密钥或用冒号分隔的用户名和密码,如 username:password

示例值:Bearer {{TOKEN}}
collectionNamestringqueryrequired

The name of the collection to describe.

export TOKEN="db_admin:xxxxxxxxxxxxx"

curl --request GET \
--url "${CLUSTER_ENDPOINT}/v1/vector/collections/describe?collectionName=undefined" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Content-Type: application/json"
响应200 - application/json
codeinteger

响应码。

dataobject

响应载荷,携带 Collection 详情。

collectionNamestring

Collection 名称。

descriptionstring

Collection 描述。

fieldsarray

字段列表。

[]fieldsobject

A field object

autoIdboolean

主键是否自动增长。此参数仅在当前字段为主键时展示。

descriptionstring

当前字段描述。

namestring

当前字段名称。

primaryKeyboolean

当前字段是否为主键。

typestring

当前字段值的数据类型。

indexesarray

索引列表。

[]indexesobject

An index object

fieldNamestring

当前索引对应的字段名称。

indexNamestring

当前索引名称。

metricTypestring

用于度量向量间相似度的度量类型。

loadstring

当前 Collection 的载入状态。

enableDynamicFieldboolean

是否已启用保留的动态字段,用于存放 Schema 中未定义的字段。

A failure response.

codeinteger

响应码。

messagestring

错误描述。

{
"code": 200,
"data": {
"aliases": [],
"autoId": false,
"collectionID": 448707763883002000,
"collectionName": "test_collection",
"consistencyLevel": "Bounded",
"description": "",
"enableDynamicField": true,
"fields": [
{
"autoId": false,
"description": "",
"id": 100,
"name": "id",
"partitionKey": false,
"primaryKey": true,
"type": "Int64"
},
{
"autoId": false,
"description": "",
"id": 101,
"name": "vector",
"params": [
{
"key": "dim",
"value": "5"
}
],
"partitionKey": false,
"primaryKey": false,
"type": "FloatVector"
}
],
"indexes": [
{
"fieldName": "vector",
"indexName": "vector",
"metricType": "COSINE"
}
],
"load": "LoadStateLoaded",
"partitionsNum": 1,
"properties": []
}
}