pydo.apps.list_regions()

Description

List all regions supported by App Platform.

Request Sample

import os
from pydo import Client

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

get_resp = client.apps.list_regions()

Responses

See the API spec for this endpoint to view additional detail on responses, headers, parameters, and more.

A JSON object with key regions

Click to expand an example response for regions.
{
  "value": {
    "regions": [
      {
        "slug": "ams",
        "label": "Amsterdam",
        "flag": "netherlands",
        "continent": "Europe",
        "data_centers": [
          "ams3"
        ]
      },
      {
        "slug": "nyc",
        "label": "New York",
        "flag": "usa",
        "continent": "North America",
        "data_centers": [
          "nyc1",
          "nyc3"
        ],
        "default": true
      },
      {
        "slug": "fra",
        "label": "Frankfurt",
        "flag": "germany",
        "continent": "Europe",
        "data_centers": [
          "fra1"
        ]
      },
      {
        "slug": "sfo",
        "label": "San Francisco",
        "flag": "usa",
        "continent": "North America",
        "data_centers": [
          "sfo3"
        ]
      },
      {
        "slug": "sgp",
        "label": "Singapore",
        "flag": "singapore",
        "continent": "Asia",
        "data_centers": [
          "sgp1"
        ]
      },
      {
        "slug": "blr",
        "label": "Bangalore",
        "flag": "india",
        "continent": "Asia",
        "data_centers": [
          "blr1"
        ]
      },
      {
        "slug": "tor",
        "label": "Toronto",
        "flag": "canada",
        "continent": "North America",
        "data_centers": [
          "tor1"
        ]
      },
      {
        "slug": "lon",
        "label": "London",
        "flag": "uk",
        "continent": "Europe",
        "data_centers": [
          "lon1"
        ]
      }
    ]
  }
}

Unauthorized

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

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