Change a workspace
Renames the workspace or changes its plan, availability, restriction or idle timeout; send the workspace's `ETag` as `If-Match`. Needs `workspace.settings`.
openapi/harthelm.yaml at v1.5.0__Host-harthelm_session<token>Browser session of the UI (12 h idle, 7 days absolute). State-changing requests also need the header
Harthelm-CSRF: 1 and a matching Origin.
ws*integerNumeric resource id.
int641 <= valueIf-Match?stringETag of the version the change is based on. Declared optional so that the server, not the request binder, answers a missing header with 428.
application/json- body
1 <= propertiesname?string^[A-Za-z0-9]([-A-Za-z0-9 _.]{0,62}[A-Za-z0-9])?$plan?stringavailability?Availability"always""on-demand"restricted?booleanidle_timeout_minutes?integerMinutes without use before an on-demand IDE sleeps; 0 returns to the installation's default.
0 <= value <= 1440The updated workspace.
application/json- response
id*IDNumeric resource id.
int641 <= valueteam_id*IDNumeric resource id.
int641 <= valuename*stringplan*stringPlan id from the platform's plan list.
base_image*stringBase image id.
git?storage_gib*integer1 <= valueavailability*Availability"always""on-demand"restricted*booleanWhen true, the workspace hosts are private to team members.
state*WorkspaceState"creating""cloning""running""sleeping""waking""stopped""error""deleting"status_detail?stringProgress or error text for the current state, e.g. "Configuring storage", "Cloning repository", "Starting IDE", "Workspace is running".
urls*dev_service?The service behind the dev URL urls.dev: the one the route / of the entry host leads to.
state is the IDE's business no more: a workspace can be running while this service sleeps. Absent for an
older core.
vault_id?IDNumeric resource id.
int641 <= valuesingle_node?booleanThe volume is ReadWriteOnce (rwo-colocated), so every pod of the workspace runs on one node; the UI shows a
"single-node workspace" badge. Absent for an older core.
idle_timeout_minutes?integerMinutes without use before an on-demand IDE sleeps; absent: the installation's default, which
GET /workspaces/{ws}/power shows as the IDE's effective timeout.
1 <= value <= 1440last_archived_at?stringWhen the newest restorable archive of the volume was taken; absent when there is none. A workspace that never sleeps is never archived, so the UI shows the age.
date-timerestored_from?IDNumeric resource id.
int641 <= valueupgrade_pending?booleanThe IDE runs a pod template from before an upgrade of the installation (workspaces.upgradePolicy: keep)
and gets the new one when it sleeps or stops; the UI shows an "upgrade pending" badge.
Absent for an older core.
created_by?IDNumeric resource id.
int641 <= valueowner_id?IDNumeric resource id.
int641 <= valueneeds_owner?booleanThe owner left the team or was disabled: the git proxy refuses the workspace until a workspace admin names a
new owner (PUT /workspaces/{ws}/owner). Absent for an older core.
permissions?array<>The caller's permissions on the resource; the UI shows only what they allow. Absent for an older core.
created_at*stringdate-timedeleted_at?stringSet on soft-deleted workspaces.
date-timepurge_after?stringWhen a soft-deleted workspace is purged for good; restore works until then.
date-timecurl -X PATCH 'https://console.example.com/api/v1/workspaces/1' \ -H 'Content-Type: application/json' \ -d '{}'{ "id": 1, "team_id": 1, "name": "string", "plan": "string", "base_image": "string", "git": { "provider": "string", "repo": "string", "ref": "string" }, "storage_gib": 1, "availability": "always", "restricted": true, "state": "creating", "status_detail": "string", "urls": { "ide": "string", "dev": "string" }, "dev_service": { "name": "string", "state": "running", "wake_seconds": 0, "needs": [ "string" ], "failing_needs": [ "string" ] }, "vault_id": 1, "single_node": true, "idle_timeout_minutes": 1, "last_archived_at": "2019-08-24T14:15:22Z", "restored_from": 1, "upgrade_pending": true, "created_by": 1, "owner_id": 1, "needs_owner": true, "permissions": [ "string" ], "created_at": "2019-08-24T14:15:22Z", "deleted_at": "2019-08-24T14:15:22Z", "purge_after": "2019-08-24T14:15:22Z"}