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 authorization

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

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
agent object
id string required
type string
version string required
audit_unenrolled_reason string
capabilities string[] · max items: 100
components object[] · max items: 10000
id string required
message string required
status enum required
Values: STARTING CONFIGURING HEALTHY DEGRADED FAILED STOPPING STOPPED
type string required
units object[] · max items: 10000
id string required
message string required
payload map string to object
status enum required
Values: STARTING CONFIGURING HEALTHY DEGRADED FAILED STOPPING STOPPED
type enum required
Values: input output
default_api_key string
default_api_key_history object[] · max items: 100
id string required
retired_at string required
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
metrics object
cpu_avg number
memory_size_byte_avg number
namespaces string[] · max items: 100
non_identifying_attributes map string to string
outputs map string to object
<string> object
api_key_id string
to_retire_api_key_ids object[] · max items: 100
id string required
retired_at string required
type string
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
unenrollment_started_at string
unhealthy_reason enum[] · max items: 3 nullable
Values: input output other
upgrade object
rollbacks object[] · max items: 100
valid_until string required
version string required
upgrade_attempts string[] · max items: 10000 nullable
upgrade_details object nullable
action_id string required
metadata object
download_percent number
download_rate number
error_msg string
failed_state enum
Values: UPG_REQUESTED UPG_SCHEDULED UPG_DOWNLOADING UPG_EXTRACTING UPG_REPLACING UPG_RESTARTING UPG_FAILED UPG_WATCHING UPG_ROLLBACK
reason string
retry_error_msg string
retry_until string
scheduled_at string
state enum required
Values: UPG_REQUESTED UPG_SCHEDULED UPG_DOWNLOADING UPG_EXTRACTING UPG_REPLACING UPG_RESTARTING UPG_FAILED UPG_WATCHING UPG_ROLLBACK
target_version string required
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

Bad Request

application/json
attributes object required
error string
errorType string
message string required
statusCode number
Base URL
https://{kibana_url}