Skip to main content
POST
/
collections
/
{collectionName}
/
docs
/
fetch
cURL
curl --request POST \
  --url https://{projectHost}/collections/{collectionName}/docs/fetch \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "ids": [
    "example-doc-id-1",
    "example-doc-id-2"
  ]
}
'
{
  "total": 2,
  "took": 10,
  "docs": [
    {
      "collection": "example-collection-name",
      "doc": {
        "example-field1": "example-value1",
        "example-field2": [
          0.1,
          0.2,
          0.3
        ]
      }
    },
    {
      "collection": "example-collection-name",
      "doc": {
        "example-field1": "example-value2",
        "example-field2": [
          0.4,
          0.5,
          0.6
        ]
      }
    }
  ],
  "isDocsInline": true
}

Authorizations

x-api-key
string
header
required

Project API Key.

Path Parameters

collectionName
string
required

Collection name.

Body

application/json
ids
string[]
required

A list of document IDs to fetch. Note that the maximum number of document IDs is 100.

consistentRead
boolean
default:false

If your application requires a strongly consistent read, set consistentRead to true. Although a strongly consistent read might take more time than an eventually consistent read, it always returns the last updated value.

includeVectors
boolean
default:false

If your application need to include vector values in the response, set includeVectors to true.

fields
object

An object to specify a list of field names to include and/or exclude in the result.

partitionFilter
PartitionFilter · object

Response

Fetched documents.

total
integer
required

Total number of documents returned.

took
integer
required

Elapsed time in milliseconds.

docs
object[]
required
isDocsInline
boolean
required

Whether the list of documents is included.

docsUrl
string

Download URL for the list of documents.