Events (SSE)
Real-time event stream using Server-Sent Events. Subscribe to receive live updates about image downloads, task progress, and cluster state changes.
Opens a persistent SSE connection. The server sends a heartbeat every 30 seconds to keep the connection alive. Events are JSON-encoded in the data field.
Event format
data: {"type": "image.download.progress", "payload": {...}} Event types
| Type | Description |
|---|---|
image.download.progress | Image download progress with bytes, total, percent, and done flag |
task.state.changed | A task’s state changed (started, completed, failed) |
node.state.changed | A node’s status or daemon state changed |
Image download progress event
{
"type": "image.download.progress",
"payload": {
"imageId": "a1b2c3d4-...",
"bytes": 524288000,
"total": 1073741824,
"percent": 48.8,
"done": false
}
} Task state changed event
{
"type": "task.state.changed",
"payload": {
"runId": "a1b2c3d4-...",
"taskName": "ceph.create-osd",
"state": "completed"
}
} Node state changed event
{
"type": "node.state.changed",
"payload": {
"nodeId": "550e8400-...",
"status": "active"
}
}