Skip to content

Scan or execute cleanup of stale configs

POST
/arr/cleanup
curl --request POST \
--url https://example.com/api/v1/arr/cleanup \
--header 'Content-Type: application/json' \
--data '{ "instanceId": 1, "action": "scan" }'

Detects and deletes stale namespace-suffixed custom formats and quality profiles from an Arr instance that are no longer in the current sync selections.

Two actions are supported via the action field in the request body:

  • scan: Scans for stale items and returns what would be deleted.
  • execute: Deletes the stale items from a previous scan result.

Quality profiles assigned to media will be skipped with a warning (Arr returns HTTP 500 “in use”).

Media typeapplication/json
One of:
object
instanceId
required

Arr instance ID

integer
action
required
string
Allowed values: scan

Scan or delete result

Media typeapplication/json
One of:
object
staleCustomFormats
required

Custom formats that are no longer in sync selections

Array<object>
object
id
required

Arr entity ID

integer
name
required

Full name including namespace suffix

string
strippedName
required

Name with namespace suffix removed

string
staleQualityProfiles
required

Quality profiles that are no longer in sync selections

Array<object>
object
id
required

Arr entity ID

integer
name
required

Full name including namespace suffix

string
strippedName
required

Name with namespace suffix removed

string
Examplegenerated
{
"staleCustomFormats": [
{
"id": 1,
"name": "example",
"strippedName": "example"
}
],
"staleQualityProfiles": [
{
"id": 1,
"name": "example",
"strippedName": "example"
}
]
}

Invalid request (missing instanceId, invalid action)

Media typeapplication/json
object
error
required

Error message

string
Examplegenerated
{
"error": "example"
}

Instance not found

Media typeapplication/json
object
error
required

Error message

string
Examplegenerated
{
"error": "example"
}

Failed to perform cleanup

Media typeapplication/json
object
error
required

Error message

string
Examplegenerated
{
"error": "example"
}