---
type: api
title: Search for annotations
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v8/operation/operation-getannotation
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v8/operation/operation-getannotation
products:
  - Kibana
---

# Search for annotations

- Server: `https://{kibana_url}`

## Paths

- `GET` `/api/apm/services/{serviceName}/annotation/search`
- `GET` `/s/{space_id}/api/apm/services/{serviceName}/annotation/search`

- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/kibana/v8/authentication#apikeyauth)
- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/kibana/v8/authentication#basicauth)

#### Path Parameters

- `serviceName` (string)
  The name of the service

## Description

Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.

Search for annotations related to a specific service.

## Query String Parameters

- `environment` (string)
  The environment to filter annotations by
- `start` (string)
  The start date for the search
- `end` (string)
  The end date for the search

## Responses

#### `200`

Successful response

`application/json`

- `annotations` ([] object)
  Annotations
  - `@timestamp` (number)
  - `id` (string)
  - `text` (string)
  - `type` (enum)
    Values: `version`
#### `400`

Bad Request response

`application/json`

- `error` (string)
  Error type
- `message` (string)
  Error message
- `statusCode` (number)
  Error status code
#### `401`

Unauthorized response

`application/json`

- `error` (string)
  Error type
- `message` (string)
  Error message
- `statusCode` (number)
  Error status code
#### `500`

Internal Server Error response

`application/json`

- `error` (string)
  Error type
- `message` (string)
  Error message
- `statusCode` (number)
  Error status code
## Code Examples

#### Console

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

#### curl

```curl
curl -X GET "https://{kibana_url}/api/apm/services/{serviceName}/annotation/search" \
  -H "elastic-api-version: string"
```

