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
PUT /api/apm/settings/agent-configuration
curl \ --request PUT 'https://<KIBANA_URL>/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" }