跳转到内容
EN

列出沙箱

GET/e2b/sandboxes● 支持

E2B 官方文档 ↗

请求参数

  • metadatastring可选

    query: Metadata query used to filter the sandboxes (e.g. "user=abc&app=prod"). Each key and values must be URL encoded.

返回

200

已弃用:最新官方 SDK 走 v2。

错误按 E2B 格式返回,参见 错误码

请求示例

curl
curl https://api.deepraxis.com/e2b/sandboxes \
  -H "X-API-Key: $PRAXIS_API_KEY"
Python
import requests

opts = dict(
    api_key="$PRAXIS_API_KEY",
    api_url="https://api.deepraxis.com/e2b",
    domain="sandbox.praxisusercontent.com",
)

# 官方 SDK 的 Sandbox.list 调用 v2;这个 v1 端点直接用 HTTP 调用
resp = requests.get(
    f"{opts['api_url']}/sandboxes",
    headers={"X-API-Key": opts["api_key"]},
)
print(resp.json())
TypeScript
const opts = {
  apiKey: "$PRAXIS_API_KEY",
  apiUrl: "https://api.deepraxis.com/e2b",
  domain: "sandbox.praxisusercontent.com",
};

// 官方 SDK 的 Sandbox.list 调用 v2;这个 v1 端点直接用 HTTP 调用
const resp = await fetch(`${opts.apiUrl}/sandboxes`, {
  headers: { "X-API-Key": opts.apiKey },
});
console.log(await resp.json());

响应示例 200

[
  {
    "templateID": "node22",
    "sandboxID": "sbib185b70d57718fd1f3df06d4",
    "clientID": "iuf9ho516lcexp7svm6td",
    "startedAt": "2026-10-04T15:32:41.457Z",
    "endAt": "2026-10-04T15:37:40.907Z",
    "state": "running",
    "cpuCount": 1,
    "memoryMB": 1983,
    "diskSizeMB": 24242,
    "envdVersion": "0.9.0",
    "metadata": {},
    "volumeMounts": []
  }
]

响应

HTTP 200

Successfully returned all running sandboxes

application/json

名称 类型 说明
[].templateID string Identifier of the template from which is the sandbox created
[].alias string Alias of the template
[].sandboxID string Identifier of the sandbox
[].clientID string Identifier of the client
[].startedAt string Time when the sandbox was started
[].endAt string Time when the sandbox will expire
[].cpuCount integer CPU cores for the sandbox
[].memoryMB integer Memory for the sandbox in MiB
[].diskSizeMB integer Disk size for the sandbox in MiB
[].metadata any
[].state string State of the sandbox
[].envdVersion string Version of the envd running in the sandbox
[].volumeMounts array<object>
[].volumeMounts[].name string Name of the volume
[].volumeMounts[].path string Path of the volume