fleet

POST /v1/fleet/heartbeat

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

Wszystkie punkty końcowe fleet

Wszystkie dokumentacje dla programistów

Uwierzytelnianie

Wyślij klucz API jako token bearer. Ten punkt końcowy nie określa konkretnego uprawnienia w specyfikacji, więc nadaj swojemu kluczowi minimum potrzebnych uprawnień i sprawdź odpowiedź zamiast zakładać.

Ten punkt końcowy nie wymaga identyfikatora organizacji. Twój klucz już identyfikuje organizację, do której należy, a odpowiedź jest do niej ograniczona.

Wypróbuj

Zastąp wszystko w nawiasach ostrych własnymi wartościami, a zastępczy znacznik klucza kluczem ze swojego pulpitu nawigacyjnego.

curl -X POST https://api.zinndigital.com/v1/fleet/heartbeat \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "instance_id": <string> }'

Zalogowany? Konsola API w Twoim panelu uzupełnia rzeczywiste identyfikator organizacji oraz Twój własny klucz i wykonuje żądanie względem aktywnego API, dzięki czemu możesz zobaczyć rzeczywistą odpowiedź. Otwórz ten punkt końcowy w konsoli API

Szczegóły

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.

Treść żądania

NazwaTypWymaganeCo to jest
instance_idstringTak
agent_versionstringNie
reportWorkerHostReportNieOne heartbeat's observed host state.

Odpowiedź

NazwaTypWymaganeCo to jest
worker_idstringNie
hostnamestringNie
statusstring<provisioning, active, draining, down, decommissioned>Nie
accepts_deploysbooleanNie
regionstringNie
poolstringNie
driverstringNie
capacityintegerNie
product_linesstring[]Nie
heartbeat_interval_secondsintegerNieHow 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…
continue_runningbooleanNieFalse 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[]Nie

Błędy, które ten punkt końcowy może zwrócić

401 · 422 · 429