wtree Cloud

Sandbox

Sandbox templates

GET
/sandbox.templates

Authorization

x-api-key

x-api-key<token>

API key authentication. Use YOUR-GENERATED-API-KEY

In: header

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://panel.example.com/api/sandbox.templates"
{}
{
  "code": "BAD_REQUEST",
  "message": "Invalid input data",
  "issues": []
}
{
  "code": "UNAUTHORIZED",
  "message": "Authorization not provided",
  "issues": []
}
{
  "code": "FORBIDDEN",
  "message": "Insufficient access",
  "issues": []
}
{
  "code": "NOT_FOUND",
  "message": "Not found",
  "issues": []
}
{
  "code": "INTERNAL_SERVER_ERROR",
  "message": "Internal server error",
  "issues": []
}

Sandbox create

POST
/sandbox.create

Authorization

x-api-key

x-api-key<token>

API key authentication. Use YOUR-GENERATED-API-KEY

In: header

Request Body

application/json

name?string
Length1 <= length <= 64
template?string
Value in"base" | "alpine" | "python" | "node" | "bun" | "deno" | "go" | "rust" | "ruby" | "java" | "php"
image?string
Length1 <= length <= 255
serverId?string|null
cpu?number
Range0.1 <= value <= 64
memoryMb?integer
Range64 <= value <= 262144
pidsLimit?integer
Range16 <= value <= 65536
timeoutMs?integer
Range10000 <= value <= 86400000
maxLifetimeMs?integer
Range60000 <= value <= 86400000
networkMode?string
Value in"isolated" | "internet"
envVars?string
Lengthlength <= 65536
workdir?string
Length1 <= length <= 4096
runtime?string
Match^[a-zA-Z0-9][a-zA-Z0-9_.-]*$
Lengthlength <= 64

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://panel.example.com/api/sandbox.create" \  -H "Content-Type: application/json" \  -d '{}'
{}
{
  "code": "BAD_REQUEST",
  "message": "Invalid input data",
  "issues": []
}
{
  "code": "UNAUTHORIZED",
  "message": "Authorization not provided",
  "issues": []
}
{
  "code": "FORBIDDEN",
  "message": "Insufficient access",
  "issues": []
}
{
  "code": "INTERNAL_SERVER_ERROR",
  "message": "Internal server error",
  "issues": []
}

Sandbox one

GET
/sandbox.one

Authorization

x-api-key

x-api-key<token>

API key authentication. Use YOUR-GENERATED-API-KEY

In: header

Query Parameters

sandboxId*string
Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://panel.example.com/api/sandbox.one?sandboxId=string"
{}
{
  "code": "BAD_REQUEST",
  "message": "Invalid input data",
  "issues": []
}
{
  "code": "UNAUTHORIZED",
  "message": "Authorization not provided",
  "issues": []
}
{
  "code": "FORBIDDEN",
  "message": "Insufficient access",
  "issues": []
}
{
  "code": "NOT_FOUND",
  "message": "Not found",
  "issues": []
}
{
  "code": "INTERNAL_SERVER_ERROR",
  "message": "Internal server error",
  "issues": []
}

Sandbox list

GET
/sandbox.list

Authorization

x-api-key

x-api-key<token>

API key authentication. Use YOUR-GENERATED-API-KEY

In: header

Query Parameters

serverId?string|null

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://panel.example.com/api/sandbox.list"
{}
{
  "code": "BAD_REQUEST",
  "message": "Invalid input data",
  "issues": []
}
{
  "code": "UNAUTHORIZED",
  "message": "Authorization not provided",
  "issues": []
}
{
  "code": "FORBIDDEN",
  "message": "Insufficient access",
  "issues": []
}
{
  "code": "NOT_FOUND",
  "message": "Not found",
  "issues": []
}
{
  "code": "INTERNAL_SERVER_ERROR",
  "message": "Internal server error",
  "issues": []
}

Sandbox exec

POST
/sandbox.exec

Authorization

x-api-key

x-api-key<token>

API key authentication. Use YOUR-GENERATED-API-KEY

In: header

Request Body

application/json

sandboxId*string
Length1 <= length
cmd*string
Length1 <= length <= 65536
cwd?string
Length1 <= length <= 4096
env?
timeoutMs?integer
Range1000 <= value <= 600000

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://panel.example.com/api/sandbox.exec" \  -H "Content-Type: application/json" \  -d '{    "sandboxId": "string",    "cmd": "string"  }'
{}
{
  "code": "BAD_REQUEST",
  "message": "Invalid input data",
  "issues": []
}
{
  "code": "UNAUTHORIZED",
  "message": "Authorization not provided",
  "issues": []
}
{
  "code": "FORBIDDEN",
  "message": "Insufficient access",
  "issues": []
}
{
  "code": "INTERNAL_SERVER_ERROR",
  "message": "Internal server error",
  "issues": []
}

Sandbox write File

POST
/sandbox.writeFile

Authorization

x-api-key

x-api-key<token>

API key authentication. Use YOUR-GENERATED-API-KEY

In: header

Request Body

application/json

