Get
POST
http://${MILVUS_URI}/v2/vectordb/entities/get
This operation gets specific entities by their IDs.
Example
export MILVUS_URI="localhost:19530"
curl --location --request POST "http://${MILVUS_URI}/v2/vectordb/entities/get" \
--header "Content-Type: application/json" \
--data-raw '{
"collectionName": "quick_setup",
"id": [
1,3,5
],
"outputFields": [
"color"
]
}'
Possible response is similar to the following .
{
"code": 200,
"data": [
{
"color": "red_7025",
"id": 1
},
{
"color": "pink_9298",
"id": 3
},
{
"color": "yellow_4222",
"id": 5
}
]
}
Request
Parameters
Header parameters
Parameter Description Request-Timeout
integer
The timeout duration for this operation.
Setting this to None indicates that this operation timeouts when any response arrives or any error occurs.Authorization
string
The authentication token.No query parameters required
No path parameters required
Request Body
{
"dbName": "string",
"collectionName": "string",
"outputFields": [],
"partitionNames": []
}
Parameter | Description | |||
---|---|---|---|---|
dbName | string The name of the database. | |||
collectionName * | string The name of the collection to which this operation applies. | |||
id | __integer \ | string \ | array[integer] \ | array[string]__ A specific entity ID or a list of entity IDs. |
outputFields | array An array of fields to return along with the search results. | |||
outputFields[] | string | |||
partitionNames | array The name of the partitions to which this operation applies. | |||
partitionNames[] | string PartitionName |
Response
A list of dictionaries with each dictionary representing a queried entity.
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.
Property | Description |
---|---|
code | integer Indicates whether the request succeeds.
|
data | array |
data[] | object |
message | string Indicates the possible reason for the reported error. |