Describe a collection
Retrieve the status, schema, and configuration of a DashVector collection using the Python SDK.
Prerequisites
Before you begin, make sure you have:
A DashVector cluster (Create a cluster)
An API key (Manage API keys)
The DashVector SDK installed (Install DashVector SDK)
An existing collection, such as
quickstart(Create a collection)
API signature
Client.describe(name: str) -> DashVectorResponseRequest parameter
Parameter | Type | Required | Description |
| str | Yes | The name of the collection to describe |
Example
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 |
| int | Status code. |
|
| str | Result description. Empty on success. |
|
| str | Unique request identifier for troubleshooting. |
|
| CollectionMeta | Collection metadata. For the full definition, see CollectionMeta. | -- |
CollectionMeta fields
Field | Type | Description |
| str | Collection name |
| int | Vector dimension |
| str | Vector data type |
| str | Distance metric |
| dict | Schema mapping of field names to their data types |
| str | Collection status |
| dict | Mapping of partition names to their statuses |