Skip to main content

The documentation here is for an unreleased version of Recyclarr.

Visit the documentation site for the Current Version instead.

API and Sync Jobs

The recyclarr CLI and other programs control the server through its HTTP API. Through it they start syncs, follow the jobs those syncs run as, and read the server diagnostics.

API Reference​

Each server describes its own API on the same address and port as the API itself, so the description always matches the version you run:

  • /scalar is an interactive reference page where you can browse operations and try requests.
  • /openapi/v1.json is the OpenAPI document, for tools that generate clients or import an API.

Both paths are open without the API key. Requests you send from the /scalar page go to /api, so enter the key there before you try them. This site also has the reference under HTTP API.

Sync Jobs​

Every sync runs as a job, whether the schedule, the CLI, or the API started it. The server runs one job at a time, oldest first. Other jobs wait in a queue. A job that runs longer than the sync time limit stops so that the next job can start.

Each job has one of these statuses:

StatusMeaning
pendingWaiting in the queue
runningSyncing now
succeededThe sync finished without errors
partialThe sync finished, but some changes failed
failedThe sync failed
interruptedThe server stopped while the job was pending or running
skippedA scheduled sync was not started because another job was already active

A persistent server keeps the 50 most recent finished jobs and their results, including across restarts. When the server starts, it marks jobs that were active at shutdown as interrupted. It does not run them again.

Server Diagnostics​

Server diagnostics are problems the server has right now that you need to fix, such as a deprecated setting or an instance it had to leave out of syncs. The server logs each problem when it finds it, and also keeps it in a list until the problem is gone. You see this list in three places:

  • Notifications: Every sync notification has a Server section with the current diagnostics. While the list is not empty, the server sends a notification after every sync, even when the sync itself had nothing to report.
  • recyclarr sync: The sync command lists them under Sync Diagnostics after the results, and in the log output when you use --log. They do not change the exit code. If the server cannot return the list, the command shows its results without it.
  • HTTP API: GET /api/v1/diagnostics returns the list.
CodeSeverityCauseGoes away when
environmentVariableRemovedwarningA Recyclarr 8 Docker variable such as CRON_SCHEDULE is still setYou remove the variable and restart the server
settingDeprecatedwarningsettings.yml uses a deprecated settingYou remove the setting and restart the server
configPropertyDeprecatedwarningA configuration file uses a deprecated propertyThe server loads your configuration without it
instanceLeftOuterrorAn instance has errors and no earlier working version, so syncs leave it outYou fix or remove the instance
instanceChangeRejectederrorThe latest change to an instance has errors, so syncs use its last working settingsYou fix the change, or undo it
configFileUnreadableerrorA YAML configuration file cannot be read, so its instances keep their last working settingsYou fix the file
guideUpdateRejectedwarningNew data from a resource provider made an instance invalid, so the server went back to that provider's last data that workedA later update from that provider leaves every instance valid
resourceProviderUpdateFailedwarningA resource provider could not be downloaded, so syncs use its cached copyThe next download of that provider succeeds

The server reads settings.yml and environment variables only when it starts, so those problems last until a restart. It checks your instances at startup, after you edit your YAML files, and on each change to an API instance.

The API returns errors first. Each diagnostic has an id that stays the same while the problem lasts, a code from the table above, a severity, a message, and a data object. The API reference lists the data fields for each code. Reading the list changes nothing, and the list is empty when the server has no problems:

{
"diagnostics": [
{
"id": "environmentVariableRemoved:CRON_SCHEDULE",
"code": "environmentVariableRemoved",
"severity": "warning",
"message": "CRON_SCHEDULE is no longer used; set `server.schedule.cron` in settings.yml instead. See https://recyclarr.dev/guide/upgrade-guide/v9.0/#cron-schedule",
"data": { "variable": "CRON_SCHEDULE" }
}
]
}

The server keeps the list in memory and builds it again after a restart. Problems found at startup appear right away. A guide data update that was held back appears again the next time the server updates that provider, up to one hour after the restart.