Skip to content

Apply a goal to a quality profile

POST
/goals/apply
curl --request POST \
--url https://example.com/api/v1/goals/apply \
--header 'Content-Type: application/json' \
--data '{ "databaseId": 1, "arrType": "radarr", "profileName": "example", "preset": "example", "weights": { "qualityVsSize": 1, "compatibility": 1, "hdrPreference": 1, "unwantedStrictness": 1, "resolutionCeiling": "720p" }, "expectedEngineVersion": "example" }'

Persists the generated scores + thresholds to the quality profile via the standard PCD user-op path (updateScoring) and records the goal binding. Applied scores are ordinary user ops, editable anywhere manual scores are. Returns 409 when expectedEngineVersion does not match the server engine version (optimistic concurrency).

Media typeapplication/json
object
databaseId
required
integer
arrType
required
string
Allowed values: radarr sonarr lidarr
profileName
required
string
preset
required
string
weights
required
object
qualityVsSize
required
integer
<= 100
compatibility
required
integer
<= 100
hdrPreference
required
integer
<= 100
unwantedStrictness
required
integer
<= 100
resolutionCeiling
required
string
Allowed values: 720p 1080p 2160p
expectedEngineVersion
required

The engine version the client computed against; a mismatch yields 409.

string

The applied plan and persisted binding

Media typeapplication/json
object
plan
required

Deterministic translation of a goal into concrete scores + thresholds.

object
engineVersion
required
string
arrType
required
string
Allowed values: radarr sonarr lidarr
decisions
required
Array<object>
object
customFormatName
required
string
arrType
required
string
Allowed values: radarr sonarr lidarr
category
required

Closed set of semantic categories a custom format is classified into.

string
Allowed values: unwanted hdr_dv hdr_hdr10plus hdr_baseline remux release_group_tier_1 release_group_tier_2 release_group_tier_3 audio_lossless audio_advanced audio_baseline streaming_service movie_version repack_proper resolution
score
required
integer
reason
required
object
code
required
string
category
required
One of:

Closed set of semantic categories a custom format is classified into.

string
Allowed values: unwanted hdr_dv hdr_hdr10plus hdr_baseline remux release_group_tier_1 release_group_tier_2 release_group_tier_3 audio_lossless audio_advanced audio_baseline streaming_service movie_version repack_proper resolution
ruleId
required
string
base
required
integer
axisContributions
required
Array<object>
object
axis
required
string
delta
required
integer
ceiling
required
One of:
string
Allowed values: above match below
uncategorized
required
Array<object>
object
name
required
string
suggestedCategory
required
One of:

Closed set of semantic categories a custom format is classified into.

string
Allowed values: unwanted hdr_dv hdr_hdr10plus hdr_baseline remux release_group_tier_1 release_group_tier_2 release_group_tier_3 audio_lossless audio_advanced audio_baseline streaming_service movie_version repack_proper resolution
reason
required
string
thresholds
required
object
minimumScore
required
integer
upgradeUntilScore
required
integer
upgradeScoreIncrement
required
integer
coverage
required
object
total
required
integer
scored
required
integer
uncategorized
required
integer
qualityLadder
required

