Stream a job’s events
GET /v1/jobs/{id}/events
Server-sent events: the job each time it changes, until it finishes.
Each event carries the job as GET /v1/jobs/{id} shows it: job.updated while it runs, then one of job.completed, job.failed or job.canceled, after which the stream ends. A comment line keeps the connection open every 15 seconds. Event IDs let a reconnect send Last-Event-ID to skip what it has seen; a stream ends after 15 minutes.
API key with the read scope.
Request
curl "https://api.formatjet.com/v1/jobs/job_01JBXA3Q6M2T8V4W9Y5Z7B1C3D/events" \ -H "Authorization: Bearer $FORMATJET_API_KEY"Path parameters
| Field | Type | Description |
|---|---|---|
id required | string |
Responses
200 OK
An event stream
id: 1761300006000event: job.completeddata: {"id":"job_01JBXA3Q6M2T8V4W9Y5Z7B1C3D","status":"completed",…}Errors
Problem documents (application/problem+json); see Errors.
| Status | Code | When |
|---|---|---|
| 401 | unauthorized | No API key, or one that’s unknown or revoked. |
| 403 | forbidden | The key lacks the read scope, or the plan has no API. |
| 404 | not_found | No such job of this key’s mode, or its files are gone. |
| 429 | rate_limited | More requests than the plan allows in 10 seconds: wait Retry-After seconds. |