All Products
Search
Document Center

DashVector:Delete a collection

Last Updated:Mar 10, 2026

Delete a collection and all its data using the DashVector Python SDK.

Prerequisites

Before you begin, make sure that you have:

API definition

Client.delete(name: str) -> DashVectorResponse

Request parameter

ParameterTypeRequiredDescription
namestrYesName of the collection to delete

Response

The method returns a DashVectorResponse object:

FieldTypeDescriptionExample
codeintStatus code. 0 indicates success.0
messagestrResponse messagesuccess
request_idstrUnique request ID for troubleshooting19215409-ea66-4db9-8764-26ce2eb5bb99

Example

Important

Deleting a collection permanently removes all its data. This action cannot be undone.

Replace the following placeholders before running the code:

PlaceholderDescription
<your-api-key>Your DashVector API key
<your-cluster-endpoint>Your cluster endpoint
import dashvector

# Initialize the client
client = dashvector.Client(
    api_key='<your-api-key>',
    endpoint='<your-cluster-endpoint>'
)

# Delete the collection and all its data
resp = client.delete(name='quickstart')
print(resp)

Expected output on success:

code: 0
message: success
request_id: 19215409-ea66-4db9-8764-26ce2eb5bb99
Note

This example deletes a collection named quickstart. To create this collection, see the "Example" section of Create a collection.

What's next