跳转到内容
EN

列出快照

GET/sandbox/v1/snapshots● 支持

E2B 官方文档 ↗

请求参数

  • sandboxIDstring可选

    query: 按来源沙箱 ID 筛选。

  • namestring可选

    query: 按原始别名或本平台 snap_ 快照 ID 筛选。

  • limitinteger可选
    默认 100

    query: 每页返回的快照数量上限。

  • nextTokenstring可选

    query: 上一页响应头 X-Next-Token 返回的游标。

返回

200

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

请求示例

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

api_key = "$PRAXIS_API_KEY"

# Call /sandbox/v1 directly over HTTP.
resp = requests.get(
    "https://api.deepraxis.com/sandbox/v1/snapshots",
    headers={"X-API-Key": api_key},
)
print(resp.status_code, resp.text)
TypeScript
const apiKey = "$PRAXIS_API_KEY";

// Call /sandbox/v1 directly over HTTP.
const resp = await fetch(`https://api.deepraxis.com/sandbox/v1/snapshots`, {
  headers: { "X-API-Key": apiKey },
});
console.log(resp.status, await resp.text());

响应示例 200

[
  {
    "snapshotID": "snap_e14812e6bfe34655b7443a83",
    "names": [
      "docs-snapshot"
    ]
  }
]

响应

HTTP 200

Successfully returned snapshots

application/json

名称 类型 说明
[].snapshotID string Identifier of the snapshot template including the tag. Uses namespace/alias when a name was provided (e.g. team-slug/my-snapshot:default), otherwise falls back to the raw template ID (e.g. abc123:default).
[].names array<string> Full names of the snapshot template including team namespace and tag (e.g. team-slug/my-snapshot:v2)

自有入口在响应对象(列表为每行)追加 createdAt:创建时间,ISO 8601 UTC 字符串。

快照还包括 sourceSandboxID(string,来源沙箱公开 ID)与 sourceSandboxName(string 或 null)。名称无法取得时返回 null,界面可回退显示 ID。

网关自动设置 X-Praxis-Face: own-v1,客户端无需传入;/e2b 兼容入口会剥除该头,保留厂商响应形状。