Skip to content

Radarr Module API Explanation

The Radarr module tracks movie inventory count and missing media release queues.


API Execution Logic

The module locates the service matching the identifier radarr. The API key is loaded from the RADARR_API_KEY environment variable and mapped to the X-Api-Key header.

Parallel Request Execution

To retrieve both the library size and missing item queues, the backend executes two parallel HTTP GET requests using Promise.all:

  1. Library Query: A request is sent to /api/v3/movie to retrieve the list of all movies in the library.
  2. Missing Queue Query: A request is sent to /api/v3/wanted/missing to retrieve missing movie records.

Data Parsing

  • Primary Metric: The total count of movies in the library (calculated as the length of the movie array).
  • Secondary Metric: The count of missing movie items (calculated as the length of the records array returned from the wanted endpoint).

Caching Strategy

The results are cached for 60 seconds (TTL) with a maximum stale window of 300 seconds. A timeout of 5 seconds is enforced per request.