snapshots
Overview
Name | snapshots |
Type | Resource |
Id | digitalocean.snapshots.snapshots |
Fields
Name | Datatype | Description |
---|---|---|
id | string | The unique identifier for the snapshot. |
name | string | A human-readable name for the snapshot. |
resource_id | string | The unique identifier for the resource that the snapshot originated from. |
created_at | string | A time value given in ISO8601 combined date and time format that represents when the snapshot was created. |
resource_type | string | The type of resource that the snapshot originated from. |
min_disk_size | integer | The minimum size in GB required for a volume or Droplet to use this snapshot. |
size_gigabytes | number | The billable size of the snapshot in gigabytes. |
tags | array | An array of Tags the snapshot has been tagged with. |
regions | array | An array of the regions that the snapshot is available in. The regions are represented by their identifying slug values. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | snapshot_id | To 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 ofthis will be an snapshot object containing the standard snapshot attributes. |
list | SELECT | To 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 beset to an array of snapshot objects, each of which will contain the standardsnapshot 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 . | |
delete | DELETE | snapshot_id | Both 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. |
_list | EXEC | To 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 beset to an array of snapshot objects, each of which will contain the standardsnapshot 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 . |