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 for the session. Empty falls back to the configured default OS user's home for shell sessions (which run as that user) when the home exists; kind=code sessions and a missing home fall 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 kind. Omitted means shell.

login?boolean

Whether to request a login shell.

shell?|

Requested shell path or name for shell sessions.

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

Current session working directory.

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

Current session working directory.

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