Skip to main content

VPS power operation (start/stop/restart/poweroff)

POST 

/services/:id/power/:action

Changes the power state of the reseller's VPS. The action URL parameter accepts start, stop, restart or poweroff; any other value returns 404 in the Slim route regex.

Idempotency-Key REQUIRED. If the header is missing it returns 400 missing_idempotency_key. Power actions must be processed idempotently for double-click protection; the reseller module must generate a NEW UUID v4 on EVERY CLICK. The same key + same body replays the cached response for 24 hours (with the X-Idempotent-Replay: true header).

Rate limit: services_changes_120rpm bucket (120 req/min).

vps_id null: If the service is not yet connected to Virtualizor (tblcustomfieldsvalues empty or undefined) it returns 422 service_not_provisioned and NO call is made to Virtualizor.

Request

Responses

Power action processed

Response Headers
    X-RateLimit-Limit

    The per-minute limit defined for this key

    X-RateLimit-Remaining

    Number of requests remaining in the current window

    X-RateLimit-Reset

    Unix epoch of the start of the next window (UTC seconds)

    X-Idempotent-Replay

    true on a cache-hit replay. Not sent for fresh processing.