Skip to content
  • Auto
  • Light
  • Dark

List Policies

List Backup Policies for All Existing Droplets
get/v2/droplets/backups/policies

To list information about the backup policies for all Droplets in the account, send a GET request to /v2/droplets/backups/policies.

Query Parameters
pagenumber
optional

Which 'page' of paginated results to return.

minimum1
per_pagenumber
optional

Number of items returned per page

minimum1
maximum200
Returns
metatotalnumberMetaProperties

Information about the response itself.

policiesmap
optional

A map where the keys are the Droplet IDs and the values are objects containing the backup policy information for each Droplet.

Hide ParametersShow Parameters
backup_enabledboolean
optional

A boolean value indicating whether backups are enabled for the Droplet.

backup_policyhourenumplanenumretention_period_daysnumberweekdayenumwindow_length_hoursnumberDropletBackupPolicy
optional

An object specifying the backup policy for the Droplet.

droplet_idnumber
optional

The unique identifier for the Droplet.

next_backup_windowendstringstartstringDropletNextBackupWindow
optional

An object containing keys with the start and end times of the window during which the backup will occur.

curl https://api.digitalocean.com//v2/droplets/backups/policies \
    -H "Authorization: Bearer $GRADIENTAI_API_KEY"
200 Example
{
  "meta": {
    "total": 1
  },
  "links": {
    "pages": {
      "last": "https://api.digitalocean.com/v2/images?page=2",
      "next": "https://api.digitalocean.com/v2/images?page=2"
    }
  },
  "policies": {
    "foo": {
      "backup_enabled": true,
      "backup_policy": {
        "hour": 0,
        "plan": "daily",
        "weekday": "SUN"
      },
      "droplet_id": 7101383,
      "next_backup_window": {
        "end": "2019-12-04T23:00:00Z",
        "start": "2019-12-04T00:00:00Z"
      }
    }
  }
}