Harthelm Docs

Get the power state of a workspace

The IDE and every service of the synced landscape: awake or asleep and why, the last wake and how it ended, and what keeps a target awake. The UI polls it while something wakes and refetches it on `workspace.updated` and `landscape.updated`.

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

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

Response Body

The workspace's targets.

application/json
  1. response
workspace_id*ID

Numeric resource id.

Formatint64
Range1 <= value
targets*array<>

The IDE first, then the services by name.

curl -X GET 'https://console.example.com/api/v1/workspaces/1/power'
{  "workspace_id": 1,  "targets": [    {      "target": "string",      "availability": "always",      "asleep": true,      "ready_replicas": 0,      "sleep_reason": "idle",      "slept_at": "2019-08-24T14:15:22Z",      "woke_at": "2019-08-24T14:15:22Z",      "idle_timeout_minutes": 1,      "last_active_at": "2019-08-24T14:15:22Z",      "sleeps_at": "2019-08-24T14:15:22Z",      "busy": [        "ide"      ],      "busy_at": "2019-08-24T14:15:22Z",      "wake": {        "state": "awake",        "requested_at": "2019-08-24T14:15:22Z",        "finished_at": "2019-08-24T14:15:22Z",        "detail": "string",        "retry_after_seconds": 0,        "until": "2019-08-24T14:15:22Z"      }    }  ]}