Restore a soft-deleted workspace
Works until `purge_after`. Answers 409 with problem `name-taken` when a live workspace of the team now has the same name; rename that one first.
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 <= valueAccepted; the workspace is live again and starts like a new one.
application/json- response
workspace*operation*A long-running action. It ends in succeeded or failed and stays readable for 7 days.
curl -X POST 'https://console.example.com/api/v1/workspaces/1/restore'{ "workspace": { "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" }, "operation": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "kind": "string", "state": "pending", "target": "string", "detail": "string", "error": { "type": "about:blank", "title": "string", "status": 100, "detail": "string", "instance": "string", "errors": [ { "pointer": "string", "line": 1, "column": 1, "message": "string", "code": "string", "subject": "string" } ], "held_by_deleted": { "workspaces": 0, "storage_gib": 0 }, "failed_team": { "id": 1, "name": "string", "reason": "string" } }, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "finished_at": "2019-08-24T14:15:22Z" }}Purge a soft-deleted workspace now
Team admins and cluster admins (`team.manage` on the workspace's team). A soft-deleted workspace keeps its volume, and so counts against the team's storage quota, until `purge_after`; this purges it at once instead: its volume, objects and rows go and it can no longer be restored. Audited as `workspace.purge`; the event `workspace.purged` follows when it is gone (`GET /teams/{team}/quota` then no longer counts it). A live workspace answers 409 `workspace-not-deleted`; purging one whose purge is under way answers 204 again. The console asks to type the workspace's name first.
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`.