Stream real-time logs for an active execution via Server-Sent Events (SSE).
Required Role: VIEWER or higher
This endpoint provides real-time log streaming using Hatchet’s native
streaming capability. Logs are streamed as JSON objects in SSE format
(data: {json}\n\n).
Event Payload: Each SSE event contains a JSON object. The fields vary by event type:
Log Events (file operations, progress updates):
level: Log level (INFO, WARNING, ERROR)timestamp: ISO 8601 timestampmessage: Raw RClone message (e.g., “Copied (new)”, “Deleted”, progress stats)object: File path (present for file operations, e.g., “bucket/file.txt”)size: File size in bytes (present for file operations)progress: Progress percentage (0-100, present for stats updates)transfer_rate_mbps: Transfer rate in MB/sfiles_transferred: Number of files transferredfiles_total: Total number of filesbytes_transferred: Bytes transferred so farbytes_total: Total bytes to transfereta_seconds: Estimated time remaining in secondsStream End Event (sent when execution completes):
type: Always “stream_end”status: Final status (“completed”, “failed”, “cancelled”)reason: Human-readable descriptiontimestamp: ISO 8601 timestampExample Events:
{"level":"INFO","timestamp":"...","message":"Copied (new)","object":"file.bin","size":71680}
{"level":"INFO","timestamp":"...","message":"Deleted","object":"old_file.bin"}
{"level":"INFO","timestamp":"...","message":"29.5 MiB / 49.5 MiB, 60%, 2.9 MiB/s, ETA 6s"}
{"type":"stream_end","status":"completed","reason":"Execution completed","timestamp":"..."}
Note: This endpoint streams until the execution completes. For completed
executions, use /logs/download to retrieve the full log file.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Server-Sent Events (SSE) stream of real-time log events