fleet
POST /v1/fleet/commands/{commandId}/result
Report how a claimed host command ended.
Authentication
This endpoint does not take an API key. It takes its own credential, issued to the plugin or service that calls it, as a bearer token; see the description above.
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
| Name | Type | Required | What it is |
|---|---|---|---|
commandId (path) | string | Yes | A command claimed for this host in a heartbeat response. |
Request body
| Name | Type | Required | What it is |
|---|---|---|---|
ok | boolean | Yes | — |
result | string | No | 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 | No | 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 | No | The document a read-only command produced: the software inventory for software_inventory, the pending updates for update_check, and the local site liveness results for… |
Response
| Name | Type | Required | What it is |
|---|---|---|---|
id | string | No | — |
status | string | No | — |
Errors this endpoint can return
401 · 404 · 422 · 429