v53

latestOpenAPI 3.0.3raw.githubusercontent.com2026-08-076771,7565.2 MB
APM agent keys

Create an APM agent key

Spaces method and path for this operation:

<div><span class="operation-verb post">post</span>&nbsp;<span class="operation-path">/s/{space_id}/api/apm/agent_keys</span></div>

Refer to Spaces for more information.

Create a new agent key for APM. The user creating an APM agent API key must have at least the manage_own_api_key cluster privilege and the APM application-level privileges that it wishes to grant. After it is created, you can copy the API key (Base64 encoded) and use it to to authorize requests from APM agents to the APM Server.

post/api/apm/agent_keys

Headers

elastic-api-version'2023-10-31' required

The version of the API to use

kbn-xsrfstring required
Example:true

A required header to protect against CSRF attacks

Request body

namestring required

The name of the APM agent key.

privilegesstring[] required

The APM agent key privileges. It can take one or more of the following values:

  • event:write, which is required for ingesting APM agent events. * config_agent:read, which is required for APM agents to read agent configuration remotely.

Response

Agent key created successfully