Ceiling-derived quality-ladder configuration (issue #221), always shown before persistence. A per-arr ceiling reshapes the shared quality_profile_qualities row set for every Arr that syncs the profile; sharedLadderNote surfaces that when the profile is sibling-compatible.

object
ceiling
required
string
Allowed values: 720p 1080p 2160p
cutoff
required
One of:
string
items
required
Array<object>

One row of the ceiling-derived quality ladder (issue #221).

object
name
required
string
type
required
string
Allowed values: quality group
enabled
required
boolean
upgradeUntil
required
boolean
position
required
integer
resolution
required
One of:
integer
mapped
required

False when the row is not present/derivable for the target arr (left unchanged).

boolean
reshapesSiblingArrs
required
boolean
sharedLadderNote
required
One of:
string
binding
required

Persisted intent metadata for a goal-governed quality profile.

object
presetId
required
string
weights
required
object
qualityVsSize
required
integer
<= 100
compatibility
required
integer
<= 100
hdrPreference
required
integer
<= 100
unwantedStrictness
required
integer
<= 100
resolutionCeiling
required
string
Allowed values: 720p 1080p 2160p
engineVersion
required
string
appliedAt
required

ISO-8601 UTC timestamp of the last apply

string
configDiff
required

Authoritative sandbox config diff of the persisted ladder + scoring, captured before persist so it matches the preview diff for the same request (issue #221).

Array<object>
object
entityType
required
string
Allowed values: quality_profile
name
required
string
arrType
required
string
Allowed values: radarr sonarr lidarr
changes
required
Array<object>
object
field
required

Dot-notated field path

string
type
required
string
Allowed values: added changed removed
current
required
Any of:
string
desired
required
Any of:
string
applyId
required

The apply-journal row id for this apply (issue #236).

integer
applyStatus
required

Durable outcome of a Quality Goals apply/reconcile attempt (issue #236). Reports whether scoring changed, the binding’s terminal state, and the safe recovery action, so a partial write is never unreported.

object
applyId
required
integer
status
required
string
Allowed values: pending succeeded failed
scoringChanged
required

Whether the scoring ops reached (or may have reached) their intended terminal state.

boolean
bindingStatus
required
string
Allowed values: written pending failed
failureStage
One of:
string
failureReason
One of:
string
intentFingerprint
string
startedAt
required
string
settledAt
One of:
string
recovery
required

The safe operator recovery action for a failed or pending Quality Goals apply (issue #236).

object
action
required
string
Allowed values: none reconcile
endpoint
One of:
string
Example
{
"plan": {
"arrType": "radarr",
"decisions": [
{
"arrType": "radarr",
"category": "unwanted",
"reason": {
"category": "unwanted",
"ceiling": "above"
}
}
],
"uncategorized": [
{
"suggestedCategory": "unwanted"
}
],
"qualityLadder": {
"ceiling": "720p",
"items": [
{
"type": "quality"
}
]
}
},
"binding": {
"weights": {
"resolutionCeiling": "720p"
}
},
"configDiff": [
{
"entityType": "quality_profile",
"arrType": "radarr",
"changes": [
{
"type": "added"
}
]
}
],
"applyStatus": {
"status": "pending",
"bindingStatus": "written",
"recovery": {
"action": "none"
}
}
}

Invalid request

Media typeapplication/json
object
error
required

Error message

string
Examplegenerated
{
"error": "example"
}

Database cache or profile not found

Media typeapplication/json
object
error
required

Error message

string
Examplegenerated
{
"error": "example"
}

Engine version mismatch (ErrorResponse) or a value-guard concurrency conflict — nothing persisted (GoalApplyFailure with the reported outcome + reconcile action).

Media typeapplication/json
One of:
object
error
required

Error message

string
Example
{
"applyStatus": {
"status": "pending",
"bindingStatus": "written",
"recovery": {
"action": "none"
}
}
}

Scoring or binding write failed. Returns the reported outcome (whether scoring changed) and a safe reconcile recovery action — never a silent partial write (issue #236).

Media typeapplication/json

Structured failure body for a Quality Goals apply/reconcile (issue #236). message mirrors ErrorResponse’s human text (the UI failure reader falls back to error), and applyStatus carries the reported outcome + recovery action.

object
message
required
string
applyStatus
required

Durable outcome of a Quality Goals apply/reconcile attempt (issue #236). Reports whether scoring changed, the binding’s terminal state, and the safe recovery action, so a partial write is never unreported.

object
applyId
required
integer
status
required
string
Allowed values: pending succeeded failed
scoringChanged
required

Whether the scoring ops reached (or may have reached) their intended terminal state.

boolean
bindingStatus
required
string
Allowed values: written pending failed
failureStage
One of:
string
failureReason
One of:
string
intentFingerprint
string
startedAt
required
string
settledAt
One of:
string
recovery
required

The safe operator recovery action for a failed or pending Quality Goals apply (issue #236).

object
action
required
string
Allowed values: none reconcile
endpoint
One of:
string
Example
{
"applyStatus": {
"status": "pending",
"bindingStatus": "written",
"recovery": {
"action": "none"
}
}
}