Skip to main content

snapshots

Overview

Namesnapshots
TypeResource
Iddigitalocean.snapshots.snapshots

Fields

NameDatatypeDescription
idstringThe unique identifier for the snapshot.
namestringA human-readable name for the snapshot.
resource_idstringThe unique identifier for the resource that the snapshot originated from.
created_atstringA time value given in ISO8601 combined date and time format that represents when the snapshot was created.
resource_typestringThe type of resource that the snapshot originated from.
min_disk_sizeintegerThe minimum size in GB required for a volume or Droplet to use this snapshot.
size_gigabytesnumberThe billable size of the snapshot in gigabytes.
tagsarrayAn array of Tags the snapshot has been tagged with.
regionsarrayAn array of the regions that the snapshot is available in. The regions are represented by their identifying slug values.

Methods

NameAccessible byRequired ParamsDescription
getSELECTsnapshot_idTo retrieve information about a snapshot, send a GET request to
/v2/snapshots/$SNAPSHOT_ID.

The response will be a JSON object with a key called snapshot. The value of
this will be an snapshot object containing the standard snapshot attributes.
listSELECTTo list all of the snapshots available on your account, send a GET request to
/v2/snapshots.

The response will be a JSON object with a key called snapshots. This will be
set to an array of snapshot objects, each of which will contain the standard
snapshot attributes.

### Filtering Results by Resource Type

It's possible to request filtered results by including certain query parameters.

#### List Droplet Snapshots

To retrieve only snapshots based on Droplets, include the resource_type
query parameter set to droplet. For example, /v2/snapshots?resource_type=droplet.

#### List Volume Snapshots

To retrieve only snapshots based on volumes, include the resource_type
query parameter set to volume. For example, /v2/snapshots?resource_type=volume.
deleteDELETEsnapshot_idBoth Droplet and volume snapshots are managed through the /v2/snapshots/
endpoint. To delete a snapshot, send a DELETE request to
/v2/snapshots/$SNAPSHOT_ID.

A status of 204 will be given. This indicates that the request was processed
successfully, but that no response body is needed.
_listEXECTo list all of the snapshots available on your account, send a GET request to
/v2/snapshots.

The response will be a JSON object with a key called snapshots. This will be
set to an array of snapshot objects, each of which will contain the standard
snapshot attributes.

### Filtering Results by Resource Type

It's possible to request filtered results by including certain query parameters.

#### List Droplet Snapshots

To retrieve only snapshots based on Droplets, include the resource_type
query parameter set to droplet. For example, /v2/snapshots?resource_type=droplet.

#### List Volume Snapshots

To retrieve only snapshots based on volumes, include the resource_type
query parameter set to volume. For example, /v2/snapshots?resource_type=volume.