> ## 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.

# API Reference Overview

> Complete API reference for Wazuh Dashboard Plugins

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](/api/main-plugin)**
>
> Core application logic, UI components, and routes

> **[Wazuh Core](/api/wazuh-core)**
>
> Shared services, configuration, and security

> **[Check Updates](/api/wazuh-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:

* **[Agents Components](/api/components/agents)** - Agent status, synchronization, and management UI
* **[Overview Components](/api/components/overview)** - Dashboard and statistics displays
* **[Management Components](/api/components/management)** - Configuration and administrative interfaces
* **[Security Components](/api/components/security)** - Security policy and access control UI
* **[Settings Components](/api/components/settings)** - Application settings and preferences

### 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)

```typescript theme={null}
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)

```typescript theme={null}
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:

```typescript theme={null}
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](/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.

> [!NOTE]
>
> Always check the plugin version compatibility when using APIs, as the Wazuh API backend version must also be compatible.

## Next Steps

> **[Main Plugin API](/api/main-plugin)**
>
> Explore the core plugin interfaces and lifecycle

> **[Components](/api/components/overview)**
>
> Browse reusable UI components

> **[API Console](/api/console)**
>
> Test API endpoints interactively

> **[Server Routes](/api/main-plugin#server-routes)**
>
> View REST API endpoints


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.