diff --git a/Command.md b/Command.md new file mode 100644 index 0000000..9a68be4 --- /dev/null +++ b/Command.md @@ -0,0 +1,139 @@ +## GET ## + +``` +api/command +api/command/{id} +``` + +##### Summary ##### +Queries the status of a previously started command, or all currently started commands. + +##### Parameters ###### + +Required: +*None* + +Optional: +`id (int)` Unique ID of the command + +##### Returns ###### + +For `api/command` + +An array of JSON objects + +For `api/command/{id}` + +````JSON +{ + "name": "RescanArtist", + "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 Lidarr to run. + +These commands are executed asynchronously; use `GET` to retrieve the current status. + +And, remember, all `POST/PUT` requests require all parameters to be JSON encoded in the body, unless otherwise noted. + +##### Parameters ###### + +Required: +`name (string)` + +##### Returns ###### + +````JSON +{ + "name": "RescanArtist", + "startedOn": "0001-01-01T00:00:00Z", + "stateChangeTime": "2014-02-05T05:09:09.2366139Z", + "sendUpdatesToClient": true, + "state": "pending", + "id": 24 +} +```` + +## Commands ## + +### RefreshArtist ### +Refresh artist information from trakt and rescan disk + +##### Parameters ###### + +Optional: +`artistId (int)` - if not set, all artists will be refreshed and scanned + +--- + +### RescanArtist ### +Refresh rescan disk for a single artist + +##### Parameters ###### + +Optional: +`artistId (int)` - if not set all artist will be scanned + +--- + +### AlbumSearch ### +Search for one or more albums + +##### Parameters ###### + +Required: +`albumIds (int[])` - one or more albumIds in an array + +--- + +### ArtistSearch ### +Search for all albums by an artist + +##### Parameters ###### + +Required: +`artistId (int) + +--- + +### RssSync ### +Instruct Lidarr to perform an RSS sync with all enabled indexers + +##### Parameters ###### + +None + +--- + +### RenameFiles ### +Instruct Lidarr to rename the list of files provided + +##### Parameters ###### + +`files (int[])` List of File IDs to rename + +--- + +### RenameArtist ### +Instruct Lidarr to rename all files in the provided artist. + +##### Parameters ###### + +`artistIds (int[])` List of Artist IDs to rename + +--- + +### Backup ### +Instruct Lidarr to perform a backup of it's database and config file (nzbdrone.db and config.xml) + +##### Parameters ###### + +None