Skip to main content
GET
/
workflows
/
{workflow_id}
/
jobs
/
{job_id}
/
events
Stream Job Logs
curl --request GET \
  --url https://api.example.com/workflows/{workflow_id}/jobs/{job_id}/events
{
  "connected": {},
  "log": {
    "timestamp": "<string>",
    "message": "<string>",
    "sequence_num": 123,
    "stream": "<string>"
  },
  "end": {},
  "error": {}
}
This endpoint uses Server-Sent Events (SSE) to stream logs in real-time as the job executes.

Path Parameters

workflow_id
string
required
The unique identifier of the workflow
job_id
string
required
The unique identifier of the job

Response Headers

Content-Type: text/event-stream
Cache-Control: no-cache
Connection: keep-alive

Event Types

connected
event
Sent immediately when the connection is established
event: connected
data: {"status":"connected"}
log
event
Sent for each log entry as it’s generated
timestamp
string
ISO 8601 timestamp when the log was created
message
string
The log message content
sequence_num
integer
Sequence number for ordering
stream
string
Stream type: stdout or stderr
end
event
Sent when the stream completes normally
event: end
data: {"status":"stream_ended"}
error
event
Sent when an error occurs
event: error
data: error message here

Examples

curl -N -X GET 'https://api.chronoverse.dev/workflows/wf_abc123/jobs/job_xyz789/events' \
  -H 'Authorization: Bearer YOUR_API_TOKEN'

Example Event Stream

event: connected
data: {"status":"connected"}

event: log
data: {"timestamp":"2026-03-03T10:00:05.123Z","message":"Starting workflow execution","sequence_num":1,"stream":"stdout"}

event: log
data: {"timestamp":"2026-03-03T10:00:06.456Z","message":"Loading configuration","sequence_num":2,"stream":"stdout"}

event: log
data: {"timestamp":"2026-03-03T10:00:07.789Z","message":"Warning: deprecated option used","sequence_num":3,"stream":"stderr"}

event: log
data: {"timestamp":"2026-03-03T10:15:30.123Z","message":"Workflow completed successfully","sequence_num":1547,"stream":"stdout"}

event: end
data: {"status":"stream_ended"}
The connection will automatically close when the job completes or fails. Make sure to handle connection cleanup in your client.
For historical logs, use the Get Job Logs endpoint with pagination instead.

Build docs developers (and LLMs) love