pydo.uptime.list_checks()

Description

To list all of the Uptime checks on your account, send a GET request to /v2/uptime/checks.

Parameters

Name Type Required Description Default Value
per_page integer False Number of items returned per page 20
page integer False Which ‘page’ of paginated results to return. 1

Request Sample

import os
from pydo import Client

client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))

resp = client.uptime.checks_list()

Responses

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 checks. This will be set to an array of objects, each of which will contain the standard attributes associated with an uptime check

Click to expand an example response.
{
  "checks": [
    {
      "id": "5a4981aa-9653-4bd1-bef5-d6bff52042e4",
      "name": "Landing page check",
      "type": "https",
      "target": "https://www.landingpage.com",
      "regions": [
        "us_east",
        "eu_west"
      ],
      "enabled": true
    },
    {
      "id": "5a4981aa-9653-4bd1-bef5-d6bff52042e4",
      "name": "Landing page check",
      "type": "https",
      "target": "https://www.landingpage.com",
      "regions": [
        "us_east",
        "eu_west"
      ],
      "enabled": true
    }
  ],
  "links": {
    "pages": {
      "pages": {
        "first": "https://api.digitalocean.com/v2/account/keys?page=1",
        "prev": "https://api.digitalocean.com/v2/account/keys?page=2"
      }
    }
  },
  "meta": {
    "total": 1
  }
}

Unauthorized

Click to expand an example response.
{
  "id": "unauthorized",
  "message": "Unable to authenticate you."
}

The resource was not found.

Click to expand an example response.
{
  "id": "not_found",
  "message": "The resource you requested could not be found."
}

API Rate limit exceeded

Click to expand an example response.
{
  "id": "too_many_requests",
  "message": "API Rate limit exceeded."
}

Server error.

Click to expand an example response.
{
  "id": "server_error",
  "message": "Unexpected server-side error"
}

Unexpected error

Click to expand an example response.
{
  "id": "example_error",
  "message": "some error message"
}