Skip to content

Get PCD snapshot detail

GET
/pcd/{databaseId}/snapshots/{snapshotId}
curl --request GET \
--url https://example.com/api/v1/pcd/1/snapshots/1

Returns full snapshot detail including computed fields for restore context (opsWrittenSince, isRestorable). isRestorable reflects a real fail-closed check: it is true only when the snapshot’s published-op manifest reconstructs and its recomputed fingerprint matches the stored cacheStateHash. See the .../rollback/preview and .../rollback endpoints to preview and execute a restore.

databaseId
required
integer

PCD database ID

snapshotId
required
integer

PCD snapshot ID

Snapshot full detail

Media typeapplication/json
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
  • rollback: system pre-rollback auto-capture taken before a restore rewinds the op log
string
Allowed values: pull sync manual rollback
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
opsWrittenSince
required

Number of ops written after this snapshot (count of pcd_ops rows with id greater than opsSequenceMaxId)

integer
isRestorable
required

Whether this snapshot can be safely restored. True only when the snapshot’s published-op set reconstructs and its recomputed fingerprint matches the stored cacheStateHash (fail-closed). Legacy snapshots without a fingerprint are false.

boolean
Example
{
"type": "auto",
"trigger": "pull"
}

Invalid parameters

Media typeapplication/json
object
error
required
string
Examplegenerated
{
"error": "example"
}

Snapshot not found or doesn’t belong to database

Media typeapplication/json
object
error
required
string
Examplegenerated
{
"error": "example"
}

Failed to fetch snapshot

Media typeapplication/json
object
error
required
string
Examplegenerated
{
"error": "example"
}