Xeonr Developer Docs
API SpecificationConsole Sessions

Read Console

POST
/containers.api.v1.ConsoleService/ReadConsole

Reads output from from_offset, optionally long-polling up to wait_ms (capped at 25 s) for new bytes. max_bytes is capped at 1 MiB (0 means 1 MiB). truncated is set when the requested offset was already evicted. Returns the next offset, session state and exit code.

Access: namespace VIEWER or above (read)

Authorization

BearerAuth
AuthorizationBearer <token>

A namespace-scoped API key (cpk_…) for machines, or a Xeonr Auth OIDC token for humans. The key's namespace and role are pinned server-side.

In: header

Header Parameters

Connect-Protocol-Version?number

Define the version of the Connect protocol

Connect-Timeout-Ms?number

Define the timeout, in ms

Request Body

application/json

sessionId?string
Length1 <= length <= 64
fromOffset?string

validate:skip any offset is valid; below head_offset reads report truncated

Formatint64
maxBytes?integer

0 or anything over 1 MiB reads 1 MiB. validate:skip clamped server-side to 1 MiB

waitMs?integer

Wait up to this long for new bytes before returning empty. 0 = return immediately with whatever is there (the polling agent's mode); non-zero turns one request into a long poll and is how a live terminal rides on the same call. Capped server-side at 25 s. validate:skip clamped server-side to 25 s

[key: string]?never

Response Body

application/json

application/json

curl -X POST "https://containers.xeonr.io/containers.api.v1.ConsoleService/ReadConsole" \  -H "Connect-Protocol-Version: 1" \  -H "Connect-Timeout-Ms: 1000" \  -H "Content-Type: application/json" \  -d '{}'
{
  "data": "string",
  "nextOffset": "string",
  "truncated": true,
  "state": "CONSOLE_SESSION_STATE_UNSPECIFIED",
  "exitCode": 0
}
{
  "code": "not_found",
  "message": "string",
  "details": [
    {
      "type": "string",
      "value": "string",
      "debug": {}
    }
  ]
}