Skip to main content
POST
/
projects
/
{projectId}
/
indexes
/
{indexName}
/
docs
/
fetch
cURL
curl --request POST \
  --url https://{baseUrl}/{version}/projects/{projectId}/indexes/{indexName}/docs/fetch \
  --header 'content-type: <content-type>' \
  --header 'x-api-key: <x-api-key>' \
  --data '{
  "ids": [
    "<string>"
  ],
  "consistentRead": false,
  "includeVectors": false
}'
{
  "total": 123,
  "took": 123,
  "docs": [
    {
      "index": "<string>",
      "doc": {}
    }
  ]
}

Headers

content-type
string
default:application/json
required
x-api-key
string
required

Project API Key.

Path Parameters

projectId
string
required

Project ID.

indexName
string
required

Index name.

Body

application/json
ids
string[]
required

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

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.

Response

200 - application/json

Fetched documents.

total
integer

Total number of documents returned.

took
integer

Elapsed time in milliseconds.

docs
object[]