Rename or reconfigure a workspace
A rename does not move the workspace's git branch. Moving it to another environment pushes that environment's network rules to its running execution 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
curl -X PATCH "https://example.com/orgs/string/projects/string/workspaces/497f6eca-6276-4993-bfeb-53cbbbba6f08" \ -H "Content-Type: application/json" \ -d '{}'{ "workspace": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "orgId": "25b2c2d5-a7fc-47d0-89e4-8709a1560bfa", "projectId": "5a8591dd-4039-49df-9202-96385ba3eff8", "name": "string", "title": "string", "environmentId": "19f5cc2e-7657-437a-9268-83cd3d563563", "lifetimePolicy": "ephemeral", "expiresAt": "string", "gitBranch": "string", "cpuBaseline": "string", "vmm": "string", "currentCheckpointId": "58a17ea9-e017-4666-a39c-b13b4cc338f7", "status": "active", "lease": { "sandboxId": "5b4b1d3f-21e4-43f6-8ac1-b460b150f885", "epoch": "string", "expiresAt": "string", "live": true }, "createdBy": "25a02396-1048-48f9-bf93-102d2fb7895e", "createdAt": "string", "updatedAt": "string", "lastActivityAt": "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" }}Read a workspace GET
An API key reads only a workspace its principal owns; any other answers the same 404 as one that does not exist, and so does every other operation on it. API keys reach these operations only where key access to environments is enabled for this deployment, and then only their principal's own workspaces; until then every API key is refused with 403.
Delete a workspace DELETE
Deletes the workspace and destroys every execution of it. Uncommitted work is lost. The workspace is unattachable from the moment the call starts; an execution that cannot be destroyed yet (its host is not answering, or an operation on it is still settling) is listed in executionsPendingCleanup and destroyed automatically once it can be. Needs sandbox.environment.delete, which every role holding sandbox.destroy holds. An API key holds it only when its own scopes name it: an unscoped key and every key template lack it, and are refused with 403. API keys reach these operations only where key access to environments is enabled for this deployment, and then only their principal's own workspaces; until then every API key is refused with 403.