The Documents API provides endpoints for uploading files, managing document lifecycle, controlling the ingestion queue, and inspecting the resulting knowledge graph entries.
Document Management
| Method | Endpoint | Description |
|---|
POST | /api/v1/documents/upload | Upload one or more files for ingestion |
GET | /api/v1/documents/ | List all documents |
GET | /api/v1/documents/ingestion-status | Ingestion status across all documents |
GET | /api/v1/documents/graph | Knowledge graph entries for ingested documents |
GET | /api/v1/documents/{doc_id}/preview | Preview a document (PDF, text, or structured) |
GET | /api/v1/documents/{doc_id}/download | Download the original file |
PATCH | /api/v1/documents/{doc_id}/status | Update document status |
POST | /api/v1/documents/{doc_id}/approve | Approve a document for ingestion |
POST | /api/v1/documents/{doc_id}/ingest | Trigger ingestion for a specific document |
DELETE | /api/v1/documents/{doc_id} | Delete a document |
Document Linking
| Method | Endpoint | Description |
|---|
POST | /api/v1/documents/{doc_id}/link | Create a relationship link from this document |
DELETE | /api/v1/documents/{doc_id}/link/{rel_id} | Remove a relationship link |
Ingestion Queue
| Method | Endpoint | Description |
|---|
POST | /api/v1/documents/queue/enqueue | Add documents to the ingestion queue |
POST | /api/v1/documents/queue/pause | Pause the ingestion queue |
POST | /api/v1/documents/queue/resume | Resume the ingestion queue |
GET | /api/v1/documents/queue/status | Current queue status and progress |
GET | /api/v1/documents/queue/stream | SSE stream for real-time queue updates |
DELETE | /api/v1/documents/queue/{doc_id} | Remove a document from the queue |
Next Steps