Skip to content

Revert an entity's local PCD overrides

POST
/pcd/{databaseId}/overrides/{entityType}/{name}/revert
curl --request POST \
--url 'https://example.com/api/v1/pcd/1/overrides/delayProfile/example/revert?arrType=radarr' \
--header 'Content-Type: application/json' \
--data '{ "opIds": [ 1 ], "cascadeGroup": false }'

Soft-drops all or selected published user ops for the entity and recompiles the PCD. Operation rows are retained; no automatic snapshot is created. Revert is fail-closed: dependent or conflicting changes are not silently dropped. Only cascadeGroup explicitly permits including other entities in a required group. API tokens require admin scope. The request body is limited to 8 KB.

databaseId
required
integer
>= 1

PCD database ID

entityType
required
string
Allowed values: delayProfile regularExpression customFormat qualityProfile naming mediaSettings qualityDefinitions lidarrMetadataProfile

Resolved entity family

name
required
string
>= 1 characters

Current resolved entity name, not an earlier name before a rename. Preserved exactly without trimming; empty names are rejected. Names containing a slash are supported when it is URL-encoded as %2F.

arrType
string
Allowed values: radarr sonarr lidarr

Required for naming, mediaSettings, and qualityDefinitions. Required and must be lidarr for lidarrMetadataProfile. Rejected for delayProfile, regularExpression, customFormat, and qualityProfile. Never inferred from a sibling Arr app.

Media typeapplication/json

All fields are optional; omit opIds to revert all user ops for the entity.

object
opIds

Explicit subset of the entity’s published user-op IDs to revert

Array<integer>
>= 1 items <= 1000 items
cascadeGroup

Explicitly include other ops in a required dependent-operation group

boolean

User ops reverted and cache recompiled

Media typeapplication/json
object
entityType
required

Resolved config entity type

string
Allowed values: delayProfile regularExpression customFormat qualityProfile naming mediaSettings qualityDefinitions lidarrMetadataProfile
arrType
required

Explicit Arr app for scoped entities; null for Arr-agnostic entities

string
nullable
Allowed values: radarr sonarr lidarr
name
required

Current resolved entity name, preserved exactly without trimming

string
>= 1 characters
databaseId
required
integer
revertedOpIds
required
Array<integer>
cascadedEntities
required
Array<object>
object
entityType
required

Resolved config entity type

string
Allowed values: delayProfile regularExpression customFormat qualityProfile naming mediaSettings qualityDefinitions lidarrMetadataProfile
arrType
required

Explicit Arr app for scoped entities; null for Arr-agnostic entities

string
nullable
Allowed values: radarr sonarr lidarr
name
required

Current resolved entity name, preserved exactly without trimming

string
>= 1 characters
remainingOpIds
required
Array<integer>
resolvedMatchesBase
required

Whether a fully reverted entity matches base. Null when not comparable, including a partial revert or an entity absent from both layers.

boolean
nullable
Example
{
"entityType": "delayProfile",
"arrType": "radarr",
"cascadedEntities": [
{
"entityType": "delayProfile",
"arrType": "radarr"
}
]
}

Invalid parameters or JSON body, oversized body, disabled database, or unbuilt cache

Media typeapplication/json
object
error
required

Error message

string
code

Stable machine-readable code present on 5xx responses; error is a fixed user-safe message, raw detail is logged server-side only

string
Allowed values: cleanup_failed library_fetch_failed episodes_fetch_failed releases_fetch_failed
Example
{
"code": "cleanup_failed"
}

Authentication required

Media typeapplication/json
object
error
required

Error message

string
code

Stable machine-readable code present on 5xx responses; error is a fixed user-safe message, raw detail is logged server-side only

string
Allowed values: cleanup_failed library_fetch_failed episodes_fetch_failed releases_fetch_failed
Example
{
"code": "cleanup_failed"
}

The API token lacks the admin scope.

Media typeapplication/json

An authenticated API token lacks the scope the requested route requires.

object
error
required

Always Forbidden.

string
requiredScope
required

The API token scope this request requires.

string
Allowed values: read mcp sync:apply admin
Example
{
"requiredScope": "read"
}

Entity_not_found means no local overrides map to the entity’s current name. op_not_found means a selected op does not belong to this entity.

Media typeapplication/json
object
error
required
string
reason
required

Machine-readable missing-target (404) or fail-closed conflict (409) reason

string
Allowed values: entity_not_found op_not_found nothing_to_undo group_dependency dependent_ops selection_blocked op_not_revertible conflict_after_revert collateral_ops stale_action
blockingOpIds
Array<integer>
entities
Array<object>
object
entityType
required

Resolved config entity type

string
Allowed values: delayProfile regularExpression customFormat qualityProfile naming mediaSettings qualityDefinitions lidarrMetadataProfile
arrType
required

Explicit Arr app for scoped entities; null for Arr-agnostic entities

string
nullable
Allowed values: radarr sonarr lidarr
name
required

Current resolved entity name, preserved exactly without trimming

string
>= 1 characters
Example
{
"reason": "entity_not_found",
"entities": [
{
"entityType": "delayProfile",
"arrType": "radarr"
}
]
}

Revert rejected without changing the published-op set:

  • group_dependency: a required group includes unselected ops; use cascadeGroup to opt in.
  • dependent_ops: remaining user ops depend on the selected create or rename.
  • selection_blocked: a partial selection is not closed over overlapping fields or renames.
  • op_not_revertible: a selected op is no longer published and cannot be reverted.
  • conflict_after_revert: recompilation would introduce a new conflict on a remaining op.
  • collateral_ops: recompilation would change ops outside the explicitly planned set.
Media typeapplication/json
object
error
required
string
reason
required

Machine-readable missing-target (404) or fail-closed conflict (409) reason

string
Allowed values: entity_not_found op_not_found nothing_to_undo group_dependency dependent_ops selection_blocked op_not_revertible conflict_after_revert collateral_ops stale_action
blockingOpIds
Array<integer>
entities
Array<object>
object
entityType
required

Resolved config entity type

string
Allowed values: delayProfile regularExpression customFormat qualityProfile naming mediaSettings qualityDefinitions lidarrMetadataProfile
arrType
required

Explicit Arr app for scoped entities; null for Arr-agnostic entities

string
nullable
Allowed values: radarr sonarr lidarr
name
required

Current resolved entity name, preserved exactly without trimming

string
>= 1 characters
Example
{
"reason": "entity_not_found",
"entities": [
{
"entityType": "delayProfile",
"arrType": "radarr"
}
]
}

Failed to revert local overrides

Media typeapplication/json
object
error
required

Error message

string
code

Stable machine-readable code present on 5xx responses; error is a fixed user-safe message, raw detail is logged server-side only

string
Allowed values: cleanup_failed library_fetch_failed episodes_fetch_failed releases_fetch_failed
Example
{
"code": "cleanup_failed"
}