ReadarrAPI

class pyarr.readarr.ReadarrAPI(host_url: str, api_key: str)[source]

API wrapper for Readarr endpoints.

lookup(term: str) list[dict[str, JsonDataType]][source]

Search for an author / book by name or Goodreads ID / ISBN / ASIN

Note

You can also search using the Goodreads ID, work, or author, the ISBN or ASIN:

readarr.lookup(term="edition:656")
readarr.lookup(term="work:4912789")
readarr.lookup(term="author:128382")
readarr.lookup(term="isbn:067003469X")
readarr.lookup(term="asin:B00JCDK5ME")
Parameters:

term (str) – Search term

Returns:

List of dictionaries with items

Return type:

JsonArray

lookup_book(term: str) list[dict[str, JsonDataType]][source]

Searches for new books using a term, goodreads ID, isbn or asin.

Parameters:

term (str) –

Search term:

goodreads:656
isbn:067003469X
asin:B00JCDK5ME

Returns:

List of dictionaries with items

Return type:

JsonArray

lookup_author(term: str) list[dict[str, JsonDataType]][source]

Searches for new authors using a term

Parameters:

term (str) – Author name or book

Returns:

List of dictionaries with items

Return type:

JsonArray

get_command(id_: int | None = None) list[dict[str, JsonDataType]] | dict[str, JsonDataType][source]

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

Parameters:

id (Optional[int], optional) – Database ID of the command. Defaults to None.

Returns:

List of dictionaries with items

Return type:

Union[JsonArray, JsonObject]

post_command(name: Literal['ApplicationUpdateCheck', 'AuthorSearch', 'BookSearch', 'RefreshAuthor', 'RefreshBook', 'RenameAuthor', 'RenameFiles', 'RescanFolders', 'RssSync', 'Backup', 'MissingBookSearch'], **kwargs: dict[str, Union[int, list[int]]] | None) dict[str, JsonDataType][source]

Performs any of the predetermined Readarr command routines

Parameters:
  • name (ReadarrCommands) – Command name that should be executed

  • **kwargs – Additional parameters for specific commands

Note

For available commands and required **kwargs see the ReadarrCommands model

Returns:

Dictionary of command run

Return type:

JsonObject

get_missing(page: int | None = None, page_size: int | None = None, sort_key: Literal['authorId', 'Books.Id', 'books.releaseDate', 'downloadClient', 'id', 'indexer', 'message', 'path', 'progress', 'protocol', 'quality', 'ratings', 'size', 'sourcetitle', 'status', 'timeleft', 'title'] | None = None, sort_dir: Literal['ascending', 'default', 'descending'] | None = None) dict[str, JsonDataType][source]

Gets missing episode (episodes without files)

Parameters:
  • page (int, optional) – Page number to return. Defaults to None.

  • page_size (int, optional) – Number of items per page. Defaults to None.

  • sort_key (ReadarrSortKeys, optional) – id, title, ratings, bookid, or quality. (Others do not apply). Defaults to None.

  • sort_dir (PyarrSortDirection, optional) – Direction to sort the items. Defaults to None,

Returns:

List of dictionaries with items

Return type:

JsonObject

get_cutoff(page: int | None = None, page_size: int | None = None, sort_key: Literal['authorId', 'Books.Id', 'books.releaseDate', 'downloadClient', 'id', 'indexer', 'message', 'path', 'progress', 'protocol', 'quality', 'ratings', 'size', 'sourcetitle', 'status', 'timeleft', 'title'] | None = None, sort_dir: Literal['ascending', 'default', 'descending'] | None = None, monitored: bool | None = None) dict[str, JsonDataType][source]

Get wanted items where the cutoff is unmet

Parameters:
  • page (int, optional) – Page number to return. Defaults to None.

  • page_size (int, optional) – Number of items per page. Defaults to None.

  • sort_key (ReadarrSortKeys, optional) – id, title, ratings, bookid, or quality”. (others do not apply). Defaults to None.

  • sort_dir (PyarrSortDirection, optional) – Direction to sort. Defaults to None.

  • monitored (bool, optional) – Search for monitored only. Defaults to None.

Returns:

List of dictionaries with items

Return type:

JsonObject

get_queue(page: int | None = None, page_size: int | None = None, sort_key: Literal['authorId', 'Books.Id', 'books.releaseDate', 'downloadClient', 'id', 'indexer', 'message', 'path', 'progress', 'protocol', 'quality', 'ratings', 'size', 'sourcetitle', 'status', 'timeleft', 'title'] | None = None, sort_dir: Literal['ascending', 'default', 'descending'] | None = None, unknown_authors: bool | None = None, include_author: bool | None = None, include_book: bool | None = None) dict[str, JsonDataType][source]

