Assign tags to a ready build
POST
/e2b/templates/tags● SupportedRequest body
targetstringrequiredTarget template in "name:tag" format
tagsarrayrequiredTags to assign to the template
Returns
200
Errors follow the E2B format — see error codes
Request
curl
curl https://api.deepraxis.com/e2b/templates/tags \
-H "X-API-Key: $PRAXIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"target":"docs-template:b1","tags":["default","stable"]}'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("POST", opts["api_url"] + "/templates/tags",
headers={"X-API-Key": opts["api_key"]},
json={"target":"docs-template:b1","tags":["default","stable"]},
)
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/tags", { method: "POST",
headers: { "X-API-Key": opts.apiKey, "Content-Type": "application/json" },
body: JSON.stringify({"target":"docs-template:b1","tags":["default","stable"]}),
});
console.log(resp.status, await resp.text());Response 200
{
"tags": [
"default",
"stable"
],
"buildID": "sbt_e2d426b9-49b3-4082-ace8-ef369dd78c07"
}Response
HTTP 201
Tag assigned successfully
application/json
| Name | Type | Description |
|---|---|---|
| tags | array<string> | Assigned tags of the template |
| buildID | string | Identifier of the build associated with these tags |