The API Console provides an interactive interface for testing and exploring Wazuh API endpoints directly from the dashboard. It’s accessible through the Settings page under the API section.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/wazuh/wazuh-dashboard-plugins/llms.txt
Use this file to discover all available pages before exploring further.
Accessing the API Console
Navigate to Settings > API in the Wazuh Dashboard to access the API console interface.Making API Requests
The console supports all standard HTTP methods used by the Wazuh API:GET Requests
Retrieve information from the Wazuh API:POST Requests
Create resources or perform actions:PUT Requests
Update existing resources:DELETE Requests
Remove resources:Request Format
Requests in the console follow this format:HTTP method: GET, POST, PUT, DELETE, PATCH
API endpoint path, starting with
/. Query parameters can be included.JSON request body for POST, PUT, and PATCH requests
Response Format
The console displays responses in a formatted JSON view:The main response data containing affected items and metadata
Human-readable description of the response
Error code (0 indicates success)
Common Endpoints
Here are some frequently used endpoints you can test in the console:Agent Management
Manager Information
Rules and Decoders
Security Configuration Assessment
Features
Auto-completion
The console provides intelligent auto-completion for:- API endpoint paths
- HTTP methods
- Common query parameters
- Request body schemas
Request History
Access previously executed requests from the history panel:Multi-host Support
Switch between different configured API hosts:- Select the API host from the dropdown
- The console automatically uses the selected host’s credentials
- All requests are sent to the selected host
Error Handling
The console displays detailed error information when requests fail:Common Error Codes
Wazuh API internal error
Wazuh API error (invalid request)
Permission denied
Wazuh daemon error
Programmatic Usage
While the console is designed for interactive use, you can also make programmatic API requests:Client-Side (Public Plugin)
Server-Side (Server Plugin)
Best Practices
Use Query Parameters for Filtering
Use Query Parameters for Filtering
Instead of fetching all data and filtering client-side, use query parameters:
Handle Pagination
Handle Pagination
For large datasets, use offset and limit:
Check Permissions First
Check Permissions First
Verify user permissions before attempting operations:
Use Specific Queries
Use Specific Queries
Query specific resources instead of retrieving all:
Related Resources
Wazuh API Reference
Official Wazuh API documentation
Server Routes
Dashboard plugin API endpoints
Authentication
API authentication methods
RBAC
Role-based access control