Terminal
PreviewRead a terminal session
GET
cookie
better-auth.session_token<token>Better Auth session cookie. Production uses the __Secure- prefixed name.
sessionId*stringFormat
uuidThe session.
application/json- response
id*stringFormat
uuiddeploymentId*stringFormat
uuiddeploymentName*stringclusterId*stringFormat
uuiduserId*stringnamespace*stringpod*stringcontainer*stringcommand*array<string>tty*booleanreason*stringproduction*booleanrecorded*booleanWhether the output is recorded, by the organization's recording setting and the cluster's tier.
state*ExecSessionStatepending waits for its WebSocket, opening waits for the operator, active runs, ended is over.
Value in
"pending""opening""active""ended"idleTimeoutSeconds*integermaxDurationSeconds*integercreatedAt*stringFormat
date-timestartedAt?stringFormat
date-timeendedAt?stringFormat
date-timeendReason?ExecEndReasonValue 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?integerterminatedBy?stringThe user id of whoever ended it.
recordingBytes*integerFormat
int64curl -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}List terminal sessions GET
Terminal sessions of the organization, newest first. `live=true` keeps those not ended, so an admin can see who is in a pod now and end any of them. Needs `audit:read`.
End a terminal session POST
Ends a live session wherever it runs; the process relaying it closes the exec within seconds and records `exec.ended` with reason `terminated` and who ended it. Needs `org:manage`, or being the person who opened the session.