Create or update agent configuration
Headers
-
The version of the API to use
Value is
2023-10-31
. Default value is2023-10-31
. -
A required header to protect against CSRF attacks
Query parameters
-
overwrite boolean
If the config exists ?overwrite=true is required
Body Required
-
agent_name string
Agent name
-
Service
Additional properties are allowed.
-
Agent configuration settings
Responses
-
200 application/json; Elastic-Api-Version=2023-10-31
Successful response
Additional properties are NOT allowed.
-
400 application/json; Elastic-Api-Version=2023-10-31
Bad Request response
-
401 application/json; Elastic-Api-Version=2023-10-31
Unauthorized response
-
403 application/json; Elastic-Api-Version=2023-10-31
Forbidden response
-
404 application/json; Elastic-Api-Version=2023-10-31
Not found response
PUT /api/apm/settings/agent-configuration
curl \
-X PUT https://localhost:5601/api/apm/settings/agent-configuration \
-H "Content-Type: application/json; Elastic-Api-Version=2023-10-31" \
-H "elastic-api-version: 2023-10-31" \
-H "kbn-xsrf: true"
Request examples
# Headers
elastic-api-version: 2023-10-31
kbn-xsrf: true
# Payload
{
"agent_name": "string",
"service": {
"environment": "prod",
"name": "node"
},
"settings": {
"additionalProperty1": "string",
"additionalProperty2": "string"
}
}
Response examples (200)
{}
Response examples (400)
{
"error": "Not Found",
"message": "Not Found",
"statusCode": 400
}
Response examples (401)
{
"error": "Unauthorized",
"message": "string",
"statusCode": 401
}
Response examples (403)
{
"error": "Forbidden",
"message": "string",
"statusCode": 403
}
Response examples (404)
{
"error": "Not Found",
"message": "Not Found",
"statusCode": 404
}