To list all of the alerts for an Uptime check, send a GET request to /v2/uptime/checks/$CHECK_ID/alerts
.
Name | Type | Required | Description | Default Value |
---|---|---|---|---|
check_id |
string | True | A unique identifier for a check. | |
per_page |
integer | False | Number of items returned per page | 20 |
page |
integer | False | Which ‘page’ of paginated results to return. | 1 |
import os
from pydo import Client
client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))
resp = client.uptime.check_alerts_list(check_id="4de7ac8b")
See the API spec for this endpoint to view additional detail on responses, headers, parameters, and more.
The response will be a JSON object with a key called alerts
. This will be set to an array of objects, each of which will contain the standard attributes associated with an uptime alert.
Unauthorized
The resource was not found.
API Rate limit exceeded
Server error.
Unexpected error