DeluxHostAPI Reference
Services & monitoring

Change server power state

POST
/v1/services/{id}/power

VirtFusion supports boot, restart, shutdown and poweroff. TenantOS supports boot, restart and poweroff; graceful shutdown is refused rather than mapped to a hard power cut.

409 is the normal answer a few seconds after any other operation, including a console being closed: the panel queues one task per server. Back off and retry; it is not a failure.

No idempotency key in v1. boot and shutdown are safe to repeat; a retried restart reboots the machine a second time, so a client that retries automatically should read powerState first.

Authorization

apiToken services:power
headerAuthorizationBearer <token>

A personal API token: Authorization: Bearer dh_live_…. See Authentication for scopes.

Scope: services:power

Path Parameters

id*integer

The service id, as returned by GET /v1/services.

Request Body

application/json
  1. body
action*string
Value in"boot""restart""shutdown""poweroff"

Response Body

The panel accepted the action. It is queued, not necessarily finished.

application/json
  1. response
ok*boolean
action*string
Value in"boot""restart""shutdown""poweroff"
taskId*integer

The task this call created. Find it by id in GET /v1/services/{id}/tasks to see whether it finished.

curl -X POST 'https://api.deluxhost.net/v1/services/0/power' \  -H "Authorization: Bearer $DELUXHOST_TOKEN" \  -H 'Content-Type: application/json' \  -d '{  "action": "boot"}'
Example Response
{  "ok": true,  "action": "boot",  "taskId": 0}