Assign tags to a ready build
POST
/sandbox/v1/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/sandbox/v1/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
api_key = "$PRAXIS_API_KEY"
# templateID and buildID come from the preceding create response; replace the example IDs.
resp = requests.request("POST", "https://api.deepraxis.com/sandbox/v1/templates/tags",
headers={"X-API-Key": api_key},
json={"target":"docs-template:b1","tags":["default","stable"]},
)
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/tags", { method: "POST",
headers: { "X-API-Key": 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_2158874f-2b56-49ee-beeb-f85922f8e362"
}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 |