Subscribe to real-time task progress events via SSE
GET/api/v1/tasks/stream
Clients can subscribe to this endpoint to receive real-time notifications about background task progress (analyze_book, generate_thumbnails, etc.).
Authentication
Requires valid authentication with LibrariesRead permission.
Event Format
Events are sent as JSON-encoded TaskProgressEvent objects with the following structure:
{
"task_id": "uuid",
"task_type": "analyze_book",
"status": "running",
"progress": {
"current": 5,
"total": 10,
"message": "Processing book 5 of 10"
},
"started_at": "2024-01-06T12:00:00Z",
"library_id": "uuid"
}
Keep-Alive
A keep-alive message is sent every 15 seconds to prevent connection timeout.
Responses
- 200
- 401
- 403
SSE stream of task progress events
Unauthorized
Forbidden