fleet
POST /v1/fleet/drain
Take this host out of placement on graceful shutdown.
Autenticazione
Invia una chiave API come bearer token. Questo endpoint non specifica un permesso specifico nella specifica, quindi assegna alla tua chiave i permessi minimi necessari e verifica la risposta invece di fare supposizioni.
Questo endpoint non richiede alcun ID organizzazione. La tua chiave identifica già l'organizzazione a cui appartiene e la risposta è limitata ad essa.
Provalo
Sostituisci qualsiasi elemento tra parentesi angolari con i tuoi valori e il segnaposto key con una chiave dalla tua dashboard.
curl -X POST https://api.zinndigital.com/v1/fleet/drain \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "instance_id": <string> }'Hai effettuato l'accesso? La console API nella tua dashboard inserisce il tuo ID organizzazione reale e la tua chiave personale, ed esegue la richiesta sull'API live in modo da poter vedere la risposta effettiva. Apri questo endpoint nella console API
Dettagli
The only availability change a box may make for itself, and safe in the direction it moves: a host can take itself **out** of service and never back **in**. Returning requires either the once-only first-heartbeat promotion or a staff undrain (`setWorkerDrain`). Idempotent; a `decommissioned` host is left alone.
Corpo della richiesta
| Nome | Tipo | Obbligatorio | Che cos'è |
|---|---|---|---|
instance_id | string | Sì | — |
Risposta
| Nome | Tipo | Obbligatorio | Che cos'è |
|---|---|---|---|
worker_id | string | No | — |
hostname | string | No | — |
status | string<provisioning, active, draining, down, decommissioned> | No | — |
accepts_deploys | boolean | No | — |
region | string | No | — |
pool | string | No | — |
driver | string | No | — |
capacity | integer | No | — |
product_lines | string[] | No | — |
heartbeat_interval_seconds | integer | No | How often to heartbeat, decided engine-side. The box no longer reads its own interval from an env file, so "the host-down window is ten missed beats" stays a fact about the depl… |
Errori che questo endpoint può restituire
401 · 422 · 429