Describe a partition

更新时间: 2026-06-10 12:30:14

This topic describes how to retrieve the status of a partition in a collection by using the DashVector SDK for Python.

Prerequisites

API definition

Collection.describe_partition(name: str) -> DashVectorResponse

Example

Note
  1. To run the example code, replace YOUR_API_KEY and YOUR_CLUSTER_ENDPOINT with your API key and cluster endpoint.

  2. Create a collection named quickstart. For more information, see the example in Create a collection.

  3. Create a partition named shoes. For more information, see the example in Create a partition.

import dashvector

client = dashvector.Client(
    api_key='YOUR_API_KEY',
    endpoint='YOUR_CLUSTER_ENDPOINT'
)
collection = client.get(name='quickstart')

ret = collection.describe_partition('shoes')

print(ret)
# example output:
# {"request_id":"296267a7-68e2-483a-87e6-5992d85a5806","code":0,"message":"","output":"SERVING"}

Request parameters

Parameter

Type

Default

Description

name

str

-

The name of the partition.

Response parameters

Note

The operation returns a DashVectorResponse object. The following table describes the fields in this object.

Field

Type

Description

Example

code

int

The status code returned for the request. A value of 0 indicates success. For more information, see Status codes.

0

message

str

The response message.

success

request_id

str

The request ID.

19215409-ea66-4db9-8764-26ce2eb5bb99

output

str

The status of the partition. For more information, see Status.

SERVING

上一篇: Create a partition 下一篇: List partitions