Skip to main content
The Wazuh Dashboard Plugins provide a comprehensive set of APIs for extending and integrating with the Wazuh security platform. This reference covers the plugin architecture, public APIs, components, and server-side endpoints.

Plugin Architecture

The Wazuh Dashboard is built on the OpenSearch Dashboards plugin framework and consists of three main plugins:

Main Plugin

Core application logic, UI components, and routes

Wazuh Core

Shared services, configuration, and security

Check Updates

Update notification and version checking

API Categories

Plugin Lifecycle

All plugins implement the standard OpenSearch Dashboards plugin lifecycle:
1

Setup Phase

Initialize services, register routes, and configure dependencies
2

Start Phase

Activate services and establish runtime connections
3

Stop Phase

Clean up resources and gracefully shutdown

Component APIs

Reusable React components for building Wazuh interfaces:

Server APIs

The plugins expose REST endpoints for:
  • Wazuh API proxy and request handling
  • Host configuration management
  • Index pattern and data operations
  • Authentication and authorization
  • Update checking and notifications

Quick Start

Using the Plugin API (Public)

import { WazuhCorePluginStart } from 'plugins/wazuh-core/public';

export class MyPlugin implements Plugin {
  public start(core: CoreStart, plugins: { wazuhCore: WazuhCorePluginStart }) {
    // Access configuration
    const config = await plugins.wazuhCore.configuration.get('pattern');
    
    // Check user permissions
    const currentPlatform = await plugins.wazuhCore.dashboardSecurity.fetchCurrentPlatform();
    
    // Use utilities
    const formattedDate = plugins.wazuhCore.utils.formatUIDate(new Date());
  }
}

Making API Requests (Server)

import { WazuhCorePluginSetup } from 'plugins/wazuh-core/server';

export class MyPlugin implements Plugin {
  public setup(core: CoreSetup, plugins: { wazuhCore: WazuhCorePluginSetup }) {
    const router = core.http.createRouter();
    
    router.get(
      { path: '/api/my-endpoint', validate: false },
      async (context, request, response) => {
        // Make authenticated request to Wazuh API
        const result = await context.wazuh_core.api.client.asCurrentUser.request(
          'GET',
          '/agents',
          {},
          { apiHostID: 'default' }
        );
        
        return response.ok({ body: result });
      }
    );
  }
}

Type Safety

All plugin APIs are fully typed with TypeScript. Import types from the plugin’s type definitions:
import type {
  WazuhSetup,
  WazuhStart,
  WazuhSetupPlugins,
  WazuhStartPlugins,
} from 'plugins/main/public/types';

import type {
  WazuhCorePluginSetup,
  WazuhCorePluginStart,
} from 'plugins/wazuh-core/public/types';

API Console

For interactive API testing and exploration, see the API Console documentation.

API Versioning

The plugin APIs follow semantic versioning. Breaking changes are introduced only in major versions. The current API version is tied to the plugin version.
Always check the plugin version compatibility when using APIs, as the Wazuh API backend version must also be compatible.

Next Steps

Main Plugin API

Explore the core plugin interfaces and lifecycle

Components

Browse reusable UI components

API Console

Test API endpoints interactively

Server Routes

View REST API endpoints