To create an Uptime check, send a POST request to /v2/uptime/checks
specifying the attributes
in the table below in the JSON body.
import os
from pydo import Client
client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))
req = {
"name": "Landing page check",
"type": "https",
"target": "https://www.landingpage.com",
"regions": [
"us_east",
"eu_west"
],
"enabled": True
}
resp = client.uptime.check_create(body=req)
See the API spec for this endpoint to view additional detail on responses, headers, parameters, and more.