milvus-logo
LFAI
< Docs
  • RESTful
    • v2

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

    ParameterDescription
    Request-Timeoutinteger
    The timeout duration for this operation.
    Setting this to None indicates that this operation timeouts when any response arrives or any error occurs.
    Authorizationstring
    The authentication token.
  • No query parameters required

  • No path parameters required

Request Body

{
    "dbName": "string",
    "collectionName": "string",
    "outputFields": [],
    "partitionNames": []
}
ParameterDescription
dbNamestring
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.
outputFieldsarray
An array of fields to return along with the search results.
outputFields[]string
partitionNamesarray
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.

PropertyDescription
codeinteger
Indicates whether the request succeeds.
  • 200: The request succeeds.
  • Others: Some error occurs.
dataarray
data[]object
messagestring
Indicates the possible reason for the reported error.
Feedback

Was this page helpful?