fleet
POST /v1/fleet/commands/{commandId}/result
Report how a claimed host command ended.
Authentifizierung
Senden Sie einen API-Schlüssel als Bearer-Token. Dieser Endpunkt gibt in der Spezifikation keine spezifische Berechtigung an. Versehen Sie Ihren Schlüssel daher mit den minimal erforderlichen Rechten und prüfen Sie die Antwort, anstatt Annahmen zu treffen.
Dieser Endpunkt erfordert keine Organisations-ID. Ihr Schlüssel identifiziert bereits die zugehörige Organisation, und die Antwort ist entsprechend eingeschränkt.
Ausprobieren
Ersetzen Sie alles in spitzen Klammern durch Ihre eigenen Werte und den Platzhalter für den Schlüssel durch einen Schlüssel aus Ihrem Dashboard.
curl -X POST https://api.zinndigital.com/v1/fleet/commands/{commandId}/result \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "ok": <boolean> }'Angemeldet? Die API-Konsole in Ihrem Dashboard trägt automatisch Ihre echte Organisations-ID sowie Ihren eigenen Schlüssel ein und führt die Anfrage gegen die Live-API aus, sodass Sie die tatsächliche Antwort sehen können. Öffnen Sie diesen Endpunkt in der API-Konsole
Details
A command belonging to a **different** host answers `404`, byte-identical to the answer for a command that does not exist — distinguishing them would make this an enumeration oracle for other hosts' command ids. `result` is one redacted line, never raw command output.
Parameter
| Name | Typ | Erforderlich | Was es ist |
|---|---|---|---|
commandId (path) | string | Ja | A command claimed for this host in a heartbeat response. |
Anfragekörper
| Name | Typ | Erforderlich | Was es ist |
|---|---|---|---|
ok | boolean | Ja | — |
result | string | Nein | One redacted line, never raw command output. Truncated keeping BOTH ENDS: a traceback puts its exception on the last line, so a head-only cut discards exactly the words that say… |
exit_code | integer | Nein | The process exit status, when a process ran, and the field that separates a VERDICT from a CRASH. `lsws_suexec.py check` exits 3 when it has looked and found a broken per-site i… |
inventory | object | Nein | The software inventory document, sent only when the command was a `software_inventory`. A DOCUMENT rather than a result line, because `result` is capped at 255 characters on pur… |
Antwort
| Name | Typ | Erforderlich | Was es ist |
|---|---|---|---|
id | string | Nein | — |
status | string | Nein | — |
Fehler, die dieser Endpunkt zurückgeben kann
401 · 404 · 422 · 429