fleet

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

Report how a claimed host command ended.

すべての fleet エンドポイント

すべての開発者向けドキュメント

認証

ベアラー トークンとして API キーを送信します。このエンドポイントでは仕様に特定の権限が記載されていないため、キーに必要な最小限の権限を付与し、推測するのではなくレスポンスを確認してください。

このエンドポイントは組織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.

リクエスト本文

名前タイプ必須これがその内容です
okbooleanはい
resultstringいいえ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_codeintegerいいえ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…
inventoryobjectいいえ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…

返信

名前タイプ必須これがその内容です
idstringいいえ
statusstringいいえ

このエンドポイントが返すエラー

401 · 404 · 422 · 429