WebSocket Events
Odysseus uses WebSocket connections for real-time scan progress updates.
Endpoints
| Endpoint | Description |
|---|---|
/ws/scans/{scan_id} |
Live progress for a specific scan |
/ws/events |
General event stream |
Message Types
Messages are JSON objects with a type field:
| Type | Description | Payload |
|---|---|---|
progress |
Scan progress update | { "percentage": 45 } |
item_discovered |
A new device was found during the scan | { "ip_address": "...", "hostname": "...", ... } |
completed |
Scan finished successfully | { "assets_found": 12 } |
failed |
Scan encountered an error | { "error_message": "..." } |
log |
Informational log message | { "message": "..." } |
Usage
The Scan Detail page automatically connects to the WebSocket for the viewed scan. While the scan is running, you see:
- A real-time progress bar
- Devices appearing in the list as they are discovered
- Automatic status update when the scan completes or fails
No manual setup is required — the frontend manages WebSocket connections automatically.