跳到主要内容

查看 Partition 统计信息 (V2)

本接口可以查看指定 Partition 中存放的 Entity 数量。

POST/v2/vectordb/partitions/get_stats
连接端点

该 API 的 Base URL 格式如下:

https://${CLUSTER_ENDPOINT}

📘说明
  • 你需要填入您的 Zilliz Cloud 集群的 ${CLUSTER_ENDPOINT}
  • 您可以使用 查看集群详情 V2 来获取集群的 Endpoint.
shell
export CLUSTER_ENDPOINT=""
参数
Authorizationstringheader必填项

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

示例值:Bearer {{TOKEN}}
请求体
dbNamestring

数据库名称。

collectionNamestring必填项

Collection 名称。

partitionNamestring必填项

待查看的 Partition 名称。

bash
export TOKEN="db_admin:xxxxxxxxxxxxx"

curl --request POST \
--url "${CLUSTER_ENDPOINT}/v2/vectordb/partitions/get_stats" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Request-Timeout: 5" \
--header "Content-Type: application/json" \
-d '{
"partitionName": "january",
"collectionName": "quick_setup"
}'
响应

返回指定 Partition 中存放的 Entity 数量。

codeinteger

响应码。

示例值:0
dataobject

指定 Partition 的统计信息。

rowCountinteger

Entity 数量。

返回错误消息。

codeinteger

响应码。

messagestring

错误描述。

Successjson
{
"code": 0,
"data": {
"rowCount": 0
}
}
Ctrl I