pydo.droplets.list_supported_backup_policies()

Description

To retrieve a list of all supported Droplet backup policies, send a GET request to /v2/droplets/backups/supported_policies.

Responses

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

A JSON object with an supported_policies key set to an array of objects describing each supported backup policy.

Click to expand an example response.
{
  "supported_policies": [
    {
      "name": "weekly",
      "possible_window_starts": [
        0,
        4,
        8,
        12,
        16,
        20
      ],
      "window_length_hours": 4,
      "retention_period_days": 28,
      "possible_days\"": [
        "SUN",
        "MON",
        "TUE",
        "WED",
        "THU",
        "FRI",
        "SAT"
      ]
    },
    {
      "name": "daily",
      "possible_window_starts": [
        0,
        4,
        8,
        12,
        16,
        20
      ],
      "window_length_hours": 4,
      "retention_period_days": 7,
      "possible_days": []
    }
  ]
}

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