fleet

POST /v1/fleet/heartbeat

Stamp fleet liveness, ship the host report, collect queued commands.

Todos los endpoints de fleet

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/heartbeat \
  -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

Sent every `heartbeatIntervalSeconds`. Carries the host health report — the same document the console has always shown — because the heartbeat and the report answer the same question, and one call means the report can never be fresher than the heartbeat it is judged against. **This is where a declared box becomes real capacity.** A host that has never heartbeated is promoted to `active` **and** starts accepting deploys on its first successful beat; every beat after that leaves `acceptsDeploys` untouched, so an operator's drain sticks across an agent restart. A `down` host that heartbeats again is revived to `active` or `draining` according to the operator's existing intent. A `decommissioned` host gets `continue: false` and nothing is written. The response carries any commands the engine claimed for this host (bounded per tick). The claim is still `SELECT … FOR UPDATE SKIP LOCKED`, so exactly-once semantics are unchanged; only *who runs the query* moved, because a worker box has no database connection.

Cuerpo de la solicitud

NombreTipoObligatorio¿Qué es esto?
instance_idstring
agent_versionstringNo
reportWorkerHostReportNoOne heartbeat's observed host state.

Respuesta

NombreTipoObligatorio¿Qué es esto?
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…
continue_runningbooleanNoFalse only for an **answered** "this host is gone" (decommissioned or removed). An error is never reported as one — that distinction is what stops a transient failure retiring a…
commandsWorkerClaimedCommand[]No

Errores que este endpoint puede devolver

401 · 422 · 429