REST API
All PandaStack HTTP endpoints, indexed.
Base URL: https://api-dev.pandastack.ai/v1
All requests require either:
Authorization: Bearer <jwt-or-api-key>header, or?access_token=<jwt-or-api-key>query parameter (for SSE / WebSocket where headers can't be set)
All responses are JSON. Errors follow the error envelope.
Sandboxes
| Method | Path | Description |
|---|---|---|
POST | /sandboxes | Create a sandbox |
GET | /sandboxes | List sandboxes (filter by ?template=, ?status=) |
GET | /sandboxes/{id} | Describe a sandbox |
DELETE | /sandboxes/{id} | Delete a sandbox |
POST | /sandboxes/{id}/pause | Pause (state stays in RAM) |
POST | /sandboxes/{id}/resume | Resume from pause |
POST | /sandboxes/{id}/hibernate | Snapshot to disk, free RAM |
POST | /sandboxes/{id}/wake | Restore from hibernation |
POST | /sandboxes/{id}/fork | Fork into a new sandbox |
POST | /sandboxes/{id}/snapshot | Create a named snapshot |
GET | /sandboxes/{id}/logs?follow=1 | Stream serial console logs (SSE) |
GET | /sandboxes/{id}/events?follow=1&tail=200 | Stream lifecycle events (SSE) |
Create sandbox
POST /v1/sandboxes
{
"template": "code-interpreter",
"cpu": 1,
"memory_mb": 512,
"metadata": {"user_id": "u_123"},
"volumes": [{"id": "vol_xxx", "mount": "/mnt/data"}],
"egress_allowlist": ["api.openai.com", "pypi.org"]
}Response (201):
{
"id": "sb_d288f706...",
"status": "running",
"template": "code-interpreter",
"created_at": "2025-11-21T10:00:00Z",
"boot_ms": 285
}Exec & files
| Method | Path | Description |
|---|---|---|
POST | /sandboxes/{id}/exec | Run a command, wait, return result |
POST | /sandboxes/{id}/exec/stream | Stream stdout/stderr via SSE |
WS | /sandboxes/{id}/exec/pty?rows=&cols= | Interactive PTY |
GET | /sandboxes/{id}/files?path= | Read file |
PUT | /sandboxes/{id}/files?path= | Write file |
DELETE | /sandboxes/{id}/files?path= | Delete file |
GET | /sandboxes/{id}/files/ls?path= | List directory |
Templates
| Method | Path | Description |
|---|---|---|
GET | /templates | List templates |
GET | /templates/{name} | Get template details |
POST | /templates | Build a new template |
DELETE | /templates/{name} | Delete a template |
Volumes
| Method | Path | Description |
|---|---|---|
POST | /volumes | Create volume |
GET | /volumes | List volumes |
GET | /volumes/{id} | Describe volume |
DELETE | /volumes/{id} | Delete volume |
LSP
| Method | Path | Description |
|---|---|---|
WS | /sandboxes/{id}/lsp/{lang} | LSP bridge (python, typescript, go, rust) |
Auth
| Method | Path | Description |
|---|---|---|
GET | /auth/whoami | Identity + workspace |
GET | /auth/tokens | List API tokens |
POST | /auth/tokens | Create token |
DELETE | /auth/tokens/{id} | Revoke token |
OpenAPI spec
Machine-readable: /openapi.json