Get current download information

Parameters:
  • page (int, optional) – Page number. Defaults to None.

  • page_size (int, optional) – Number of items per page. Defaults to None.

  • sort_key (ReadarrSortKeys, optional) – Field to sort by. Defaults to None.

  • sort_dir (PyarrSortDirection, optional) – Direction to sort. Defaults to None.

  • unknown_authors (bool, optional) – Include items with an unknown author. Defaults to None.

  • include_author (bool, optional) – Include the author. Defaults to None.

  • include_book (bool, optional) – Include the book. Defaults to None.

Returns:

List of dictionaries with items

Return type:

JsonObject

add_quality_profile(name: str, upgrades_allowed: bool, cutoff: int, items: list, min_format_score: int = 0, cutoff_format_score: int = 0, format_items: list | None = None) dict[str, JsonDataType][source]

Add new quality profile

Parameters:
  • name (str) – Name of the profile

  • upgrades_allowed (bool) – Are upgrades in quality allowed?

  • cutoff (int) – ID of quality definition to cutoff at. Must be an allowed definition ID.

  • items (list) – Add a list of items (from get_quality_definition())

  • min_format_score (int) – minimum score for format. Defaults to 0

  • cutoff_format_score (int) – cutoff format score. Defaults to 0

  • format_items (list) – custom format items. Defaults to []

Returns:

An object containing the profile

Return type:

JsonObject

get_metadata_profile(id_: int | None = None) list[dict[str, JsonDataType]] | dict[Any, Any][source]

Gets all metadata profiles or specific one with ID

Parameters:

id (Optional[int], optional) – Metadata profile id from database. Defaults to None.

Returns:

List of dictionaries with items

Return type:

Union[JsonArray, JsonObject]

add_metadata_profile(name: str, min_popularity: int, skip_missing_date: bool, skip_missing_isbn: bool, skip_parts_and_sets: bool, skip_series_secondary: bool, allowed_languages: str, min_pages: int) list[dict[str, JsonDataType]] | dict[str, JsonDataType][source]

Add a metadata profile

Parameters:
  • name (str) – Name of the profile

  • min_popularity (int) – Minimum popularity

  • skip_missing_date (bool) – Skip missing dates

  • skip_missing_isbn (bool) – Skip missing isbn

  • skip_parts_and_sets (bool) – Skip parts and sets

  • skip_series_secondary (bool) – Skip series secondary

  • allowed_languages (str) – List of allowed languages

  • min_pages (int) – minimum pages

Returns:

object of added record

Return type:

Union[JsonArray, JsonObject]

del_metadata_profile(id_: int) Response | dict[str, JsonDataType] | dict[Any, Any][source]

Delete the metadata profile with the given ID

Parameters:

id (int) – Database ID for metadata profile

Returns:

HTTP Response

Return type:

Response

get_delay_profile(id_: int | None = None) list[dict[str, JsonDataType]] | dict[str, JsonDataType][source]

Gets all delay profiles or specific one with ID

Parameters:

id (Optional[int], optional) – Metadata profile ID from database. Defaults to None.

Returns:

List of dictionaries with items

Return type:

Union[JsonArray, JsonObject]

get_release_profile(id_: int | None = None) list[dict[str, JsonDataType]] | dict[str, JsonDataType][source]

Gets all release profiles or specific one with ID

Parameters:

id (Optional[int], optional) – Release profile ID from database. Defaults to None.

Returns:

List of dictionaries with items

Return type:

Union[JsonArray, JsonObject]

get_book(id_: int | None = None) list[dict[str, JsonDataType]] | dict[str, JsonDataType][source]

Returns all books in your collection or the book with the matching book ID if one is found.

Parameters:

id (Optional[int], optional) – Database id for book. Defaults to None.

Returns:

List of dictionaries with items

Return type:

Union[JsonArray, JsonObject]

add_book(book: dict[str, JsonDataType], root_dir: str, quality_profile_id: int | None = None, metadata_profile_id: int | None = None, monitored: bool = True, search_for_new_book: bool = False, author_monitor: Literal['all', 'future', 'missing', 'existing', 'first', 'latest', 'none'] = 'all', author_search_for_missing_books: bool = False) dict[str, JsonDataType][source]

Add a new book and its associated author (if not already added).

Parameters:
  • book (JsonObject) – A book object from lookup()

  • root_dir (str) – The root directory for the books to be saved.

  • quality_profile_id (Optional[int], optional) – Quality Profile. Defaults to first found profile.

  • metadata_profile_id (Optional[int], optional) – Metadata Profile. Defaults to first found profile.

  • monitored (bool, optional) – Monitor the book. Defaults to True.

  • search_for_new_book (bool, optional) – Look for new books. Defaults to False.

  • author_monitor (ReadarrAuthorMonitor, optional) – Monitor the author for books. Defaults to β€œall”.

  • author_search_for_missing_books (bool, optional) – Search missing books by the author. Defaults to False.

