List agent policies

GET /api/fleet/agent_policies

Query parameters

  • perPage integer

    The number of items to return

    Default value is 20.

  • page integer

    Default value is 1.

  • kuery string
  • format string

    Simplified or legacy format for package inputs

    Values are simplified or legacy.

  • full boolean

    When set to true, retrieve the related package policies for each agent policy.

  • When set to true, do not count how many agents are in the agent policy, this can improve performance if you are searching over a large number of agent policies. The "agents" property will always be 0 if set to true.

Responses

GET /api/fleet/agent_policies
curl \
 -X GET https://localhost:5601/api/fleet/agent_policies
Response examples (200)
{
  "items": [
    {
      "advanced_settings": {},
      "agent_features": [
        {
          "enabled": true,
          "name": "string"
        }
      ],
      "agents": 42.0,
      "data_output_id": "string",
      "description": "string",
      "download_source_id": "string",
      "fleet_server_host_id": "string",
      "global_data_tags": [
        {}
      ],
      "id": "string",
      "inactivity_timeout": 42,
      "is_protected": true,
      "keep_monitoring_alive": true,
      "monitoring_diagnostics": {
        "limit": {
          "burst": 42.0,
          "interval": "string"
        },
        "uploader": {
          "init_dur": "string",
          "max_dur": "string",
          "max_retries": 42.0
        }
      },
      "monitoring_enabled": [
        "metrics"
      ],
      "monitoring_http": {
        "enabled": true,
        "host": "string",
        "port": 42.0
      },
      "monitoring_output_id": "string",
      "monitoring_pprof_enabled": true,
      "name": "string",
      "namespace": "string",
      "overrides": {},
      "package_policies": [
        {
          "id": "string",
          "inputs": [
            {
              "config": {},
              "enabled": true,
              "processors": [
                "string"
              ],
              "streams": [],
              "type": "string",
              "vars": {}
            }
          ],
          "revision": 42.0,
          "description": "string",
          "enabled": true,
          "name": "string",
          "namespace": "string",
          "output_id": "string",
          "overrides": {},
          "package": {
            "name": "string",
            "requires_root": true,
            "title": "string",
            "version": "string"
          },
          "policy_id": "string",
          "policy_ids": [
            "string"
          ]
        }
      ],
      "revision": 42.0,
      "supports_agentless": true,
      "unenroll_timeout": 42,
      "unprivileged_agents": 42.0,
      "updated_by": "string",
      "updated_on": "2024-05-04T09:42:00+00:00"
    }
  ],
  "page": 42.0,
  "perPage": 42.0,
  "total": 42.0
}
Response examples (400)
{
  "error": "string",
  "message": "string",
  "statusCode": 42.0
}