Stream session events (actions, command output)
GET/computers/{id}/events
Server-Sent Events stream carrying non-video events for a session. Each data: line is a JSON object describing one event. Three event categories are emitted:
- Action requests — an action has been queued for execution.
- Action responses — a previously requested action has completed. Includes a
request_idfor correlation; for shell commands, also includesexit_code,stdout, andstderr. - Command output chunks — streaming output from a long-running shell command started with
/exec. Each chunk includesrequest_id, base64-encodeddata, and anis_stderrflag.
Video and cursor traffic is delivered on /computers/{id}/screencast instead and is deliberately excluded from this stream so high-frequency frame data doesn't drown out action responses.
On stream-setup failure the server emits a single event: error SSE event and closes the connection.
Path Parameters
id: string
Stream session events (actions, command output)
curl https://api.tzafon.ai/computers/$ID/events \
-H "Authorization: Bearer $TZAFON_API_KEY"