跳转到内容
EN

解析模板名称

GET/sandbox/v1/templates/aliases/{alias}● 支持

请求参数

  • aliasstring必填

    path: Bare template name belonging to your organization, without a tag or provider namespace.

返回

200

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

请求示例

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

响应示例 200

{
  "templateID": "sbe_a9b9ece1928540ffcfcf",
  "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