fleet
POST /v1/fleet/commands/{commandId}/result
Report how a claimed host command ended.
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/commands/{commandId}/result \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "ok": <boolean> }'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
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.
Parametri
| Naziv | Vrsta | Obavezno | Što je to |
|---|---|---|---|
commandId (path) | string | Da | A command claimed for this host in a heartbeat response. |
Tijelo zahtjeva
| Naziv | Vrsta | Obavezno | Što je to |
|---|---|---|---|
ok | boolean | Da | — |
result | string | Ne | 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 | Ne | 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 | Ne | 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… |
Odgovor
| Naziv | Vrsta | Obavezno | Što je to |
|---|---|---|---|
id | string | Ne | — |
status | string | Ne | — |
Pogreške koje ova krajnja točka može vratiti
401 · 404 · 422 · 429