GET /api/apm/settings/agent-configuration/view

Spaces method and path for this operation:

get /s/{space_id}/api/apm/settings/agent-configuration/view

Refer to Spaces for more information.

Retrieve a single agent configuration matching the given service name and environment. You must have read privileges for the APM and User Experience feature in Kibana. If no matching configuration is found, the API returns a 404.

Headers

  • elastic-api-version string Required

    The version of the API to use

    Value is 2023-10-31. Default value is 2023-10-31.

Query parameters

  • name string

    Service name

  • environment string

    Service environment

Responses

  • 200 application/json

    Successful response

    Hide response attributes Show response attributes object
    • id string Required
    • @timestamp number Required

      Timestamp

    • agent_name string

      Agent name

    • applied_by_agent boolean

      Applied by agent

    • etag string Required

      etag is sent by the APM agent to indicate the etag of the last successfully applied configuration. If the etag matches an existing configuration its applied_by_agent property will be set to true. Every time a configuration is edited applied_by_agent is reset to false.

    • service object Required

      Service

      Hide service attributes Show service attributes object
      • environment string

        The environment of the service.

      • name string

        The name of the service.

    • settings object Required

      Agent configuration settings

      Hide settings attribute Show settings attribute object
      • * string Additional properties
  • 400 application/json

    Bad Request response

    Hide response attributes Show response attributes object
    • error string

      Error type

    • message string

      Error message

    • statusCode number

      Error status code

  • 401 application/json

    Unauthorized response

    Hide response attributes Show response attributes object
    • error string

      Error type

    • message string

      Error message

    • statusCode number

      Error status code

  • 404 application/json

    Not found response

    Hide response attributes Show response attributes object
    • error string

      Error type

    • message string

      Error message

    • statusCode number

      Error status code

GET /api/apm/settings/agent-configuration/view
curl \
 --request GET 'https://<KIBANA_URL>/api/apm/settings/agent-configuration/view' \
 --header "Authorization: $API_KEY" \
 --header "elastic-api-version: 2023-10-31"
Response examples (200)
An example of a successful response from `GET /api/apm/settings/agent-configuration/view`.
{
  "@timestamp": 1582031336265,
  "agent_name": "nodejs",
  "applied_by_agent": true,
  "etag": "5080ed25785b7b19f32713681e79f46996801a5b",
  "id": "CIaqXXABmQCdPphWj8EJ",
  "service": {
    "environment": "production",
    "name": "frontend"
  },
  "settings": {
    "capture_body": "off",
    "transaction_max_spans": "500",
    "transaction_sample_rate": "0.4"
  }
}