v1
latestOpenAPI 3.1.02026-08-04253331435.1 KBRAG Files
Get Rag File
Download the source file backing a RAG document.
(data_source, id) together identify the file — each source's document table has an independent autoincrement ID space, so id alone is ambiguous.
Responses: 200 — file body + detected mime type. 404 — no matching document or no file_path on the row. 502 — S3 download failed.
get/api/internal/rag/files/{data_source}/{id}
Path parameters
data_source'meeting_minutes' | 'annual_budgets' | 'procurement_guidelines' required
Supported sources for RAG file downloads.
Each value matches the key the ML team's nationgraph_rag.database_search uses in its DATA_MAP. Not every chunk-search endpoint has a backing file — YouTube videos, for example, don't live in S3, so they're not exposed here.
idinteger required
Response
Successful Response
{"stackTrail":"paths:/api/internal/rag/files/{data_source}/{id}:get:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}