GET /api/apm/services/{serviceName}/annotation/search

Spaces method and path for this operation:

get /s/{space_id}/api/apm/services/{serviceName}/annotation/search

Refer to Spaces for more information.

Search for annotations related to a specific service.

Headers

  • elastic-api-version string Required

    The version of the API to use

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

Path parameters

  • serviceName string Required

    The name of the service

Query parameters

  • environment string

    The environment to filter annotations by

  • start string(date-time)

    The start date for the search

  • end string(date-time)

    The end date for the search

Responses

  • 200 application/json

    Successful response

    Hide response attribute Show response attribute object
    • annotations array[object]

      Annotations

      Hide annotations attributes Show annotations attributes object
      • @timestamp number
      • id string
      • text string
      • type string

        Value is version.

  • 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

  • 500 application/json

    Internal Server Error response

    Hide response attributes Show response attributes object
    • error string

      Error type

    • message string

      Error message

    • statusCode number

      Error status code

GET /api/apm/services/{serviceName}/annotation/search
curl \
 --request GET 'https://<KIBANA_URL>/api/apm/services/{serviceName}/annotation/search' \
 --header "Authorization: $API_KEY" \
 --header "elastic-api-version: 2023-10-31"
Response examples (200)
An example of a successful response from `GET /api/apm/services/{serviceName}/annotation/search`, which returns the annotations associated with a service over the given time range.
{
  "annotations": [
    {
      "@timestamp": 1735689600000,
      "id": "opbeans-node@2.0.0",
      "text": "opbeans-node@2.0.0",
      "type": "version"
    },
    {
      "@timestamp": 1736294400000,
      "id": "opbeans-node@2.1.0",
      "text": "opbeans-node@2.1.0",
      "type": "version"
    }
  ]
}
Response examples (400)
An example of a 400 Bad Request response, returned when the request payload or query parameters fail validation.
{
  "error": "Bad Request",
  "message": "[request body]: expected value of type [string] but got [undefined]",
  "statusCode": 400
}
Response examples (401)
An example of a 401 Unauthorized response, returned when the request is missing valid authentication credentials.
{
  "error": "Unauthorized",
  "message": "[security_exception]: missing authentication credentials for REST request",
  "statusCode": 401
}
Response examples (500)
An example of a 500 Internal Server Error response, returned when an unexpected error occurs while processing the request.
{
  "error": "Internal Server Error",
  "message": "An internal server error occurred. Check the Kibana server logs for details.",
  "statusCode": 500
}