fleet
POST /v1/fleet/commands/{commandId}/result
Report how a claimed host command ended.
Автентифікація
Надішліть ключ API як маркер носія (bearer token). Ця кінцева точка не вказує конкретного дозволу в специфікації, тому надайте своєму ключу мінімально необхідні права та перевірте відповідь, замість того щоб припускати.
Цей кінцевий пункт не потребує ідентифікатора організації. Ваш ключ уже ідентифікує організацію, якій він належить, і відповідь обмежується її межами.
Спробувати
Замініть усе в кутових дужках власними значеннями, а заповнювач ключа — ключем із вашої панелі керування.
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> }'Увійшли в систему? Консоль API у вашій панелі керування автоматично підставляє ваш реальний ідентифікатор організації та ваш власний ключ, а також виконує запит до робочого API, щоб ви могли побачити справжню відповідь. Відкрийте цю кінцеву точку в консолі API
Деталі
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.
Параметри
| Назва | Тип | Обов'язкове | Що це таке |
|---|---|---|---|
commandId (path) | string | Так | A command claimed for this host in a heartbeat response. |
Тіло запиту
| Назва | Тип | Обов'язкове | Що це таке |
|---|---|---|---|
ok | boolean | Так | — |
result | string | Ні | 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 | Ні | 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 | Ні | 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… |
Відповідь
| Назва | Тип | Обов'язкове | Що це таке |
|---|---|---|---|
id | string | Ні | — |
status | string | Ні | — |
Помилки, які може повертати ця кінцева точка
401 · 404 · 422 · 429