List PCD snapshots for a database
GET
/pcd/{databaseId}/snapshots
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”databaseId
required
integer
PCD database ID
Query Parameters
Section titled “Query Parameters”type
string
Filter by snapshot type
limit
integer
Maximum number of results to return
offset
integer
Pagination offset
Responses
Section titled “Responses”Snapshot list
Media typeapplication/json
object
snapshots
required
Array<object>
object
id
required
integer
databaseId
required
integer
type
required
Whether the snapshot was auto-created or user-initiated
string
trigger
required
What event triggered the snapshot creation.
- pull: before a PCD repository pull/refresh
- sync: before an Arr instance sync
- manual: user-initiated via API
string
description
required
string
opsSequenceMaxId
required
Maximum pcd_ops ID at snapshot time
integer
opsCountBase
required
Count of published base-origin ops
integer
opsCountUser
required
Count of published user-origin ops
integer
cacheStateHash
required
SHA-256 state fingerprint
string
targetInstanceIds
required
Arr instance IDs targeted by this operation
Array<integer>
createdAt
required
string format: date-time
total
required
Total count matching the query filters
integer
Example
{ "snapshots": [ { "type": "auto", "trigger": "pull" } ]}Invalid parameters
Media typeapplication/json
object
error
required
string
Examplegenerated
{ "error": "example"}Database not found
Media typeapplication/json
object
error
required
string
Examplegenerated
{ "error": "example"}Failed to list snapshots
Media typeapplication/json
object
error
required
string
Examplegenerated
{ "error": "example"}