Delete a partition

更新时间:
复制 MD 格式

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

Warning

Deleting a partition is irreversible. All vectors and data in the partition are permanently deleted and cannot be recovered.

Prerequisites

Before you begin, make sure that you have:

Request syntax

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

Request parameters

ParameterLocationTypeRequiredDescription
{Endpoint}PathStringYesThe cluster endpoint. Find this on the cluster details page in the console.
{CollectionName}PathStringYesThe collection name.
{PartitionName}PathStringYesThe partition name.
dashvector-auth-tokenHeaderStringYesThe API key.

Response parameters

ParameterTypeDescriptionExample
codeIntegerThe status code. 0 indicates success. For other values, see Status codes.0
messageStringThe response message. Empty on success.""
request_idStringThe unique request ID. Use this for troubleshooting.19215409-ea66-4db9-8764-26ce2eb5bb99

Example

This example deletes a partition named shoes from the quickstart collection.

Before running this example, make sure that you have:

Replace the placeholders with your actual values:

PlaceholderDescription
<your-api-key>API key for your DashVector cluster
<your-cluster-endpoint>Endpoint of your DashVector cluster

Request

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

Response

A successful response returns code: 0:

{
  "request_id": "40a883e4-4101-4045-b9e5-c1996ffd1034",
  "code": 0,
  "message": ""
}

What's next