pydo.snapshots.get()

Description

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

Name Type Required Description Default Value
snapshot_id JSON True Either the ID of an existing snapshot. This will be an integer for a Droplet snapshot or a string for a volume snapshot.

Responses

See the API spec for this endpoint to view additional detail on responses, headers, parameters, and more.

A JSON object with a key called snapshot.

Click to expand an example response.
{
  "snapshot": {
    "id": "6372321",
    "name": "web-01-1595954862243",
    "created_at": "2020-07-28T16:47:44Z",
    "regions": [
      "nyc3",
      "sfo3"
    ],
    "min_disk_size": 25,
    "size_gigabytes": 2.34,
    "resource_id": "200776916",
    "resource_type": "droplet",
    "tags": [
      "web",
      "env:prod"
    ]
  }
}

Bad Request

Click to expand an example response.
{
  "id": "bad_request",
  "message": "the resource is not a snapshot",
  "request_id": "bbd8d7d4-2beb-4be1-a374-338e6165e32d"
}

Unauthorized

Click to expand an example response.
{
  "id": "unauthorized",
  "message": "Unable to authenticate you."
}

The resource was not found.

Click to expand an example response.
{
  "id": "not_found",
  "message": "The resource you requested could not be found."
}

API Rate limit exceeded

Click to expand an example response.
{
  "id": "too_many_requests",
  "message": "API Rate limit exceeded."
}

Server error.

Click to expand an example response.
{
  "id": "server_error",
  "message": "Unexpected server-side error"
}

Unexpected error

Click to expand an example response.
{
  "id": "example_error",
  "message": "some error message"
}