Delete a collection

更新时间:
复制 MD 格式

Delete a DashVector collection and all its data through the HTTP API.

Important

Deleting a collection permanently removes all data in it and cannot be undone.

Prerequisites

Before you begin, ensure that you have:

Method and URL

DELETE https://{Endpoint}/v1/collections/{CollectionName}

Example

The following example deletes a collection named quickstart.

Note

Create the quickstart collection before running this example. For instructions, see the "Example" section of Create a collection.

curl -XDELETE -H 'dashvector-auth-token: <your-api-key>' \
  https://<your-cluster-endpoint>/v1/collections/quickstart

# Example response:
# {"request_id":"19215409-ea66-4db9-8764-26ce2eb5bb99","code":0,"message":""}

Replace the following placeholders with your actual values:

Placeholder

Description

<your-api-key>

Your API key

<your-cluster-endpoint>

The endpoint of your cluster, available on the cluster details page in the console

Request parameters

Parameter

Location

Type

Required

Description

{Endpoint}

path

str

Yes

The endpoint of your cluster. Find this on the cluster details page in the console.

{CollectionName}

path

str

Yes

The name of the collection to delete.

dashvector-auth-token

header

str

Yes

The API key for authentication.

Response parameters

Parameter

Type

Description

Example

code

int

Status code. 0 indicates success. For more information, see Status codes.

0

message

str

Response message. Empty on success.

success

request_id

str

Unique request identifier for troubleshooting.

19215409-ea66-4db9-8764-26ce2eb5bb99