fleet
POST /v1/fleet/commands/{commandId}/result
Report how a claimed host command ended.
Autentikasi
Kirimkan kunci API sebagai token bearer. Titik akhir ini tidak menyatakan izin tertentu dalam spesifikasi, jadi berikan kunci Anda izin minimum yang diperlukan dan periksa responsnya alih-alih berasumsi.
Endpoint ini tidak memerlukan id organisasi. Kunci Anda telah mengidentifikasi organisasi tempatnya berafiliasi, dan respons akan dibatasi untuk organisasi tersebut.
Coba
Ganti apa pun di dalam tanda kurung sudut dengan nilai Anda sendiri, dan placeholder kunci dengan kunci dari dasbor Anda.
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> }'Sudah masuk? Konsol API di dasbor Anda akan mengisi ID organisasi asli dan kunci Anda sendiri, serta menjalankan permintaan terhadap API langsung sehingga Anda dapat melihat respons aktualnya. Buka titik akhir ini di konsol API
Detail
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
| Nama | Jenis | Wajib | Tentang apa ini |
|---|---|---|---|
commandId (path) | string | Ya | A command claimed for this host in a heartbeat response. |
Isi permintaan
| Nama | Jenis | Wajib | Tentang apa ini |
|---|---|---|---|
ok | boolean | Ya | — |
result | string | Tidak | 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 | Tidak | 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 | Tidak | 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… |
Tanggapan
| Nama | Jenis | Wajib | Tentang apa ini |
|---|---|---|---|
id | string | Tidak | — |
status | string | Tidak | — |
Kesalahan yang dapat dikembalikan oleh titik akhir ini
401 · 404 · 422 · 429