Skip to main content
GET
/
api
/
v1
/
pty
List PTY sessions
curl --request GET \
  --url https://{sandbox_id_or_name}.sandbox.tensorlake.ai/api/v1/pty \
  --header 'Authorization: Bearer <token>'
{
  "sessions": [
    {
      "session_id": "<string>",
      "pid": 123,
      "command": "<string>",
      "args": [
        "<string>"
      ],
      "rows": 123,
      "cols": 123,
      "created_at": 123,
      "is_alive": true,
      "ended_at": 123,
      "exit_code": 123
    }
  ]
}
List the PTY sessions tracked inside a sandbox.

Endpoint

GET /api/v1/pty

Example Request

curl https://<sandbox-id>.sandbox.tensorlake.ai/api/v1/pty \
  -H "Authorization: Bearer $TENSORLAKE_API_KEY"

Response

Tensorlake returns 200 OK:
{
  "sessions": [
    {
      "session_id": "LYtJOrxE9Kz3bphPUDzuX",
      "pid": 42,
      "command": "/bin/bash",
      "args": ["-l"],
      "rows": 24,
      "cols": 80,
      "created_at": 1710000000000,
      "ended_at": null,
      "exit_code": null,
      "is_alive": true
    }
  ]
}
The PTY token is not included in list responses.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Response

200 - application/json

List of PTY sessions

sessions
object[]
required