fleet

POST /v1/fleet/commands/{commandId}/result

Report how a claimed host command ended.

All fleet endpoints

Authentication

Send an API key as a bearer token. This endpoint does not state a specific permission in the specification, so give your key the least it needs and check the response rather than assuming.

This endpoint takes no organisation id. Your key already identifies the organisation it belongs to, and the response is scoped to it.

Try it

Replace anything in angle brackets with your own values, and the key placeholder with a key from your dashboard.

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> }'

Signed in? The API console in your dashboard fills in your real organisation id and your own key, and runs the request against the live API so you can see the actual response. Open this endpoint in the API console

Details

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.

Parameters

NameTypeRequiredWhat it is
commandId (path)stringYesA command claimed for this host in a heartbeat response.

Request body

NameTypeRequiredWhat it is
okbooleanYes
resultstringNoOne 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_codeintegerNoThe 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…
inventoryobjectNoThe 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…

Response

NameTypeRequiredWhat it is
idstringNo
statusstringNo

Errors this endpoint can return

401 · 404 · 422 · 429