fleet
POST /v1/fleet/commands/{commandId}/result
Report how a claimed host command ended.
Authentification
Envoyez une clé d'API en tant que jeton du porteur (bearer token). Cet endpoint n'indique pas de permission spécifique dans la spécification, attribuez donc à votre clé le minimum requis et vérifiez la réponse plutôt que de faire des suppositions.
Cet endpoint ne prend aucun identifiant d'organisation. Votre clé identifie déjà l'organisation à laquelle elle appartient, et la réponse y est limitée.
Essayer
Remplacez tout ce qui se trouve entre crochets par vos propres valeurs, et le espace réservé à la clé par une clé de votre tableau de bord.
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> }'Connecté ? La console d'API de votre tableau de bord saisit votre véritable ID d'organisation ainsi que votre propre clé, et exécute la requête sur l'API de production afin que vous puissiez voir la réponse réelle. Ouvrir ce point de terminaison dans la console API
Détails
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.
Paramètres
| Nom | Type | Obligatoire | Qu'est-ce que c'est |
|---|---|---|---|
commandId (path) | string | Oui | A command claimed for this host in a heartbeat response. |
Corps de la requête
| Nom | Type | Obligatoire | Qu'est-ce que c'est |
|---|---|---|---|
ok | boolean | Oui | — |
result | string | Non | 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 | Non | 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 | Non | 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… |
Réponse
| Nom | Type | Obligatoire | Qu'est-ce que c'est |
|---|---|---|---|
id | string | Non | — |
status | string | Non | — |
Erreurs que cet point de terminaison peut renvoyer
401 · 404 · 422 · 429