Create or update agent configuration
Headers
-
elastic-api-version
string Required The version of the API to use
Value is
2023-10-31
. Default value is2023-10-31
. -
kbn-xsrf
string Required 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 The agent name is used by the UI to determine which settings to display.
-
service
object Required Service
-
settings
object Required Agent configuration settings
PUT
/api/apm/settings/agent-configuration
curl \
--request PUT 'https://localhost:5601/api/apm/settings/agent-configuration' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--header "elastic-api-version: 2023-10-31" \
--header "kbn-xsrf: true" \
--data '"{\n \"service\": {\n \"name\": \"frontend\",\n \"environment\": \"production\"\n },\n \"settings\": {\n \"transaction_sample_rate\": \"0.4\",\n \"capture_body\": \"off\",\n \"transaction_max_spans\": \"500\"\n },\n \"agent_name\": \"nodejs\"\n}\n"'
Request example
Run `PUT /api/apm/settings/agent-configuration` to create or update configuration details.
{
"service": {
"name": "frontend",
"environment": "production"
},
"settings": {
"transaction_sample_rate": "0.4",
"capture_body": "off",
"transaction_max_spans": "500"
},
"agent_name": "nodejs"
}
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
}