Returns:

A copy of the added books

Return type:

JsonObject

upd_book(book: dict[str, JsonDataType], editions: list[dict[str, JsonDataType]]) dict[str, JsonDataType][source]

Update the given book.

Note

To be used in conjunction with get_book() and get_edition()

Currently only monitored states are updated (for the book and edition).

Parameters:
  • id (int) – Book database ID to update

  • book (JsonObject) – All parameters to update book

  • editions (JsonArray) – List of editions to update book from get_edition()

Returns:

Dictionary with updated record

Return type:

JsonObject

upd_book_monitor(book_ids: list[int], monitored: bool = True) list[dict[str, JsonDataType]][source]

Update book monitored status

Parameters:
  • book_ids (list[int]) – All book IDs to be updated

  • monitored (bool, optional) – True or False. Defaults to True.

Returns:

list of dictionaries containing updated records

Return type:

JsonArray

del_book(id_: int, delete_files: bool | None = None, import_list_exclusion: bool | None = None) Response | dict[str, JsonDataType] | dict[Any, Any][source]

Delete the book with the given ID

Parameters:
  • id (int) – Database ID for book

  • delete_files (bool, optional) – If true book folder and files will be deleted. Defaults to None.

  • import_list_exclusion (bool, optional) – Add an exclusion so book doesn’t get re-added. Defaults to None.

Returns:

HTTP Response

Return type:

Response

get_author(id_: int | None = None) list[dict[str, JsonDataType]] | dict[str, JsonDataType][source]

Returns all authors in your collection or the author with the matching ID if one is found.

Parameters:

id (Optional[int], optional) – Database ID for author. Defaults to None.

Returns:

List of dictionaries with items

Return type:

Union[JsonArray, JsonObject]

add_author(author: dict[str, JsonDataType], root_dir: str, quality_profile_id: int | None = None, metadata_profile_id: int | None = None, monitored: bool = True, author_monitor: Literal['all', 'future', 'missing', 'existing', 'first', 'latest', 'none'] = 'none', author_search_for_missing_books: bool = False) dict[str, JsonDataType][source]

Adds an author based on data from lookup, must be an author record

Parameters:
  • author (JsonObject) – A author object from lookup()

  • root_dir (str) – Directory for book to be stored

  • quality_profile_id (int, optional) – Quality profile id. Defaults to 1.

  • metadata_profile_id (int, optional) – Metadata profile id. Defaults to 0.

  • monitored (bool, optional) – Should the author be monitored. Defaults to True.

  • author_monitor (ReadarrAuthorMonitor, optional) – What level should the author be monitored. Defaults to β€œnone”.

  • author_search_for_missing_books (bool, optional) – Search for any missing books by the author. Defaults to False.

Returns:

Dictonary of added record

Return type:

JsonObject

upd_author(id_: int, data: dict[str, JsonDataType]) dict[str, JsonDataType][source]

Update the given author, currently only monitored is changed, all other modifications are ignored.

Note

To be used in conjunction with get_author()

Parameters:
  • id (int) – Author database ID to update

  • data (JsonObject) – All parameters to update author

Returns:

Dictionary with updated record

Return type:

JsonObject

del_author(id_: int, delete_files: bool | None = None, import_list_exclusion: bool | None = None) Response | dict[str, JsonDataType] | dict[Any, Any][source]

Delete the author with the given ID

Parameters:
  • id (int) – Database ID for author

  • delete_files (bool, optional) – If true author folder and files will be deleted. Defaults to None.

  • import_list_exclusion (bool, optional) – Add an exclusion so author doesn’t get re-added. Defaults to None.

Returns:

HTTP Response

Return type:

Response

get_log_file() list[dict[str, JsonDataType]][source]

Get log file

Returns:

List of dictionaries with items

Return type:

JsonArray

add_root_folder(name: str, path: str, default_quality_profile_id: int, default_metadata_profile_id: int, default_tags: list | None = None, is_calibre_lib: bool = False, calibre_host: str = 'localhost', calibre_port: int = 8080, use_ssl: bool = False, output_profile: str = 'default') dict[str, JsonDataType][source]

Add a new location to store files

