Create an APM agent key

POST /api/apm/agent_keys

Create a new agent key for APM.

application/json; Elastic-Api-Version=2023-10-31

Body Required

Responses

POST /api/apm/agent_keys
curl \
 -X POST https://localhost:5601/api/apm/agent_keys \
 -H "Content-Type: application/json; Elastic-Api-Version=2023-10-31"
Request examples
{
  "name": "string",
  "privileges": [
    "event:write"
  ]
}
Response examples (200)
{
  "api_key": "string",
  "encoded": "string",
  "expiration": 42,
  "id": "string",
  "name": "string"
}