fleet
POST /v1/fleet/heartbeat
Stamp fleet liveness, ship the host report, collect queued commands.
Tabbatar da Asali
Aiko da maɓallin API a matsayin bearer token. Wannan ma'anar ba ta bayyana takamaiman izini ba a cikin ƙayyadaddun bayanai, don haka ba wa maɓallin ku mafi ƙarancin abin da yake buƙata kuma ku bincika amsar maimakon yin zato.
Wannan wurin ƙarewa ba ya buƙatar ID na ƙungiya. Maɓallin ku ya riga ya gano ƙungiyar da yake ciki, kuma an iyakance amsa a kanta.
Gwada
May gurbin komai da ke cikin kusurwa da ƙimar ka, kuma may gurbin maballi da maballi daga allon sarrafa ka.
curl -X POST https://api.zinndigital.com/v1/fleet/heartbeat \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "instance_id": <string> }'An shiga? Na'urar sarrafa API da ke cikin sashin kulawarka tana cika ainihin lambar ƙungiyarka da maɓallinka naka, sannan tana gudanar da buƙatar a kan ainihin API don haka zaka iya ganin amsar gaske. Buɗe wannan tashar a cikin na'urar kula da API
Bayani
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.
Jikin buƙata
| Suna | Nau'i | Ana buƙata | Abin da yake |
|---|---|---|---|
instance_id | string | Eh | — |
agent_version | string | A'a | — |
report | WorkerHostReport | A'a | One heartbeat's observed host state. |
Martani
| Suna | Nau'i | Ana buƙata | Abin da yake |
|---|---|---|---|
worker_id | string | A'a | — |
hostname | string | A'a | — |
status | string<provisioning, active, draining, down, decommissioned> | A'a | — |
accepts_deploys | boolean | A'a | — |
region | string | A'a | — |
pool | string | A'a | — |
driver | string | A'a | — |
capacity | integer | A'a | — |
product_lines | string[] | A'a | — |
heartbeat_interval_seconds | integer | A'a | 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 | A'a | 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[] | A'a | — |
Kuskuren da wannan matsaya za ta iya maido wa
401 · 422 · 429