Skip to content
中文

Check local build file support

GET/sandbox/v1/templates/{templateID}/files/{hash}○ Unsupported

Request parameters

  • templateIDstringrequired

    path: Template identifier from templates.create or templates.list. Use your organization's templateID, not a provider handle.

  • hashstringrequired

    path: Upstream file-content hash. Local COPY/ADD uploads are unavailable and this request returns 400.

Returns

400

501 This endpoint is not implemented yet; calling it returns the response below:

Errors follow the E2B format — see error codes

Request

curl
curl https://api.deepraxis.com/sandbox/v1/templates/sbe_example/files/example-hash \
  -H "X-API-Key: $PRAXIS_API_KEY"
Python
import requests

api_key = "$PRAXIS_API_KEY"

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

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

Response 400

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

Response

HTTP 201

The upload link where to upload the tar file

application/json

Name Type Description
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