Wazuh icon

Wazuh

Work with the Wazuh Server API and Wazuh Indexer API

Actions15

Agent → List

AI-generated

Summary

List Wazuh agents with optional filtering, pagination, and field selection using the Wazuh Manager API.

Inputs

  • Status — Filter agents by their connection status: Active, Disconnected, Never Connected, Pending, or Any (no filter).
  • Select — Comma-separated list of agent fields to include in the response (e.g., id, name, ip, status, version).
  • Search — Text to search for within agent fields.
  • Limit — Maximum number of agents to return. Minimum value is 1; defaults to 50.
  • Offset — Number of agents to skip in the result set. Minimum value is 0; defaults to 0.

Output shape

a collection object containing the list of agents matching the filters

Returns an object with 'items' array for agents, total count, total failed items, any failed items, and messages or errors as provided by the API. Pagination is supported via Limit and Offset parameters.

Examples

Example 1: Retrieve up to 50 active agents showing only their id and name.

Set Status to 'Active', Select to 'id,name', Limit to 50, Offset to 0.

Example 2: Search agents with 'webserver' in any field without status filtering.

Leave Status empty, set Search to 'webserver'.

Links

Discussion