sandboxId*string
Length1 <= length
path*string
Length1 <= length <= 4096
content*string
encoding?string
Default"utf8"
Value in"utf8" | "base64"
mode?integer
Range0 <= value <= 4095

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://panel.example.com/api/sandbox.writeFile" \  -H "Content-Type: application/json" \  -d '{    "sandboxId": "string",    "path": "string",    "content": "string"  }'
{}
{
  "code": "BAD_REQUEST",
  "message": "Invalid input data",
  "issues": []
}
{
  "code": "UNAUTHORIZED",
  "message": "Authorization not provided",
  "issues": []
}
{
  "code": "FORBIDDEN",
  "message": "Insufficient access",
  "issues": []
}
{
  "code": "INTERNAL_SERVER_ERROR",
  "message": "Internal server error",
  "issues": []
}

Sandbox read File

GET
/sandbox.readFile

Authorization

x-api-key

x-api-key<token>

API key authentication. Use YOUR-GENERATED-API-KEY

In: header

Query Parameters

sandboxId*string
Length1 <= length
path*string
Length1 <= length <= 4096
encoding?string
Default"utf8"
Value in"utf8" | "base64"

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://panel.example.com/api/sandbox.readFile?sandboxId=string&path=string"
{}
{
  "code": "BAD_REQUEST",
  "message": "Invalid input data",
  "issues": []
}
{
  "code": "UNAUTHORIZED",
  "message": "Authorization not provided",
  "issues": []
}
{
  "code": "FORBIDDEN",
  "message": "Insufficient access",
  "issues": []
}
{
  "code": "NOT_FOUND",
  "message": "Not found",
  "issues": []
}
{
  "code": "INTERNAL_SERVER_ERROR",
  "message": "Internal server error",
  "issues": []
}

Sandbox list Files

GET
/sandbox.listFiles

Authorization

x-api-key

x-api-key<token>

API key authentication. Use YOUR-GENERATED-API-KEY

In: header

Query Parameters

sandboxId*string
Length1 <= length
path?string
Length1 <= length <= 4096

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://panel.example.com/api/sandbox.listFiles?sandboxId=string"
{}
{
  "code": "BAD_REQUEST",
  "message": "Invalid input data",
  "issues": []
}
{
  "code": "UNAUTHORIZED",
  "message": "Authorization not provided",
  "issues": []
}
{
  "code": "FORBIDDEN",
  "message": "Insufficient access",
  "issues": []
}
{
  "code": "NOT_FOUND",
  "message": "Not found",
  "issues": []
}
{
  "code": "INTERNAL_SERVER_ERROR",
  "message": "Internal server error",
  "issues": []
}

Sandbox set Timeout

POST
/sandbox.setTimeout

Authorization

x-api-key

x-api-key<token>

API key authentication. Use YOUR-GENERATED-API-KEY

In: header

Request Body

application/json

sandboxId*string
Length1 <= length
timeoutMs*integer
Range10000 <= value <= 86400000

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://panel.example.com/api/sandbox.setTimeout" \  -H "Content-Type: application/json" \  -d '{    "sandboxId": "string",    "timeoutMs": 10000  }'
{}
{
  "code": "BAD_REQUEST",
  "message": "Invalid input data",
  "issues": []
}
{
  "code": "UNAUTHORIZED",
  "message": "Authorization not provided",
  "issues": []
}
{
  "code": "FORBIDDEN",
  "message": "Insufficient access",
  "issues": []
}
{
  "code": "INTERNAL_SERVER_ERROR",
  "message": "Internal server error",
  "issues": []
}

Sandbox kill

POST
/sandbox.kill

Authorization

x-api-key

x-api-key<token>

API key authentication. Use YOUR-GENERATED-API-KEY

In: header

Request Body

application/json

sandboxId*string
Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://panel.example.com/api/sandbox.kill" \  -H "Content-Type: application/json" \  -d '{    "sandboxId": "string"  }'
{}
{
  "code": "BAD_REQUEST",
  "message": "Invalid input data",
  "issues": []
}
{
  "code": "UNAUTHORIZED",
  "message": "Authorization not provided",
  "issues": []
}
{
  "code": "FORBIDDEN",
  "message": "Insufficient access",
  "issues": []
}
{
  "code": "INTERNAL_SERVER_ERROR",
  "message": "Internal server error",
  "issues": []
}

Sandbox remove

POST
/sandbox.remove

Authorization

x-api-key

x-api-key<token>

API key authentication. Use YOUR-GENERATED-API-KEY

In: header

Request Body

application/json

sandboxId*string
Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://panel.example.com/api/sandbox.remove" \  -H "Content-Type: application/json" \  -d '{    "sandboxId": "string"  }'
{}
{
  "code": "BAD_REQUEST",
  "message": "Invalid input data",
  "issues": []
}
{
  "code": "UNAUTHORIZED",
  "message": "Authorization not provided",
  "issues": []
}
{
  "code": "FORBIDDEN",
  "message": "Insufficient access",
  "issues": []
}
{
  "code": "INTERNAL_SERVER_ERROR",
  "message": "Internal server error",
  "issues": []
}