DigitalOcean.dropletGetSnapshots()

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.

Usage

Hover over inputs/exits for more info.

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) {

 

},

});

Inputs

token required

Your DigitalOcean API token.

'FFDFdf8f8d'
dropletID required

Droplet ID - This will let you return details on a specific droplet.

'7564837494'

Exits

error

An unexpected error occurred.

notFound

Could not find specified ID

success

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 }
}