Skip to content
  • Auto
  • Light
  • Dark

Retrieve

Retrieve an Existing Snapshot
gpu_droplets.snapshots.retrieve(Union[int, str]snapshot_id) -> snapshotSnapshotsSnapshotRetrieveResponse
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_idunion
Union[int, str]

The ID of a Droplet snapshot.

Hide ParametersShow Parameters
SnapshotIDUnionMember0type
int

The ID of a Droplet snapshot.

SnapshotIDUnionMember1type
str

The ID of a volume snapshot.

Returns
SnapshotRetrieveResponseclass
Hide ParametersShow Parameters
snapshotSnapshots
optional
from do_gradientai import GradientAI

client = GradientAI()
snapshot = client.gpu_droplets.snapshots.retrieve(
    6372321,
)
print(snapshot.snapshot)
200 Example
{
  "snapshot": {
    "id": "6372321",
    "created_at": "2020-07-28T16:47:44Z",
    "min_disk_size": 25,
    "name": "web-01-1595954862243",
    "regions": [
      "nyc3",
      "sfo3"
    ],
    "resource_id": "200776916",
    "resource_type": "droplet",
    "size_gigabytes": 2.34,
    "tags": [
      "web",
      "env:prod"
    ]
  }
}