跳转到内容
EN

列出快照

GET/e2b/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/e2b/snapshots \
  -H "X-API-Key: $PRAXIS_API_KEY"
Python
from e2b import Sandbox

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

paginator = Sandbox.list_snapshots(**opts)
print(paginator.next_items())
TypeScript
import { Sandbox } from "e2b";

const opts = {
  apiKey: "$PRAXIS_API_KEY",
  apiUrl: "https://api.deepraxis.com/e2b",
  domain: "sandbox.praxisusercontent.com",
};

const paginator = Sandbox.listSnapshots(opts);
console.log(await paginator.nextItems());

响应示例 200

[
  {
    "snapshotID": "snap_43997ab2ab004b8c8cc8d42d",
    "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)