Describe a partition

更新时间:
复制 MD 格式

Retrieve the status of a partition in a DashVector collection by using the HTTP API.

Method and URL

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

Prerequisites

Before you begin, make sure that you have:

Request parameters

ParameterLocationTypeRequiredDescription
{Endpoint}PathStringYesThe cluster endpoint. Find this on the Cluster details page in the console.
{CollectionName}PathStringYesThe name of the collection that contains the partition.
{PartitionName}PathStringYesThe name of the partition to query.
dashvector-auth-tokenHeaderStringYesThe API key for authentication.

Response parameters

ParameterTypeDescriptionExample
codeIntegerStatus code. 0 indicates success. For other values, see Status codes.0
messageStringThe returned message.success
request_idStringUnique request identifier for troubleshooting.19215409-ea66-4db9-8764-26ce2eb5bb99
outputStringCurrent partition status. For all possible values, see Status.SERVING

Example

The following example retrieves the status of a partition named shoes in the quickstart collection.

Note

Replace YOUR_API_KEY with your API key and YOUR_CLUSTER_ENDPOINT with the endpoint of your cluster.

Before running this example, create the required resources:

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

Sample response:

{
  "request_id": "296267a7-68e2-483a-87e6-5992d85a5806",
  "code": 0,
  "message": "",
  "output": "SERVING"
}

The output field returns SERVING, which indicates the partition is ready to handle requests. For all possible status values, see Status.