Return a list of Snapshots for a specific Droplet
You can find documentation for this API here: https://developers.digitalocean.com/documentation/v2/ and raise issues here: Github.com/NileFrater/machinepack-digitalocean.
var DigitalOcean = require('machinepack-digitalocean');
// Return a list of Snapshots for a specific Droplet
DigitalOcean.dropletGetSnapshots({
token: 'FFDFdf8f8d',
dropletID: '7564837494',
}).exec({
// An unexpected error occurred.
error: function (err) {
},
// Could not find specified ID
notFound: function () {
},
// OK.
success: function (result) {
},
});
Your DigitalOcean API token.
'FFDFdf8f8d'
Droplet ID - This will let you return details on a specific droplet.
'7564837494'
An unexpected error occurred.
Could not find specified ID
OK.
{
snapshots: [
{
id: 7938206,
name: 'nginx-fresh',
distribution: 'Ubuntu',
slug: null,
public: false,
regions: [ 'nyc3', 'nyc3' ],
created_at: '2014-11-14T16:37:34Z',
type: 'snapshot',
min_disk_size: 20
}
],
links: {},
meta: { total: 1 }
}