Create an agent action

POST /api/fleet/agents/{agentId}/actions

[Required authorization] Route required privileges: fleet-agents-all.

Headers

  • kbn-xsrf string Required

    A required header to protect against CSRF attacks

Path parameters

  • agentId string Required
application/json

Body

  • action object Required

    Any of:

Responses

  • 200 application/json
    Hide response attribute Show response attribute object
    • item object Required

      Additional properties are NOT allowed.

      Hide item attributes Show item attributes object
      • agents array[string]
      • created_at string Required
      • expiration string
      • id string Required
      • minimum_execution_duration number
      • namespaces array[string]
      • rollout_duration_seconds number
      • sent_at string
      • source_uri string
      • start_time string
      • total number
      • type string Required
  • 400 application/json
    Hide response attributes Show response attributes object
    • error string
    • errorType string
    • message string Required
    • statusCode number
POST /api/fleet/agents/{agentId}/actions
curl \
 --request POST 'https://<KIBANA_URL>/api/fleet/agents/{agentId}/actions' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --header "kbn-xsrf: true" \
 --data '{"action":{"type":"UNENROLL"}}'