fleet
POST /v1/fleet/commands/{commandId}/result
Report how a claimed host command ended.
Аутентификација
Пошаљите API кључ као bearer токен. Ова крајња тачка не наводи конкретну дозволу у спецификацији, па свом кључу доделите најмања неопходна овлашћења и проверите одговор уместо да претпостављате.
Ова крајња тачка не прихвата id организације. Ваш кључ већ идентификује организацију којој припада, а одговор је ограничен на њу.
Испробајте
Замените све што је у угластим заградама сопственим вредностима, а чувар места кључа кључем са своје контролне табле.
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 конзола на вашој контролној табли попуњава ваш прави id организације и ваш сопствени кључ, и покреће захтев према живом 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… |
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… |
Одговор
| Назив | Тип | Обавезно | Шта је ово |
|---|---|---|---|
id | string | Не | — |
status | string | Не | — |
Грешке које ова крајња тачка може вратити
401 · 404 · 422 · 429