1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-16 16:04:08 +01:00
13 API
nitsua edited this page 2020-09-10 00:04:47 -04:00

URL

All API endpoints are based off of /api or /api/v3 if you access Radarr via http://localhost:7878 the API root would be http://localhost:7878/api for Radarr v0.2 or http://localhost:7878/api/v3 for Radarr 3

Authentication

All requests made to the api endpoint require API Key authentication using the X-Api-Key header or in the query string using ?apikey=APIKEY.

API Key

  • Can be accessed and reset via Settings -> General
  • Stored in Config.xml
  • alpha-numeric (lower case)

Dates & Times

  • All dates/timestamps are ISO-8601 formatted in UTC 2014-01-27T01:30:00Z
  • Movies (missing & calendar) also include the airdate in the original timezone for display purposes
  • Date parameters should be ISO-8601 UTC dates to ensure proper handling by Radarr

Content Type

  • All POST/PUT requests require all parameters to be JSON encoded in the body, unless otherwise noted.
  • All GET requests will return a JSON encoded response

Endpoints

Examples

Powershell

Example of post processing script to scan the disk for the movie

$movie_id = $env:radarr_movie_id
$params = @{"name"="RescanMovie";"movieId"="$movie_id";} | ConvertTo-Json
Invoke-WebRequest -Uri http://RADARR_IP:RADARR_PORT/api/command?apikey=RADARR_APIKEY -Method POST -Body $params

Curl on Linux

Example of instructing Radarr to do a backlog search of your missing movies which are released. You can put this command in CRON to do it on a schedule.

curl -d '{name: "missingMoviesSearch", filterKey: "status", filterValue: "released"}' -H "Content-Type: application/json" -X POST http://RADARR_IP:RADARR_PORT/api/command?apikey=RADARR_APIKEY