Preview restoring a PCD snapshot
const url = 'https://example.com/api/v1/pcd/1/snapshots/1/rollback/preview';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/1/rollback/previewRead-only, PCD-to-PCD preview of exactly what restoring this snapshot would change in the PCD desired state (issue #16). Does not contact any Arr instance. The returned currentStateHash is the from-state value-guard required by the execute endpoint.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”PCD database ID
PCD snapshot ID
Responses
Section titled “Responses”Rollback preview
Mandatory PCD-to-PCD preview of what restoring a snapshot would change in the PCD desired state. Never contacts an Arr instance. When reconstructable is false the snapshot cannot be safely restored and sections is empty.
object
Whether the snapshot verifies against its fingerprint and can be restored
When not reconstructable, why (legacy/no-fingerprint or diverged history)
Live published-op fingerprint at preview time; echo as expectedCurrentStateHash on execute
The snapshot’s stored restore-target fingerprint
A group of entity changes for one resolved-config family. Reuses the sync-preview EntityChange/FieldChange shapes. Diff direction is PCD-to-PCD: each FieldChange.current is the CURRENT PCD desired-state and FieldChange.desired is the SNAPSHOT restore-target state (NOT live Arr state).
object
Human-readable family label (e.g. “Custom Formats”, “Naming (radarr)”)
Namespaced entity type; per-arr families are “${entityType}:${arrType}”
object
Sync target entity kind (e.g., customFormat, qualityProfile)
Entity display name (namespace-stripped where applicable)
Arr entity ID when present
Field-level diff; empty for unchanged/create where no deltas are tracked
object
Dot-notated field path
object
Example
{ "sections": [ { "arrType": "radarr", "changes": [ { "action": "create", "fields": [ { "type": "added" } ] } ] } ]}Invalid parameters
object
Examplegenerated
{ "error": "example"}Snapshot not found or doesn’t belong to database
object
Examplegenerated
{ "error": "example"}Failed to generate rollback preview
object
Examplegenerated
{ "error": "example"}