# List monitors

Returns list of all your monitors. This endpoint [supports pagination](https://betterstack.com/docs/uptime/api/pagination/).

[endpoint]
base_url = "https://uptime.betterstack.com"
path = "/api/v2/monitors"
method = "GET"

[[query_param]]
name = "team_name"
description = "Filter monitors belonging to a specified team when using [global API token](https://betterstack.com/docs/uptime/api/getting-started-with-uptime-api/#get-a-global-api-token)."
required = false
type = "string"

[[query_param]]
name = "url"
description = "Filter monitors by their URL property."
required = false
type = "string"

[[query_param]]
name = "pronounceable_name"
description = "Filter monitors by their pronounceable name property."
required = false
type = "string"

[[header]]
name = "Authorization"
description = "Bearer `$TOKEN`"
required = true
type = "string"
[/endpoint]

[responses]
[[response]]
status = 200
description = '''Returns list of existing monitors.

<br>
The status attribute can have one of the following values:
<br>
`paused` - the monitor was paused
<br>
`pending` - the monitor was just created and it's waiting for the first check
<br>
`maintenance` - the monitor is paused because it is currently in its maintenance period
<br>
`up` - checks are passing
<br>
`validating` - service seems to be back up, but the recovery_period since the last failed check still hasn't passed
<br>
`down` - checks are failing

<br>

If an escalation policy is set (policy_id) then the simple escalation policy settings (call, sms, email, push) are ignored.'''
body = '''{
  "data": [
    {
      "id": "2",
      "type": "monitor",
      "attributes": {
        "url": "https://uptime.betterstack.com",
        "pronounceable_name": "Uptime homepage",
        "monitor_type": "keyword",
        "monitor_group_id": "12345",
        "last_checked_at": "2020-09-01T14:17:46.000Z",
        "status": "up",
        "policy_id": null,
        "expiration_policy_id": null,
        "team_name": "Test team",
        "required_keyword": "We call you",
        "verify_ssl": true,
        "check_frequency": 30,
        "call": true,
        "sms": true,
        "email": true,
        "push": true,
        "team_wait": null,
        "http_method": "get",
        "request_timeout": 15,
        "recovery_period": 0,
        "request_headers": [
          {
            "id": "123",
            "name": "Content-Type",
            "value": "application/xml"
          }
        ],
        "request_body": "",
        "paused_at": null,
        "created_at": "2020-02-18T13:38:16.586Z",
        "updated_at": "2020-09-08T13:10:20.202Z",
        "ssl_expiration": 7,
        "domain_expiration": 14,
        "regions": ["us", "eu", "as", "au"],
        "maintenance_from": "01:02:00",
        "maintenance_to": "03:04:00",
        "maintenance_timezone": "Amsterdam",
        "maintenance_days": ["mon", "tue", "wed", "thu", "fri", "sat", "sun"],
        "port": null,
        "confirmation_period": 120,
        "expected_status_codes": [],
        "environment_variables": {}
      }
    }
  ],
  "pagination": {
    "first": "https://uptime.betterstack.com/api/v2/monitors?page=1",
    "last": "https://uptime.betterstack.com/api/v2/monitors?page=16",
    "prev": null,
    "next": "https://uptime.betterstack.com/api/v2/monitors?page=2"
  }
}'''

[/responses]

<br>

#### Example cURL 

[code-tabs]
```shell
[label List all]
curl --request GET \
  --url "https://uptime.betterstack.com/api/v2/monitors" \
  --header "Authorization: Bearer $TOKEN"
```
```shell
[label Filter by URL]
curl --request GET \
  --url "https://uptime.betterstack.com/api/v2/monitors?url=https://google.com" \
  --header "Authorization: Bearer $TOKEN"
```
[/code-tabs]

[info]
### Don't have your API token yet?
Please, see [obtaining an API token](https://betterstack.com/docs/uptime/api/getting-started-with-uptime-api/).

#### Looking for the details of a specific parameter?
Explore [the list of all monitor API parameters](https://betterstack.com/docs/uptime/api/monitors-api-response-params/).
[/info]
