Spaces method and path for this operation:
Refer to Spaces for more information.
List agents, with optional filtering and pagination.
[Required authorization] Route required privileges: fleet-agents-read.
Query parameters
-
Page number
-
Number of results per page
Default value is
20. -
A KQL query string to filter results
-
When true, include agentless agents in the results
Default value is
true. -
When true, include inactive agents in the results
Default value is
false. -
When true, include CPU and memory metrics in the response
Default value is
false. -
When true, only return agents that are upgradeable
Default value is
false. -
When true, return a summary of agent statuses in the response
Default value is
false. -
Field to sort results by
-
Sort order, ascending or descending
Values are
ascordesc. -
JSON-encoded array of sort values for
search_afterpagination -
When true, opens a new point-in-time for pagination
-
Point-in-time ID for pagination
-
Duration to keep the point-in-time alive, for example,
1m
curl \
--request GET 'https://localhost:5601/api/fleet/agents' \
--header "Authorization: $API_KEY"
{
"items": [
{
"active": true,
"enrolled_at": "2024-01-01T00:00:00.000Z",
"id": "agent-id-1",
"policy_id": "agent-policy-id-1",
"policy_revision": 1,
"status": "online",
"type": "PERMANENT",
"updated_at": "2024-01-01T00:00:00.000Z"
}
],
"page": 1,
"perPage": 20,
"total": 1
}
{
"error": "Bad Request",
"message": "An error message describing what went wrong",
"statusCode": 400
}