Lookup single agent configuration
This endpoint enables you to search for a single agent configuration and update the 'applied_by_agent' field.
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
Body
Required
-
etag
string If etags match then
applied_by_agent
field will be set totrue
-
mark_as_applied_by_agent
boolean markAsAppliedByAgent=true
means "force setting it to true regardless of etag". This is needed for Jaeger agent that doesn't have etags -
service
object Required Service
POST
/api/apm/settings/agent-configuration/search
curl \
--request POST 'https://localhost:5601/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 '"{\n \"etag\": \"1e58c178efeebae15c25c539da740d21dee422fc\",\n \"service\" : {\n \"name\": \"frontend\",\n \"environment\": \"production\"\n }\n}\n"'
Request example
Run `POST /api/apm/settings/agent-configuration/search` to search configuration details.
{
"etag": "1e58c178efeebae15c25c539da740d21dee422fc",
"service" : {
"name": "frontend",
"environment": "production"
}
}
Response examples (200)
An example of a successful response from `POST /api/apm/settings/agent-configuration/search`.
{
"_index": ".apm-agent-configuration",
"_id": "CIaqXXABmQCdPphWj8EJ",
"_score": 2,
"_source": {
"agent_name": "nodejs",
"service": {
"name": "frontend"
},
"settings": {
"transaction_sample_rate": "1",
},
"@timestamp": 1582031336265,
"applied_by_agent": false,
"etag": "5080ed25785b7b19f32713681e79f46996801a5b"
}
}
Response examples (400)
{
"error": "Not Found",
"message": "Not Found",
"statusCode": 400
}
Response examples (401)
{
"error": "Unauthorized",
"message": "string",
"statusCode": 401
}
Response examples (404)
{
"error": "Not Found",
"message": "Not Found",
"statusCode": 404
}