Skip to content
NorthstarPlatformPricingLogin

Stream session events (actions, command output)

computers.retrieve_events(strid)
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_id for correlation; for shell commands, also includes exit_code, stdout, and stderr.
  • Command output chunks — streaming output from a long-running shell command started with /exec. Each chunk includes request_id, base64-encoded data, and an is_stderr flag.

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.

ParametersExpand Collapse
id: str

Stream session events (actions, command output)

import os
from tzafon import Lightcone

client = Lightcone(
    api_key=os.environ.get("TZAFON_API_KEY"),  # This is the default and can be omitted
)
client.computers.retrieve_events(
    "id",
)
Returns Examples