List documents (GET)
Retrieve a paginated list of documents in your index.
GET
/api/v1/documentsList indexed documents.
Query parameters
| Parameter | Type | Description |
|---|---|---|
limit | number | Number of documents to return. Default 20, max 100. |
offset | number | Number of documents to skip. Default 0. |
Example
const response = await fetch(
"https://etoile.dev/api/v1/documents?limit=20&offset=0",
{
headers: {
Authorization: `Bearer ${process.env.ETOILE_SECRET_KEY}`,
},
},
);
const { documents } = await response.json();curl "https://etoile.dev/api/v1/documents?limit=20&offset=0" \
-H "Authorization: Bearer $ETOILE_SECRET_KEY"Response
{
"documents": [
{
"id": 1,
"external_id": "starry-night",
"collection": "paintings",
"title": "The Starry Night",
"type": "text",
"metadata": { "artist": "Vincent van Gogh", "year": 1889 },
"created_at": "2024-01-01T00:00:00.000Z",
"updated_at": "2024-01-01T00:00:00.000Z"
}
]
}Auth
Requires secret key.