pydo.snapshots.list()
Generated on 8 May 2026
from pydo version
v0.34.0
Usage
client.snapshots.list(
per_page=20,
page=1,
resource_type=None,
)Description
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
per_pageinteger optionalNumber of items returned per page
pageinteger optionalWhich 'page' of paginated results to return.
resource_typestring optionalUsed to filter snapshots by a resource type.
Request Sample
Pagination
This method returns paginated results. The response includes a
links.pages object with URLs for navigating between pages. To
retrieve the next page, parse the next URL and pass the page
parameter:
from urllib.parse import urlparse, parse_qs
resp = client.snapshots.list()
pages = resp.get("links", {}).get("pages", {})
while "next" in pages:
parsed = urlparse(pages["next"])
page = int(parse_qs(parsed.query)["page"][0])
resp = client.snapshots.list(page=page)
pages = resp.get("links", {}).get("pages", {})Response Example
More Information
See /v2/snapshots in the API reference for additional detail on responses, headers, parameters, and more.