Skip to content
  • Auto
  • Light
  • Dark

Retrieve Policy

Retrieve the Backup Policy for an Existing Droplet
get/v2/droplets/{droplet_id}/backups/policy

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

Path ParametersExpand Collapse
droplet_id: number
ReturnsExpand Collapse
policy: optional object { backup_enabled, backup_policy, droplet_id, next_backup_window }
backup_enabled: optional boolean

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

backup_policy: optional DropletBackupPolicy

An object specifying the backup policy for the Droplet.

droplet_id: optional number

The unique identifier for the Droplet.

next_backup_window: optional DropletNextBackupWindow

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/$DROPLET_ID/backups/policy \
    -H "Authorization: Bearer $DIGITALOCEAN_ACCESS_TOKEN"
{
  "policy": {
    "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"
    }
  }
}
Returns Examples
{
  "policy": {
    "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"
    }
  }
}