POST /api/fleet/agents

Spaces method and path for this operation:

post /s/{space_id}/api/fleet/agents

Refer to Spaces for more information.

Retrieve agents associated with specific action IDs.

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

Headers

  • kbn-xsrf string Required

    A required header to protect against CSRF attacks

application/json

Body

  • actionIds array[string] Required

    Not more than 1000 elements.

Responses

  • 200 application/json

    Successful response

    Hide response attribute Show response attribute object
    • items array[string] Required

      Not more than 10000 elements.

  • 400 application/json

    Bad Request

    Hide response attributes Show response attributes object
    • attributes Required
    • error string
    • errorType string
    • message string Required
    • statusCode number
POST /api/fleet/agents
curl \
 --request POST 'https://<KIBANA_URL>/api/fleet/agents' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --header "kbn-xsrf: true" \
 --data '{"actionIds":["action-id-1","action-id-2"]}'
Request example
Retrieve agents associated with specific action IDs
{
  "actionIds": [
    "action-id-1",
    "action-id-2"
  ]
}
Response examples (200)
Agents associated with the given actions
{
  "items": [
    {
      "active": true,
      "id": "agent-id-1",
      "policy_id": "agent-policy-id-1",
      "status": "online"
    }
  ],
  "total": 1
}
Response examples (400)
Example of a generic error response
{
  "error": "Bad Request",
  "message": "An error message describing what went wrong",
  "statusCode": 400
}