Parameters:
  • name (str) – Friendly Name for folder

  • path (str) – Location the files should be stored

  • default_quality_profile_id (int) – Quality Profile.

  • default_metadata_profile_id (int) – Metadata Profile.

  • default_tags (Optional[list], optional) – List of tags to apply. Defaults to None.

  • is_calibre_lib (bool, optional) – Use Calibre Content Server. Defaults to False.

  • calibre_host (str, optional) – Calibre Content Server address. Defaults to β€œlocalhost”.

  • calibre_port (int, optional) – Calibre Content Server port. Defaults to 8080.

  • use_ssl (bool, optional) – Calibre Content Server SSL. Defaults to False.

  • output_profile (str, optional) – Books to monitor. Defaults to β€œdefault”.

Returns:

Dictionary of added record

Return type:

JsonObject

get_metadata_provider() dict[str, JsonDataType][source]

Get metadata provider from settings/metadata

Returns:

Dictionary of record

Return type:

JsonObject

upd_metadata_provider(data: dict[str, JsonDataType]) dict[str, JsonDataType][source]

Update the metadata provider data.

Note

To be used in conjunction with get_metadata_provider()

Parameters:

data (JsonObject) – All parameters to update

Returns:

Dictionary of updated record

Return type:

dict[str, Any]

add_release_profile(ignored: list, required: list, indexerId: int = 0, tags: list[int] | None = None, enabled: bool = True, includePreferredWhenRenaming: bool = False) dict[str, JsonDataType][source]

Add a Release Profile

Parameters:
  • ignored (list) – List of terms in the release to ignore

  • indexerId (int) – ID for preferred indexer. Defaults to 0 (any).

  • required (list) – List of terms the release must include.

  • tags (list[int]) – List of tag id’s. Defaults to empty list

  • enabled (bool, optional) – Enable release profile. Defaults to True.

  • includePreferredWhenRenaming (bool, optional) – Include preferred when renaming. Defaults to False.

Returns:

Dictionary containing details of new profile

Return type:

JsonObject

del_release_profile(id_: int) Response | dict[str, JsonDataType] | dict[Any, Any][source]

Delete the release profile with the given ID

Parameters:

id (int) – Database ID for release profile

Returns:

HTTP Response

Return type:

Response

add_delay_profile(tags: list[int], preferredProtocol: str = 'usenet', usenetDelay: int = 0, torrentDelay: int = 0, bypassIfHighestQuality: bool = False, bypassIfAboveCustomFormatScore: bool = False, minimumCustomFormatScore: int = 0) dict[str, JsonDataType][source]

Add delay profile

Parameters:
  • tags (list[int]) – List of tag IDs. Use: get_tag.

  • preferredProtocol (str, optional) – usenet, torrent, onlyusenet, onlytorrent . Defaults to β€œusenet”.

  • usenetDelay (int, optional) – Delay before grabbing a release. Defaults to 0.

  • torrentDelay (int, optional) – Delay before grabbing a release. Defaults to 0.

  • bypassIfHighestQuality (bool, optional) – Bypass delay when release has the highest enabled quality in the quality profile. Defaults to False.

  • bypassIfAboveCustomFormatScore (bool, optional) – Enable bypass when release has a score higher than the configured minimum custom format score. Defaults to False.

  • minimumCustomFormatScore (int, optional) – set when using bypassIfAboveCustomFormatScore. Defaults to 0.

Returns:

Dictonary with added item

Return type:

JsonObject

del_delay_profile(id_: int) Response | dict[str, JsonDataType] | dict[Any, Any][source]

Delete the delay profile with the given ID

Parameters:

id (int) – Database ID for delay profile

Returns:

HTTP Response

Return type:

Response

get_manual_import(folder: str, download_id: str | None = None, author_id: int | None = None, filter_existing_files: bool | None = None, replace_existing_files: bool | None = None) list[dict[str, JsonDataType]][source]

Gets a manual import list

Parameters:
  • downloadId (str) – Download IDs

  • author_id (int, optional) – Author Database ID. Defaults to None.

  • folder (Optional[str], optional) – folder name. Defaults to None.

  • filterExistingFiles (bool, optional) – filter files. Defaults to True.

  • replaceExistingFiles (bool, optional) – replace files. Defaults to True.

Returns:

List of dictionaries with items

Return type:

JsonArray

upd_manual_import(data: dict[str, JsonDataType]) dict[str, JsonDataType][source]

Update a manual import

Note

To be used in conjunction with get_manual_import()

Parameters:

data (JsonObject) – Data containing changes

Returns:

Dictionary of updated record

Return type:

JsonObject

get_edition(id_: int) list[dict[str, JsonDataType]][source]

Get edition’s for specific book

Parameters:

id (int) – Database ID of book

Returns:

Dictionary of editions

Return type:

JsonObject

add_download_client(data: dict[str, JsonDataType]) dict[str, JsonDataType]

Add a download client based on the schema information supplied

Note

Recommended to be used in conjunction with get_download_client_schema()

Parameters:

data (JsonObject) – dictionary with download client schema and settings

