v1

latestOpenAPI 3.0.0Elastic License 2.02026-07-1791851.7 KB

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

type'PERMANENT' required

The enrollment type of the agent. The agent only supports the PERMANENT value. In the future the enrollment type may be used to indicate agents that use fleet for reporting and monitoring, but do not use policies.

shared_idstring required

The shared ID of the agent. To support pre-existing installs.

Never implemented.

Response

Agent enrolled successfully.

actionstring required

The action result. Will have the value "created".