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 ] } } ] }
Lookup and return documents by document IDs from a collection.
Project API Key.
Collection name.
Fetched documents.
The response is of type object.
object
Was this page helpful?