Type to search.

Get agents

Base URL
https://{kibana_url}
  • GET /api/fleet/agents
  • GET /s/{space_id}/api/fleet/agents
Auth

List agents, with optional filtering and pagination.

Required privileges

Privileges fleet-agents-read

Path parameters

space_id string optional

An identifier for the space. If space_id is not provided in the URL, the default space is used. Refer to Spaces for more information.

Query parameters

page number

Page number

perPage number · default: 20

Number of results per page

kuery string

A KQL query string to filter results

showAgentless boolean · default: true

When true, include agentless agents in the results

showInactive boolean · default: false

When true, include inactive agents in the results

withMetrics boolean · default: false

When true, include CPU and memory metrics in the response

withPendingRestart boolean · default: false

When true, include the pending restart action of each agent

showUpgradeable boolean · default: false

When true, only return agents that are upgradeable

getStatusSummary boolean · default: false

When true, return a summary of agent statuses in the response

sortField string

Field to sort results by

sortOrder enum

Sort order, ascending or descending

Values: asc desc
searchAfter string

JSON-encoded array of sort values for search_after pagination

openPit boolean

When true, opens a new point-in-time for pagination

pitId string

Point-in-time ID for pagination

pitKeepAlive string

Duration to keep the point-in-time alive, for example, 1m

Responses

Successful response

application/json
items object[] · max items: 10000 required
access_api_key string
access_api_key_id string
active boolean required
audit_unenrolled_reason string
capabilities string[] · max items: 100
default_api_key string
default_api_key_id string
effective_config object required
enrolled_at string required
health map string to object
id string required
identifying_attributes map string to string
last_checkin string
last_checkin_message string
last_checkin_status enum
Values: error online degraded updating starting disconnected
last_known_status enum
Values: offline error online inactive enrolling unenrolling unenrolled updating degraded uninstalled orphaned
local_metadata map string to object required
namespaces string[] · max items: 100
non_identifying_attributes map string to string
outputs map string to object
packages string[] · max items: 10000 required
pipeline_config string · max length: 10000
policy_base_id string
policy_id string
policy_revision number nullable
sequence_num number
signals string[] · max items: 50
sort object[] · max items: 10
status enum
Values: offline error online inactive enrolling unenrolling unenrolled updating degraded uninstalled orphaned
tags string[] · max items: 100
type enum required
Values: PERMANENT EPHEMERAL TEMPORARY OPAMP
unenrolled_at string
unenrolled_reason string
unenrollment_started_at string
unhealthy_reason enum[] · max items: 3 nullable
Values: input output other
upgrade_attempts string[] · max items: 10000 nullable
upgrade_started_at string nullable
upgraded_at string nullable
user_provided_metadata map string to object
nextSearchAfter string
page number required
perPage number required
pit string
statusSummary map string to number
total number required