fleet
POST /v1/fleet/drain
Take this host out of placement on graceful shutdown.
Autenticación
Envía una clave de API como token de portador. Este endpoint no especifica un permiso concreto en la especificación, así que otorga a tu clave los mínimos privilegios necesarios y comprueba la respuesta en lugar de dar por sentado.
Este endpoint no requiere ningún id de organización. Su clave ya identifica la organización a la que pertenece, y la respuesta está delimitada a ella.
Pruébalo
Reemplaza cualquier elemento entre corchetes angulares por tus propios valores, y el marcador de posición key con una clave de tu panel de control.
curl -X POST https://api.zinndigital.com/v1/fleet/drain \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "instance_id": <string> }'¿Has iniciado sesión? La consola de la API en tu panel de control rellena el ID de tu organización real y tu propia clave, y ejecuta la solicitud contra la API en vivo para que puedas ver la respuesta real. Abre este endpoint en la consola de la API
Detalles
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.
Cuerpo de la solicitud
| Nombre | Tipo | Obligatorio | ¿Qué es esto? |
|---|---|---|---|
instance_id | string | Sí | — |
Respuesta
| Nombre | Tipo | Obligatorio | ¿Qué es esto? |
|---|---|---|---|
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… |
Errores que este endpoint puede devolver
401 · 422 · 429