Create PTY session
Create a new interactive terminal session. A shell process is spawned inside the sandbox.
Create a new interactive terminal session. A shell process is spawned inside the sandbox.
Authorization
BearerAuth AuthorizationBearer <token>
API key passed as a Bearer token in the Authorization header.
Alternatively, use the leap0-authorization header.
In: header
Path Parameters
sandboxID*string
Unique sandbox identifier.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
id?string
Optional session ID. Auto-generated if not provided.
cwd?string
Starting directory.
envs?
Environment variables.
cols?integer
Terminal columns.
rows?integer
Terminal rows.
lazy_start?boolean
Defer shell process start until first WebSocket connection.
Default
falseResponse Body
application/json
application/json
application/json
curl -X POST "https://api.leap0.dev/v1/sandbox/string/pty" \ -H "Content-Type: application/json" \ -d '{}'{ "id": "my-terminal", "cwd": "/home/user", "envs": { "property1": "string", "property2": "string" }, "cols": 120, "rows": 40, "created_at": "2019-08-24T14:15:22Z", "active": true, "lazy_start": true}{ "message": "string", "errors": [ { "field": "string", "error": "string" } ]}{ "message": "string"}
