Skip to content

Create a manual PCD snapshot

POST
/pcd/{databaseId}/snapshots
curl --request POST \
--url https://example.com/api/v1/pcd/1/snapshots \
--header 'Content-Type: application/json' \
--data '{ "description": "example" }'

Creates a manual snapshot of the current PCD database state. The snapshot captures ops metadata and a state fingerprint for future restore operations.

databaseId
required
integer

PCD database ID

Media typeapplication/json

Request body for creating a manual snapshot. All fields are optional.

object
description

Optional description for the snapshot

string
Examplegenerated
{
"description": "example"
}

Snapshot created

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
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
Example
{
"type": "auto",
"trigger": "pull"
}

Invalid databaseId

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

Database not found

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

Snapshot creation failed

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