---
type: api
title: Search monitors
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana-serverless/operation/operation-get-synthetic-monitors
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana-serverless/operation/operation-get-synthetic-monitors
products:
  - Kibana
---

# Search monitors

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

## Paths

- `GET` `/api/synthetics/monitors`
- `GET` `/s/{space_id}/api/synthetics/monitors`

## Description

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

Get a list of monitors.

You must have `read` privileges for the Synthetics feature in the Observability section of the Kibana feature privileges.

## Required authorization

- Privileges: `uptime-read`

## Authentication

- Api key: `Authorization: <value>`
  You must create an API key and use the encoded value in the request header. To learn about creating keys, go to [API keys](https://www.elastic.co/docs/current/serverless/api-keys).

## Query string parameters

- `query` (string · max length: 4096) — optional
  A free-text query string.
- `filter` (string · max length: 4096) — optional
  Additional KQL filtering criteria.
- `tags` (string[] · max items: 1000) — optional
  Tags to filter monitors. Accepts a string or an array of strings.
- `monitorTypes` (string[] · max items: 1000) — optional
  The monitor types to filter by, such as `http`. Accepts a string or an array of strings.
- `locations` (string[] · max items: 1000) — optional
  The location IDs to filter by. Accepts a string or an array of strings.
- `projects` (string[] · max items: 1000) — optional
  The projects to filter by. Accepts a string or an array of strings.
- `schedules` (string[] · max items: 1000) — optional
  The schedules to filter by. Accepts a string or an array of strings.
- `remoteNames` (string[] · max items: 1000) — optional
  A string or an array of strings.
- `status` (string[] · max items: 1000) — optional
  The monitor statuses to filter by. Accepts a string or an array of strings.
- `monitorQueryIds` (string[] · max items: 1000) — optional
  The monitor query IDs to filter by. Accepts a string or an array of strings.
- `configIds` (string[] · max items: 1000) — optional
  The monitor config IDs to filter by. Accepts a string or an array of strings.
- `showFromAllSpaces` (union enum | boolean) — optional
  If `true`, return monitors from all spaces the user can access.
  Values: `true`, `false`
- `useLogicalAndFor` (enum[] · max items: 1000) — optional
  Apply logical AND for `tags` and/or `locations`. Accepts a string or an array.
  Values: `tags`, `locations`
- `dateRangeStart` (string · max length: 4096) — optional
  The start of the status window, as datemath (`now-15m`) or an ISO-8601 timestamp.
- `dateRangeEnd` (string · max length: 4096) — optional
  The end of the status window, as datemath (`now`) or an ISO-8601 timestamp.
- `page` (number) — optional
  The page number for paginated results.
- `perPage` (number) — optional
  The number of items to return per page.
- `sortField` (enum) — optional
  The field to sort the results by.
  Values: `enabled`, `status`, `updated_at`, `created_at`, `urls`, `name`, `tags`, `project_id`, `type`, `schedule`, `journey_id`
- `sortOrder` (enum) — optional
  The sort order.
  Values: `desc`, `asc`
- `searchAfter` (string[] · max items: 50) — optional
  A JSON array of sort values from the previous page, for cursor-based paging.

## Response

A successful response.

`application/json`

- `absoluteTotal` (integer)
- `monitors` (object[])
- `page` (integer)
- `perPage` (integer)
- `total` (integer)
## Code examples

#### Console

```console
GET kbn://api/synthetics/monitors
```

#### curl

```curl
curl \
  -X GET "${KIBANA_URL}/api/synthetics/monitors" \
  -H "Authorization: ApiKey ${API_KEY}"
```

## Response examples

#### Get synthetic monitors response example1

A successful response from `GET /api/synthetics/monitors?tags=prod&monitorTypes=http&locations=us-east-1&projects=project1&status=up`.

```json
{
  "absoluteTotal": 24,
  "monitors": [
    {
      "alert": {
        "status": {
          "enabled": true
        },
        "tls": {
          "enabled": true
        }
      },
      "config_id": "e59142e5-1fe3-4aae-b0b0-19d6345e65a1",
      "created_at": "2023-11-07T09:57:04.152Z",
      "enabled": false,
      "host": "8.8.8.8:80",
      "id": "e59142e5-1fe3-4aae-b0b0-19d6345e65a1",
      "ipv4": true,
      "ipv6": true,
      "locations": [
        {
          "geo": {
            "lat": 41.25,
            "lon": -95.86
          },
          "id": "us_central",
          "isServiceManaged": true,
          "label": "North America - US Central"
        }
      ],
      "max_attempts": 2,
      "mode": "all",
      "name": "8.8.8.8:80",
      "namespace": "default",
      "origin": "ui",
      "revision": 3,
      "schedule": {
        "number": "3",
        "unit": "m"
      },
      "timeout": "16",
      "type": "icmp",
      "updated_at": "2023-12-04T19:19:34.039Z",
      "wait": "7"
    }
  ],
  "page": 1,
  "perPage": 10,
  "total": 24
}
```

