pydo.droplets.get_backup_policy()

Description

To show information about an individual Droplet’s backup policy, send a GET request to /v2/droplets/$DROPLET_ID/backups/policy.

Parameters

Name Type Required Description Default Value
droplet_id integer True A unique identifier for a Droplet instance.

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 policy. This will be set to a JSON object that contains the standard Droplet backup policy attributes.

Click to expand an example response.
{
  "policy": {
    "droplet_id": 444909706,
    "backup_enabled": true,
    "backup_policy": {
      "plan": "weekly",
      "weekday": "SUN",
      "hour": 20,
      "window_length_hours": 4,
      "retention_period_days": 28
    },
    "next_backup_window": {
      "start": "2024-09-15T20:00:00Z",
      "end": "2024-09-16T00:00:00Z"
    }
  }
}

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