Guest Machines
API referenceRuns

Stream run events

GET/api/v1/runs/{run_id}/events

Server-Sent Events stream for real-time run execution events. Connection stays open until the run reaches a terminal state (completed, failed, cancelled) or the client disconnects. Supports reconnection via the Last-Event-ID header.

A Server-Sent Events stream, not a JSON document. A closing outcome frame is named run.completed, run.failed, or run.cancelled. Always inspect data.status: a paused, resumable outcome closes the live stream under run.completed. Treat the connection closing without an outcome frame as an interruption and reconnect.

Outcome-frame data includes verification_status, verification_checks_passed, and verification_checks_total, matching the persisted run projection. A pause before a verifier ran remains not_evaluated; a workforce verification failure can instead pause with verification_failed.

Subscribe before checking whether the run has already finished. Checking first leaves a window where the run terminates between the check and the subscription, and the consumer waits for an event that will never arrive.

Required access

Credentials: service principal, delegated token, user session

Scope: runs:read

Authorization

AuthorizationBearer <token>

An organization-owned automation key, prefixed gsmc_sk_. Already bound to one organization, so it needs no X-Org-Id header. It carries no user identity: it never reaches a private resource however it is scoped, and a run it starts has no user for an interactive tool to reach.

In: header

Path Parameters

run_id*Run Id

Header Parameters

Last-Event-ID?string|null
X-Org-Id?|

Selects the active organization for a credential that belongs to more than one. Service-principal keys are bound to a single organization and ignore it.

Response Body

text/event-stream

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/api/v1/runs/0/events" \  -H "Authorization: Bearer $GUEST_MACHINES_API_KEY"
"string"
{  "detail": "string",  "error_code": "string",  "request_id": "string"}
{  "detail": "string",  "error_code": "string",  "request_id": "string"}
{  "detail": "string",  "error_code": "string",  "request_id": "string"}
{  "detail": "string",  "error_code": "string",  "request_id": "string"}
{  "detail": "string",  "error_code": "string",  "request_id": "string"}
{  "detail": "string",  "error_code": "string",  "request_id": "string"}