Skip to main content

Index Directory

directory_path
string
required
Absolute path to the directory to re-index
POST /api/index/directory Force re-index all files in a directory, bypassing the normal watcher flow.
cURL
curl -X POST http://localhost:60534/api/index/directory \
  -H "Content-Type: application/json" \
  -d '{"directory_path": "/Users/username/Documents"}'

Response

201 Success
{
  "success": true,
  "message": "Started indexing directory: /Users/username/Documents",
  "files_indexed": 0
}

Index File

file_path
string
required
Absolute path to the file to index
POST /api/index/file Index a single file directly through the pipeline.
cURL
curl -X POST http://localhost:60534/api/index/file \
  -H "Content-Type: application/json" \
  -d '{"file_path": "/Users/username/Documents/report.pdf"}'

Response

201 Success
{
  "success": true,
  "message": "Successfully indexed file: /Users/username/Documents/report.pdf",
  "file_id": null
}
Both endpoints return 201 and process asynchronously. Monitor progress via the /api/updates SSE stream.