List
List Backups for a Droplet
client.gpuDroplets.backups.list(numberdropletID, BackupListParams { page, per_page } query?, RequestOptionsoptions?): BackupListResponse { meta, backups, links }
/v2/droplets/{droplet_id}/backups
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.
Parameters
dropletID: number
Returns
List Backups for a Droplet
import Gradient from '@digitalocean/gradient';
const client = new Gradient();
const backups = await client.gpuDroplets.backups.list(3164444);
console.log(backups.meta);
{
"meta": {
"total": 1
},
"backups": [
{
"id": 6372321,
"created_at": "2020-07-28T16:47:44Z",
"min_disk_size": 25,
"name": "web-01-1595954862243",
"regions": [
"nyc3",
"sfo3"
],
"size_gigabytes": 2.34,
"type": "snapshot"
}
],
"links": {
"pages": {
"last": "https://api.digitalocean.com/v2/images?page=2",
"next": "https://api.digitalocean.com/v2/images?page=2"
}
}
}
Returns Examples
{
"meta": {
"total": 1
},
"backups": [
{
"id": 6372321,
"created_at": "2020-07-28T16:47:44Z",
"min_disk_size": 25,
"name": "web-01-1595954862243",
"regions": [
"nyc3",
"sfo3"
],
"size_gigabytes": 2.34,
"type": "snapshot"
}
],
"links": {
"pages": {
"last": "https://api.digitalocean.com/v2/images?page=2",
"next": "https://api.digitalocean.com/v2/images?page=2"
}
}
}