Create an APM agent key

Base URL
https://{kibana_url}
  • POST /api/apm/agent_keys
  • POST /s/{space_id}/api/apm/agent_keys
Auth

Create a new agent key for APM.

Path parameters

space_id string optional

An identifier for the space. If space_id is not provided in the URL, the default space is used. Refer to Spaces for more information.

Header parameters

elastic-api-version enum · default: 2023-10-31 required

The version of the API to use

Values: 2023-10-31
kbn-xsrf string required

A required header to protect against CSRF attacks

Request body

name string required

Agent name

privileges enum[] required

Privileges configuration

Values: event:write config_agent:read

Responses

Agent key created successfully

application/json
agentKey object

Agent key

api_key string required
encoded string required
expiration integer · format: int64
id string required
name string required

Bad Request response

application/json
error string

Error type

message string

Error message

statusCode number

Error status code

Unauthorized response

application/json
error string

Error type

message string

Error message

statusCode number

Error status code

Forbidden response

application/json
error string

Error type

message string

Error message

statusCode number

Error status code

Internal Server Error response

application/json
error string

Error type

message string

Error message

statusCode number

Error status code

Base URL
https://{kibana_url}