本文介绍如何通过HTTP API获取Collection中一个已存在的Partition的统计信息,如Doc数等。
前提条件
Method与URL
HTTP
GET https://{Endpoint}/v1/collections/{CollectionName}/partitions/{PartitionName}/stats
使用示例
说明
-
需要使用您的api-key替换示例中的YOUR_API_KEY、您的Cluster Endpoint替换示例中的YOUR_CLUSTER_ENDPOINT,代码才能正常运行。
-
本示例需要参考新建Collection-使用示例提前创建好名称为
quickstart的Collection -
本示例需要参考新建Partition-使用示例提前创建好名称为
shoes的Partition
Shell
curl -H 'dashvector-auth-token: YOUR_API_KEY' \
https://YOUR_CLUSTER_ENDPOINT/v1/collections/quickstart/partitions/shoes/stats
# example output:
# {
# "request_id": "14448bcb-c9a3-49a8-9152-0de3990bce59",
# "code": 0,
# "message": "Success",
# "output": {
# "total_doc_count": "0"
# }
# }