> For the complete documentation index, see [llms.txt](https://docs.groundcover.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.groundcover.com/reference/remote-access-and-apis/api-examples/list-monitors.md).

# List Monitors

List and filter monitor definitions with the v2 gcQL search API.

### Endpoint

**POST** `/api/v2/monitors/search`

This endpoint searches monitor definitions. It requires a backend with the monitors-v2 capability enabled; otherwise it returns `404`.

For a backend without v2, use **POST** `/api/monitors/list`. Its request and response differ from v2 search; see the [legacy list example](https://docs.groundcover.com/reference/remote-access-and-apis/api-examples/legacy-monitor-reads.md#list-monitors) for filters and pagination.

### Authentication

Use an [API key](https://docs.groundcover.com/administer/api-keys.md) with at least Viewer (`read`) permissions. Include `Authorization: Bearer <YOUR_API_KEY>`, `X-Backend-Id: <YOUR_BACKEND_ID>`, and `Content-Type: application/json`.

### Request Body

The required `query` field contains gcQL. Monitor definitions do not need a time range. If your query joins issue evaluations, add `start` and `end` to bound that history.

```bash
curl --request POST 'https://api.groundcover.com/api/v2/monitors/search' \
  --header 'Authorization: Bearer <YOUR_API_KEY>' \
  --header 'X-Backend-Id: <YOUR_BACKEND_ID>' \
  --header 'Content-Type: application/json' \
  --data '{
  "query": "* | fields uuid, name, type, is_paused | sort by (uuid) | limit 100"
}'
```

### Response

HTTP `200` returns `data` (row objects) and `valueFieldHints` (numeric result columns):

```json
{
  "data": [
    {
      "uuid": "00000000-0000-4000-8000-000000000001",
      "name": "Checkout error logs",
      "type": "logs",
      "is_paused": true
    }
  ],
  "valueFieldHints": []
}
```

To filter definitions, use fields such as `type:logs`, `is_paused:true`, or `labels.team:platform` before the first pipe. Keep a stable sort when paginating; for the next page, use `| sort by (uuid) | offset 100 | limit 100`. Continue until a page has fewer than 100 rows.

Search uses field names such as `is_paused`; the typed definition returned by [Get Monitor](https://docs.groundcover.com/reference/remote-access-and-apis/api-examples/get-monitor.md) uses `spec.isPaused`. Read the full definition before updating it.

See [Monitors v2 API](https://docs.groundcover.com/reference/remote-access-and-apis/api-examples/monitors-v2-api.md) for write operations and [Monitor Issues API](https://docs.groundcover.com/reference/remote-access-and-apis/api-examples/monitor-issues-api.md) for evaluation history, instances, and timelines.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.groundcover.com/reference/remote-access-and-apis/api-examples/list-monitors.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
