读取卷
GET
/e2b/volumes/{volumeID}● 支持请求参数
volumeIDstring必填path:
返回
200
错误按 E2B 格式返回,参见 错误码
请求示例
curl
curl https://api.deepraxis.com/e2b/volumes/sbv_123 \
-H "X-API-Key: $PRAXIS_API_KEY"Python
from e2b import Volume
opts = dict(
api_key="$PRAXIS_API_KEY",
api_url="https://api.deepraxis.com/e2b",
domain="sandbox.praxisusercontent.com",
)
info = Volume.get_info("sbv_123", **opts)
print(info.name)TypeScript
import { Volume } from "e2b";
const opts = {
apiKey: "$PRAXIS_API_KEY",
apiUrl: "https://api.deepraxis.com/e2b",
domain: "sandbox.praxisusercontent.com",
};
const info = await Volume.getInfo("sbv_123", opts);
console.log(info.name);响应示例 200
{
"volumeID": "sbv_d28b7b9a9b6c656f582d",
"name": "docs-sample",
"token": "<access-token>"
}响应
HTTP 200
Successfully retrieved a team volume
application/json
| 名称 | 类型 | 说明 |
|---|---|---|
| volumeID | string | ID of the volume |
| name | string | Name of the volume |
| token | string | Auth token to use for interacting with volume content |
| domain | string | Domain to use as the destination for volume content requests, replacing the default api.<E2B_DOMAIN>. Only returned when the team is connected to a custom (BYOC) cluster; absent otherwise, in which case the default domain is used. |