Welcome
The CosmaSense backend exposes a RESTful API for managing file indexing, search, queue control, and real-time updates. The backend runs on port60534 by default.
Base URL: http://localhost:60534
All endpoints are local-only and require no authentication. The backend is designed to run on your local machine and is not intended to be exposed to the internet.
Quick Start
Start the backend server:Endpoint Groups
Watch Directory
Add a directory to the watch list and start indexing
Search Files
Search indexed files using natural language queries
Watch Jobs
List and manage watched directory jobs
Queue Control
Pause, resume, and inspect the indexing queue
Scheduler
Configure automatic pause/resume based on system conditions
Real-time Updates
Stream processing status updates via Server-Sent Events
Filters
Configure file inclusion/exclusion patterns
Settings
Read and update application settings
Data Flow
File Processing States
When files are being indexed, they go through several states reported via SSE:| State | SSE Opcode | Description |
|---|---|---|
| Queued | queue_item_added | File added to indexing queue, waiting for cooldown |
| Processing | queue_item_processing | Cooldown expired, processing started |
| Parsing | file_parsing | Extracting content from file |
| Summarizing | file_summarizing | AI generating summary and keywords |
| Embedding | file_embedding | Creating vector embedding |
| Complete | file_complete | Successfully indexed |
| Failed | file_failed | Error during processing |
/api/updates SSE endpoint.