The Wazuh manager API allows users to make an agent enrollment request to the Wazuh manager. This request returns a unique key for the agent, which must be manually imported to the agent.
The flow of an agent being enrolled via API is as follows:
- The user sends an API request with the manager API credentials to generate an authorization token (a JSON Web Token).
- The user sends an API request with the authorization token to the Wazuh manager. This request enrolls the agent and gets the agent key.
- On the agent endpoint, the user imports the key to the agent.
- The user configures the Wazuh manager IP address on the agent.
- The user restarts the agent and the connection to the manager is established.
In this document, you will find the following information:
requesting-the-key importing-the-key