pydo.uptime.get_check_state()

Description

To show information about an existing check’s state, send a GET request to /v2/uptime/checks/$CHECK_ID/state.

Parameters

Name Type Required Description Default Value
check_id string True A unique identifier for a check.

Request Sample

import os
from pydo import Client

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

resp = client.uptime.check_state_get(check_id="fd9fda")

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 state. The value of this will be an object that contains the standard attributes associated with an uptime check’s state.

Click to expand an example response.
{
  "state": {
    "regions": {
      "us_east": {
        "status": "UP",
        "status_changed_at": "2022-03-17T22:28:51Z",
        "thirty_day_uptime_percentage": 97.99
      },
      "eu_west": {
        "status": "UP",
        "status_changed_at": "2022-03-17T22:28:51Z",
        "thirty_day_uptime_percentage": 97.99
      }
    },
    "previous_outage": {
      "region": "us_east",
      "started_at": "2022-03-17T18:04:55Z",
      "ended_at": "2022-03-17T18:06:55Z",
      "duration_seconds": 120
    }
  }
}

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"
}