Returns:

dictionary of added item

Return type:

JsonObject

add_import_list(data: dict[str, JsonDataType]) dict[str, JsonDataType]

Add an import list based on the schema information supplied

Note

Recommended to be used in conjunction with get_import_list_schema()

Parameters:

data (JsonObject) – dictionary with import list schema and settings

Returns:

dictionary of added item

Return type:

JsonObject

add_notification(data: dict[str, JsonDataType]) dict[str, JsonDataType]

Add an import list based on the schema information supplied

Note

Recommended to be used in conjunction with get_notification_schema()

Parameters:

data (JsonObject) – dictionary with import list schema and settings

Returns:

dictionary of added item

Return type:

JsonObject

basic_auth(username: str, password: str) HTTPBasicAuth | None

If you have basic authentication setup you will need to pass your username and passwords to the HTTPBASICAUTH() method.

Parameters:
  • username (str) – Username for basic auth.

  • password (str) – Password for basic auth.

Returns:

HTTP Auth object

Return type:

Object

create_tag(label: str) dict[str, JsonDataType]

Adds a new tag

Parameters:

label (str) – Tag name / label

Returns:

Dictionary of new record

Return type:

JsonObject

del_blocklist(id_: int) Response | dict[str, JsonDataType] | dict[Any, Any]

Removes a specific release (the id provided) from the blocklist

Parameters:

id (int) – Blocklist ID from database

Returns:

HTTP Response

Return type:

Response

del_blocklist_bulk(ids: list[int]) Response | dict[str, JsonDataType] | dict[Any, Any]

Delete blocked releases in bulk

Parameters:

ids (list[int]) – Blocklists ids that should be deleted

Returns:

HTTP Response

Return type:

Response

del_download_client(id_: int) Response | dict[str, JsonDataType] | dict[Any, Any]

Delete a download client by database id

Parameters:

id (int) – download client database id

Returns:

HTTP Response

Return type:

Response

del_import_list(id_: int) Response | dict[str, JsonDataType] | dict[Any, Any]

Delete an import list

Parameters:

id (int) – Import list database id

Returns:

HTTP Response

Return type:

Response

del_indexer(id_: int) Response | dict[str, JsonDataType] | dict[Any, Any]

Removes a specific indexer from the blocklist

Parameters:

id (int) – indexer id from database

Returns:

HTTP Response

Return type:

Response

del_notification(id_: int) Response | dict[str, JsonDataType] | dict[Any, Any]

Delete a notification by its database id

Parameters:

id (int) – Database id of notification.

Returns:

HTTP Response

Return type:

Response

del_quality_profile(id_: int) Response | dict[str, JsonDataType] | dict[Any, Any]

Removes a specific quality profile from the blocklist

Parameters:

id (int) – Quality profile ID from database

Returns:

HTTP Response

Return type:

Response

del_queue(id_: int, remove_from_client: bool | None = None, blocklist: bool | None = None) Response | dict[str, JsonDataType] | dict[Any, Any]

Remove an item from the queue and blocklist it

Parameters:
  • id (int) – ID of the item to be removed

  • remove_from_client (Optional[bool], optional) – Remove the item from the client. Defaults to None.

  • blocklist (Optional[bool], optional) – Add the item to the blocklist. Defaults to None.

Returns:

HTTP Response

Return type:

Response

del_root_folder(id_: int) Response | dict[str, JsonDataType] | dict[Any, Any]

Delete root folder with specified id

Parameters:

id (int) – Root folder id from database

Returns:

HTTP Response

Return type:

Response

del_tag(id_: int) Response | dict[str, JsonDataType] | dict[Any, Any]

Delete the tag with the given ID

Parameters:

id (int) – Database id of tag

Returns:

HTTP Response

Return type:

Response

get_backup() list[dict[str, JsonDataType]]

Returns the list of available backups

Returns:

List of dictionaries with items

Return type:

JsonArray

get_blocklist(page: int | None = None, page_size: int | None = None, sort_key: Literal['date'] | None = None, sort_dir: Literal['ascending', 'default', 'descending'] | None = None) dict[str, JsonDataType]

Returns blocked releases.

Parameters:
  • page (Optional[int], optional) – Page number to return. Defaults to None.

  • page_size (Optional[int], optional) – Number of items per page. Defaults to None.

  • sort_key (Optional[PyarrBlocklistSortKey], optional) – Field to sort by. Defaults to None.

  • sort_dir (Optional[PyarrSortDirection], optional) – Direction to sort the items. Defaults to None.

Returns:

Dictionary with items

Return type:

JsonObject

get_calendar(start_date: datetime | None = None, end_date: datetime | None = None, unmonitored: bool = True) list[dict[str, JsonDataType]]

