fleet
POST /v1/fleet/commands/{commandId}/result
Report how a claimed host command ended.
Autenticação
Envie uma chave de API como um token bearer. Este endpoint não especifica uma permissão específica na documentação, portanto, conceda à sua chave o mínimo necessário e verifique a resposta em vez de assumir.
Este endpoint não requer um ID de organização. Sua chave já identifica a organização à qual pertence, e a resposta é delimitada a ela.
Experimente
Substitua qualquer item entre colchetes por seus próprios valores e o espaço reservado para a chave por uma chave do seu painel.
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> }'Conectado? O console da API no seu painel preenche o ID da sua organização real e a sua própria chave, e executa a requisição contra a API de produção para que você possa ver a resposta real. Abra este endpoint no console da API
Detalhes
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.
Parâmetros
| Nome | Tipo | Obrigatório | O que é |
|---|---|---|---|
commandId (path) | string | Sim | A command claimed for this host in a heartbeat response. |
Corpo da requisição
| Nome | Tipo | Obrigatório | O que é |
|---|---|---|---|
ok | boolean | Sim | — |
result | string | Não | 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 | Não | 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 | Não | 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… |
Resposta
| Nome | Tipo | Obrigatório | O que é |
|---|---|---|---|
id | string | Não | — |
status | string | Não | — |
Erros que este endpoint pode retornar
401 · 404 · 422 · 429