get partition statistics

更新时间:
复制 MD 格式

Retrieve statistical information about a specific partition in a collection, such as the total document count. Use this endpoint to monitor data ingestion progress, verify data distribution across partitions, or check partition size before performing operations.

Prerequisites

Before you begin, make sure that you have:

Request syntax

GET https://{Endpoint}/v1/collections/{CollectionName}/partitions/{PartitionName}/stats

Request parameters

ParameterLocationTypeRequiredDescription
{Endpoint}PathStringYesThe cluster endpoint. You can find this on the cluster details page in the console.
{CollectionName}PathStringYesThe collection name.
{PartitionName}PathStringYesThe partition name.
dashvector-auth-tokenHeaderStringYesThe API key.

Response parameters

ParameterTypeDescriptionExample
codeIntegerThe status code. 0 indicates success. For other values, see Status codes.0
messageStringA human-readable status message.Success
request_idStringThe unique request identifier. Use this value when troubleshooting issues with technical support.19215409-ea66-4db9-8764-26ce2eb5bb99
outputObjectThe partition statistics object. Contains total_doc_count (String): the total number of documents in the partition. For the full data type definition, see PartitionStats.See the following example.

Example

This example retrieves statistics for a partition named shoes in the quickstart collection.

Note

Before you run this example:

  • Replace YOUR_API_KEY with your API key.

  • Replace YOUR_CLUSTER_ENDPOINT with your cluster endpoint.

  • Create a collection named quickstart. See the "Example" section in Create a collection.

  • Create a partition named shoes. See the "Example" section in Create a partition.

Request

curl -H 'dashvector-auth-token: YOUR_API_KEY' \
 https://YOUR_CLUSTER_ENDPOINT/v1/collections/quickstart/partitions/shoes/stats

Response

{
  "request_id": "14448bcb-c9a3-49a8-9152-0de3990bce59",
  "code": 0,
  "message": "Success",
  "output": {
    "total_doc_count": "0"
  }
}