Gets upcoming releases by monitored, if start/end are not supplied, today and tomorrow will be returned

Parameters:
  • start_date (Optional[str], optional) – ISO8601 start datetime. Defaults to None.

  • end_date (Optional[str], optional) – ISO8601 end datetime. Defaults to None.

  • unmonitored (bool, optional) – Include unmonitored movies. Defaults to True.

Returns:

List of dictionaries with items

Return type:

JsonArray

get_config_download_client() dict[str, JsonDataType]

Gets download client page configuration

Returns:

Dictionary of configuration

Return type:

JsonObject

get_config_host() dict[str, JsonDataType]

Get General/Host settings.

Returns:

Dictionaries with items

Return type:

JsonObject

get_config_naming() dict[str, JsonDataType]

Get Settings for file and folder naming.

Returns:

Dictionary with items

Return type:

JsonObject

get_config_ui() dict[str, JsonDataType]

Query Radarr for UI configuration

Returns:

List of dictionaries with items

Return type:

JsonObject

get_disk_space() list[dict[str, JsonDataType]]
Query disk usage information

System > Status

Returns:

List of dictionaries with items

Return type:

JsonArray

get_download_client(id_: int | None = None) list[dict[str, JsonDataType]] | dict[str, JsonDataType]

Get a list of all the download clients or a single client by its database id

Parameters:

id (Optional[int], optional) – Download client database id. Defaults to None.

Returns:

List of dictionaries with items

Return type:

Union[JsonArray, JsonObject]

get_download_client_schema(implementation: Literal['Aria2', 'Deluge', 'TorrentDownloadStation', 'UsenetDownloadStation', 'Flood', 'Hadouken', 'Nzbget', 'NzbVortex', 'Pneumatic', 'QBittorrent', 'RTorrent', 'Sabnzbd', 'TorrentBlackhole', 'Transmission', 'UsenetBlackhole', 'UTorrent', 'Vuze'] | None = None) list[dict[str, JsonDataType]]

Gets the schemas for the different download Clients

Parameters:

implementation (Optional[PyarrDownloadClientSchema], optional) – Client implementation name. Defaults to None.

Returns:

List of dictionaries with items

Return type:

JsonArray

get_health() list[dict[str, JsonDataType]]

Get health information

Returns:

List of dictionaries with items

Return type:

JsonArray

get_history(page: int | None = None, page_size: int | None = None, sort_key: Literal['id', 'date', 'eventType', 'series.title', 'episode.title', 'movieFile.relativePath', 'sourceTitle', 'status'] | None = None, sort_dir: Literal['ascending', 'default', 'descending'] | None = None) dict[str, JsonDataType]

Gets history (grabs/failures/completed)

Parameters:
  • page (Optional[int], optional) – Page number to return. Defaults to None.

  • page_size (Optional[int], optional) – Number of items per page. Defaults to None.

  • sort_key (Optional[PyarrSortKey], optional) – Field to sort by. Defaults to None.

  • sort_dir (Optional[PyarrSortDirection], optional) – Direction to sort the items. Defaults to None.

Returns:

Dictionary with items

Return type:

JsonObject

get_import_list(id_: int | None = None) list[dict[str, JsonDataType]]

Query for all lists or a single list by its database id

Parameters:

id (Optional[int], optional) – Import list database id. Defaults to None.

Returns:

List of dictionaries with items

Return type:

JsonArray

get_import_list_schema(implementation: Literal['PlexImport', 'SonarrImport', 'TraktListImport', 'TraktPopularImport', 'TraktUserImport'] | Literal['LidarrImport', 'HeadphonesImport', 'LastFmTag', 'LastFmUser', 'LidarrLists', 'MusicBrainzSeries', 'SpotifyFollowedArtists', 'SpotifyPlaylist', 'SpotifySavedAlbums'] | None = None) list[dict[str, JsonDataType]]

Gets the schemas for the different import list sources

Parameters:

implementation (Optional[Union[PyarrImportListSchema, LidarrImportListSchema]], optional) – Client implementation name. Defaults to None.

Returns:

List of dictionaries with items

Return type:

JsonArray

get_indexer(id_: int | None = None) list[dict[str, JsonDataType]] | dict[Any, Any]

Get all indexers or specific by id

Parameters:

id (Optional[int], optional) – Database if of indexer to return. Defaults to None.

Returns:

List of dictionaries with items

Return type:

Union[JsonArray, dict[Any, Any]]

get_indexer_schema(implementation: Literal['FileList', 'HDBits', 'IPTorrents', 'Newznab', 'Nyaa', 'Omgwtfnzbs', 'PassThePopcorn', 'Rarbg', 'TorrentRssIndexer', 'TorrentPotato', 'Torznab'] | None = None) list[dict[str, JsonDataType]] | dict[str, JsonDataType]

