Overview
The Improve Run Events endpoint streams live progress updates for a Cloud Improve run using Server-Sent Events (SSE). Use it to track a run from enqueue through completion without polling. The stream is resumable — pass aLast-Event-ID header or cursor query parameter to replay events you may have missed after a disconnect.
Stream events
| Parameter | Location | Required | Description |
|---|---|---|---|
id | Path | Yes | The improve run UUID |
Last-Event-ID | Header | No | Resume the stream after this event ID |
cursor | Query | No | Alias for Last-Event-ID when headers are not available |
Content-Type: text/event-stream. Each SSE message carries a JSON payload in its data field.
Example stream
Event types
| Type | Meaning |
|---|---|
run_enqueued | Run has been accepted and placed in the execution queue |
run_started | Run is now actively executing on the runtime |
phase_changed | The run has moved to a new execution phase (see phase field) |
candidate_persisted | A candidate skill revision has been saved (see candidate_id) |
proposal_created | An evolution proposal has been created from a candidate (see proposal_id) |
run_completed | Run finished with a terminal success outcome (succeeded or no_winner) |
run_failed | Run encountered a fatal error |
run_cancelled | Run was cancelled before completion |
Event object
Every event in the stream has the following shape:| Field | Type | Description |
|---|---|---|
id | string | Unique event ID — use as Last-Event-ID to resume |
run_id | string | The improve run this event belongs to |
org_id | string | Your organisation ID |
type | string | One of the event types above |
status | string | undefined | Run status at the time of the event |
phase | string | undefined | Present on phase_changed events |
candidate_id | string | undefined | Present on candidate_persisted events |
proposal_id | string | undefined | Present on proposal_created events |
payload | object | undefined | Additional event-specific data |
created_at | string | ISO 8601 timestamp |
Resuming after a disconnect
Store theid field from the last event you successfully processed. On reconnect, pass it as either:
Last-Event-IDrequest header (preferred)cursorquery parameter (useful when headers cannot be customised)
JavaScript example
Error responses
| Status | Meaning |
|---|---|
401 | Missing or invalid API key |
403 | Run does not belong to your organisation |
404 | Run ID not found |
503 | Cloud Improve runtime is not configured for your account |