Create an APM agent key
https://{kibana_url}
- POST /api/apm/agent_keys
- POST /s/{space_id}/api/apm/agent_keys
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.
Request
-
namestringrequired -
The name of the APM agent key.
-
privilegesrequired -
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.
-
Values:
event:writeconfig_agent:read
Responses
Agent key created successfully
Bad Request response
-
errorstring -
Error type
-
messagestring -
Error message
-
statusCodenumber -
Error status code
Unauthorized response
-
errorstring -
Error type
-
messagestring -
Error message
-
statusCodenumber -
Error status code
Forbidden response
-
errorstring -
Error type
-
messagestring -
Error message
-
statusCodenumber -
Error status code
Internal Server Error response
-
errorstring -
Error type
-
messagestring -
Error message
-
statusCodenumber -
Error status code