To retrieve any backups associated with a Droplet, send a GET request to
/v2/droplets/$DROPLET_ID/backups
.
You will get back a JSON object that has a backups
key. This will be set to
an array of backup objects, each of which contain the standard
Droplet backup attributes.
Name | Type | Required | Description | Default Value |
---|---|---|---|---|
droplet_id |
integer | True | A unique identifier for a Droplet instance. | |
per_page |
integer | False | Number of items returned per page | 20 |
page |
integer | False | Which ‘page’ of paginated results to return. | 1 |
import os
from pydo import Client
client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))
resp = client.droplets.list_backups(droplet_id=594828)
See the API spec for this endpoint to view additional detail on responses, headers, parameters, and more.