Skip to main content

Drop Collection

Drops a collection. This operation erases your collection data. Exercise caution when performing this operation.


POST
https://{cluster-endpoint}/v1/vector/collections/drop

Example

Notes

You can use either of the following ways to authorize:

  • An API Key with appropriate permissions.
  • A colon-joined username and password of the target cluster. For example, username:p@ssw0rd.
curl --request POST \
--url "${CLUSTER_ENDPOINT}/v1/vector/collections/drop" \
--header "Authorization: Bearer ${TOKEN}" \
--header "accept: application/json" \
--header "content-type: application/json" \
-d '{
"collectionName": "medium_articles"
}'

Success response:

{
"code": 200,
"data": {}
}

Request

Parameters

  • No query parameters required

  • No path parameters required

Request Body

{
"dbName": "string",
"collectionName": "string"
}
ParameterDescription
dbNamestring
The name of the database.
collectionNamestring
The name of the collection to delete.

Response

Returns an empty object.

Response Bodies

  • Response body if we process your request successfully
{
"code": "integer",
"data": {}
}
  • Response body if we failed to process your request
{
"code": integer,
"message": string
}

Properties

The properties in the returned response are listed in the following table.

PropertyDescription
codeinteger
dataobject
messagestring
Indicates the possible reason for the reported error.

Possible Errors

CodeError Message
80000Incorrect parameter: xxx
80001The token is illegal
80002The token is invalid
80020Cluster not exist or you don't have permission.
80022Dedicated cluster not support this operation.
90001The collection xxx does not exist. You can use ListCollections to view the list of existing collections.
90011Invalid CollectionName. Reason: Name contains only alphanumeric letters and underscores
90102The cluster does not exist in current region.
90103The clusterId parameter is empty in the request path.
90138No drop collection content provided.
90139Type mismatch for field 'xxx'. expected type:xxx