Update an environment template
Fields left out are unchanged; null clears a nullable one. Moving to the none or full egress policy clears the allowlist. Changing egressPolicy or egressAllowlist requires environments.egress.manage; changing any other field requires environments.manage; a request that does both requires both. A change to egressPolicy or egressAllowlist, or to whether the project is enforced, is pushed to the running sandboxes it affects as it is saved; one the push cannot reach is stopped so it cannot keep the old rules, and the response's egressPropagation says which.
Authorization
bearerAuth A RemoteHost API key (rh_sk_...) or a user session token.
In: header
Path Parameters
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PATCH "https://example.com/orgs/string/projects/string/environment-templates/497f6eca-6276-4993-bfeb-53cbbbba6f08" \ -H "Content-Type: application/json" \ -d '{}'{ "environment": { "usage": { "workspaces": 0, "sandboxes": 0 }, "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "projectId": "5a8591dd-4039-49df-9202-96385ba3eff8", "name": "string", "description": "string", "isDefault": true, "enforced": true, "template": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "platform": true }, "machineSize": "small", "vmm": "string", "setupScript": "string", "services": [ { "name": "string", "command": "string", "port": 1, "cwd": "string" } ], "ports": [ 0 ], "envVars": { "property1": "string", "property2": "string" }, "egressPolicy": "none", "egressAllowlist": [ "string" ], "applied": true, "createdAt": "string", "updatedAt": "string" }, "egressPropagation": { "applied": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string" } ], "failed": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "error": "string", "stopped": true } ], "notRunning": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string" } ], "listError": "string" }}Get an environment template GET
Requires environments.read.
Delete an environment template DELETE
Refused with 409 while any workspace names it, or, for the project's default, while workspaces that name no environment follow it: move them first. Sandboxes do not hold it: if any still boot from it, it is deleted for everything else (no longer listed, readable, editable, the default or usable for anything new) and kept only for them, so each keeps waking under its last egress policy, environment variables and setup script; it is released when the last of them is deleted. Requires environments.manage.