docs/ref/modules/server-api/README.md
The Server API is the REST interface used to manage and interact with the Wazuh manager. It is backed by a Python Framework that implements all business logic, RBAC enforcement, and communication with internal daemons.
The API exposes endpoints for agent management, security configuration, cluster operations, file integrity monitoring, and more. All requests are authenticated via JWT tokens and authorized through a Role-Based Access Control (RBAC) system.
spec/spec.yaml)| Concept | Description |
|---|---|
| Server API | REST API used to manage agents, manager, cluster, and security |
| Framework | Python backend implementing API behavior and business logic |
| Core Layer | Low-level logic and system interactions |
| RBAC | Role-Based Access Control enforced per endpoint |
| JWT | Authentication mechanism for all API calls |
| WQL | Query language for filtering and searching API data |
| DAPI | Distributed API layer for cluster-aware request routing |
| Component | Technology |
|---|---|
| Web Framework | Starlette + Connexion |
| API Specification | OpenAPI 3.0 (spec.yaml) |
| Authentication | PyJWT with EC keys |
| Async HTTP | aiohttp (for WDB HTTP client) |
| Database | Wazuh DB (SQLite via Unix sockets) |
| Security Headers | secure (Python library) |
| File Watching | asyncio + inotify |
| XML Parsing | lxml + defusedxml |
| Testing | pytest |
/agents endpoints