0 API:Command
Jake Jones edited this page 2020-10-17 21:14:30 +11:00

GET

api/command api/command/{id}

Summary

Queries the status of a previously started command, or all currently started commands.

Parameters

Optional route {id}:

id (int) Unique ID of the command

Returns

For api/command
Array of json objects

For api/command/{id}

{
  "name": "RescanMovie",
  "startedOn": "0001-01-01T00:00:00Z",
  "stateChangeTime": "2014-02-05T05:09:09.2366139Z",
  "sendUpdatesToClient": true,
  "state": "pending",
  "id": 24
}

POST

Summary

Publish a new command for Radarr to run. These commands are executed asynchronously; use GET to retrieve the current status.

Parameters

Required:

name (string)

Returns
{
  "name": "RescanMovie",
  "body": {
    "sendUpdatesToClient": true,
    "updateScheduledTask": true,
    "completionMessage": "Completed",
    "name": "RescanMovie",
    "trigger": "manual"
  },
  "priority": "normal",
  "status": "queued",
  "queued": "2017-01-31T20:36:32.296558Z",
  "trigger": "manual",
  "state": "queued",
  "manual": true,
  "startedOn": "2017-01-31T20:36:32.296558Z",
  "sendUpdatesToClient": true,
  "updateScheduledTask": true,
  "id": 26618
}

Commands

RefreshMovie

Refresh movie information from TMDb and rescan disk

Parameters

Optional:

movieId (int) - if not set all movies will be refreshed and scanned


RescanMovie

Rescan disk for movies

Parameters

Optional:

movieId (int) - if not set all movies will be scanned


MoviesSearch

Search for one or more movies

Parameters

Required:

movieIds (int[]) - one or more episodeIds in an array


DownloadedMoviesScan

Instruct Radarr to scan the DroneFactoryFolder or a folder defined by the path variable.
Each file and folder in the DroneFactoryFolder is interpreted as separate download.

But a folder specified by the path variable is assumed to be a single download (job) and the folder name should be the release name.

The downloadClientId can be used to support this API endpoint in conjunction with Completed Download Handling, so Radarr knows that a particular download has already been imported.

Parameters

Optional:

path (string),
downloadClientId (string) (nzoid for sabnzbd, special 'drone' attribute value for nzbget, uppercase infohash for torrents),
importMode (string) = Move or Copy (Copy = Copy Or Hardlink depending on Radarr configuration) Can be used to override the default Copy for torrents with external preprocessing/transcoding/unrar.


RssSync

Instruct Radarr to perform an RSS sync with all enabled indexers

Parameters

None


RenameFiles

Instruct Radarr to rename the list of files provided.

Parameters

Optional: files (int[]) (List of File IDs to rename)


RenameMovie

Instruct Radarr to rename all files in the provided movies.

Parameters

movieIds (int[]) (List of Movie IDs to rename)


CutOffUnmetMoviesSearch

Instructs Radarr to search all cutoff unmet movies (Take care, since it could go over your indexers api limits!)

Parameters

filterKey (string) Key by which to further filter cutoff unmet movies. (Possible values: monitored (recommended), all, status)

filterValue (string) Value by which to further filter cutoff unmet movies. This must correspond to the filterKey. (Possible values with respect to the ones for the filterKey above: (true (recommended), false), (all), (available, released, inCinemas, announced)

Example: {"name":"cutOffUnmetMoviesSearch","filterKey":"monitored","filterValue":"true"}


NetImportSync

Instructs Radarr to search all lists for movies not yet added to Radarr.


missingMoviesSearch

Instructs Radarr to search all missing movies. This functionality is similar to what CouchPotato does and runs a backlog search for all your missing movies. For example You can use this api with curl and crontab to instruct Radarr to run a backlog search on 1 AM everyday.

Parameters

filterKey (string) Key by which to further filter missing movies. (Possible values: monitored (recommended), all, status)

filterValue (string) Value by which to further filter missing movies. This must correspond to the filterKey. (Possible values with respect to the ones for the filterKey above: (true (recommended), false), (all), (available, released, inCinemas, announced)

Example: {name: "missingMoviesSearch", filterKey: "status", filterValue: "released"}