Harthelm Docs

Put targets of a workspace to sleep

Needs `landscape.manage`. Puts the named targets, or without a body the IDE and every service, to sleep now (sleep reason `manual`), always-running ones included; the next request or wake wakes them. Running steps get the agents' stop grace. A workspace that is deleting, or whose volume Harthelm works on, answers 409.

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

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

Request Body

application/json
  1. body
targets?array<>

The targets; absent for the default of the operation.

Items1 <= items <= 64

Response Body

Accepted; the power state after the request.

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 POST 'https://console.example.com/api/v1/workspaces/1/sleep' \  -H 'Content-Type: application/json' \  -d '{}'
{  "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"      }    }  ]}