compute

POST /v1/compute/servers/{serverId}/power

Start, stop or reboot a server.

Toate punctele finale compute

Autentificare

Trimiteți o cheie API ca token de tip bearer. Cheia trebuie să aibă permisiunea sites.view; o cheie care nu o are va fi respinsă cu 403, nu 404.

Acest endpoint nu necesită un ID de organizație. Cheia ta identifică deja organizația căreia îi aparține, iar răspunsul este limitat la aceasta.

Încearcă

Înlocuiți tot ce se află între paranteze unghiulare cu propriile valori și substituentul cheie cu o cheie din tabloul de bord.

curl -X POST https://api.zinndigital.com/v1/compute/servers/{serverId}/power \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "action": <string<start, stop, reboot>> }'

Autentificat? Consola API din panoul de control îți completează ID-ul real al organizației și propria cheie și rulează cererea în API-ul live, astfel încât să poți vedea răspunsul efectiv. Deschideți acest punct final în consola API

Detalii

Asks the provider to change the machine's power state and returns the server's whole new state, which the client writes straight into its cache. ⛔ **The answer carries the transitional state, never the destination.** Power at the provider is asynchronous — the request is accepted long before the machine is up — so writing `on` the instant Start is accepted would be a dashboard asserting an observation it never made. The engine answers `starting`, the detail screen begins polling on that, and nothing in between ever renders the old state as if the button had done nothing. `404` for a server that is not the caller's; `422` for a machine that is not `active`. Requires `sites.view` **and** `sites.restart`, which is already the "make this thing stop and start again" authority.

Parametri

NumeTipObligatoriuCe este
serverId (path)UuidDaThe server's id, as `listComputeServers` reports it. **Ours** (UUIDv7), minted when the order row was written — never the provider's own identifier for the machine.

Corp cerere

NumeTipObligatoriuCe este
actionstring<start, stop, reboot>DaVendor-neutral by design — no provider's verb. The response carries the **transitional** power state, never the destination.

Răspuns

NumeTipObligatoriuCe este
idUuidDa**Ours**, and also the provisioning workflow's id and the machine's name at the provider — which is what makes the whole purchase path idempotent.
namestringDaWhat the customer called it. ⛔ At the provider a machine's name is its row id; confusing the two is a cross-tenant defect, so this is the customer's string and nothing else.
deploy_targetstringDaWhich compute range the machine belongs to.
plan_codestringDaThe tier it was bought on, or `""` when it was ordered by size alone.
providerstringDaOur provider id.
specstringDaThe machine size it currently runs.
zonestringDaThe data centre it runs in.
statusstring<pending, provisioning, active, failed, suspended, terminated>DaHow far the order got — **ours**, and a different fact from `power_state`. `pending` is a row with nothing bought and nothing charged; `failed` is the state whose `message` is t…
messagestringDaWhy the order failed, in a sentence the customer reads. Blank unless `failed`.
vendor_statusstringDaThe provider's own word, verbatim and unrounded. Staff-facing detail; a customer client renders `status` and never this.
power_statestring<unknown, on, off, starting, stopping, rebooting>DaWhat the machine is doing right now. ⛔ **Six values, not two, and the four extra ones are the point: a machine mid-transition is not "on".** `unknown` is the honest answer when…
addressesstring[]DaPublic addresses **if the provider states them**. Empty means *not stated*, never "none" — a machine rendered as having no address reads as broken.
optimisationstringDaThe stack optimisation profile it was built with, or `""` for none.
term_monthsintegerDaThe term it was bought on, or null when the provider states none.
renews_atstringDa⛔ **Always null today, and honestly so**: the provider publishes no renewal date, and one computed from the order plus the term would be our arithmetic rendered as the provider'…
created_atstringDaWhen the row was created, or `""` when not stated.
operablebooleanDaWhether the customer may act on this machine — power, resize, renew, rebuild. ⛔ Read rather than re-derived from `status`: the engine refuses every one of those on anything but…
imagestringDaThe provider image the machine was built from. Blank on the resold range, which installs one managed image and offers no choice.
suspendedbooleanDa⛔⛔ **Whether WE stopped it, which is not the same fact as `power_state`.** A stopped machine is the customer's own choice and they may start it again; a suspended one is ours an…
suspension_reasonstringDaWhy, verbatim, so the customer reads the same sentence support wrote. Blank when the machine is in good standing.
capabilitiesstring[]Da⭐⭐ **What this machine's provider can actually do** — capability tokens such as `compute:snapshots`, `compute:console`, `compute:firewall`, `compute:backups_manage` and `compute…

Erori pe care le poate returna acest punct final

401 · 403 · 404 · 422 · 429 · 503