Guest Machines
API referenceRuns

Stream run events

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

Receive live run events through Server-Sent Events. Reconnect with Last-Event-ID to continue after the last received event. The stream also closes if access is revoked or the client disconnects.

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 run response. A pause before a verifier ran remains not_evaluated.

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: automation account, delegated token, user session, user API key

User API keys use the owner’s current permissions, subject to any key restrictions. Capability scopes below apply to automation account keys and delegated tokens.

Scope: runs:read

Authorization

AuthorizationBearer <token>

A user-owned key prefixed gsmc_uk_, bound to one organization. It follows its owner's current membership, role and resource permissions, optionally restricted to read-only access. No X-Org-Id header is needed; a conflicting organization is rejected. Credential creation, personal connection setup and human attestations require a signed-in session. Runs are private to the calling user; sharing an agent grants access to your own personal memory of it, never to the agent's own memory.

In: header

Path Parameters

run_id*Run Id

Header Parameters

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

Selects the active organization for a direct user session that has more than one membership. Automation account keys and delegated tokens are each bound to one 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"