Skip to Content
Docs

GET /api/get_chunks

GET
/api/get_chunks

Retrieves chunks from a document, optionally filtered by file path and search term.

Personal access token scope: sources:read.

Authorization

bearer
headerAuthorizationBearer <token>

A session token or a personal access token. Leave it empty when the instance runs without authentication (AUTH_TYPE unset).

Query Parameters

id?string

The document ID

page?string

Page number for pagination

per_page?string

Number of chunks per page

path?string

Optional: Filter chunks by relative file path

search?string

Optional: Search term to filter chunks by title or content

injection?string

Optional: flagged keeps the chunks whose cached prompt-injection score is suspected or high (marked safe ones included)

Response Body

Success

Example Request
curl -X GET 'http://localhost:7091/api/get_chunks'
Example Response200
Empty