Get possible indexer connections

Parameters:

implementation (Optional[PyarrIndexerSchema], optional) – indexer system

Returns:

List of dictionaries with items

Return type:

Union[JsonArray, JsonObject]

get_language(id_: int | None = None) list[dict[str, JsonDataType]] | dict[Any, Any]

Gets all language profiles or specific one with id

Note

This method is not working in Sonarr, use get_language_profile() I have raised this with the Sonarr team.

Parameters:

id (Optional[int], optional) – Language profile id from database. Defaults to None.

Returns:

List of dictionaries with items

Return type:

Union[JsonArray, dict[Any, Any]]

get_log(page: int | None = None, page_size: int | None = None, sort_key: Literal['Id', 'level', 'time', 'logger', 'message', 'exception', 'exceptionType'] | None = None, sort_dir: Literal['ascending', 'default', 'descending'] | None = None, filter_key: Literal['level'] | None = None, filter_value: Literal['all', 'info', 'warn', 'error'] | None = None) dict[str, JsonDataType]

Gets logs from instance

Parameters:
  • page (Optional[int], optional) – Specifiy page to return. Defaults to None.

  • page_size (Optional[int], optional) – Number of items per page. Defaults to None.

  • sort_key (Optional[PyarrLogSortKey], optional) – Field to sort by. Defaults to None.

  • sort_dir (Optional[PyarrSortDirection], optional) – Direction to sort. Defaults to None.

  • filter_key (Optional[PyarrFilterKey], optional) – Key to filter by. Defaults to None.

  • filter_value (Optional[PyarrFilterValue], optional) – Value of the filter. Defaults to None.

Returns:

List of dictionaries with items

Return type:

JsonObject

get_media_management() dict[str, JsonDataType]

Get media management configuration

Returns:

Dictionary with items

Return type:

JsonObject

get_metadata(id_: int | None = None) list[dict[str, JsonDataType]] | dict[str, JsonDataType]

Get all metadata consumer settings

Parameters:

id (Optional[int], optional) – ID for specific metadata record

Returns:

List of dictionaries with items

Return type:

Union[JsonArray, JsonObject]

get_notification(id_: int | None = None) list[dict[str, JsonDataType]] | dict[Any, Any]

Get a list of all notification services, or single by ID

Parameters:

id (Optional[int], optional) – Notification ID. Defaults to None.

Returns:

List of dictionaries with items

Return type:

Union[JsonArray, dict[Any, Any]]

get_notification_schema(implementation: Literal['Boxcar', 'CustomScript', 'Discord', 'Email', 'MediaBrowser', 'Gotify', 'Join', 'Xbmc', 'MailGun', 'PlexHomeTheater', 'PlexClient', 'PlexServer', 'Prowl', 'PushBullet', 'Pushover', 'SendGrid', 'Slack', 'SynologyIndexer', 'Telegram', 'Trakt', 'Twitter', 'Webhook'] | None = None) list[dict[str, JsonDataType]] | dict[str, JsonDataType]

Get possible notification connections

Parameters:

implementation (Optional[PyarrNotificationSchema], optional) – notification system

Returns:

List of dictionaries with items

Return type:

Union[JsonArray, JsonObject]

get_quality_definition(id_: int | None = None) list[dict[str, JsonDataType]] | dict[Any, Any]

Gets all quality definitions or specific one by ID

Parameters:

id (Optional[int], optional) – Import list database id. Defaults to None.

Returns:

List of dictionaries with items

Return type:

Union[JsonArray, dict[Any, Any]]

get_quality_profile(id_: int | None = None) list[dict[str, JsonDataType]] | dict[Any, Any]

Gets all quality profiles or specific one with id

Parameters:

id (Optional[int], optional) – Quality profile id from database. Defaults to None.

Returns:

List of dictionaries with items

Return type:

JsonArray

get_quality_profile_schema() list[dict[str, JsonDataType]]

Get the schemas for quality profiles

Returns:

List of dictionaries with items

Return type:

JsonArray

get_remote_path_mapping(id_: int | None = None) list[dict[str, JsonDataType]] | dict[Any, Any]

Get remote path mappings for downloads Directory

Parameters:

id (Optional[int], optional) – ID for specific record. Defaults to None.

Returns:

List of dictionaries with items

Return type:

JsonArray

get_root_folder(id_: int | None = None) list[dict[str, JsonDataType]] | dict[str, JsonDataType]

Get list of root folders, free space and any unmappedFolders

Parameters:

id (Optional[int], optional) – ID of the folder to return. Defaults to None.

Returns:

List of dictionaries with items

Return type:

