milvus-logo
LFAI
< Docs
  • RESTful

Drop Collection

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

POST
https://${MILVUS_HOST}:${MILVUS_PORT}/v1/vector/collections/drop

Example

Drop a collection named medium_articles:

curl --request POST \
     --url "${MILVUS_HOST}:${MILVUS_PORT}/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

{
    "collectionName": "string"
}
ParameterDescription
collectionNamestring(required)
The name of the collection to delete.

Response

Returns an empty object.

Response Bodies

  • Response body if we process your request successfully
{
    "code": 200,
    "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
Indicates whether the request succeeds.
  • 200: The request succeeds.
  • Others: Some error occurs.
dataobject
A data object.
messagestring
Indicates the possible reason for the reported error.

Possible Errors

Error CodeDescription
800database not found
1800user hasn't authenticate
1801can only accept json format request
1802missing required parameters
Feedback

Was this page helpful?