DumpAPI Reference
Ask a Question
POST/api/rag
Ask a question about your vault content. Returns a streaming SSE response with AI-generated answer and source attribution.
Body
{
query: string // Your question (required, min 1 char)
limit?: number // Max context items (1-20, default 10)
}Example
curl -X POST "http://localhost:3106/api/rag" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{"query": "What are the key benefits of server components?"}' \
--no-bufferResponse (SSE Stream)
data: {"status":"embedding"}
data: {"status":"searching"}
data: {"status":"thinking"}
data: {"text":"Based on your vault, "}
data: {"text":"server components provide..."}
data: {"done":true,"sources":[{"id":"uuid","title":"RSC Deep Dive","url":"https://...","source_type":"article"}]}Event Types
| Event | Description |
|---|---|
status | Pipeline progress (embedding, searching, thinking) |
text | Streamed answer chunk |
error | Error message if pipeline fails |
done | Final event with sources array |
If no relevant content is found, the response will be: "Nao encontrei conteudo relevante no vault para essa pergunta."
Status Codes
| Code | Description |
|---|---|
| 200 | SSE stream started |
| 400 | Invalid body or missing query |
| 401 | Unauthorized |
RAG Stats
GET/api/rag/stats
Get statistics about the RAG index.
curl "http://localhost:3106/api/rag/stats"Response
{
"totalChunks": 1247,
"pendingEmbeddings": 3,
"lastIngest": "2026-02-23T12:00:00Z"
}| Field | Description |
|---|---|
totalChunks | Total chunks in the RAG index |
pendingEmbeddings | Chunks waiting for embedding generation |
lastIngest | Timestamp of the most recent document ingestion |