Skip to content
中文

Check local build file support

GET/e2b/templates/{templateID}/files/{hash}○ Unsupported

Request parameters

  • templateIDstringrequired

    path:

  • hashstringrequired

    path: Hash of the files

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/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());

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