Harthelm Docs
REST APIWorkspaces

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`).

Generated from openapi/harthelm.yaml at v1.5.0
DELETE
/workspaces/{ws}

Authorization

cookie__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.

Path Parameters

ws*integer

Numeric resource id.

Formatint64
Range1 <= value

Header Parameters

If-Match?string

ETag of the version the change is based on. Declared optional so that the server, not the request binder, answers a missing header with 428.

Response Body

Accepted; follow the Operation.

application/json
  1. response

A long-running action. It ends in succeeded or failed and stays readable for 7 days.

id*string
Formatuuid
kind*string

What 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
Value in"pending""running""succeeded""failed"
target?string

API path of the resource the operation acts on, e.g. /workspaces/123.

detail?string

Human-readable progress, e.g. "Cloning repository".

error?

RFC 9457 problem details.

created_at*string
Formatdate-time
updated_at*string
Formatdate-time
finished_at?string
Formatdate-time
curl -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"}