Delete
Deletes one or more entities from a collection.
POST
https://${MILVUS_HOST}:${MILVUS_PORT}/v1/vector/delete
Example
Delete a collection whose ID is an integer:
curl --request POST \
--url "${MILVUS_HOST}:${MILVUS_PORT}/v1/vector/delete" \
--header "Authorization: Bearer ${TOKEN}" \
--header "accept: application/json" \
--header "content-type: application/json" \
-d '{
"collectionName": "medium_articles",
"id": 1
}'
Delete a collection whose ID is a string:
curl --request POST \
--url "${MILVUS_HOST}:${MILVUS_PORT}/v1/vector/delete" \
--header "Authorization: Bearer ${TOKEN}" \
--header "accept: application/json" \
--header "content-type: application/json" \
-d '{
"collectionName": "medium_articles",
"id": "id1"
}'
Delete a list of collections whose IDs are integers:
curl --request POST \
--url "${MILVUS_HOST}:${MILVUS_PORT}/v1/vector/delete" \
--header "Authorization: Bearer ${TOKEN}" \
--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:
curl --request POST \
--url "${MILVUS_HOST}:${MILVUS_PORT}/v1/vector/delete" \
--header "Authorization: Bearer ${TOKEN}" \
--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",
"id": "string"
}
Parameter | Description |
---|---|
collectionName | string(required) The name of the collection to which this operation applies. |
id | string(required) The ID of the entity to be retrieved |
{
"collectionName": "string",
"id": []
}
Parameter | Description |
---|---|
collectionName | string(required) The name of the collection to which this operation applies. |
id | array(required) An array of IDs of the entities to be retrieved |
{
"collectionName": "string",
"id": "integer"
}
Parameter | Description |
---|---|
collectionName | string(required) The name of the collection to which this operation applies. |
id | integer(required) The ID of the entity to be retrieved |
{
"collectionName": "string",
"id": []
}
Parameter | Description |
---|---|
collectionName | string(required) The name of the collection to which this operation applies. |
id | array(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.
Property | Description |
---|---|
code | integer Indicates whether the request succeeds.
|
data | object A data object. |
message | string Indicates the possible reason for the reported error. |
Possible Errors
Error Code | Description |
---|---|
800 | database not found |
1800 | user hasn’t authenticate |
1801 | can only accept json format request |
1802 | missing required parameters |
1806 | please check the primary key and its’ type can only in [int |