GET /api/get_chunks
Retrieves chunks from a document, optionally filtered by file path and search term.
Personal access token scope: sources:read.
bearerAuthorizationBearer <token>A session token or a personal access token. Leave it empty when the instance runs without authentication (AUTH_TYPE unset).
id?stringThe document ID
page?stringPage number for pagination
per_page?stringNumber of chunks per page
path?stringOptional: Filter chunks by relative file path
search?stringOptional: Search term to filter chunks by title or content
injection?stringOptional: flagged keeps the chunks whose cached prompt-injection score is suspected or high (marked safe ones included)
Success
curl -X GET 'http://localhost:7091/api/get_chunks'Get the directory structure for a document GET
Get the directory structure for a document. [Personal access token](/API/personal-access-tokens) scope: `sources:read`.
Get sources with pagination, sorting and filtering GET
Get sources with pagination, sorting and filtering. Each row carries `used_by` (the agents using it). `kind_counts` counts every kind with the search and usage filters applied; `usage_counts` counts all/in_use/unused with the search and kind filters applied. [Personal access token](/API/personal-access-tokens) scope: `sources:read`.