fleet
POST /v1/fleet/heartbeat
Stamp fleet liveness, ship the host report, collect queued commands.
Autentifikacija
Pošaljite API ključ kao bearer token. Ova krajnja točka ne navodi određenu dozvolu u specifikaciji, stoga dajte svom ključu najmanje što mu je potrebno i provjerite odgovor umjesto da pretpostavljate.
Ova krajnja točka ne prihvaća ID organizacije. Vaš ključ već identificira organizaciju kojoj pripada, a odgovor je ograničen na nju.
Isprobajte
Zamijenite sve unutar šiljastih zagrada svojim vlastitim vrijednostima, a rezervirano mjesto za ključ s ključem iz vaše nadzorne ploče.
curl -X POST https://api.zinndigital.com/v1/fleet/heartbeat \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "instance_id": <string> }'Prijavljeni ste? API konzola na vašoj nadzornoj ploči automatski unosi stvarni ID vaše organizacije i vaš vlastiti ključ te šalje zahtjev prema aktivnom API-ju kako biste mogli vidjeti stvarni odgovor. Otvori ovu krajnju točku u API konzoli
Pojedinosti
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.
Tijelo zahtjeva
| Naziv | Vrsta | Obavezno | Što je to |
|---|---|---|---|
instance_id | string | Da | — |
agent_version | string | Ne | — |
report | WorkerHostReport | Ne | One heartbeat's observed host state. |
Odgovor
| Naziv | Vrsta | Obavezno | Što je to |
|---|---|---|---|
worker_id | string | Ne | — |
hostname | string | Ne | — |
status | string<provisioning, active, draining, down, decommissioned> | Ne | — |
accepts_deploys | boolean | Ne | — |
region | string | Ne | — |
pool | string | Ne | — |
driver | string | Ne | — |
capacity | integer | Ne | — |
product_lines | string[] | Ne | — |
heartbeat_interval_seconds | integer | Ne | 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… |
continue_running | boolean | Ne | False 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… |
commands | WorkerClaimedCommand[] | Ne | — |
Pogreške koje ova krajnja točka može vratiti
401 · 422 · 429