Spaces method and path for this operation:
Refer to Spaces for more information.
DEPRECATED: This endpoint is intended for internal use by APM agents to fetch their configuration and mark it as applied. Do not use for new integrations. It searches for a single agent configuration matching the given service, and optionally updates the applied_by_agent field when the provided etag matches the current 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
Body
Required
-
If provided, the agent configuration will be marked as error and
applied_by_agentwill be set tofalse. This is useful for cases where the agent configuration was not applied successfully. -
If etags match then
applied_by_agentfield will be set totrue -
markAsAppliedByAgent=truemeans "force setting it to true regardless of etag". This is needed for Jaeger agent that doesn't have etags -
Service
curl \
--request POST 'https://<KIBANA_URL>/api/apm/settings/agent-configuration/search' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--header "elastic-api-version: 2023-10-31" \
--header "kbn-xsrf: true" \
--data '{"etag":"1e58c178efeebae15c25c539da740d21dee422fc","service":{"environment":"production","name":"frontend"}}'
{
"etag": "1e58c178efeebae15c25c539da740d21dee422fc",
"service": {
"environment": "production",
"name": "frontend"
}
}
{
"_id": "CIaqXXABmQCdPphWj8EJ",
"_index": ".apm-agent-configuration",
"_score": 2,
"_source": {
"@timestamp": 1582031336265,
"agent_name": "nodejs",
"applied_by_agent": false,
"etag": "5080ed25785b7b19f32713681e79f46996801a5b",
"service": {
"name": "frontend"
},
"settings": {
"transaction_sample_rate": "1"
}
}
}