Skip to main content
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.

Accessing the API Console

Navigate to Settings > API in the Wazuh Dashboard to access the API console interface.
1

Navigate to Settings

Click on the Wazuh icon and select Settings from the menu
2

Select API Tab

Click on the API tab to view configured API connections
3

Open Console

Select an API host and open the 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:
With query parameters:

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:
string
required
HTTP method: GET, POST, PUT, DELETE, PATCH
string
required
API endpoint path, starting with /. Query parameters can be included.
object
JSON request body for POST, PUT, and PATCH requests

Response Format

The console displays responses in a formatted JSON view:
object
The main response data containing affected items and metadata
string
Human-readable description of the response
number
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:
1

View History

Click the history icon to view recent requests
2

Reuse Request

Click on a previous request to load it into the console
3

Clear History

Use the clear button to remove all history entries

Multi-host Support

Switch between different configured API hosts:
  1. Select the API host from the dropdown
  2. The console automatically uses the selected host’s credentials
  3. All requests are sent to the selected host

Error Handling

The console displays detailed error information when requests fail:

Common Error Codes

error
Wazuh API internal error
error
Wazuh API error (invalid request)
error
Permission denied
error
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

Instead of fetching all data and filtering client-side, use query parameters:
For large datasets, use offset and limit:
Verify user permissions before attempting operations:
Query specific resources instead of retrieving all:

Wazuh API Reference

Official Wazuh API documentation

Server Routes

Dashboard plugin API endpoints

Authentication

API authentication methods

RBAC

Role-based access control