# Snapshots
## Retrieve
`gpu_droplets.snapshots.retrieve(Union[int, str]snapshot_id) -> SnapshotRetrieveResponse`
**get** `/v2/snapshots/{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 of
this will be an snapshot object containing the standard snapshot attributes.
### Parameters
- **snapshot\_id:** `Union[int, str]`
The ID of a Droplet snapshot.
- **SnapshotIDUnionMember0:** `int`
The ID of a Droplet snapshot.
- **SnapshotIDUnionMember1:** `str`
The ID of a volume snapshot.
### Returns
- `class SnapshotRetrieveResponse`
- **snapshot:** `Optional[Snapshots]`
### Example
```python
from gradient import Gradient
client = Gradient()
snapshot = client.gpu_droplets.snapshots.retrieve(
6372321,
)
print(snapshot.snapshot)
```
## List
`gpu_droplets.snapshots.list(SnapshotListParams**kwargs) -> SnapshotListResponse`
**get** `/v2/snapshots`
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 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`.
### Parameters
- **page:** `int`
Which 'page' of paginated results to return.
- **per\_page:** `int`
Number of items returned per page
- **resource\_type:** `Literal["droplet", "volume"]`
Used to filter snapshots by a resource type.
- `"droplet"`
- `"volume"`
### Returns
- `class SnapshotListResponse`
- **meta:** `MetaProperties`
Information about the response itself.
- **links:** `Optional[PageLinks]`
- **snapshots:** `Optional[List[Snapshots]]`
- **id:** `str`
The unique identifier for the snapshot.
- **created\_at:** `datetime`
A time value given in ISO8601 combined date and time format that represents when the snapshot was created.
- **min\_disk\_size:** `int`
The minimum size in GB required for a volume or Droplet to use this snapshot.
- **name:** `str`
A human-readable name for the snapshot.
- **regions:** `List[str]`
An array of the regions that the snapshot is available in. The regions are represented by their identifying slug values.
- **resource\_id:** `str`
The unique identifier for the resource that the snapshot originated from.
- **resource\_type:** `Literal["droplet", "volume"]`
The type of resource that the snapshot originated from.
- `"droplet"`
- `"volume"`
- **size\_gigabytes:** `float`
The billable size of the snapshot in gigabytes.
- **tags:** `Optional[List[str]]`
An array of Tags the snapshot has been tagged with.
Requires `tag:read` scope.
### Example
```python
from gradient import Gradient
client = Gradient()
snapshots = client.gpu_droplets.snapshots.list()
print(snapshots.meta)
```
## Delete
`gpu_droplets.snapshots.delete(Union[int, str]snapshot_id)`
**delete** `/v2/snapshots/{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.
### Parameters
- **snapshot\_id:** `Union[int, str]`
The ID of a Droplet snapshot.
- **SnapshotIDUnionMember0:** `int`
The ID of a Droplet snapshot.
- **SnapshotIDUnionMember1:** `str`
The ID of a volume snapshot.
### Example
```python
from gradient import Gradient
client = Gradient()
client.gpu_droplets.snapshots.delete(
6372321,
)
```