Sign Up

Sessions

List sessions

GET
/sessions

List session execution hosts in creation order.

Response Body

application/json
  1. response

GET /sessions response body.

items*array<>

Sessions in creation order.

curl -X GET 'http://sandbox:2280/sessions'
{  "items": [    {      "active": true,      "createdAt": "string",      "cwd": "string",      "id": "string",      "kernel": "shell",      "kernelProcessId": "string",      "processIds": [        "string"      ]    }  ]}

Create a session

POST
/sessions

Create a long-lived execution host such as a shell session or a language-kernel session.

Request Body

application/json
  1. body

POST /sessions request body.

cwd?|

Working directory the kernel starts in. Empty falls back to the daemon work dir.

env?

Environment overrides applied when the kernel starts.

id?|

Optional client-chosen session id. Must be a safe identifier when present.

kernel?|

Kernel language, one of python, typescript or javascript. A language is required: shell, or omitting the field, answers 400 UNSUPPORTED_OPERATION, because shell sessions are created with POST /processes kind=session.

login?boolean

Not used by language kernels; answers 400 UNSUPPORTED_OPERATION when true.

shell?|

Not used by language kernels; answers 400 UNSUPPORTED_OPERATION when set.

Response Body

application/json
  1. response

Session DTO returned by create/list/get.

active*boolean

Whether the backing kernel is active.

createdAt*string

RFC 3339 creation timestamp.

cwd*string

Working directory the kernel started in (a kernel's own chdir is not tracked).

id*string

Stable session id.

kernel*KernelKind

Kernel kind.

Value in"shell""python""typescript""javascript"
kernelProcessId*string

Id of the long-lived kernel process backing this session.

processIds*array<string>

Member process ids in creation order.

curl -X POST 'http://sandbox:2280/sessions' \  -H 'Content-Type: application/json' \  -d '{}'
{  "active": true,  "createdAt": "string",  "cwd": "string",  "id": "string",  "kernel": "shell",  "kernelProcessId": "string",  "processIds": [    "string"  ]}

Get a session

GET
/sessions/{id}

Fetch a session by id.

Path Parameters

id*string

Session id.

Response Body

application/json
  1. response

Session DTO returned by create/list/get.

active*boolean

Whether the backing kernel is active.

createdAt*string

RFC 3339 creation timestamp.

cwd*string

Working directory the kernel started in (a kernel's own chdir is not tracked).

id*string

Stable session id.

kernel*KernelKind

Kernel kind.

Value in"shell""python""typescript""javascript"
kernelProcessId*string

Id of the long-lived kernel process backing this session.

processIds*array<string>

Member process ids in creation order.

curl -X GET 'http://sandbox:2280/sessions/string'
{  "active": true,  "createdAt": "string",  "cwd": "string",  "id": "string",  "kernel": "shell",  "kernelProcessId": "string",  "processIds": [    "string"  ]}

Delete a session

DELETE
/sessions/{id}

Delete a session, its backing kernel, and any member records that belong to it.

Path Parameters

id*string

Session id.

Response Body

Session deleted.

curl -X DELETE 'http://sandbox:2280/sessions/string'
Empty