fleet
POST /v1/fleet/commands/{commandId}/result
Report how a claimed host command ended.
Doğrulama
API açarını bearer token kimi göndərin. Bu səhifə spresifikasiyada xüsusi icazə tələb etmir, buna görə də açarınıza ehtiyac duyduğu minimum səviyyədə icazə verin və güman etmək əvəzinə cavabı yoxlayın.
Bu endpoint heç bir təşkilat ID-si tələb etmir. Sizin açarınız artıq aid olduğu təşkilatı müəyyən edir və cavab həmin təşkilat üçün məhdudlaşdırılır.
Sınaqdan keçir
Bucaqlı mötərizələrdə olan hór şeyi öz qiymətlərinizlə, açar yertutucusunu isə idarə panelinizdən bir açarla əvəz edin.
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> }'Sistemə daxil olmusunuz? İdarə panelinizdəki API konsolu real təşkilatınızın identifikatorunu və öz açarınızı avtomatik doldurur, sorğunu canlı API-yə qarşı icra edir ki, siz faktiki cavabı görə biləsiniz. Bu son nöqtəni API konsolunda açın
Təfərrüatlar
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.
Parametrlər
| Ad | Tip | Tələb olunur | Nədir |
|---|---|---|---|
commandId (path) | string | Bəli | A command claimed for this host in a heartbeat response. |
Sorğu gövdəsi
| Ad | Tip | Tələb olunur | Nədir |
|---|---|---|---|
ok | boolean | Bəli | — |
result | string | Xeyr | 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 | Xeyr | 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 | Xeyr | 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… |
Cavab
| Ad | Tip | Tələb olunur | Nədir |
|---|---|---|---|
id | string | Xeyr | — |
status | string | Xeyr | — |
Bu son nöqtənin qaytara biləcəyi xətalar
401 · 404 · 422 · 429