Enrollment via Wazuh server API

The Wazuh server API allows users to make an agent enrollment request to the Wazuh manager. This request returns a unique client key for the Wazuh agent, which must be manually imported to the Wazuh agent. This is useful for users who need manual control over the enrollment process.

How it works

The flow of a Wazuh agent being enrolled via API is as follows:

  1. The user sends an API request with the Wazuh server API credentials to generate an authorization token (a JSON Web Token). This action can be performed from any authorized endpoint.

  2. The user sends an API request with the authorization token to the Wazuh manager. This request enrolls the Wazuh agent and gets the agent key.

  3. On the Wazuh agent endpoint, the user imports the agent key to the Wazuh agent.

  4. The user configures the Wazuh manager IP address or FQDN (Fully Qualified Domain Name) on the Wazuh agent.

  5. The user restarts the Wazuh agent, establishing the connection to the Wazuh manager.

In this section of the guide, you will find the following information: