跳转到内容
EN

解析模板名称

GET/e2b/templates/aliases/{alias}● 支持

请求参数

  • aliasstring必填

    path: Template alias

返回

200

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

请求示例

curl
curl https://api.deepraxis.com/e2b/templates/aliases/docs-template \
  -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/aliases/docs-template",
    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/aliases/docs-template", { method: "GET",
  headers: { "X-API-Key": opts.apiKey },
});
console.log(resp.status, await resp.text());

响应示例 200

{
  "templateID": "sbe_316095347ee129f46013",
  "public": false
}

响应

HTTP 200

Successfully queried template by alias

application/json

名称 类型 说明
templateID string Identifier of the template
public boolean Whether the template is public or only accessible by the team