fleet

POST /v1/fleet/commands/{commandId}/result

Report how a claimed host command ended.

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/commands/{commandId}/result \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "ok": <boolean> }'

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

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.

Parametry

NazwaTypWymaganeCo to jest
commandId (path)stringTakA command claimed for this host in a heartbeat response.

Treść żądania

NazwaTypWymaganeCo to jest
okbooleanTak
resultstringNieOne 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_codeintegerNieThe 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…
inventoryobjectNieThe 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…

Odpowiedź

NazwaTypWymaganeCo to jest
idstringNie
statusstringNie

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

401 · 404 · 422 · 429