fleet
POST /v1/fleet/heartbeat
Stamp fleet liveness, ship the host report, collect queued commands.
אימות
שלח מפתח API כטוקן Bearer. נקודת קצה זו אינה מציינת הרשאת ספציפית במפרט, לכן הקצה למפתח שלך את המינימום הנדרש ובדוק את התגובה במקום להניח הנחות.
נקודת קצה זו אינה דורשת מזהה ארגון. המפתח שלך כבר מזהה את הארגון שאליו הוא שייך, והתגובה מוגבלת אליו בלבד.
נסה זאת
החלף כל דבר בסוגריים זוויתיים בערכים משלך, ואת מציין מיקום המפתח במפתח מלוח הבקרה שלך.
curl -X POST https://api.zinndigital.com/v1/fleet/heartbeat \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "instance_id": <string> }'מחובר? קונסולת ה-API בלוח הבקרה שלך מזינה את מזהה הארגון האמיתי שלך ואת המפתח שלך, ומריצה את הבקשה מול ה-API הפיזי כך שתוכל לראות את התגובה בפועל. פתח נקודת קצה זו במסוף ה-API
פרטים
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.
גוף הבקשה
| שם | סוג | נדרש | מה זה |
|---|---|---|---|
instance_id | string | כן | — |
agent_version | string | לא | — |
report | WorkerHostReport | לא | One heartbeat's observed host state. |
תשובה
| שם | סוג | נדרש | מה זה |
|---|---|---|---|
worker_id | string | לא | — |
hostname | string | לא | — |
status | string<provisioning, active, draining, down, decommissioned> | לא | — |
accepts_deploys | boolean | לא | — |
region | string | לא | — |
pool | string | לא | — |
driver | string | לא | — |
capacity | integer | לא | — |
product_lines | string[] | לא | — |
heartbeat_interval_seconds | integer | לא | 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… |
continue_running | boolean | לא | 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[] | לא | — |
שגיאות שנקודה קצה זו עשויה להחזיר
401 · 422 · 429