milvus-logo
LFAI
< Docs
  • RESTful
    • v2

Get Partition Statistics

POST
http://${MILVUS_URI}/v2/vectordb/partitions/get_stats

This operations gets the number of entities in a partition.

Example

export MILVUS_URI="localhost:19530"

curl --location --request POST "http://${MILVUS_URI}/v2/vectordb/partitions/get_stats" \
--header "Content-Type: application/json" \
--data-raw '{
    "partitionName": "january",
    "collectionName": "quick_setup"
}'

Possible response is similar to the following :

{
    "code": 200,
    "data": {
        "rowCount": 0
    }
}

Request

Parameters

  • Header parameters

    ParameterDescription
    Request-Timeoutinteger
    The timeout duration for this operation.
    Setting this to None indicates that this operation timeouts when any response arrives or any error occurs.
    Authorizationstring
    The authentication token.
  • No query parameters required

  • No path parameters required

Request Body

{
    "dbName": "string",
    "collectionName": "string",
    "partitionName": "string"
}
ParameterDescription
dbNamestring
The name of an existing database. The value defaults to default.
collectionName *string
The name of an existing collection.
partitionName *string
The name of the target partition of this operation.

Response

成功

Response Bodies

  • Response body if we process your request successfully
{
    "code": "integer",
    "data": {
        "rowCount": "integer"
    }
}
  • Response body if we failed to process your request
{
    "code": integer,
    "message": string
}

Properties

The properties in the returned response are listed in the following table.

PropertyDescription
codeinteger
Indicates whether the request succeeds.
  • 200: The request succeeds.
  • Others: Some error occurs.
dataobject
data.rowCountinteger
The number of entities.
messagestring
Indicates the possible reason for the reported error.
Feedback

Was this page helpful?