Sessions
List interpreter sessions in creation order.
application/json- 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 language interpreter session for subsequent code executions. Supported languages are python, typescript and javascript (case-sensitive). Unknown languages, including an empty string, return 400 UNSUPPORTED_OPERATION before kernel provisioning. Omitting kernel or requesting shell also returns 400 UNSUPPORTED_OPERATION; shell sessions use POST /processes with kind=session.
application/json- body
POST /sessions request body.
cwd?|Initial working directory. Empty uses the sandbox’s default working directory.
env?Environment overrides applied when the interpreter session starts.
id?|Optional client-chosen session id. Must be a safe identifier when present.
kernel?|Interpreter language, exactly python, typescript or javascript (case-sensitive). Unknown values, including an empty string, answer 400 UNSUPPORTED_OPERATION before provisioning; a supported kernel that fails to install or start answers 503 KERNEL_UNAVAILABLE. A language is required: shell, or omitting the field, answers 400 UNSUPPORTED_OPERATION, because shell sessions are created with POST /processes kind=session.
login?booleanNot supported for interpreter sessions; answers 400 UNSUPPORTED_OPERATION when true.
shell?|Not supported for interpreter sessions; answers 400 UNSUPPORTED_OPERATION when set.
application/json- response
Session information returned by create, list, and get operations.
active*booleanWhether the interpreter session is active.
createdAt*stringRFC 3339 creation timestamp.
cwd*stringInitial working directory of the interpreter session; changes made by executed code are not reflected here.
id*stringStable session id.
kernel*KernelKindInterpreter language.
"shell""python""typescript""javascript"kernelProcessId*stringProcess ID for the session's interpreter.
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" ]}Fetch a session by id.
id*stringSession id.
application/json- response
Session information returned by create, list, and get operations.
active*booleanWhether the interpreter session is active.
createdAt*stringRFC 3339 creation timestamp.
cwd*stringInitial working directory of the interpreter session; changes made by executed code are not reflected here.
id*stringStable session id.
kernel*KernelKindInterpreter language.
"shell""python""typescript""javascript"kernelProcessId*stringProcess ID for the session's interpreter.
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 an interpreter session and its associated process information.
id*stringSession id.
Session deleted.
curl -X DELETE 'http://sandbox:2280/sessions/string'