跳转到内容
EN

检查构建文件

GET/e2b/templates/{templateID}/files/{hash}○ 未支持

请求参数

  • templateIDstring必填

    path:

  • hashstring必填

    path: Hash of the files

返回

400

501 平台还没有实现这个端点;调用会得到下面这个响应:

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

请求示例

curl
curl https://api.deepraxis.com/e2b/templates/sbe_example/files/example-hash \
  -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",
)

# templateID and buildID come from the preceding create response; replace the example IDs.
resp = requests.request("GET", opts["api_url"] + "/templates/sbe_example/files/example-hash",
    headers={"X-API-Key": opts["api_key"]},
)
print(resp.status_code, resp.text)
TypeScript
const opts = {
  apiKey: "$PRAXIS_API_KEY",
  apiUrl: "https://api.deepraxis.com/e2b",
  domain: "sandbox.praxisusercontent.com",
};

// templateID and buildID come from the preceding create response; replace the example IDs.
const resp = await fetch(opts.apiUrl + "/templates/sbe_example/files/example-hash", { method: "GET",
  headers: { "X-API-Key": opts.apiKey },
});
console.log(resp.status, await resp.text());

响应示例 400

{
  "code": 400,
  "error_code": "InvalidArgumentError",
  "message": "INVALID_PARAMS: 暂不支持 COPY 本地文件,请改用 RUN curl / git clone"
}

响应

HTTP 201

The upload link where to upload the tar file

application/json

名称 类型 说明
present boolean Whether the file is already present in the cache
url string Url where the file should be uploaded to
headers object Request headers that must be sent with the upload request