{ "sections_get_200": { "name": "A request to get all Libraries", "description": "This request will get all libraries from the Plex server.", "request": { "method": "GET", "uri": "/library/sections", "headers": { "Accept": "application/json", "X-Plex-Token": "$(fake_plex_token}", "X-Plex-Container-Size": "1" } }, "response": { "http_code": 200, "headers": { "Content-Type": "application/json", "X-Plex-Protocol": "1.0" }, "body": { "MediaContainer": { "Directory": [ { "Location": [ { "id": 1, "path": "/storage/media/movies" } ], "agent": "tv.plex.agents.movie", "allowSync": true, "art": "/:/resources/movie-fanart.jpg", "composite": "/library/sections/2/composite/1693688538", "content": true, "contentChangedAt": 18253756, "createdAt": 1499601583, "directory": true, "filters": true, "hidden": 0, "key": "1", "language": "en-US", "refreshing": false, "scannedAt": 1693688538, "scanner": "Plex Movie", "thumb": "/:/resources/movie.png", "title": "Movies", "type": "movie", "updatedAt": 1693708514, "uuid": "AC000000-0000-0000-0000-000000000001" }, { "Location": [ { "id": 2, "path": "/storage/media/tv" } ], "agent": "tv.plex.agents.series", "allowSync": true, "art": "/:/resources/show-fanart.jpg", "composite": "/library/sections/1/composite/1693717781", "content": true, "contentChangedAt": 18253803, "createdAt": 1499601519, "directory": true, "filters": true, "hidden": 0, "key": "2", "language": "en-US", "refreshing": false, "scannedAt": 1693717781, "scanner": "Plex TV Series", "thumb": "/:/resources/show.png", "title": "TV Shows", "type": "show", "updatedAt": 1693717833, "uuid": "AC000000-0000-0000-0000-000000000002" }, { "Location": [ { "id": 3, "path": "/storage/media/no_agent" } ], "agent": "com.plexapp.agents.none", "allowSync": true, "art": "/:/resources/show-fanart.jpg", "composite": "/library/sections/40/composite/1693717782", "content": true, "contentChangedAt": 18231903, "createdAt": 1682365203, "directory": true, "filters": true, "hidden": 0, "key": "3", "language": "xn", "refreshing": false, "scannedAt": 1693717782, "scanner": "Absolute Series Scanner", "thumb": "/:/resources/show.png", "title": "Non matched content", "type": "show", "updatedAt": 1693717833, "uuid": "AC000000-0000-0000-0000-000000000003" } ], "allowSync": false, "size": 3, "title1": "Plex Library" } } } }, "sections_get_401": { "name": "A request to get all Libraries with an invalid token", "description": "This request will receive a 401 Unauthorized response.", "request": { "method": "GET", "uri": "/library/sections", "headers": { "Accept": "application/json", "X-Plex-Token": "$(fake_invalid_plex_token}", "X-Plex-Container-Size": "1" } }, "response": { "http_code": 401, "headers": { "Content-Type": "text/html", "X-Plex-Protocol": "1.0" }, "body": "Unauthorized

401 Unauthorized

" } }, "library_head_200": { "name": "a head request to get library size", "description": "This request will get the size of the library.", "request": { "method": "HEAD", "uri": "/library/sections/${id}/all", "headers": { "Accept": "application/json", "X-Plex-Token": "$(fake_plex_token}", "X-Plex-Container-Size": "1000", "X-Plex-Container-Start": "0" } }, "response": { "http_code": 200, "headers": { "Content-Type": "application/json", "X-Plex-Container-Start": "0", "X-Plex-Container-Total-Size": "${total}", "X-Plex-Protocol": "1.0" }, "body": null } }, "library_head_401": { "name": "a head request to get library size with an invalid token", "description": "This request will fail with a 401 Unauthorized response", "request": { "method": "HEAD", "uri": "/library/sections/${id}/all", "headers": { "Accept": "application/json", "X-Plex-Token": "$(fake_invalid_plex_token}", "X-Plex-Container-Size": "1000", "X-Plex-Container-Start": "0" } }, "response": { "http_code": 401, "headers": { "Content-Type": "text/html", "X-Plex-Protocol": "1.0" }, "body": null } }, "library_movie_get_200": { "name": "a request to get all library movies", "description": "This request will get all library movies from the Plex server.", "request": { "method": "GET", "uri": "/library/sections/1/all", "query": { "X-Plex-Container-Size": "1000", "X-Plex-Container-Start": "0", "includeGuids": 1, "type": 1, "sort": "addedAt" }, "headers": { "Accept": "application/json", "X-Plex-Token": "$(fake_plex_token}", "X-Plex-Container-Size": "1000", "X-Plex-Container-Start": "0" } }, "response": { "http_code": 200, "headers": { "Content-Type": "application/json", "X-Plex-Protocol": "1.0", "X-Plex-Container-Start": "0", "X-Plex-Container-Total-Size": "${total}" }, "body": { "MediaContainer": { "Metadata": [ { "Collection": [ { "tag": "Ferengi: Collection" } ], "Country": [ { "tag": "The Ferengi Alliance" } ], "Director": [ { "tag": "Jean Luc Picard" } ], "Genre": [ { "tag": "Science Fiction" }, { "tag": "Action" } ], "Guid": [ { "id": "imdb://tt0000001" }, { "id": "tmdb://1" }, { "id": "tvdb://1" } ], "Media": [ { "Part": [ { "audioProfile": "lc", "container": "mp4", "duration": 6989056, "file": "/storage/media/movies/Ferengi Rules of Acquisition (2000)/Ferengi Rules of Acquisition (2000).mp4", "has64bitOffsets": false, "id": 646898, "key": "/library/parts/646898/1680454652/file.mp4", "optimizedForStreaming": false, "size": 1190641734, "videoProfile": "high" } ], "aspectRatio": 2.35, "audioChannels": 2, "audioCodec": "aac", "audioProfile": "lc", "bitrate": 1363, "container": "mp4", "duration": 6989056, "has64bitOffsets": false, "height": 306, "id": 317205, "optimizedForStreaming": 0, "videoCodec": "h264", "videoFrameRate": "24p", "videoProfile": "high", "videoResolution": "sd", "width": 720 } ], "Role": [ { "tag": "Jean Luc Picard" } ], "Writer": [ { "tag": "A Ferengi drunk writer" } ], "addedAt": 1159501116, "art": "/library/metadata/1/art/1691594411", "audienceRating": 4.9, "audienceRatingImage": "rottentomatoes://image.rating.spilled", "chapterSource": "agent", "contentRating": "PG-13", "duration": 6989056, "guid": "plex://movie/100000000000000000000001", "key": "/library/metadata/1", "originallyAvailableAt": "2000-01-01", "primaryExtraKey": "/library/metadata/197086", "rating": 3.8, "ratingImage": "rottentomatoes://image.rating.rotten", "ratingKey": "1", "studio": "A Ferengi studio", "summary": "The Rules of Acquisition movie is based on the story of a young Ferengi named Picard who would like to exploit the Rules of Acquisition.", "tagline": "Rules of Acquisition are sacred!", "thumb": "/library/metadata/1/thumb/1691594411", "title": "Ferengi: Rules of Acquisition", "type": "movie", "updatedAt": 1691594411, "year": 2000 } ], "allowSync": true, "art": "/:/resources/movie-fanart.jpg", "identifier": "com.plexapp.plugins.library", "librarySectionID": 1, "librarySectionTitle": "Movies", "librarySectionUUID": "AC000000-0000-0000-0000-000000000001", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1690992652, "offset": 0, "size": 1, "thumb": "/:/resources/movie.png", "title1": "Movies", "title2": "All Movies", "totalSize": 1, "viewGroup": "movie", "viewMode": 65592 } } } }, "library_show_get_200": { "name": "a request to get all library shows", "description": "This request will get all library shows from the Plex server.", "request": { "method": "GET", "uri": "/library/sections/2/all", "query": { "X-Plex-Container-Size": "1000", "X-Plex-Container-Start": "0", "includeGuids": 1, "type": 2, "sort": "addedAt" }, "headers": { "Accept": "application/json", "X-Plex-Token": "$(fake_plex_token}", "X-Plex-Container-Size": "1000", "X-Plex-Container-Start": "0" } }, "response": { "http_code": 200, "headers": { "Content-Type": "application/json", "X-Plex-Protocol": "1.0", "X-Plex-Container-Start": "0", "X-Plex-Container-Total-Size": "${total}" }, "body": { "MediaContainer": { "Metadata": [ { "Country": [ { "tag": "The Ferengi Alliance" } ], "Genre": [ { "tag": "Drama" }, { "tag": "Comedy" } ], "Guid": [ { "id": "tmdb://3" }, { "id": "tvdb://3" } ], "Role": [ { "tag": "Jean Luc Picard" } ], "addedAt": 1511234031, "art": "/library/metadata/3/art/1692127811", "audienceRating": 5.0, "audienceRatingImage": "themoviedb://image.rating", "childCount": 1, "contentRating": "TV-14", "duration": 1800000, "guid": "plex://show/300000000000000000000003", "index": 1, "key": "/library/metadata/3/children", "leafCount": 13, "originalTitle": "A Ferengi Comedy Show", "originallyAvailableAt": "2002-02-02", "ratingKey": "3", "skipChildren": true, "studio": "A Ferengi studio", "summary": "Picard is young ferengi who is trying to make it big in the world of comedy.", "thumb": "/library/metadata/3/thumb/1692127811", "title": "Ferengi StandUp Comedy", "type": "show", "updatedAt": 1692127811, "viewedLeafCount": 0, "year": 2002 } ], "allowSync": true, "art": "/:/resources/show-fanart.jpg", "identifier": "com.plexapp.plugins.library", "librarySectionID": 2, "librarySectionTitle": "TV Shows", "librarySectionUUID": "AC000000-0000-0000-0000-000000000002", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1690992652, "nocache": true, "offset": 0, "size": 1, "thumb": "/:/resources/show.png", "title1": "TV Shows", "title2": "All Shows", "totalSize": 1, "viewGroup": "show", "viewMode": 65592 } } } }, "library_episodes_get_200": { "name": "a request to get all library episodes", "description": "This request will get all library episodes from the Plex server.", "request": { "method": "GET", "uri": "/library/sections/2/all", "query": { "X-Plex-Container-Size": "1000", "X-Plex-Container-Start": "0", "includeGuids": 1, "type": 4, "sort": "episode.addedAt" }, "headers": { "Accept": "application/json", "X-Plex-Token": "$(fake_plex_token}", "X-Plex-Container-Size": "1000", "X-Plex-Container-Start": "0" } }, "response": { "http_code": 200, "headers": { "Content-Type": "application/json", "X-Plex-Protocol": "1.0", "X-Plex-Container-Start": "0", "X-Plex-Container-Total-Size": "${total}" }, "body": { "MediaContainer": { "Metadata": [ { "Director": [ { "tag": "A drunk ferengi director" } ], "Guid": [ { "id": "imdb://tt0000004" }, { "id": "tmdb://4" }, { "id": "tvdb://4" } ], "Media": [ { "Part": [ { "container": "mkv", "duration": 2654912, "file": "/storage/media/tv/Ferengi StandUp Comedy (2002)/Season 01/Ferengi StandUp Comedy (2002) - S01E01.mkv", "id": 598189, "key": "/library/parts/598189/1691462607/file.mkv", "size": 3109472188, "videoProfile": "main 10" } ], "aspectRatio": 1.78, "audioChannels": 6, "audioCodec": "ac3", "bitrate": 9370, "container": "mkv", "duration": 2654912, "height": 1080, "id": 270893, "videoCodec": "hevc", "videoFrameRate": "24p", "videoProfile": "main 10", "videoResolution": "1080", "width": 1920 } ], "Role": [ { "tag": "Jean Luc Picard" } ], "Writer": [ { "tag": "A drunk ferengi writer" } ], "addedAt": 1105631952, "art": "/library/metadata/5/art/1691172106", "audienceRating": 8.6, "audienceRatingImage": "themoviedb://image.rating", "chapterSource": "media", "contentRating": "TV-PG", "duration": 2654912, "grandparentArt": "/library/metadata/3/art/1691172106", "grandparentGuid": "plex://show/300000000000000000000003", "grandparentKey": "/library/metadata/3", "grandparentRatingKey": "3", "grandparentTheme": "/library/metadata/3/theme/1691172106", "grandparentThumb": "/library/metadata/3/thumb/1691172106", "grandparentTitle": "Ferengi StandUp Comedy", "guid": "plex://episode/500000000000000000000005", "index": 1, "key": "/library/metadata/4", "lastViewedAt": 1643805016, "originallyAvailableAt": "2002-01-01", "parentGuid": "plex://season/400000000000000000000004", "parentIndex": 1, "parentKey": "/library/metadata/4", "parentRatingKey": "4", "parentThumb": "/library/metadata/4/thumb/1654311379", "parentTitle": "Season 1", "parentYear": 2002, "ratingKey": "5", "summary": "ِAs our young Ferengi comedian is trying to make it big, he is faced with many challenges.", "thumb": "/library/metadata/5/thumb/1691510335", "title": "The first Picard joke", "titleSort": "first Picard joke", "type": "episode", "updatedAt": 1691510335, "viewCount": 1 } ], "allowSync": true, "art": "/:/resources/show-fanart.jpg", "identifier": "com.plexapp.plugins.library", "librarySectionID": 2, "librarySectionTitle": "TV Shows", "librarySectionUUID": "AC000000-0000-0000-0000-000000000002", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1690992652, "nocache": true, "offset": 0, "size": 1, "thumb": "/:/resources/show.png", "title1": "TV Shows", "title2": "All Shows", "totalSize": 1, "viewGroup": "show", "viewMode": 65592 } } } } }