Skip to content

List PCD snapshots for a database

GET
/pcd/{databaseId}/snapshots
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.

databaseId
required
integer

PCD database ID

type
string
Allowed values: auto manual

Filter by snapshot type

limit
integer
default: 50 >= 1 <= 200

Maximum number of results to return

offset
integer
0

Pagination offset

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
Allowed values: auto manual
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
Allowed values: pull sync manual
description
required
string
nullable
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
nullable
targetInstanceIds
required

Arr instance IDs targeted by this operation

Array<integer>
nullable
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"
}