Enroll a new agent to fleet-server. The agent is enrolled in the policy encoded in the apiKey used.
post/api/fleet/agents/enroll
Headers
User-Agentstring required
The user-agent header that is sent. Must have the format "elastic agent X.Y.Z" where "X.Y.Z" indicates the agent version. The agent version must not be greater than the version of the fleet-server.
X-Request-Idstring
The request tracking ID for APM.
Elastic-Api-Versionstring
The API version to use, format should be "YYYY-MM-DD"
Request body
Response
Agent enrolled successfully.