milvus-logo
LFAI
< Docs
  • RESTful
    • v1

Delete

Deletes one or more entities from a collection.

POST
https://${MILVUS_URI}/v1/vector/delete

Example

Delete a collection whose ID is an integer:

export MILVUS_URI="http://localhost:19530"


curl --request POST \
     --url "${MILVUS_URI}/v1/vector/delete" \
     --header "accept: application/json" \
     --header "content-type: application/json" \
     -d '{
       "collectionName": "medium_articles",
       "id": 1
     }'

Delete a collection whose ID is a string:

export MILVUS_URI="http://localhost:19530"


curl --request POST \
     --url "${MILVUS_URI}/v1/vector/delete" \
     --header "accept: application/json" \
     --header "content-type: application/json" \
     -d '{
       "collectionName": "medium_articles",
       "id": "id1"
     }'

Delete a list of collections whose IDs are integers:

export MILVUS_URI="http://localhost:19530"


curl --request POST \
     --url "${MILVUS_URI}/v1/vector/delete" \
     --header "accept: application/json" \
     --header "content-type: application/json" \
     -d '{
        "collectionName": "medium_articles",
        "id": [1,2,3,4]
      }'

Delete a list of collections whose IDs are strings:

export MILVUS_URI="http://localhost:19530"


curl --request POST \
     --url "${MILVUS_URI}/v1/vector/delete" \
     --header "accept: application/json" \
     --header "content-type: application/json" \
     -d '{
        "collectionName": "medium_articles",
        "id": ["id1", "id2", "id3","id4"]
      }'

Request

Parameters

  • No query parameters required

  • No path parameters required

Request Body

{
    "collectionName": "string",
    "dbName": "string",
    "id": "string"
}
ParameterDescription
dbNamestring
The name of the database.
collectionNamestring(required)
The name of the collection to which this operation applies.
idstring(required)
The ID of the entity to be retrieved
{
    "collectionName": "string",
    "dbName": "string",
    "id": []
}
ParameterDescription
dbNamestring
The name of the database.
collectionNamestring(required)
The name of the collection to which this operation applies.
idarray(required)
An array of IDs of the entities to be retrieved
{
    "collectionName": "string",
    "dbName": "string",
    "id": "integer"
}
ParameterDescription
dbNamestring
The name of the database.
collectionNamestring(required)
The name of the collection to which this operation applies.
idinteger(required)
The ID of the entity to be retrieved
{
    "collectionName": "string",
    "dbName": "string",
    "id": []
}
ParameterDescription
dbNamestring
The name of the database.
collectionNamestring(required)
The name of the collection to which this operation applies.
idarray(required)
An array of IDs of the entities to be retrieved

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
1806please check the primary key and its' type can only in [int
Feedback

Was this page helpful?