Describe a collection

更新时间: 2026-03-10 22:57:28

Retrieve the status, schema, and configuration of a DashVector collection using the Python SDK.

Prerequisites

Before you begin, make sure you have:

API signature

Client.describe(name: str) -> DashVectorResponse

Request parameter

Parameter

Type

Required

Description

name

str

Yes

The name of the collection to describe

Example

Note

You need to replace YOUR_API_KEY with your API key and YOUR_CLUSTER_ENDPOINT with the endpoint of your cluster for the code to run properly.

import dashvector

client = dashvector.Client(
    api_key='YOUR_API_KEY',
    endpoint='YOUR_CLUSTER_ENDPOINT'
)

# Describe the 'quickstart' collection
response = client.describe(name='quickstart')
print(response)

Sample response

{
  "request_id": "8d3ac14e-5382-4736-b77c-4318761ddfab",
  "code": 0,
  "message": "",
  "output": {
    "name": "quickstart",
    "dimension": 4,
    "dtype": "FLOAT",
    "metric": "dotproduct",
    "fields_schema": {
      "name": "STRING",
      "age": "INT",
      "weight": "FLOAT",
      "id": "LONG"
    },
    "status": "SERVING",
    "partitions": {
      "default": "SERVING"
    }
  }
}

Response parameters

The method returns a DashVectorResponse object.

Parameter

Type

Description

Example

code

int

Status code. 0 indicates success. For other values, see Status codes.

0

message

str

Result description. Empty on success.

success

request_id

str

Unique request identifier for troubleshooting.

19215409-ea66-4db9-8764-26ce2eb5bb99

output

CollectionMeta

Collection metadata. For the full definition, see CollectionMeta.

--

CollectionMeta fields

Field

Type

Description

name

str

Collection name

dimension

int

Vector dimension

dtype

str

Vector data type

metric

str

Distance metric

fields_schema

dict

Schema mapping of field names to their data types

status

str

Collection status

partitions

dict

Mapping of partition names to their statuses

上一篇: Create a collection 下一篇: Get a collection