Apply a goal to a quality profile
const url = 'https://example.com/api/v1/goals/apply';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"databaseId":1,"arrType":"radarr","profileName":"example","preset":"example","weights":{"qualityVsSize":1,"compatibility":1,"hdrPreference":1,"unwantedStrictness":1,"resolutionCeiling":"720p"},"expectedEngineVersion":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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).
Request Bodyrequired
Section titled “Request Bodyrequired”object
object
The engine version the client computed against; a mismatch yields 409.
Responses
Section titled “Responses”The applied plan and persisted binding
object
Deterministic translation of a goal into concrete scores + thresholds.
object
object
Closed set of semantic categories a custom format is classified into.
object
object
object
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
One row of the ceiling-derived quality ladder (issue #221).
Persisted intent metadata for a goal-governed quality profile.
object
object
ISO-8601 UTC timestamp of the last apply
Authoritative sandbox config diff of the persisted ladder + scoring, captured before persist so it matches the preview diff for the same request (issue #221).
object
object
Dot-notated field path
The apply-journal row id for this apply (issue #236).
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
Whether the scoring ops reached (or may have reached) their intended terminal state.
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
object
Error message
Examplegenerated
{ "error": "example"}Database cache or profile not found
object
Error message
Examplegenerated
{ "error": "example"}Engine version mismatch (ErrorResponse) or a value-guard concurrency conflict — nothing persisted (GoalApplyFailure with the reported outcome + reconcile action).
object
Error message
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
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
Whether the scoring ops reached (or may have reached) their intended terminal state.
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).
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
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
Whether the scoring ops reached (or may have reached) their intended terminal state.
Example
{ "applyStatus": { "status": "pending", "bindingStatus": "written", "recovery": { "action": "none" } }}