tinyMediaManager provides a powerful HTTP API for remote control and automation. This documentation describes the available endpoints, actions, scopes, and arguments, as well as example requests.
A machine-readable OpenAPI (swagger style) description of this API is served directly by tinyMediaManager itself - see API documentation endpoint.
Enabling the API
After enabling the HTTP API you can send requests to the chosen port. Make sure you add the API key in the header field api-key to all requests.
Command structure
The HTTP API supports to send multiple commands via a POST request (JSON body) at once. Every command follows the same structure:
{
"action": <action name>,
"scope": {
"name": <scope name>,
"args": [
<value>
]
},
"args": {
<key>: <value>
}
}
- action: The name of the action to trigger - you will find all implemented actions below
- scope: The scope for the action. This defines on which entries the action should be applied. The optional parameter
argscan be used to fine-tune the scope (not available on all scope values). Valid scope values depend on the action you trigger (details see below). - args: Any extra arguments you may pass to the actions (optional - used by some actions)
Execution order
When sending multiple commands, the order of execution may be different to the order in the request. tinyMediaManager makes sure the commands will be executed in the right order to preserve the best possible result:
- update the library (
update,findMissing,readNfo,reloadMediaInfo,calculateChecksum,detectAspectRatio) - scrape (
scrape,fetchRatings,assignMovieSet) - download tasks (
downloadTrailer,downloadSubtitle,downloadMissingArtwork,downloadTheme,cleanupArtwork) - rename (
rename) - export (
export,writeNfo) - cleanup unwanted leftover files (
cleanup) - post process (
postProcess) - notify/sync external services & finalize (
updateKodi,syncTrakt,syncSimkl)
When sending a new call, all new flags from any previous calls are dropped. If you want to do follow-up actions for newly found entries, you need combine all action into one call!
Multiple API calls are queued up and executed one after another.
Movies
These actions are executed in the movie module. To send a command to the movie module, you need to use the subpath movie (e.g. http://localhost:7878/api/movie).
Update data sources
Trigger the update data source action. This scans your data sources for new movies.
Example JSON:
{
"action": "update",
"scope": { "name": "all" }
}
- action -
update - scope
all- update all data sources.single- update a single data source. The indices for identifying the data source(s) will be used from args (multiple, starting with 0 for the first data source in your settings).path- update only the given path. You need to pass the full path to be updated in args (multiple possible). v5.2.13
Read data from NFO
v5.3.3 Trigger the read NFO action. This forces tinyMediaManager to re-read the NFO files of your movies and merges the data into the database (this may overwrite existing data in your library!).
Example JSON:
{
"action": "readNfo",
"scope": { "name": "new" }
}
- action -
readNfo - scope
newor empty - read NFO files of all new movies. Any movie which has been added in the last update data source action will be classified as new.path- read NFO files of all movies from the given path(s). You can pass the path(s) via args (multiple, no subpath possible).dataSource- read NFO files of all movies from the given data source(s). You can pass the data sources via args (multiple, either index of the data source or the path itself).unscraped- read NFO files for all items which are not scrapedall- read NFO files of all movies.
Reload media info
v5.0.10 Trigger the reload media info action. This reloads media info of all your media files (respecting mediainfo.xml files).
Example JSON:
{
"action": "reloadMediaInfo",
"scope": { "name": "all" }
}
- action -
reloadMediaInfo - scope
newor empty - scrape all new movies. Any movie which has been added in the last update data source action will be classified as new.path- scrape all movies from the given path(s). You can pass the path(s) via args (multiple, no subpath possible).dataSource- scrape all movies from the given data source(s). You can pass the data sources via args (multiple, either index of the data source or the path itself).unscraped- scrape all items which are not scrapedall\ scrape all movies.
Calculate checksum
v5.3.3 Trigger the calculate checksum action. This calculates the CRC32 checksum and/or the perceptual hash (PHASH, needs FFmpeg) of the main video file - values which are e.g. needed to match media in Kodi or to identify duplicate files. Already existing values are never overwritten.
Example JSON:
{
"action": "calculateChecksum",
"scope": { "name": "new" },
"args": { "type": "all" }
}
- action -
calculateChecksum - scope
newor empty - all new movies (see update data source).path/dataSource/unscraped/all- see above.
- args
type(crc32/phash/all, defaults tocrc32) - which checksum to calculate.
Detect aspect ratio
v5.0.10 Trigger the detect aspect ratio action. This command will run the aspect ratio detector (using FFmpeg) for your movies.
Example JSON:
{
"action": "detectAspectRatio",
"scope": { "name": "all" }
}
- action -
detectAspectRatio - scope
newor empty - scrape all new movies. Any movie which has been added in the last update data source action will be classified as new.path- scrape all movies from the given path(s). You can pass the path(s) via args (multiple, no subpath possible).dataSource- scrape all movies from the given data source(s). You can pass the data sources via args (multiple, either index of the data source or the path itself).unscraped- scrape all items which are not scrapedall- scrape all movies.
Scrape
Scrape your movies from online sources.
Example JSON:
{
"action": "scrape",
"scope": { "name": "all" },
"args": { "scraper": "tmdb" }
}
- action -
scrape - scope
newor empty - scrape all newly added movies. Any movie added during the update data source action of the current API call will be considered new.path- scrape all movies from the specified path(s). Provide the path(s) via args (multiple allowed, no subpath possible).dataSource- scrape all movies from the specified data source(s). Provide the data sources via args (multiple allowed, either the index of the data source or the path itself).unscraped- scrape all movies that have not yet been scraped.all- scrape all movies.
- args
scraper(tmdb, imdb, tvdb, trakt, universal_movie, omdbapi, ofdb, moviemeter, mpdbtv, …) - use the specified scraper (optional; if omitted, the scraper from the settings will be used).
Fetch ratings
Fetch ratings for your movies
Example JSON:
{
"action": "fetchRatings",
"scope": { "name": "all" }
}
- action -
fetchRatings - scope
newor empty - fetch ratings for all new movies. Any movie which has been added in the last update data source action will be classified as new.path- fetch ratings for all movies from the given path(s). You can pass the path(s) via args (multiple, no subpath possible).dataSource- fetch ratings for all movies from the given data source(s). You can pass the data sources via args (multiple, either index of the data source or the path itself).unscraped- fetch ratings for all items which are not scrapedall- fetch ratings for all movies.
Assign movie sets
v5.3.3 Trigger the assign movie set action. This assigns the scraped movie set information of your movies to their movie sets (needs the set information to be scraped first, e.g. with the movie set metadata field from TMDB).
Example JSON:
{
"action": "assignMovieSet",
"scope": { "name": "new" }
}
- action -
assignMovieSet - scope
newor empty - assign all new movies (see update data source).path/dataSource/unscraped/all- see above.
Trailer download
Download trailers.
Example JSON:
{
"action": "downloadTrailer",
"scope": { "name": "all" },
"args": { "onlyMissing": true }
}
- action -
downloadTrailer - scope
newor empty - download trailers for all new movies. Any movie which has been added in the last update data source action will be classified as new.path- download trailers for all movies from the given path(s). You can pass the path(s) via args (multiple, no subpath possible).dataSource- download trailers for all movies from the given data source(s). You can pass the data sources via args (multiple, either index of the data source or the path itself).all- download trailers for all movies.
- args
onlyMissing(true/false) - only download missing trailers (optional, defaults to true if omitted).
Subtitle download
Download subtitles.
Example JSON:
{
"action": "downloadSubtitle",
"scope": { "name": "all" },
"args": { "language": "en", "onlyMissing": true }
}
- action -
downloadSubtitle - scope
newor empty - download subtitles for all new movies. Any movie which has been added in the last update data source action will be classified as new.path- download subtitles for all movies from the given path(s). You can pass the path(s) via args (multiple, no subpath possible).dataSource- download subtitles for all movies from the given data source(s). You can pass the data sources via args (multiple, either index of the data source or the path itself).all- download subtitles for all movies.
- args
language(ISO code) - the language to download the subtitles for (optional, defaults to the language of the settings if omitted).onlyMissing(true/false) - only download missing subtitles (optional, defaults to true if omitted).
Download missing artwork
Download missing artwork for movies.
Example JSON:
{
"action": "downloadMissingArtwork",
"scope": { "name": "all" }
}
- action -
downloadMissingArtwork - scope
newor empty - fetch ratings for all new movies. Any movie which has been added in the last update data source action will be classified as new.path- fetch ratings for all movies from the given path(s). You can pass the path(s) via args (multiple, no subpath possible).dataSource- fetch ratings for all movies from the given data source(s). You can pass the data sources via args (multiple, either index of the data source or the path itself).unscraped- fetch ratings for all items which are not scrapedall- fetch ratings for all movies.
- args
scraper(comma separated list of artwork scraper ids) - use these artwork scrapers instead of the ones from the settings (optional).
Rename
Rename your movies according to your renamer patterns.
Example JSON:
{
"action": "rename",
"scope": { "name": "all" },
"args": { "profile": "My renamer profile" }
}
- action -
rename - scope
newor empty - rename all new movies. Any movie which has been added in the last update data source action will be classified as new.path- rename all movies from the given path(s). You can pass the path(s) via args (multiple, no subpath possible).dataSource- rename all movies from the given data source(s). You can pass the data sources via args (multiple, either index of the data source or the path itself).all- rename all movies.
- args
profile- the name of the renamer profile to use (optional, defaults to the default profile).
Export to template
Export your movies using an export template.
Example JSON:
{
"action": "export",
"scope": { "name": "all" },
"args": { "template": "mytemplate", "exportPath": "/tmp/export" }
}
- action -
export - scope
newor empty - export all new movies. Any movie which has been added in the last update data source action will be classified as new.path- export all movies from the given path(s). You can pass the path(s) via args (multiple, no subpath possible).dataSource- export all movies from the given data source(s). You can pass the data sources via args (multiple, either index of the data source or the path itself).all- export all movies.
- args
template- the template name to use. Needs to be the folder name of the template.exportPath- path where to export your movies to.
Write NFO
v5.3.3 Trigger the write NFO action. This writes the data from the database back to the NFO files next to the media files.
Example JSON:
{
"action": "writeNfo",
"scope": { "name": "new" }
}
- action -
writeNfo - scope
newor empty - write NFO files of all new movies (see update data source).path/dataSource/unscraped/all- see above.
Cleanup unwanted files
v5.3.3 Trigger the cleanup action. This searches the folders of the entities for unwanted files (according to the cleanup file types from the settings) and deletes them - video files are NEVER deleted. Use dryRun to just log the found files without deleting anything.
Example JSON:
{
"action": "cleanup",
"scope": { "name": "all" },
"args": { "dryRun": false }
}
- action -
cleanup - scope
newor empty - all new movies (see update data source).path/dataSource/unscraped/all- see above.
- args
dryRun(true/false) - only log unwanted files instead of deleting them (optional, defaults to false).
Post process
v5.3.3 Trigger the post process action. This executes all post-processing scripts you have configured in the settings for the resolved movies.
Example JSON:
{
"action": "postProcess",
"scope": { "name": "new" }
}
- action -
postProcess - scope
newor empty - all new movies (see update data source).path/dataSource/unscraped/all- see above.
Update Kodi
v5.3.3 Trigger the update Kodi action. This tells Kodi (via its JSON-RPC API) to refresh its library from the NFO files of the resolved movies. Needs a configured and reachable Kodi host in the settings.
Example JSON:
{
"action": "updateKodi",
"scope": { "name": "new" }
}
- action -
updateKodi - scope
newor empty - all new movies (see update data source).path/dataSource/unscraped/all- see above.
Sync with Trakt.tv
v5.3.3 Trigger the sync Trakt action to synchronize the resolved movies with your Trakt.tv account. Needs Trakt to be enabled and configured in the settings.
Example JSON:
{
"action": "syncTrakt",
"scope": { "name": "all" },
"args": { "collection": true, "watched": true, "rating": false }
}
- action -
syncTrakt - scope
newor empty - all new movies (see update data source).path/dataSource/unscraped/all- see above.
- args
collection(true/false) - synchronize the collection state (optional, defaults to true).watched(true/false) - synchronize the watched state (optional, defaults to true).rating(true/false) - synchronize your personal rating (optional, defaults to true).
Sync with Simkl.com
v5.3.3 Trigger the sync Simkl action to synchronize the watched state of the resolved movies with Simkl.com. Needs Simkl to be enabled and configured in the settings.
Example JSON:
{
"action": "syncSimkl",
"scope": { "name": "all" }
}
- action -
syncSimkl - scope
newor empty - all new movies (see update data source).path/dataSource/unscraped/all- see above.
TV shows
These actions are executed in the TV show module. To send a command to the TV show module, you need to use the subpath tvshow (e.g. http://localhost:7878/api/tvshow).
Actions work on TV shows and/or episodes depending on the resolved scope.
Update data sources
Trigger the update data source action. This scans your data sources for new TV shows/episodes.
Example JSON:
{
"action": "update",
"scope": { "name": "all" }
}
- action -
update - scope
all- update all data sources.single- update a single data source. The indices for identifying the data source(s) will be used from args (multiple, starting with 0 for the first data source in your settings).show- update only the given TV show. You need to pass the full path to the TV show(s) to be updated in args (multiple possible).path- update only the given path. You need to pass the full path to be updated in args (multiple possible). v5.2.13
Read data from NFO
v5.3.3 Trigger the read NFO action. This forces tinyMediaManager to re-read the NFO files of shows, seasons and episodes and merges the data into the database (this may overwrite existing data in your library!).
Example JSON:
{
"action": "readNfo",
"scope": { "name": "new" }
}
- action -
readNfo - scope
newor empty - all new TV shows/episodes (see update data source).path/dataSource/unscraped/all- see Reload media info.
Reload media info
v5.0.10 Trigger the reload media info action. This reloads media info of all your media files (respecting mediainfo.xml files).
Example JSON:
{
"action": "reloadMediaInfo",
"scope": { "name": "all" }
}
- action -
reloadMediaInfo - scope
newor empty - scrape all new TV shows/episodes. All TV shows/episodes which have been added in the last update data source action will be classified as new.path- scrape all TV shows/episodes from the given path(s). You can pass the path(s) via args (multiple, no subpath possible).dataSource- scrape all TV shows/episodes from the given data source(s). You can pass the data sources via args (multiple, either index of the data source or the path itself).unscraped- scrape all TV shows/episodes which are not scrapedall- scrape all TV shows/episodes.
Calculate checksum
v5.3.3 Trigger the calculate checksum action. This calculates the CRC32 checksum and/or the perceptual hash (PHASH, needs FFmpeg) of the main video files of the resolved episodes - values which are e.g. needed to match media in Kodi. Already existing values are never overwritten.
Example JSON:
{
"action": "calculateChecksum",
"scope": { "name": "new" },
"args": { "type": "all" }
}
- action -
calculateChecksum - scope
newor empty - all new TV shows/episodes (see update data source).path/dataSource/unscraped/all- see Reload media info.
- args
type(crc32/phash/all, defaults tocrc32) - which checksum to calculate.
Detect aspect ratio
v5.0.10 Trigger the detect aspect ratio action. This command will run the aspect ratio detector (using FFmpeg) for your episodes.
Example JSON:
{
"action": "detectAspectRatio",
"scope": { "name": "all" }
}
- action -
detectAspectRatio - scope
newor empty - scrape all new TV shows/episodes. All TV shows/episodes which have been added in the last update data source action will be classified as new.path- scrape all TV shows/episodes from the given path(s). You can pass the path(s) via args (multiple, no subpath possible).dataSource- scrape all TV shows/episodes from the given data source(s). You can pass the data sources via args (multiple, either index of the data source or the path itself).unscraped- scrape all TV shows/episodes which are not scrapedall- scrape all TV shows/episodes.
Scrape
Scrape your TV shows/episodes from online sources.
Example JSON:
{
"action": "scrape",
"scope": { "name": "new" }
}
- action -
scrape - scope
newor empty - scrape all new TV shows/episodes. All TV shows/episodes which have been added in the update data source action of the current API call will be classified as new.path- scrape all TV shows/episodes from the given path(s). You can pass the path(s) via args (multiple, no subpath possible).dataSource- scrape all TV shows/episodes from the given data source(s). You can pass the data sources via args (multiple, either index of the data source or the path itself).unscraped- scrape all TV shows/episodes which are not scrapedall- scrape all TV shows/episodes.
Fetch ratings
Fetch ratings for your TV shows / episodes
Example JSON:
{
"action": "fetchRatings",
"scope": { "name": "all" }
}
- action -
fetchRatings - scope
newor empty - fetch ratings for all new TV shows/episodes. All TV shows/episodes which have been added in the last update data source action will be classified as new.path- fetch ratings for all TV shows/episodes from the given path(s). You can pass the path(s) via args (multiple, no subpath possible).dataSource- scrape all TV shows/episodes from the given data source(s). You can pass the data sources via args (multiple, either index of the data source or the path itself).unscraped- fetch ratings for all TV shows/episodes which are not scrapedall- fetch ratings for all TV shows/episodes.
Trailer download
Download trailers.
Example JSON:
{
"action": "downloadTrailer",
"scope": { "name": "all" },
"args": { "onlyMissing": true }
}
- action -
downloadTrailer - scope
newor empty - download trailers for all new TV shows. All TV shows which have been added in the last update data source action will be classified as new.path- download trailers for all TV shows from the given path(s). You can pass the path(s) via args (multiple, no subpath possible).dataSource- download trailers for all TV shows from the given data source(s). You can pass the data sources via args (multiple, either index of the data source or the path itself).all- download trailers for all TV shows.
- args
onlyMissing(true/false) - only download missing trailers (optional, defaults to true if omitted).
Subtitle download
Download subtitles.
Example JSON:
{
"action": "downloadSubtitle",
"scope": { "name": "all" },
"args": { "language": "en", "onlyMissing": true }
}
- action -
downloadSubtitle - scope
newor empty - download subtitles for all new episodes. All episodes which have been added in the last update data source action will be classified as new.path- download subtitles for all episodes from the given TV show path(s). You can pass the path(s) via args (multiple, no subpath possible).dataSource- download subtitles for all episodes from the given data source(s). You can pass the data sources via args (multiple, either index of the data source or the path itself).all- download subtitles for all episodes.
- args
language(ISO code) - the language to download the subtitles for (optional, defaults to the language of the settings if omitted).onlyMissing(true/false) - only download missing subtitles (optional, defaults to true if omitted).
Download missing artwork
Download missing artwork for TV shows/episodes.
Example JSON:
{
"action": "downloadMissingArtwork",
"scope": { "name": "all" }
}
- action -
downloadMissingArtwork - scope
newor empty - fetch ratings for all new TV shows/episodes. All TV shows/episodes which have been added in the last update data source action will be classified as new.path- fetch ratings for all TV shows/episodes from the given path(s). You can pass the path(s) via args (multiple, no subpath possible).dataSource- scrape all TV shows/episodes from the given data source(s). You can pass the data sources via args (multiple, either index of the data source or the path itself).unscraped- fetch ratings for all TV shows/episodes which are not scrapedall- fetch ratings for all TV shows/episodes.
- args
scraper(comma separated list of artwork scraper ids) - use these artwork scrapers instead of the ones from the settings (optional).
Download theme
v5.3.3 Download the theme music of the resolved TV shows.
Example JSON:
{
"action": "downloadTheme",
"scope": { "name": "new" },
"args": { "onlyMissing": true }
}
- action -
downloadTheme - scope
newor empty - all new TV shows (see update data source).path/dataSource/unscraped/all- see Reload media info.
- args
onlyMissing(true/false) - only download missing themes (optional, defaults to true if omitted).
Rename
Rename your TV shows/episodes according to your renamer patterns.
Example JSON:
{
"action": "rename",
"scope": { "name": "all" },
"args": { "profile": "My renamer profile" }
}
- action -
rename - scope
newor empty - rename all new TV shows/episodes. All TV shows/episodes which have been added in the last update data source action will be classified as new.path- rename all TV shows/episodes from the given path(s). You can pass the path(s) via args (multiple, no subpath possible).dataSource- rename all TV shows/episodes from the given data source(s). You can pass the data sources via args (multiple, either index of the data source or the path itself).all- rename all TV shows/episodes.
- args
profile- the name of the renamer profile to use (optional, defaults to the default profile).
Export to template
Export your TV shows using an export template.
Example JSON:
{
"action": "export",
"scope": { "name": "all" },
"args": { "template": "mytemplate", "exportPath": "/tmp/export" }
}
- action -
export - scope
newor empty - export all new TV shows. All TV shows which has been added in the last update data source action will be classified as new.path- export all TV shows from the given path(s). You can pass the path(s) via args (multiple, no subpath possible).dataSource- export all TV shows from the given data source(s). You can pass the data sources via args (multiple, either index of the data source or the path itself).all- export all TV shows.
- args
template- the template name to use. Needs to be the folder name of the template.exportPath- path where to export your movies to.
Write NFO
v5.3.3 Trigger the write NFO action. This writes the data of shows, seasons and episodes from the database back to the NFO files next to the media files.
Example JSON:
{
"action": "writeNfo",
"scope": { "name": "new" }
}
- action -
writeNfo - scope
newor empty - all new TV shows/episodes (see update data source).path/dataSource/unscraped/all- see Reload media info.
Cleanup unwanted files
v5.3.3 Trigger the cleanup action. This searches the folders of the resolved shows/episodes for unwanted files (according to the cleanup file types from the settings) and deletes them - video files are NEVER deleted. Use dryRun to just log the found files without deleting anything.
Example JSON:
{
"action": "cleanup",
"scope": { "name": "all" },
"args": { "dryRun": false }
}
- action -
cleanup - scope
newor empty - all new TV shows/episodes (see update data source).path/dataSource/unscraped/all- see Reload media info.
- args
dryRun(true/false) - only log unwanted files instead of deleting them (optional, defaults to false).
Post process
v5.3.3 Trigger the post process action. This executes all post-processing scripts you have configured in the settings for the resolved shows and/or episodes.
Example JSON:
{
"action": "postProcess",
"scope": { "name": "new" }
}
- action -
postProcess - scope
newor empty - all new TV shows/episodes (see update data source).path/dataSource/unscraped/all- see Reload media info.
Update Kodi
v5.3.3 Trigger the update Kodi action. This tells Kodi (via its JSON-RPC API) to refresh its library from the NFO files of the resolved shows/episodes. Needs a configured and reachable Kodi host in the settings.
Example JSON:
{
"action": "updateKodi",
"scope": { "name": "new" },
"args": { "full": true }
}
- action -
updateKodi - scope
newor empty - all new TV shows/episodes (see update data source).path/dataSource/unscraped/all- see Reload media info.
- args
full(true/false) - also refresh all episodes of the resolved shows (optional, defaults to true).
Sync with Trakt.tv
v5.3.3 Trigger the sync Trakt action to synchronize the resolved TV shows with your Trakt.tv account. Needs Trakt to be enabled and configured in the settings.
Example JSON:
{
"action": "syncTrakt",
"scope": { "name": "all" },
"args": { "collection": true, "watched": true, "rating": false }
}
- action -
syncTrakt - scope
newor empty - all new TV shows (see update data source).path/dataSource/unscraped/all- see Reload media info.
- args
collection(true/false) - synchronize the collection state (optional, defaults to true).watched(true/false) - synchronize the watched state (optional, defaults to true).rating(true/false) - synchronize your personal rating (optional, defaults to true).
Sync with Simkl.com
v5.3.3 Trigger the sync Simkl action to synchronize the watched state of the resolved TV shows with Simkl.com. Needs Simkl to be enabled and configured in the settings.
Example JSON:
{
"action": "syncSimkl",
"scope": { "name": "all" }
}
- action -
syncSimkl - scope
newor empty - all new TV shows (see update data source).path/dataSource/unscraped/all- see Reload media info.
Movie sets
v5.3.3 These actions are executed in the movie set module. To send a command to the movie set module, you need to use the subpath movieset (e.g. http://localhost:7878/api/movieset).
The scope for movie sets works a bit different:
allor empty - all movie sets of your library (this is the default!)name- the movie sets with the given titles. You need to pass the titles via args (multiple possible).path- the movie sets at the given paths. You need to pass the paths via args (multiple possible).
Scrape
Scrape the metadata of your movie sets from online sources.
Example JSON:
{
"action": "scrape",
"scope": { "name": "all" },
"args": { "scraper": "tmdb" }
}
- action -
scrape - args
scraper- use the specified movie set scraper (optional; if omitted, the scraper from the settings will be used).
Download missing artwork
Download missing artwork for movie sets.
Example JSON:
{
"action": "downloadMissingArtwork",
"scope": { "name": "all" }
}
- action -
downloadMissingArtwork - args
scraper(comma separated list of scraper ids) - use these scrapers instead of the ones from the settings (optional).
Cleanup artwork
Move already existing artwork of the movie sets into the correct folders (according to your artwork settings).
Example JSON:
{
"action": "cleanupArtwork",
"scope": { "name": "all" }
}
- action -
cleanupArtwork
Rename
Rename and move the files of all movies inside the resolved movie sets (the set folder itself is renamed according to your movie set rename settings).
Example JSON:
{
"action": "rename",
"scope": { "name": "all" },
"args": { "profile": "My renamer profile" }
}
- action -
rename - args
profile- the name of the renamer profile to use (optional, defaults to the default profile).
Export to template
Export your movie sets using an export template.
Example JSON:
{
"action": "export",
"scope": { "name": "all" },
"args": { "template": "mytemplate", "exportPath": "/tmp/export" }
}
- action -
export - args
template- the template name to use. Needs to be the folder name of the template.exportPath- path where to export your movie sets to.
Write NFO
Write the movie set data back to the NFO files (needs configured movie set NFO filenames in the settings).
Example JSON:
{
"action": "writeNfo",
"scope": { "name": "all" }
}
- action -
writeNfo
Post process
Execute all post-processing scripts you have configured for movie sets (and for the movies inside the sets).
Example JSON:
{
"action": "postProcess",
"scope": { "name": "all" }
}
- action -
postProcess
Update Kodi
Tell Kodi to refresh the movies of the resolved movie sets from their NFO files. Needs a configured and reachable Kodi host in the settings.
Example JSON:
{
"action": "updateKodi",
"scope": { "name": "all" }
}
- action -
updateKodi
Sync with Trakt.tv
Synchronize the movies of the resolved movie sets with your Trakt.tv account.
Example JSON:
{
"action": "syncTrakt",
"scope": { "name": "all" },
"args": { "collection": true, "watched": true, "rating": false }
}
- action -
syncTrakt - args
collection/watched/rating(true/false, all default to true) - which states to synchronize.
API documentation endpoint
v5.3.3 tinyMediaManager serves a machine-readable OpenAPI 3.0 (swagger style) description of this API directly from itself:
GET http://localhost:7878/api/docs
The returned JSON describes all endpoints, commands, scopes and arguments (including the execution order) and can be imported into any OpenAPI-capable tool (Swagger UI, Postman, …).
Examples
Update all movie data sources
curl -d '{"action":"update", "scope":{"name":"all"}}' \
-H "Content-Type: application/json" \
-H "api-key: <your-api-key>" \
-X POST http://localhost:7878/api/movie
Update all TV show data sources AND scrape the new items
curl -d '[{"action":"update", "scope":{"name":"all"}}, {"action":"scrape", "scope":{"name":"new"}}]' \
-H "Content-Type: application/json" \
-H "api-key: <your-api-key>" \
-X POST http://localhost:7878/api/tvshow
Fetch subtitles for movies from the first data source (in French)
curl -d '{"action":"downloadSubtitle", "scope":{"name":"dataSource", "args":[0]}, "args":{"language":"fr"}}' \
-H "Content-Type: application/json" \
-H "api-key: <your-api-key>" \
-X POST http://localhost:7878/api/movie
Fetch ratings for all movies
curl -d '[{"action":"fetchRatings", "scope":{"name":"all"}}]' \
-H "Content-Type: application/json" \
-H "api-key: <your-api-key>" \
-X POST http://localhost:7878/api/movie
More complex scenarios
1. Update all movie data sources, then scrape new movies with a specific scraper, and download missing artwork for those new movies
curl -d '[
{"action": "update", "scope": {"name": "all"}},
{"action": "scrape", "scope": {"name": "new"}, "args": {"scraper": "tmdb"}},
{"action": "downloadMissingArtwork", "scope": {"name": "new"}}
]' \
-H "Content-Type: application/json" \
-H "api-key: <your-api-key>" \
-X POST http://localhost:7878/api/movie
2. Scrape all TV shows from a specific data source (by path), fetch ratings, and download English subtitles for all episodes
curl -d '[
{"action": "scrape", "scope": {"name": "dataSource", "args": "/media/tv_shows/HD"}},
{"action": "fetchRatings", "scope": {"name": "all"}},
{"action": "downloadSubtitle", "scope": {"name": "all"}, "args": {"language": "en"}}
]' \
-H "Content-Type: application/json" \
-H "api-key: <your-api-key>" \
-X POST http://localhost:7878/api/tvshow
3. Update alldata sources, scrape & rename all new movies and export them using a custom template
curl -d '[
{"action": "update", "scope": {"name": "all"}},
{"action": "scrape", "scope": {"name": "new"}},
{"action": "rename", "scope": {"name": "new"}},
{"action": "export", "scope": {"name": "new"}, "args": {"template": "custom", "exportPath": "/tmp/new_export"}}
]' \
-H "Content-Type: application/json" \
-H "api-key: <your-api-key>" \
-X POST http://localhost:7878/api/movie
4. Download missing trailers and subtitles (in German) for all TV shows from a specific path
curl -d '[
{"action": "downloadTrailer", "scope": {"name": "path", "args": ["/media/tvshows"]}, "args": {"onlyMissing": true}},
{"action": "downloadSubtitle", "scope": {"name": "path", "args": ["/media/tvshows"]}, "args": {"language": "de", "onlyMissing": true}}
]' \
-H "Content-Type: application/json" \
-H "api-key: <your-api-key>" \
-X POST http://localhost:7878/api/tvshow
5. Update a single movie data source (by index), scrape, and fetch ratings for only new movies
curl -d '[
{"action": "update", "scope": {"name": "single", "args": [0]}},
{"action": "scrape", "scope": {"name": "new"}},
{"action": "fetchRatings", "scope": {"name": "new"}}
]' \
-H "Content-Type: application/json" \
-H "api-key: <your-api-key>" \
-X POST http://localhost:7878/api/movie
6. A full “new media” pipeline: update, scrape, download artwork, rename, write NFO, cleanup leftovers, run post processing and finally tell Kodi to refresh (v5.3.3)
curl -d '[
{"action": "update", "scope": {"name": "all"}},
{"action": "scrape", "scope": {"name": "new"}},
{"action": "downloadMissingArtwork", "scope": {"name": "new"}},
{"action": "rename", "scope": {"name": "new"}},
{"action": "writeNfo", "scope": {"name": "new"}},
{"action": "cleanup", "scope": {"name": "new"}},
{"action": "postProcess", "scope": {"name": "new"}},
{"action": "updateKodi", "scope": {"name": "new"}}
]' \
-H "Content-Type: application/json" \
-H "api-key: <your-api-key>" \
-X POST http://localhost:7878/api/movie
7. Scrape all movie sets, download their missing artwork and write the set NFO (v5.3.3)
curl -d '[
{"action": "scrape", "scope": {"name": "all"}},
{"action": "downloadMissingArtwork", "scope": {"name": "all"}},
{"action": "writeNfo", "scope": {"name": "all"}}
]' \
-H "Content-Type: application/json" \
-H "api-key: <your-api-key>" \
-X POST http://localhost:7878/api/movieset