Union[JsonArray, JsonObject]

get_system_status() dict[str, JsonDataType]

Gets system status

Returns:

Dictionary with items

Return type:

JsonObject

get_tag(id_: int | None = None) list[dict[str, JsonDataType]] | dict[str, JsonDataType]

Returns all tags or specific tag by database id

Parameters:

id (Optional[int], optional) – Database id for tag. Defaults to None.

Returns:

List of dictionaries with items

Return type:

Union[JsonArray, JsonObject]

get_tag_detail(id_: int | None = None) list[dict[str, JsonDataType]] | dict[str, JsonDataType]

Returns all tags or specific tag by database id with detailed information

Parameters:

id (Optional[int], optional) – Database id for tag. Defaults to None.

Returns:

List of dictionaries with items

Return type:

Union[JsonArray, JsonObject]

get_task(id_: int | None = None) dict[str, JsonDataType]

Return a list of tasks, or specify a task ID to return single task

Parameters:

id (Optional[int], optional) – ID for task. Defaults to None.

Returns:

List of dictionaries with items

Return type:

JsonObject

get_update() list[dict[str, JsonDataType]]

Will return a list of recent updated

Returns:

List of dictionaries with items

Return type:

JsonArray

upd_config_download_client(data: dict[str, JsonDataType]) dict[str, JsonDataType]

Update download client page configurations

Note

Recommended to be used in conjunction with get_config_download_client()

Parameters:

data (JsonObject) – data to be updated

Returns:

dictionary with updated items

Return type:

JsonObject

upd_config_host(data: dict[str, JsonDataType]) dict[str, JsonDataType]

Edit General/Host settings.

Parameters:

data (JsonObject) – data to be updated

Returns:

Dictionaries with items

Return type:

JsonObject

upd_config_naming(data: dict[str, JsonDataType]) dict[str, JsonDataType]

Edit Settings for file and folder naming.

Parameters:

data (JsonObject) – data to be updated

Returns:

Dictionary with items

Return type:

JsonObject

upd_config_ui(data: dict[str, JsonDataType]) dict[str, JsonDataType]

Edit one or many UI settings and save to to the database

Parameters:

data (JsonObject) – Data to be Updated.

Returns:

Dictionary with items

Return type:

JsonObject

upd_download_client(id_: int, data: dict[str, JsonDataType]) dict[str, JsonDataType]

Edit a downloadclient by database id

Parameters:
  • id (int) – Download client database id

  • data (JsonObject) – data to be updated within download client

Returns:

dictionary of updated item

Return type:

dict[str, v]

upd_import_list(id_: int, data: dict[str, JsonDataType]) dict[str, JsonDataType]

Edit an importlist

Parameters:
  • id (int) – Import list database id

  • data (JsonObject) – data to be updated within the import list

Returns:

Dictionary of updated data

Return type:

JsonObject

upd_indexer(id_: int, data: dict[str, JsonDataType]) dict[str, JsonDataType]

Edit a Indexer by database id

Note

To be used in conjunction with get_indexer()

Parameters:
  • id (int) – Indexer database id

  • data (JsonObject) – Data to be updated within Indexer

Returns:

Dictionary of updated record

Return type:

JsonObject

upd_media_management(data: dict[str, JsonDataType]) dict[str, JsonDataType]

Get media management configuration

Note

Recommended to use with get_media_management()

Parameters:

data (JsonObject) – data to be updated

Returns:

Dictionary with items

Return type:

JsonObject

upd_notification(id_: int, data: dict[str, JsonDataType]) dict[str, JsonDataType]

Edit notification by database id

Parameters:
  • id (int) – Database id of notification

  • data (JsonObject) – data that requires updating

Returns:

Dictionary of updated record

Return type:

JsonObject

upd_quality_definition(id_: int, data: dict[str, JsonDataType]) dict[str, JsonDataType]

Update the quality definitions.

Note

To be used in conjunction with get_quality_definition()

Parameters:
  • id (int) – ID of definition to update

  • data (JsonObject) – All parameters to update

Returns:

Dictionary of updated record

Return type:

JsonObject

upd_quality_profile(id_: int, data: dict[str, JsonDataType]) dict[str, JsonDataType]

Update the quality profile data

Note

To be used in conjunction with get_quality_profile()

Parameters:
  • id (int) – Profile ID to Update

  • data (JsonObject) – All parameters to update

Returns:

Dictionary of updated record

Return type:

JsonObject

upd_tag(id_: int, label: str) dict[str, JsonDataType]

Update an existing tag

Note

You should perform a get_tag() and submit the full body with changes

Parameters:
  • id (int) – Database id of tag

  • label (str) – tag name / label

Returns:

Dictionary of updated items

Return type:

JsonObject