Skip to main content

Get File Statistics

GET /api/files/stats Get aggregate statistics about all indexed files.
cURL
curl http://localhost:60534/api/files/stats

Response

total_files
number
Total number of indexed files
total_size
number
Total size in bytes (currently returns 0, tracking in progress)
file_types
object
Map of file extension to count
last_indexed
string | null
ISO 8601 timestamp of the most recently indexed file
200 Success
{
  "total_files": 342,
  "total_size": 0,
  "file_types": {},
  "last_indexed": null
}

Get File by ID

GET /api/files/{file_id} Retrieve metadata for a specific file by its database ID.
cURL
curl http://localhost:60534/api/files/1

Response

200 Success
{
  "id": 1,
  "filename": "report.pdf",
  "extension": "pdf",
  "created": "2025-01-15T10:30:00",
  "modified": "2025-01-15T14:22:00",
  "summary": "Quarterly financial report covering Q4 revenue and expenses.",
  "keywords": null
}
404 Not Found
{
  "error": "File not found"
}

Get Status

GET /api/status/ Check backend health and active job count.
cURL
curl http://localhost:60534/api/status/
200 Success
{
  "jobs": 2
}