fleet

POST /v1/fleet/drain

Take this host out of placement on graceful shutdown.

All fleet endpoints

Authentication

Send an API key as a bearer token. This endpoint does not state a specific permission in the specification, so give your key the least it needs and check the response rather than assuming.

This endpoint takes no organisation id. Your key already identifies the organisation it belongs to, and the response is scoped to it.

Try it

Replace anything in angle brackets with your own values, and the key placeholder with a key from your 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> }'

Signed in? The API console in your dashboard fills in your real organisation id and your own key, and runs the request against the live API so you can see the actual response. Open this endpoint in the API console

Details

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.

Request body

NameTypeRequiredWhat it is
instance_idstringYes

Response

NameTypeRequiredWhat it is
worker_idstringNo
hostnamestringNo
statusstring<provisioning, active, draining, down, decommissioned>No
accepts_deploysbooleanNo
regionstringNo
poolstringNo
driverstringNo
capacityintegerNo
product_linesstring[]No
heartbeat_interval_secondsintegerNoHow 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…

Errors this endpoint can return

401 · 422 · 429