List PCD snapshots for a database
const url = 'https://example.com/api/v1/pcd/1/snapshots?type=auto&limit=50&offset=0';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://example.com/api/v1/pcd/1/snapshots?type=auto&limit=50&offset=0'Returns a paginated list of snapshots for the specified database, ordered by creation time descending.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”PCD database ID
Query Parameters
Section titled “Query Parameters”Filter by snapshot type
Maximum number of results to return
Pagination offset
Responses
Section titled “Responses”Snapshot list
object
object
Whether the snapshot was auto-created or user-initiated
What event triggered the snapshot creation.
- pull: before a PCD repository pull/refresh
- sync: before an Arr instance sync
- manual: user-initiated via API
- rollback: system pre-rollback auto-capture taken before a restore rewinds the op log
Maximum pcd_ops ID at snapshot time
Count of published base-origin ops
Count of published user-origin ops
SHA-256 state fingerprint
Arr instance IDs targeted by this operation
Total count matching the query filters
Example
{ "snapshots": [ { "type": "auto", "trigger": "pull" } ]}Invalid parameters
object
Optional machine-readable error code, for example sync_in_progress or preview_stale
Examplegenerated
{ "error": "example", "code": "example"}Database not found
object
Optional machine-readable error code, for example sync_in_progress or preview_stale
Examplegenerated
{ "error": "example", "code": "example"}Failed to list snapshots
object
Optional machine-readable error code, for example sync_in_progress or preview_stale
Examplegenerated
{ "error": "example", "code": "example"}