Terminal
Preview

Read a terminal session

GET
/exec-sessions/{sessionId}
cookiebetter-auth.session_token<token>

Better Auth session cookie. Production uses the __Secure- prefixed name.

sessionId*string
Formatuuid

Response Body

The session.

application/json
  1. response
id*string
Formatuuid
deploymentId*string
Formatuuid
deploymentName*string
clusterId*string
Formatuuid
userId*string
namespace*string
pod*string
container*string
command*array<string>
tty*boolean
reason*string
production*boolean
recorded*boolean

Whether the output is recorded, by the organization's recording setting and the cluster's tier.

state*ExecSessionState

pending waits for its WebSocket, opening waits for the operator, active runs, ended is over.

Value in"pending""opening""active""ended"
idleTimeoutSeconds*integer
maxDurationSeconds*integer
createdAt*string
Formatdate-time
startedAt?string
Formatdate-time
endedAt?string
Formatdate-time
endReason?ExecEndReason
Value in"exited""client_closed""idle_timeout""max_duration""terminated""gateway_lost""operator_lost""server_lost""client_slow""recording_failed""recording_limit""open_failed""ticket_expired"
exitCode?integer
terminatedBy?string

The user id of whoever ended it.

recordingBytes*integer
Formatint64
Example Request
curl -X GET 'https://wardn.example.com/api/v1/exec-sessions/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Example Response
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "deploymentId": "a73c85a1-d857-491e-a6b2-51dce05de7a2",  "deploymentName": "string",  "clusterId": "a3d24843-7014-4490-bdd3-b7cb39b400c8",  "userId": "string",  "namespace": "string",  "pod": "string",  "container": "string",  "command": [    "string"  ],  "tty": true,  "reason": "string",  "production": true,  "recorded": true,  "state": "pending",  "idleTimeoutSeconds": 0,  "maxDurationSeconds": 0,  "createdAt": "2019-08-24T14:15:22Z",  "startedAt": "2019-08-24T14:15:22Z",  "endedAt": "2019-08-24T14:15:22Z",  "endReason": "exited",  "exitCode": 0,  "terminatedBy": "string",  "recordingBytes": 0}