Delete a workspace
Soft-deletes the workspace: it stops, leaves the git proxy and its routes, and keeps its volume and rows until `purge_after` (7 days). `POST /workspaces/{ws}/restore` brings it back until then; its volume keeps counting against the team's storage quota unless a team admin purges it now (`POST /workspaces/{ws}/purge`).
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.
Accepted; follow the Operation.
application/json- response
A long-running action. It ends in succeeded or failed and stays readable for 7 days.
id*stringuuidkind*stringWhat runs, for example workspace.create, workspace.delete, workspace.restore,
workspace.volume_owner, landscape.sync, landscape.teardown, workspace.archive,
workspace.restore_archive, managed_service.dump.
state*OperationState"pending""running""succeeded""failed"target?stringAPI path of the resource the operation acts on, e.g. /workspaces/123.
detail?stringHuman-readable progress, e.g. "Cloning repository".
error?RFC 9457 problem details.
created_at*stringdate-timeupdated_at*stringdate-timefinished_at?stringdate-timecurl -X DELETE 'https://console.example.com/api/v1/workspaces/1'{ "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"}Create a workspace
Returns at once; the workspace moves creating → cloning → running as the Operation proceeds. A Git source needs a connection to its provider (problem `git-connection-required`) and read access to the repository. The origin repository is added to the workspace's git access list with write access.
Run a command in the IDE pod
`bash -c <command>` in `/data/app` in the IDE pod with the workspace env vars and the caller's Git identity (`GIT_AUTHOR_*`, `GIT_COMMITTER_*`, as in a terminal: the name, and the email only when the identity provider verified it; an env var of the same name wins); `hart exec` uses it. 5 s unless `timeout_seconds` asks for up to 300 (since 0.8.1), and 1 MiB of output per stream; on timeout the process group is killed and `timed_out` is set. Needs `workspace.exec`; 409 when the IDE does not run, or when its agent predates 0.8.1 and allows at most 5 s (a restart of the workspace updates it).