The API supports responses in both XML and JSON, and clients can request one or the other using the standard Accept HTTP header. The default is XML, so JSON will only be returned if it's explicitly requested (Accept: application/json). New applications should use JSON.
Throughout the docs, it's common for a examples to be given in JSON only since the JSON response would be preferred for new applications.
PMS accept a variety of custom headers that follow the pattern X-Plex-{name}. The full set of headers isn't enumerated here since some may only apply to certain endpoints, but common headers that can be included on all requests include:
| Header | Description | Sample |
|---|---|---|
| X-Plex-Client-Identifier | An opaque identifier unique to the client | abc123 |
| X-Plex-Token | An authentication token, obtained from plex.tv | XXXXXXXXXXXX |
| X-Plex-Product | The name of the client product | Plex for Roku |
| X-Plex-Version | The version of the client application | 2.4.1 |
| X-Plex-Platform | The platform of the client | Roku |
| X-Plex-Platform-Version | The version of the platform | 4.3 build 1057 |
| X-Plex-Device | A relatively friendly name for the client device | Roku 3 |
| X-Plex-Model | A potentially less friendly identifier for the device model | 4200X |
| X-Plex-Device-Vendor | The device vendor | Roku |
| X-Plex-Device-Name | A friendly name for the client | Living Room TV |
| X-Plex-Marketplace | The marketplace on which the client application is distributed | googlePlay |
X-Plex-Client-Identifier is typically required, as is X-Plex-Token for authentication.
There's no standard way to send non-ASCII values as HTTP headers. We attempt to recognize and parse UTF-8 and ISO-8859-1. If you're sending something that may include non-ASCII characters (often X-Plex-Device-Name), use UTF-8 if possible.
These are referred to as headers throughout documentation, but all X-Plex- headers can also be sent as query string arguments.
Most endpoints require token based authentication, and the token is expected to be sent in the X-Plex-Token header. Tokens are obtained from plex.tv. See the Authenticating with Plex section.
Many parts of the API reference things that can be fetched by their key. These keys follow a sort of relative URL resolution pattern. Some examples will help clarify.
/library/sections that includes an item with a key of home in the response, that item can be fetched at /library/sections/home./library/sections/home that includes an item with a key of /library/metadata/deadbeef in the response, that item can be fetched at /library/metadata/deadbeef.We say this follows a "sort of" relative URL resolution pattern because all requests are treated as though they have a trailing slash.
/library/sections/ + home => /library/sections/home
/library/sections + home => /library/sections/home
/library/sections + /library/sections/home => /library/sections/home
Just like URL resolution, keys may contain absolute URLs as well, especially absolute https://... URLs or custom view://... URLs. In these cases the key resolved by simply using it, the parent is irrelevant.
Also note that the features described in this API can generally be present at a different paths. The /media/providers path defines where all features can be found. Note that a PMS can contain multiple providers which will be enumerated here. For simplicity, these docs use the most common, default paths. But when we say that /library/sections/{id} is part of the API, what we really mean is that a endpoint exists which is composed of the key for the content feature and the key for the library section.
Finally, it's worth noting that many paths can potentially be discovered by walking API responses and fetching keys, but paths that aren't documented here aren't part of the API contract, they just happen to exist for a particular provider. For example, a particular content directory might include a directory with key={baseLibraryPath}/genre. That's not an official part of the API that's guaranteed to exist for every content directory, it's just a key that happened to exist within that content directory.
Many elements throughout the API have a type attribute. These types are meant to give helpful information, such as whether something is a movie library or a TV show library. Some API elements rely on a type number so both are provided below
| Type Name | Type Number |
|---|---|
movie |
1 |
show |
2 |
season |
3 |
episode |
4 |
trailer |
5 |
person |
7 |
artist |
8 |
album |
9 |
track |
10 |
clip |
12 |
photo |
13 |
photoalbum |
14 |
playlist |
15 |
playlistfolder |
16 |
collection |
18 |
When an element has both type and key attributes, the type describes what will be returned when fetching that key. Some types will return a list of other elements. That list may have a Meta element describing the specific types within the list. Consider the following examples:
[
{
"key": "/foo",
"type": "movie",
"title": "A Movie"
},
{
"key": "/bar",
"type": "collection",
"title": "My Favorite Movies"
},
{
"key": "/baz",
"type": "show",
"title": "A Show"
}
]
In each case, the type describes what will be returned when fetching the key. One exception is the /children key for parents like shows and seasons. It will return a list of children even though the type describes the parent.
Some elements may also include an optional subtype attribute. The subtype is meant to be a refinement of the type, not a completely different type. One test is trying to explain the type in natural language. type="clip" subtype="news" passes the test that "This is a clip, a news clip specifically." Another test is considering the client UI. A client should be functional if it ignores the subtype, and optimized if it respects it. If type="track" subtype="podcast", a client can successfully play the podcast in an audio player based purely on the type, but it may tweak the display or which advanced playback controls are visible based on the subtype.
podcastwebshownewsphotomovieshowartistalbumtrailerdeletedSceneinterviewmusicVideobehindTheScenessceneOrSampleliveMusicVideolyricMusicVideoconcertfeaturetteshortotherSource URIs and attributes make it possible to uniquely reference content outside the local server context without requiring a fixed url. This might be desirable when showing related albums from a friend's shared media server, building a universal play queue, or returning aggregated hubs that span multiple providers. Source components are immutable and act as pointers to a single item or directory in the Plex ecosystem.
A source URI from a media server uses the server scheme while a cloud provider uses the provider scheme.
server://{SERVER_ID}/{PROVIDER_ID}/{PATH}
provider://{PROVIDER_ID}/{PATH}
As a single regular expression, that's:
/^(server|provider):\/\/([a-fA-F0-9-]+)?\/?([^/]+)([^\?]+)\??(.*)?/
The server id is the server's machineIdentifier. The provider id is the provider's identifier. The rest of the path represents the path of the content at the provider and may include additional query parameters like X-Plex- headers or media query syntax for sorts and filters.
Some examples may be helpful:
server://546684a3d18ac5c39037360ec9ce900b7af9cc36/com.plexapp.plugins.library/library/metadata/2814936
provider://tv.plex.provider.podcasts/library/sections/audio/all
The source attribute has the same structure as the source URI, but omits the path.
{SOURCE_TYPE}://{SOURCE_ID}/{PROVIDER_ID?}
/^(server|provider):\/\/([a-fA-F0-9-]+)?\/?([^/]+)$/
source="server://546684a3d18ac5c39037360ec9ce900b7af9cc36/com.plexapp.plugins.library"
source="provider://tv.plex.provider.podcasts"
Source attributes can be used as a base and combined with key or other root-relative path components to construct unique source URIs.
Many endpoints that return a list of items support pagination. Additionally some endpoints will force pagination and limit number of elements returned if the client attempts to request all items. To request a specific subset of data, add two headers to specify the starting offset and the number of desired items.
Both headers should be sent in order to request paginated content. Note that it's possible to request a size of 0 on supported endpoints in order to learn the total size without actually getting any content.
The response must be checked to see if the response is in fact paginated. The response might not be paginated at all, or it might include a different number of items than what was requested. A paginated response will include the headers:
The response body will also typically include pagination info. If the response is a MediaContainer, then it will have offset and size attributes representing the start index and the number of items in the current response along with an optional totalSize attribute for the total number of elements in the collection.
HTTP/1.1 200 OK
X-Plex-Container-Start: 2
X-Plex-Container-Total-Size: 5
Content-Type: application/xml
{
"MediaContainer": {
"size": 3,
"totalSize": 5,
"offset": 2,
"Metadata" : [
…
]
}
}
Rather than requesting a page starting at an index, it is also possible in some lists to request a page centered on a specific item in the list.
The requested size is respected regardless of the position of the focus item in the list. If the item is at the start of the list and 10 items are requested, 9 items in the response will be after the item. If the item is in the middle of the list and 10 items are requested, 4 items will be before the item and 5 items will be after.
Endpoints that support rich media queries also have a limit parameter that interacts with pagination. Sending limit in a query string limits the desired number of items, much like the X-Plex-Container-Size header. There are two major differences:
limit, the total size of the collection is not returned. The minimum of the limit and the actual total size will be returned as the total size.limit, since the total size doesn't have to be known.If the total size of the collection isn't needed, use limit, since the request may be more efficient.
Note that limit and X-Plex-Container-Size aren't mutually exclusive. You can page within the results that are bounded by the limit. If you want a total of 1000 items from a collection of many thousands of items, but you want to page through them 20 at a time, you'd use limit=1000&X-Plex-Container-Size=20&X-Plex-Container-Start=0.
PMS has never used API versioning before the creation of this document. The first published API is considered 1.0 with the API prior to publication considered 0.0. A client species its version via the X-Plex-Pms-Api-Version header on requests. If no header is provided, the version 0.0 is assumed.
1.0.0 (Supported in PMS >= 1.41.9)
Added /downloadQueue endpoints.
Public release of API.
The includeFields parameter has been renamed to includeOptionalFields. The includeFields parameter now means "include only these fields" where in the past it meant "please add these fields you wouldn't normally include." This was changed to be consistent with the cloud provider API.
1.1.0 (Supported in PMS >= 1.42.0)
types in /playlists/{playlistId}/items to array of integers./photo/:/transcode endpoints1.1.1 (Supported in PMS >= 1.42.2)
Many endpoints allow the data that is included in the response to be tailored to exactly what the client wants. This is possible by either specifying things that should be excluded or the set of things that should be included. PMS's ability to include/exclude elements and fields is currently limited but expanding so this should be used with care.
Attributes can be customized by using a query string arg of either excludeFields or includeFields. This single parameter should be a comma-separated list of attribute names. For example, a request with excludeFields=summary,tagline is asking for the summary and title attributes to be left off any metadata items while the includeFields parameter indicated that only the specified fields should be included.
Child elements can be customized by using a query string arg of either excludeElements or includeElements. This single parameter should be a comma-separated list of element names. For example, a request with excludeElements=Media is asking for the Media elements to be omitted while the includeElements parameter indicated that only the specified elements should be included.
In addition to the above are the parameters includeOptionalFields and includeOptionalElements. These indicate that the fields/elements which are not normally included should be included in this request. One example is includeOptionalElements=musicAnalysis on metadata will include the musicAnalysis parameter which can be large and typically not needed by a client.
Trimming the response to only include what a client will actually use can result in much better performance, especially in large collections. Increasingly these are being used to select which data is fetched from the database. So if a client knows it will only ever use a few parameters from a request, it should specify those with includeFields.
Note that these inclusions/exclusions are treated as requests, not guarantees. Some endpoints will disregard them completely, and others may ignore them for specific items and insist on returning data that the client didn't necessarily ask for.
Media providers are general purpose entities which supply media to Plex clients. Their API describes the Plex Media Server API, via a set of features on the "root" endpoint of the provider. Media provider can be hosted by a media server or in the cloud, linked to a specific Plex account. This section explains media providers generally, and then provides the specific server-hosted APIs around media providers.
The philosophy behind media providers in general is to allow a common API between cloud servers and PMS, since the APIs are nearly identical to a normal PMS. The general guidelines are:
Consume /media/providers instead of /library/sections
The new providers endpoint give you a list of all providers exported by a server and their features. Remember that the library itself is considered a (very rich) provider! This change will also require changing the client to not hardwire paths on the server, but rather read them from the feature keys directly (e.g. scrobble and rating endpoints).
Gate management functionality on the manage feature
Server libraries allow management (e.g. media deletion). The correct way to gate this functionality is via the manage feature.
Make sure key construction is correct for things like genre lists
For example, /library/sections/x/genre returns a relative key for each genre, but there's nothing which says that the key can't be an absolute URL. This is why servers pass back fastKey separately so as to not break clients which don't do key construction correctly. Media providers do not pass back fastKey, but assume clients will be doing correct key construction.
Don't call /library/sections/X/filters|sorts
You can get all that information (and more) in a single call by hitting /library/sections/X?includeDetails=1. Media providers include the extra information by default.
Respect the Type keys in /library/sections/x
The top-level type pivots have their own keys, which should be used over the old "just append /all to the path and add the type" approach. Not only is this more flexible, it also allows for "virtual" pivots, like music videos inside a music library.
Look for the skipChildren/skipParent attributes for shows
Because of things like Podcasts, single-season shows can now be made to skip seasons. This is indicated by a skipChildren attribute on the show, or a skipParent attribute on an episode. If this is set on a show, the client should use /grandchildren instead of /children in the show's key.
The list of supported features, along with the API endpoints each feature represents is shown in the following list. Note that each feature can define a custom endpoint URL, so it doesn't have to match the server API exactly.
search: This feature implies that it supports search via the provided key.
metadata: This feature implies that it supports metadata endpoint. For example, if the key were /library/metadata then the endpoints /library/metadata/X, /library/metadata/X/children and /library/metadata/X/grandchildren would be supported. This endpoint family allows browsing a hierarchical tree of media (e.g. show to episodes, or artist to tracks).
content: This feature implies that the provider exposes a content catalog, in the form of libraries to browse (grid of content), or discover (via hubs). Each entry in the content feature can contain:
hubKey: This implies it supports a discovery endpoint with hubs.key: This implies it supports a content catalog.icon: Optional, specifies the icon used for a content directory.Each content feature can contain one or both of these keys, depending on the structure. More details on the various combinations are provided below.
match: The match feature is used to match a piece of media to the provider's content catalog via a set of hints. As a specific example, you might pass in a title hint of "Attack of the 50 Foot Woman" and a year hint of 1958 for the movie type. The provider would then use all the hints to attempt to match to entries in its catalog.
manage: The manage feature implies a whole host of endpoints around changing data inside a library (e.g. editing fields, customizing artwork, etc.). This feature is generally only available on an actual server and generally only to the admin.
timeline: The timeline feature implies that the provider wants to receive timeline (playback notifications) requests from a client at the endpoint defined by key. The feature may additionally specify the scrobbleKey and unscrobbleKey attributes, which represent the endpoints which allow marking a piece of media played or unplayed.
rate: This feature implies the provider supports the endpoint which allows rating content.
playqueue: This feature implies the provider supports the play queue family of endpoints. The flavor attribute further specifies the subset; the only supported flavor is currently full.
playlist: This feature implies the provider supports the playlist family of endpoints. If readonly is set, that means that the provider only allows listing and playing playlists (via play queue API), not actually creating or editing them.
subscribe: This provider allows media subscriptions to be created. If the flavor is record then media can be recorded from this library (such as DVR). If the flavor is download then the user is allowed to download from this library.
promoted: This feature allows the provider to supply an endpoint that will return a collection of "promoted" hubs that many clients show on a user's home screen.
continuewatching: This feature allows the provider to supply an endpoint that will return a hub for merging into a global Continue Watching hub.
collection: This feature implies the provider supports the collection family of endpoints.
actions
imagetranscoder - This feature implies the provider supports the image transcoder endpoints used to scale images for clients where memory and processor is at a premium
queryParser - This feature implies the provider supports the media queries language below
grid - This feature implies the provider supports displaying metadata in a grid over time (such as live TV)
Shown in the example in /media/providers, in this media provider the first content directory is an item with only hubKey, meaning it only providers discovery hubs. This is the set of hubs covering the whole library which contains continue watching, recently added, recommendations, etc. It's essentially "landing page" for the provider.
The subsequent directories also have a browse key, which means they provide a list view of the content with options for filtering and sorting. EPG providers may have only the key and no hubKey.
There's no requirement to provide the content feature, given that there are two other ways to access content within a provider: search and match. The former can contribute to global search, whereas the latter is used for things like the DVR engine; once media subscriptions are set up, they look for matching content using the match feature, and examined using the metadata feature.
If you examine an app like Spotify, you'll see many of the concepts here apply to their content hierarchy. Their content screens are either grids or hubs. But one notable difference is that the content hierarchy runs a bit deeper than the examples we've examined thus far. For example, one of the top-level selections is "Genres & Moods". Diving into one of the genres leads to a discovery area with different hubs for popular playlists, artists, and albums from the genre. Selecting a mood leads to a grid with popular playlists for the mood. In order to support this sort of hierarchy, we need an extension to the regular library, which is a content directory. This allows us to nest content, without losing any of the power and features—for example, the grid with popular playlists could list filters and sorts specific for that grid. This is power you simply don't have with the old channel architecture.
This section examines extensions to plain libraries which content providers can use, and which clients need to be aware of.
Nested content directories: In regular libraries, there are fixed types of directories (e.g. shows, or music albums). In content providers, we want to have the ability to display other types of things (e.g. stations, or moods, or genres) as first-class things in a grid or discovery layout. Here's an example of what a nested content directory looks like. Given the type of content, the client knows that this directory should be treated like a content directory feature entry.
{
"Directory":[
{
"key":"foo",
"hubKey":"foo2",
"type":"content",
"aspectRatio":"1:1",
"title":"Genres and Moods"
}
]
}
Aspect ratio hint: Because the entities listed in content directories can be arbitrary, it's important to tell the client some information about how they should be displayed. The thumb attribute contains no information about aspect ratio, so clients make assumptions based upon known types (e.g. movies are 2:3, episode thumbs are 16:9, etc.). This attributes allows the provider to specify exactly the aspect ratio of the thing being displayed.
Media queries are a querystring-based filtering language used to select subsets of media. The language is rich, and can express complex expressions for media selection, as well as sorting and grouping.
Queries reference fields, which can be of a few types:
These fields are detailed in Field elements in the section description endpoint (e.g. /library/sections/X?includeDetails=1).
Given that media queries are expressible using querystrings, the operator syntax might look a bit quirky, because a) they have to include the = character, and b) characters to the left of the equal sign usually have to be URI encoded.
Operators are defined per type:
= (equals), != (not equals), >>= (greater than), <<= (less than), <= (less than or equals), >= (greater than or equals)=0 (false) and =1 (true)= (is) and != (is not)= (contains), != (does not contain), == (equals), !== (does not equal), <= (begins with), >= (ends with)= (equals), != (not equals), >>= (after), <<= (before)= (equals), != (not equals)For some types, values can be specified as relative. For dates, epoch seconds can be specified as relative to “now” as follows: +N (in N seconds from now and -N (N seconds ago).
In addition, the following unit suffixes can be used on date values:
For example, >>=-3y means “within the last 3 years”.
Some media is organized hierarchically (e.g. shows), and in those cases, many fields are common to different elements in the hierarchy (e.g. show title vs episode title). The following rules are used to resolve field references.
type parameter must be included to specify the result type.show.title or episode.year. A query may be comprised of multiple fields from different levels of the hierarchy.sourceType parameter may be used to change the default level to which fields refer. For example, type=4&sourceType=2&title==24 means “all episodes where the show title is 24”.The sort parameter is used to indicate an ordering on results. Typically, the sort value is a field (including optional scoping). The : character is used to indicate additional features of the sort, and the , character is used to include multiple fields to the sort.
For example, sort=title,index means “sort first by title ascending, then by index”. Sort features are:
Sort features may be mixed and matched, e.g. sort=title,index:desc.
The group parameter is used to group results by a field, similar to the SQL feature group by. For example, when listing popular tracks, we use the query type=10&sort=ratingCount:desc&group=title, because we don't want multiple tracks with the same name (e.g. same track on different albums) showing up.
The limit parameter is used to limit the number of results returned. Because it's implemented on top of the SQL limit operator, it currently only operates at the level of the type returned. In other words, type=10&limit=100 will return at most 100 tracks, but you can't select tracks from a limit of 10 albums.
Given the nature of querystrings, it makes a lot of sense to interpret the & character as a boolean AND operator. For example rating=10&index=5 means “rating is 10 AND index is 5”.
We leverage the , operator to signify the boolean OR operator. SO rating=1,2,3 means “rating is 1 OR 2 OR 3. Given standard precedence rules, rating=1,2,3&index=5 is parsed as (rating = 1 or rating = 2 or rating = 3) and index = 5).
There's only so many expressions you can form using vanilla querystring-to-boolean mapping (essentially, “ANDs of ORs”). In order to fully represent complex boolean expressions, there are a few synthetic additions:
As an example: push=1&index=1&or=1&rating=2&pop=1&duration=10 parses into (index = 1 OR rating = 2) AND duration = 10. This could not be expressed by the simplified syntax above.
Happy query building!
The universal transcode endpoint supports the following header or query string parameter: X-Plex-Client-Profile-Extra.
The value of this parameter is url-encoded. When url-decoded, it consists of a string expressed in the following (poor man's) BNF grammar:
<ProfileExtension> ::= <Directive> "+" <Directive>*
<Directive> :: = <Verb> <Arguments>
<Verb> ::= "add-direct-play-profile" | "add-limitation" | "add-transcode-target-codec" | "append-transcode-target-codec" | "add-transcode-target" | "add-settings"
<Arguments> ::= "(" (<Name> "=" <Value>) "&")*
<Name> ::= <Text>
<Value> ::= <Text>
This directive augments the set of Direct Play profiles in the client profile. The following parameters are required:
type = "videoProfile" | "musicProfile" | "photoProfile" | "subtitleProfile"container = * or a comma-separated list of containersvideoCodec = * or a comma-separated list of video codecsaudioCodec = * or a comma-separated list of audio codecssubtitleCodec = * or a comma-separated list of subtitle formats* means to use all existing matching values in the profile. At least one of the videoCodec, audioCodec and subtitleCodec parameters must not be *.
To add ac3 as a video audio codec for mp4 and mov containers:
add-direct-play-profile(type=videoProfile&container=mp4,mov&videoCodec=*&audioCodec=ac3&subtitleCodec=*)
This directive adds a scoped limitation to the profile. The following parameters are required:
scope = "videoContainer" | "musicContainer" | "photoContainer" | "videoCodec" | "videoAudioCodec" | "musicCodec" | "subtitleCodec" | "transcodeTarget"scopeName = the name of the relevant container or codectype = "match" | "notMatch" | "upperBound" | "lowerBound"name = the name of the limitationThe following parameters are optional:
isRequired = true|false (default is false)allStreams = true|false (default is false)replace = true|false (default is false)If the replace parameter is true, the limitation will replace any similarly scoped limitations (i.e. identical scope and scopeName. If false, the new limitation will simply add itself to the list of limitations.
Exactly one of the following three parameters is required:
value = the value of the limitationsubstring = the substring of the limitationregex = the regex of the limitationThe transcodeTarget scope exists to attach a limitation to a transcode target. This allows clients to tell the MDE to select a specific transcode target for a context/protocol pair, based on specific information about the media itself. When multiple transcode targets match, the first one in the profile will be selected.
To add a limitation on ac3 audio tracks in video media specifying a maximum of 6 channels:
add-limitation(scope=videoAudioCodec&scopeName=ac3&type=upperBound&name=audio.channels&value=6)
To add a limitation on ac3 audio tracks in video media specifying a maximum bitrate:
add-limitation(scope=videoAudioCodec&scopeName=ac3&type=upperBound&name=audio.bitrate&value=160)
To add a limitation on h264 video specifying a maximum level:
add-limitation(scope=videoCodec&scopeName=h264&type=upperBound&name=video.level&value=40&isRequired=true)
To add a limitation to a transcode target:
add-limitation(scope=transcodeTarget&scopeName=MyTranscodeProfile&type=upperBound&name=audio.channels&value=2)
This directive adds additional codecs to the beginning of the audioCodec and/or subtitleCodec lists for the specified transcode target. The following parameters are required:
type = "videoProfile" | "musicProfile" | "photoProfile" | "subtitleProfile"Either id or context and protocol are required:
id = a transcode target identifiercontext = a transcode context ("streaming" | "static")protocol = a protocol ("hls" | "http" | "slss" ... )At least one of the following parameters are also required:
videoCodec = a comma-separated list of videoCodecs, which are added to the set of video codecs on the target.audioCodec = a comma-separated list of audioCodecs, which are added to the set of audio codecs on the target.subtitleCodec = a comma-separated list of audioCodecs, which are added to the set of subtitle codecs on the target.To add ac3 as an additional transcode target option to a HTTP Live Streaming target:
add-transcode-target-codec(type=videoProfile&context=streaming&protocol=hls&audioCodec=ac3)
This directive appends additional codecs to the end of the audioCodec and/or subtitleCodec lists for the specified transcode target. The parameters are the same as for add-transcode-target-codec.
append-transcode-target-codec(type=videoProfile&context=streaming&protocol=hls&audioCodec=dca)
This directive adds a new transcode target. If a transcode target matching the type/context/profile already exists in the profile, then this directive is ignored. The following parameters are required:
type = "videoProfile" | "musicProfile" | "photoProfile" | "subtitleProfile"context = a transcode context ("streaming" | "static")protocol = a protocol ("hls" | "http" | "slss" ... )container = a containerThe following parameters are optional:
id = a transcode target identifierreplace = true|false (default is false)If the replace parameter is true, the transcode target will replace any similarly scoped transcode target (i.e. identical type, context and protocol. If false, the augmentation will fail if there is an existing transcode target.
The following parameters are required, depending on the type:
videoCodec = a video codec (required for video) or a comma-separated list of video codecsaudioCodec = an audio codec (required for music and video) or a comma-separated list of audio codecssubtitleCodec = an subtitle codec (required for subtitles and optional for video) or a comma-separated list of subtitle codecsadd-transcode-target(type=videoProfile&context=streaming&protocol=http&container=mkv&videoCodec=h264&audioCodec=aac,ac3&subtitleCodec=srt)
add-transcode-target(type=musicProfile&context=streaming&protocol=http&container=flac&audioCodec=flac)
add-transcode-target(type=subtitleProfile&context=all&protocol=http&container=webvtt&subtitleCodec=webvtt)
This directive overrides global settings for the profile. The parameters are name/value pairs matching existing client profile settings.
add-settings(DirectPlayStreamSelection=false&RandomAccessDataModel=limited)
Plex supports two authentication methods:
Plex now supports JSON Web Token (JWT) authentication that provides better security, shorter token lifespans, and improved protection against potential security breaches.
The new JWT system addresses security concerns by:
The new system uses a public-key authentication model where each device uploads a public key (JWK) and then requests short-lived JWT tokens. Here's the flow:
1. Device Key Registration First, your device needs to register its public key with Plex.tv:
POST https://clients.plex.tv/api/v2/auth/jwk
Headers:
X-Plex-Client-Identifier: your-device-identifier
X-Plex-Token: your-existing-token
Body:
{
"jwk": {
"kty": "OKP",
"crv": "Ed25519",
"x": "your-public-key-data",
"use": "sig",
"alg": "EdDSA"
}
}
2. Token Refresh Process Once registered, your device can refresh its token every 7 days using this three-step process:
Step 1: Get a Nonce
GET https://clients.plex.tv/api/v2/auth/nonce
Headers:
X-Plex-Client-Identifier: your-device-identifier
This returns a unique nonce valid for 5 minutes:
{
"nonce": "7c415b56-8f48-488a-98ab-847ef4460442"
}
Step 2: Create a Device JWT Your device creates a JWT containing:
plex.tvclient_identifierScope Details: The scope field in your device JWT should contain comma-separated values for the user data you need included in the JWT:
username - Access to the user's usernameemail - Access to the user's email addressfriendly_name - Access to the user's friendly namerestricted - Access to the user's restricted statusanonymous - Access to the user's anonymous statusjoinedAt - Access to the user's account creation timestampExample Device JWT Payload:
{
"nonce": "7c415b56-8f48-488a-98ab-847ef4460442",
"scope": "username,email,friendly_name",
"aud": "plex.tv",
"iss": "your-client-identifier",
"iat": 1705785603,
"exp": 1705789203
}
Step 3: Exchange for Plex Token
POST https://clients.plex.tv/api/v2/auth/token
Headers:
X-Plex-Client-Identifier: your-device-identifier
Body:
{
"jwt": "your-device-signed-jwt"
}
This returns a new Plex.tv JWT valid for 7 days:
{
"auth_token": "eyJraWQiOiJYeVRRN21seXFtVmhJcEo0U1pDZGltdXo3ZjdEYXU1Ym9MLXU2MG5JeEdJIiwidHlwIjoiSldUIiwiYWxnIjoiRWREU0EifQ..."
}
Using Your JWT Token
Once you have a JWT token, use it exactly like the old tokens in the X-Plex-Token header:
GET https://clients.plex.tv/api/v2/library/sections
Headers:
X-Plex-Token: your-jwt-token
Security Features:
Developer Experience:
X-Plex-Token header usageThe JWT system provides clear error responses with specific HTTP status codes:
For New Applications:
POST https://clients.plex.tv/api/v2/auth/jwkX-Plex-Token headerFor Existing Applications:
You're developing an app that needs access to a user's Plex account. To do this, you'll need to get access to the user's Access Token. This document details how to check whether an Access Token is valid, and how to obtain a new one.
id.id to obtain and store the user's Access Token.Choose a unique app name
The app name you choose will be visible in the user's Authorized Devices view. The name you choose should be different from any existing Plex products.
Generate a Client Identifier
The Client Identifier identifies the specific instance of your app. A random string or UUID is sufficient here. There are no hard requirements for Client Identifier length or format, but once one is generated the client should store and re-use this identifier for subsequent requests.
Verify stored Access Token validity
You can check whether a user's stored Access Token is valid by requesting user info from the plex.tv API and examining the HTTP status code of the response.
$ curl -X GET https://plex.tv/api/v2/user \
-H 'Accept: application/json' \
-H 'X-Plex-Product: My Cool App' \
-H 'X-Plex-Client-Identifier: <clientIdentifier>' \
-H 'X-Plex-Token: <userToken>'
| HTTP Status Code | |
|---|---|
200 |
Access Token is valid |
401 |
Access Token is invalid |
If an Access Token is invalid, it should be discarded, and new one should be obtained through the authentication process.
If plex.tv cannot be reached, or if you receive any other status code it indicates an error state, but does not indicate an invalid Access Token.
Generate a PIN
To sign a user in, the app must create a time-limited PIN. The user is then led through a process to "claim" the PIN, associating it with their account and granting the app access to the user's plex.tv account.
$ curl -X POST https://plex.tv/api/v2/pins?strong=true \
-H 'Accept: application/json' \
-H 'X-Plex-Product: My Cool App' \
-H 'X-Plex-Client-Identifier: <clientIdentifier>'
Note: the strong=true header provides a longer length pin which will have a longer lifetime. This is useful in cases where the user is not expected to type in the pin themselves. If not specified, a shorter pin is created but will have a much shorter lifetime.
The response will be a JSON payload; the two important properties are id and code. Store the id locally, and use the code to construct the Auth App url.
{
"id": 564964751,
"code": "8lzjqnq8lye02n52jq3fqxf8e",
…
}
Checking the PIN
There are two primary ways apps interact with the Auth App and the PIN-claiming process; Forwarding and Polling.
Forwarding is used by web-based apps. A user visits your app in their web browser, leaves your app to authenticate with Plex, and returns to your app via a forwardUrl your app provides.
Polling is used by native apps running outside of a web browser. A user indicates their intention to sign-in from within your app, and your app opens a web browser pointing to the Auth App where the user completes sign-in. Your app will periodically poll on the generated PIN until it is claimed, or it expires.
Construct the Auth App url
The user will authenticate with the plex.tv Auth App through their web browser.
If you're using the Forwarding flow, the user will be returned to your app after authenticating where you'll be able to check the created PIN to determine the user's Access Token. The forwardUrl to which the user will be returned can carry the PIN id which needs to be checked on their return to the app.
Auth App urls are encoded as parameters to the url fragment. Practically, this means that your Auth App url will be prefixed with https://app.plex.tv/auth#?; the #? at the end indicates the beginning of the url fragment, and that the content of the fragment afterwards is encoded as url parameter key-values pairs.
Append these parameters to construct the final URL.
| Parameter | |
|---|---|
clientID |
Your client identifier |
code |
The code from the generated PIN |
forwardUrl |
The url to which the user will be returned after authenticating. |
context%5Bdevice%5D%5Bproduct%5D |
The name of your App; ex "My Cool App" |
Example
https://app.plex.tv/auth#?clientID=<clientIdentifier>&code=<pinCode>&context%5Bdevice%5D%5Bproduct%5D=My%20Cool%20Plex%20App&forwardUrl=https%3A%2F%2Fmy-cool-plex-app.com
You can use the qs module to encode all necessary parameters, including the nested context parameter.
const authAppUrl =
'https://app.plex.tv/auth#?' +
require('qs').stringify({
clientID: '<clientIdentifier>',
code: '<pinCode>',
forwardUrl: 'https://my-cool-plex-app.com',
context: {
device: {
product: 'My Cool App',
},
},
});
Send user's browser to constructed Auth App url
Once the Auth App URL has been constructed, send the user's browser there to authenticate.
Check PIN
If you're using the Polling flow, your app should periodically (once per second) check the PIN id to determine when the user has signed-in.
If you're using the Forwarding flow, check the stored PIN id from the PIN creation step. If the PIN has been claimed, the authToken field in the response will contain the user's Access Token you need to make API calls on behalf of the user. If authentication failed, the authToken field will remain null.
$ curl -X GET 'https://plex.tv/api/v2/pins/<pinID>' \
-H 'Accept: application/json' \
-H 'X-Plex-Client-Identifier: <clientIdentifier>'
Once you have a token to talk to plex.tv, you will need to obtain a different set of tokens used to talk to PMS instances.
$ curl https://clients.plex.tv/api/v2/resources?includeHttps=1&includeRelay=1&includeIPv6=1 \
-H 'Accept: application/json' \
-H 'X-Plex-Product: My Cool App' \
-H 'X-Plex-Client-Identifier: <clientIdentifier>' \
-H 'X-Plex-Token: <userToken>'
The response will be a JSON document which will contain available PMS instances, the accessToken used in communication with this PMS, and the list of connection URLs where the PMS may be contacted. Connections labeled as local should be preferred over those that are not, and relay should only be used as a last resort as bandwidth on relay connections is limited.
{- "MediaContainer": {
- "size": 1,
- "allowCameraUpload": true,
- "allowChannelAccess": true,
- "allowMediaDeletion": true,
- "allowSharing": true,
- "allowSync": true,
- "allowTuners": true,
- "backgroundProcessing": true,
- "certificate": true,
- "companionProxy": true,
- "countryCode": "usa",
- "diagnostics": "logs,databases,streaminglogs",
- "eventStream": true,
- "friendlyName": "Server Name",
- "hubSearch": true,
- "itemClusters": true,
- "livetv": 7,
- "machineIdentifier": "c997cf82c4158cb986ccc0e8f829a6f5d5086a63",
- "mediaProviders": true,
- "multiuser": true,
- "musicAnalysis": 2,
- "myPlex": true,
- "myPlexMappingState": "mapped",
- "myPlexSigninState": "ok",
- "myPlexSubscription": true,
- "offlineTranscode": 1,
- "ownerFeatures"": "adaptive_bitrate,advanced-playback-settings,camera_upload,collections,content_filter,download_certificates,dvr,federated-auth,hardware_transcoding,home,hwtranscode,item_clusters,kevin-bacon,livetv,loudness,lyrics,music-analysis,music_videos,pass,photosV6-edit,photosV6-tv-albums,premium_music_metadata,radio,session_bandwidth_restrictions,session_kick,shared-radio,sync,trailers,tuner-sharing,type-first,ump-matching-pref,unsupportedtuners,webhooks",
- "platform": "MacOSX",
- "platformVersion": "14.4.1",
- "pluginHost": true,
- "pushNotifications": false,
- "readOnlyLibraries": false,
- "streamingBrainABRVersion": 3,
- "streamingBrainVersion": 2,
- "sync": true,
- "transcoderActiveVideoSessions": 0,
- "transcoderAudio": true,
- "transcoderLyrics": true,
- "transcoderPhoto": true,
- "transcoderSubtitles": true,
- "transcoderVideo": true,
- "transcoderVideoBitrates": "64,96,208,320,720,1500,2000,3000,4000,8000,10000,12000,20000",
- "transcoderVideoQualities": "0,1,2,3,4,5,6,7,8,9,10,11,12",
- "transcoderVideoResolutions": "128,128,160,240,320,480,768,720,720,1080,1080,1080,1080",
- "updatedAt": 1714653009,
- "updater": true,
- "version": "1.40.2.8395-c67dce28e",
- "voiceSearch": true,
- "Directory": [
- {
- "count": 1,
- "key": "key",
- "title": "title"
}
]
}
}If a caller requires connection details and a transient token for a source that is known to the server, for example a cloud media provider or shared PMS, then this endpoint can be called. This endpoint is only accessible with either an admin token or a valid transient token generated from an admin token.
| source required | string The source identifier with an included prefix. |
| refresh | integer Enum: 0 1 Force refresh |
An example of a resource for a remote server
{- "MediaContainer": {
- "size": 1,
- "Device": {
- "name": "PlexCorp (plex-corp)",
- "clientIdentifier": "243b471948ace337a8f92f129ec97d1902fcb1df",
- "accessToken": "transient-fa75f159-b9d2-42b6-8fbd-1761c7a4195a",
- "Connection": [
- {
- "protocol": "https",
- "address": "10.0.2.123",
- "port": 32400,
- "local": true
}, - {
- "protocol": "https",
- "address": "64.71.188.222",
- "port": 32403,
- "local": false
}, - {
- "protocol": "https",
- "address": "139.162.158.105",
- "port": 8443,
- "local": false,
- "relay": true
}
]
}
}
}This endpoint provides the caller with a temporary token with the same access level as the caller's token. These tokens are valid for up to 48 hours and are destroyed if the server instance is restarted. Note: This endpoint responds to all HTTP verbs but POST in preferred
| type required | string Value: "delegation" The value |
| scope required | string Value: "all" The value |
An example of a transient token
{- "MediaContainer": {
- "size": 0,
- "token": "transient-90904684-f91a-4391-8bf7-e0dfa7240285"
}
}Library endpoints which are outside of the Media Provider API. Typically this is manipulation of the library (adding/removing sections, modifying preferences, etc).
Request all metadata items according to a query.
| mediaQuery | object Examples:
This is a complex query built of several parameters. See API Info section for information on building media queries |
{- "MediaContainer": {
- "size": "1",
- "allowSync": true,
- "art": "/:/resources/movie-fanart.jpg",
- "identifier": "com.plexapp.plugins.library",
- "librarySectionID": 26,
- "librarySectionTitle": "Movies",
- "librarySectionUUID": "70cb5089-b165-429b-809a-9e0a31493abf",
- "mediaTagPrefix": "/system/bundle/media/flags/",
- "mediaTagVersion": "1436742334",
- "thumb": "/:/resources/movie.png",
- "title1": "Movies",
- "title2": "All Movies",
- "viewGroup": "movie",
- "Metadata": [
- {
- "id": "1049",
- "ratingKey": "1049",
- "key": "/library/metadata/1049",
- "studio": "Paramount Pictures",
- "type": "movie",
- "title": "Zoolander",
- "contentRating": "PG-13",
- "summary": "FunnyStuff",
- "year": 2001,
- "tagline": "3% Body Fat. 1% Brain Activity.",
- "thumb": "/library/metadata/1049/thumb/1434341184",
- "art": "/library/metadata/1049/art/1434341184",
- "duration": 5129000,
- "originallyAvailableAt": "2001-09-27",
- "addedAt": 1408525217,
- "updatedAt": 1434341184,
- "chapterSource": "media",
- "primaryExtraKey": "/library/metadata/1073",
- "rating": 6,
- "Media": [
- {
- "id": 827,
- "duration": 5129000,
- "bitrate": 6564,
- "width": 720,
- "height": 576,
- "aspectRatio": 1.78,
- "audioChannels": 6,
- "audioCodec": "ac3",
- "videoCodec": "mpeg2video",
- "container": "mkv",
- "videoFrameRate": "PAL",
- "Part": [
- {
- "id": "827",
- "key": "/library/parts/827/file.mkv",
- "duration": 5129000,
- "file": "O:\\fatboy\\Media\\Ripped\\Movies\\Zoolander (2001).mkv",
- "size": 4208219125,
- "container": "mkv"
}
]
}
], - "Image": [
- {
- "type": "coverPoster",
- "alt": "Zoolander",
- "url": "/library/metadata/1049/thumb/1434341184"
}
], - "Genre": [
- {
- "tag": "Comedy"
}
], - "Writer": [
- {
- "tag": "Drake Sather"
}, - {
- "tag": "Ben Stiller"
}
], - "Director": [
- {
- "tag": "Ben Stiller"
}
], - "Country": [
- {
- "tag": "Australia"
}, - {
- "tag": "Germany"
}
], - "Role": [
- {
- "tag": "Ben Stiller"
}, - {
- "tag": "Owen Wilson"
}, - {
- "tag": "Christine Taylor"
}
]
}
]
}
}This endpoint takes a file path specified in the url parameter, matches it using the scanner's match mechanism, downloads rich metadata, and then ingests the item as a transient item (without a library section). In the case where the file represents an episode, the entire tree (show, season, and episode) is added as transient items. At this time, movies and episodes are the only supported types, which are gleaned automatically from the file path.
Note that any of the parameters passed to the metadata details endpoint (e.g. includeExtras=1) work here.
| url | string <url> Example: url=file:///storage%2Femulated%2F0%2FArcher-S01E01.mkv The file of the file to ingest. |
| virtualFilePath | string Example: virtualFilePath=/Avatar.mkv A virtual path to use when the url is opaque. |
| computeHashes | integer Enum: 0 1 Example: computeHashes=1 Whether or not to compute Plex and OpenSubtitle hashes for the file. Defaults to 0. |
| ingestNonMatches | integer Enum: 0 1 Example: ingestNonMatches=1 Whether or not non matching media should be stored. Defaults to 0. |
{- "MediaContainer": {
- "size": 1,
- "Metadata": [ ]
}
}The matches endpoint is used to match content external to the library with content inside the library. This is done by passing a series of semantic "hints" about the content (its type, name, or release year). Each type (e.g. movie) has a canonical set of minimal required hints.
This ability to match content is useful in a variety of scenarios. For example, in the DVR, the EPG uses the endpoint to match recording rules against airing content. And in the cloud, the UMP uses the endpoint to match up a piece of media with rich metadata.
The endpoint response can including multiple matches, if there is ambiguity, each one containing a score from 0 to 100. For somewhat historical reasons, anything over 85 is considered a positive match (we prefer false negatives over false positives in general for matching).
The guid hint is somewhat special, in that it generally represents a unique identity for a piece of media (e.g. the IMDB ttXXX) identifier, in contrast with other hints which can be much more ambiguous (e.g. a title of Jane Eyre, which could refer to the 1943 or the 2011 version).
Episodes require either a season/episode pair, or an air date (or both). Either the path must be sent, or the show title
| type required | integer The metadata type to match against |
| includeFullMetadata | integer Enum: 0 1 Whether or not to include full metadata on a positive match. When set, and the best match exceeds a score threshold of 85, metadata as rich as possible is sent back. |
| includeAncestorMetadata | integer Enum: 0 1 Whether or not to include metadata for the item's ancestor (e.g. show and season data for an episode). |
| includeAlternateMetadataSources | integer Enum: 0 1 Whether or not to return all sources for each metadata field, which results in a different structure being passed back. |
| guid | string Used for movies, shows, artists, albums, and tracks. Allowed for various URI schemes, to be defined. |
| title | string Used for movies, shows, artists, and albums. Required if |
| year | integer Used for movies shows, and albums. Optional. |
| path | string Used for movies, episodes, and tracks. The full path to the media file, used for "cloud-scanning" an item. |
| grandparentTitle | string Used for episodes and tracks. The title of the show/artist. Required if |
| grandparentYear | integer Used for episodes. The year of the show. |
| parentIndex | integer Used for episodes and tracks. The season/album number. |
| index | integer Used for episodes and tracks. The episode/tracks number in the season/album. |
| originallyAvailableAt | string Used for episodes. In the format |
| parentTitle | string Used for albums and tracks. The artist name for albums or the album name for tracks. |
{- "MediaContainer": {
- "size": 1,
- "Metadata": [
- {
- "score": 100,
- "ratingKey": "667573",
- "key": "/library/metadata/667573",
- "studio": "Shamley Productions",
- "type": "movie",
- "title": "Psycho"
}
]
}
}Get a single chapter image for a piece of media
| mediaId required | integer The id of the media item |
| chapter required | integer The index of the chapter |
<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>
Delete a single metadata item from the library, deleting media as well
| ids required | string |
| proxy | integer Enum: 0 1 Whether proxy items, such as media optimized versions, should also be deleted. Defaults to false. |
Get the leaves for a metadata item such as the episodes in a show
| ids required | string |
{- "MediaContainer": {
- "size": "1",
- "allowSync": true,
- "art": "/:/resources/movie-fanart.jpg",
- "identifier": "com.plexapp.plugins.library",
- "librarySectionID": 26,
- "librarySectionTitle": "Movies",
- "librarySectionUUID": "70cb5089-b165-429b-809a-9e0a31493abf",
- "mediaTagPrefix": "/system/bundle/media/flags/",
- "mediaTagVersion": "1436742334",
- "thumb": "/:/resources/movie.png",
- "title1": "Movies",
- "title2": "All Movies",
- "viewGroup": "movie",
- "Metadata": [
- {
- "id": "1049",
- "ratingKey": "1049",
- "key": "/library/metadata/1049",
- "studio": "Paramount Pictures",
- "type": "movie",
- "title": "Zoolander",
- "contentRating": "PG-13",
- "summary": "FunnyStuff",
- "year": 2001,
- "tagline": "3% Body Fat. 1% Brain Activity.",
- "thumb": "/library/metadata/1049/thumb/1434341184",
- "art": "/library/metadata/1049/art/1434341184",
- "duration": 5129000,
- "originallyAvailableAt": "2001-09-27",
- "addedAt": 1408525217,
- "updatedAt": 1434341184,
- "chapterSource": "media",
- "primaryExtraKey": "/library/metadata/1073",
- "rating": 6,
- "Media": [
- {
- "id": 827,
- "duration": 5129000,
- "bitrate": 6564,
- "width": 720,
- "height": 576,
- "aspectRatio": 1.78,
- "audioChannels": 6,
- "audioCodec": "ac3",
- "videoCodec": "mpeg2video",
- "container": "mkv",
- "videoFrameRate": "PAL",
- "Part": [
- {
- "id": "827",
- "key": "/library/parts/827/file.mkv",
- "duration": 5129000,
- "file": "O:\\fatboy\\Media\\Ripped\\Movies\\Zoolander (2001).mkv",
- "size": 4208219125,
- "container": "mkv"
}
]
}
], - "Image": [
- {
- "type": "coverPoster",
- "alt": "Zoolander",
- "url": "/library/metadata/1049/thumb/1434341184"
}
], - "Genre": [
- {
- "tag": "Comedy"
}
], - "Writer": [
- {
- "tag": "Drake Sather"
}, - {
- "tag": "Ben Stiller"
}
], - "Director": [
- {
- "tag": "Ben Stiller"
}
], - "Country": [
- {
- "tag": "Australia"
}, - {
- "tag": "Germany"
}
], - "Role": [
- {
- "tag": "Ben Stiller"
}, - {
- "tag": "Owen Wilson"
}, - {
- "tag": "Christine Taylor"
}
]
}
]
}
}Get the extras for a metadata item
| ids required | string |
{- "MediaContainer": {
- "size": "1",
- "allowSync": true,
- "art": "/:/resources/movie-fanart.jpg",
- "identifier": "com.plexapp.plugins.library",
- "librarySectionID": 26,
- "librarySectionTitle": "Movies",
- "librarySectionUUID": "70cb5089-b165-429b-809a-9e0a31493abf",
- "mediaTagPrefix": "/system/bundle/media/flags/",
- "mediaTagVersion": "1436742334",
- "thumb": "/:/resources/movie.png",
- "title1": "Movies",
- "title2": "All Movies",
- "viewGroup": "movie",
- "Metadata": [
- {
- "id": "1049",
- "ratingKey": "1049",
- "key": "/library/metadata/1049",
- "studio": "Paramount Pictures",
- "type": "movie",
- "title": "Zoolander",
- "contentRating": "PG-13",
- "summary": "FunnyStuff",
- "year": 2001,
- "tagline": "3% Body Fat. 1% Brain Activity.",
- "thumb": "/library/metadata/1049/thumb/1434341184",
- "art": "/library/metadata/1049/art/1434341184",
- "duration": 5129000,
- "originallyAvailableAt": "2001-09-27",
- "addedAt": 1408525217,
- "updatedAt": 1434341184,
- "chapterSource": "media",
- "primaryExtraKey": "/library/metadata/1073",
- "rating": 6,
- "Media": [
- {
- "id": 827,
- "duration": 5129000,
- "bitrate": 6564,
- "width": 720,
- "height": 576,
- "aspectRatio": 1.78,
- "audioChannels": 6,
- "audioCodec": "ac3",
- "videoCodec": "mpeg2video",
- "container": "mkv",
- "videoFrameRate": "PAL",
- "Part": [
- {
- "id": "827",
- "key": "/library/parts/827/file.mkv",
- "duration": 5129000,
- "file": "O:\\fatboy\\Media\\Ripped\\Movies\\Zoolander (2001).mkv",
- "size": 4208219125,
- "container": "mkv"
}
]
}
], - "Image": [
- {
- "type": "coverPoster",
- "alt": "Zoolander",
- "url": "/library/metadata/1049/thumb/1434341184"
}
], - "Genre": [
- {
- "tag": "Comedy"
}
], - "Writer": [
- {
- "tag": "Drake Sather"
}, - {
- "tag": "Ben Stiller"
}
], - "Director": [
- {
- "tag": "Ben Stiller"
}
], - "Country": [
- {
- "tag": "Australia"
}, - {
- "tag": "Germany"
}
], - "Role": [
- {
- "tag": "Ben Stiller"
}, - {
- "tag": "Owen Wilson"
}, - {
- "tag": "Christine Taylor"
}
]
}
]
}
}Add an extra to a metadata item
| ids required | string |
| extraType | integer The metadata type of the extra |
| url required | string The URL of the extra |
| title required | string The title of the extra |
Get a bundle file for a metadata or media item. This is either an image or a mp3 (for a show's theme)
| ids required | string |
| url | string The bundle url, typically starting with |
Start the detection of intros in a metadata item
| ids required | string |
| force | integer Enum: 0 1 Indicate whether detection should be re-run |
| threshold | number The threshold for determining if content is an intro or not |
Create a marker for this user on the metadata item
| ids required | string |
| type required | integer The type of marker to edit/create |
| startTimeOffset required | integer The start time of the marker |
| endTimeOffset | integer The end time of the marker |
| attributes | object Example: attributes[title]=My favorite spot The attributes to assign to this marker |
{- "MediaContainer": {
- "size": 1,
- "Marker": [
- {
- "final": true,
- "id": 1025,
- "type": "credits",
- "startTimeOffset": 8249805,
- "endTimeOffset": 8715339
}
]
}
}Edit a marker for this user on the metadata item
| ids required | string |
| marker required | string The id of the marker to edit |
| type required | integer The type of marker to edit/create |
| startTimeOffset required | integer The start time of the marker |
| endTimeOffset | integer The end time of the marker |
| attributes | object Example: attributes[title]=My favorite spot The attributes to assign to this marker |
{- "MediaContainer": {
- "size": 1,
- "Marker": [
- {
- "final": true,
- "id": 1025,
- "type": "credits",
- "startTimeOffset": 8249805,
- "endTimeOffset": 8715339
}
]
}
}Get the list of metadata matches for a metadata item
| ids required | string |
| title | string |
| parentTitle | string |
| agent | string |
| language | string |
| year | integer |
| manual | integer Enum: 0 1 |
{- "MediaContainer": {
- "size": "1",
- "allowSync": true,
- "art": "/:/resources/movie-fanart.jpg",
- "identifier": "com.plexapp.plugins.library",
- "librarySectionID": 26,
- "librarySectionTitle": "Movies",
- "librarySectionUUID": "70cb5089-b165-429b-809a-9e0a31493abf",
- "mediaTagPrefix": "/system/bundle/media/flags/",
- "mediaTagVersion": "1436742334",
- "thumb": "/:/resources/movie.png",
- "title1": "Movies",
- "title2": "All Movies",
- "viewGroup": "movie",
- "Metadata": [
- {
- "id": "1049",
- "ratingKey": "1049",
- "key": "/library/metadata/1049",
- "studio": "Paramount Pictures",
- "type": "movie",
- "title": "Zoolander",
- "contentRating": "PG-13",
- "summary": "FunnyStuff",
- "year": 2001,
- "tagline": "3% Body Fat. 1% Brain Activity.",
- "thumb": "/library/metadata/1049/thumb/1434341184",
- "art": "/library/metadata/1049/art/1434341184",
- "duration": 5129000,
- "originallyAvailableAt": "2001-09-27",
- "addedAt": 1408525217,
- "updatedAt": 1434341184,
- "chapterSource": "media",
- "primaryExtraKey": "/library/metadata/1073",
- "rating": 6,
- "Media": [
- {
- "id": 827,
- "duration": 5129000,
- "bitrate": 6564,
- "width": 720,
- "height": 576,
- "aspectRatio": 1.78,
- "audioChannels": 6,
- "audioCodec": "ac3",
- "videoCodec": "mpeg2video",
- "container": "mkv",
- "videoFrameRate": "PAL",
- "Part": [
- {
- "id": "827",
- "key": "/library/parts/827/file.mkv",
- "duration": 5129000,
- "file": "O:\\fatboy\\Media\\Ripped\\Movies\\Zoolander (2001).mkv",
- "size": 4208219125,
- "container": "mkv"
}
]
}
], - "Image": [
- {
- "type": "coverPoster",
- "alt": "Zoolander",
- "url": "/library/metadata/1049/thumb/1434341184"
}
], - "Genre": [
- {
- "tag": "Comedy"
}
], - "Writer": [
- {
- "tag": "Drake Sather"
}, - {
- "tag": "Ben Stiller"
}
], - "Director": [
- {
- "tag": "Ben Stiller"
}
], - "Country": [
- {
- "tag": "Australia"
}, - {
- "tag": "Germany"
}
], - "Role": [
- {
- "tag": "Ben Stiller"
}, - {
- "tag": "Owen Wilson"
}, - {
- "tag": "Christine Taylor"
}
]
}
]
}
}Delete a single media from a metadata item in the library
| ids required | string |
| mediaItem required | string |
| proxy | integer Enum: 0 1 Whether proxy items, such as media optimized versions, should also be deleted. Defaults to false. |
Get the nearest tracks, sonically, to the provided track
| ids required | string |
| excludeParentID | integer |
| excludeGrandparentID | integer |
| limit | integer |
| maxDistance | number |
{- "MediaContainer": {
- "size": "1",
- "allowSync": true,
- "art": "/:/resources/movie-fanart.jpg",
- "identifier": "com.plexapp.plugins.library",
- "librarySectionID": 26,
- "librarySectionTitle": "Movies",
- "librarySectionUUID": "70cb5089-b165-429b-809a-9e0a31493abf",
- "mediaTagPrefix": "/system/bundle/media/flags/",
- "mediaTagVersion": "1436742334",
- "thumb": "/:/resources/movie.png",
- "title1": "Movies",
- "title2": "All Movies",
- "viewGroup": "movie",
- "Metadata": [
- {
- "id": "1049",
- "ratingKey": "1049",
- "key": "/library/metadata/1049",
- "studio": "Paramount Pictures",
- "type": "movie",
- "title": "Zoolander",
- "contentRating": "PG-13",
- "summary": "FunnyStuff",
- "year": 2001,
- "tagline": "3% Body Fat. 1% Brain Activity.",
- "thumb": "/library/metadata/1049/thumb/1434341184",
- "art": "/library/metadata/1049/art/1434341184",
- "duration": 5129000,
- "originallyAvailableAt": "2001-09-27",
- "addedAt": 1408525217,
- "updatedAt": 1434341184,
- "chapterSource": "media",
- "primaryExtraKey": "/library/metadata/1073",
- "rating": 6,
- "Media": [
- {
- "id": 827,
- "duration": 5129000,
- "bitrate": 6564,
- "width": 720,
- "height": 576,
- "aspectRatio": 1.78,
- "audioChannels": 6,
- "audioCodec": "ac3",
- "videoCodec": "mpeg2video",
- "container": "mkv",
- "videoFrameRate": "PAL",
- "Part": [
- {
- "id": "827",
- "key": "/library/parts/827/file.mkv",
- "duration": 5129000,
- "file": "O:\\fatboy\\Media\\Ripped\\Movies\\Zoolander (2001).mkv",
- "size": 4208219125,
- "container": "mkv"
}
]
}
], - "Image": [
- {
- "type": "coverPoster",
- "alt": "Zoolander",
- "url": "/library/metadata/1049/thumb/1434341184"
}
], - "Genre": [
- {
- "tag": "Comedy"
}
], - "Writer": [
- {
- "tag": "Drake Sather"
}, - {
- "tag": "Ben Stiller"
}
], - "Director": [
- {
- "tag": "Ben Stiller"
}
], - "Country": [
- {
- "tag": "Australia"
}, - {
- "tag": "Germany"
}
], - "Role": [
- {
- "tag": "Ben Stiller"
}, - {
- "tag": "Owen Wilson"
}, - {
- "tag": "Christine Taylor"
}
]
}
]
}
}Get a hub of related items to a metadata item
| ids required | string |
{- "MediaContainer": {
- "size": 1,
- "Hub": [
- {
- "context": "hub.home.onDeck",
- "hubIdentifier": "home.onDeck",
- "key": "/hubs/sections/home/onDeck",
- "more": true,
- "size": 1,
- "subtype": "podcast",
- "title": "On Deck",
- "totalSize": 8,
- "type": "track"
}
]
}
}Get a list of similar items to a metadata item
| ids required | string |
| count | integer The maximum number of similar items; defaults to 200 |
{- "MediaContainer": {
- "size": "1",
- "allowSync": true,
- "art": "/:/resources/movie-fanart.jpg",
- "identifier": "com.plexapp.plugins.library",
- "librarySectionID": 26,
- "librarySectionTitle": "Movies",
- "librarySectionUUID": "70cb5089-b165-429b-809a-9e0a31493abf",
- "mediaTagPrefix": "/system/bundle/media/flags/",
- "mediaTagVersion": "1436742334",
- "thumb": "/:/resources/movie.png",
- "title1": "Movies",
- "title2": "All Movies",
- "viewGroup": "movie",
- "Metadata": [
- {
- "id": "1049",
- "ratingKey": "1049",
- "key": "/library/metadata/1049",
- "studio": "Paramount Pictures",
- "type": "movie",
- "title": "Zoolander",
- "contentRating": "PG-13",
- "summary": "FunnyStuff",
- "year": 2001,
- "tagline": "3% Body Fat. 1% Brain Activity.",
- "thumb": "/library/metadata/1049/thumb/1434341184",
- "art": "/library/metadata/1049/art/1434341184",
- "duration": 5129000,
- "originallyAvailableAt": "2001-09-27",
- "addedAt": 1408525217,
- "updatedAt": 1434341184,
- "chapterSource": "media",
- "primaryExtraKey": "/library/metadata/1073",
- "rating": 6,
- "Media": [
- {
- "id": 827,
- "duration": 5129000,
- "bitrate": 6564,
- "width": 720,
- "height": 576,
- "aspectRatio": 1.78,
- "audioChannels": 6,
- "audioCodec": "ac3",
- "videoCodec": "mpeg2video",
- "container": "mkv",
- "videoFrameRate": "PAL",
- "Part": [
- {
- "id": "827",
- "key": "/library/parts/827/file.mkv",
- "duration": 5129000,
- "file": "O:\\fatboy\\Media\\Ripped\\Movies\\Zoolander (2001).mkv",
- "size": 4208219125,
- "container": "mkv"
}
]
}
], - "Image": [
- {
- "type": "coverPoster",
- "alt": "Zoolander",
- "url": "/library/metadata/1049/thumb/1434341184"
}
], - "Genre": [
- {
- "tag": "Comedy"
}
], - "Writer": [
- {
- "tag": "Drake Sather"
}, - {
- "tag": "Ben Stiller"
}
], - "Director": [
- {
- "tag": "Ben Stiller"
}
], - "Country": [
- {
- "tag": "Australia"
}, - {
- "tag": "Germany"
}
], - "Role": [
- {
- "tag": "Ben Stiller"
}, - {
- "tag": "Owen Wilson"
}, - {
- "tag": "Christine Taylor"
}
]
}
]
}
}Add a subtitle to a metadata item
| ids required | string |
| title | string |
| language | string |
| mediaItemID | integer |
| url | string The URL of the subtitle. If not provided, the contents of the subtitle must be in the post body |
| format | string |
| forced | integer Enum: 0 1 |
| hearingImpaired | integer Enum: 0 1 |
Get a tree of metadata items, such as the seasons/episodes of a show
| ids required | string |
{- "MediaContainer": {
- "size": 1,
- "identifier": "com.plexapp.plugins.library",
- "mediaTagPrefix": "/system/bundle/media/flags/",
- "mediaTagVersion": 1680272530,
- "MetadataItem": [
- {
- "id": 148,
- "title": "Babylon 5",
- "guid": "plex://show/5d9c087202391c001f58a287",
- "parentTitle": "",
- "instanceRatingKey": "",
- "index": 1,
- "originallyAvailableAt": "1993-02-22",
- "addedAt": 1348349390,
- "refreshedAt": 1733670142,
- "MetadataItem": [
- {
- "id": 155,
- "title": "",
- "guid": "plex://season/602e691966dfdb002c0a4fe8",
- "parentTitle": "",
- "instanceRatingKey": "",
- "index": 0,
- "originallyAvailableAt": "",
- "addedAt": 1535655413,
- "refreshedAt": 1681173733,
- "MetadataItem": [
- {
- "id": 156,
- "title": "The Gathering",
- "guid": "plex://episode/5de84fff473b6d001f36c4ff",
- "parentTitle": "",
- "instanceRatingKey": "",
- "index": 1,
- "originallyAvailableAt": "1993-02-22",
- "addedAt": 1535655413,
- "refreshedAt": 1731766766,
- "MediaItem": [
- {
- "id": 380,
- "MediaPart": [
- {
- "metadataType": 4,
- "id": 868,
- "file": "/Volumes/Media/TV Shows/Babylon 5/Specials/Babylon 5 S00E01 The Gathering.mkv",
- "size": 4034073857,
- "openSubtitleHash": "65f52aa3bd4025d4",
- "hash": "47da8a62adf441b14a925e779766adb6680e96da",
- "duration": 5682009,
- "MediaStream": [
- {
- "id": 2000,
- "index": 0,
- "type": 1,
- "codec": "mpeg2video",
- "language": "en",
- "anamorphic": "1",
- "bitDepth": "8",
- "chromaLocation": "left",
- "chromaSubsampling": "4:2:0",
- "codedHeight": "480",
- "codedWidth": "720",
- "colorRange": "tv",
- "frameRate": "29.970",
- "height": "480",
- "level": "8",
- "pixelAspectRatio": "8:9",
- "profile": "main",
- "refFrames": "1",
- "requiredBandwidths": "6015,5740,5448,5276,5256,5256,5256,5256",
- "scanType": "interlaced",
- "width": "720"
}, - {
- "id": 2001,
- "index": 1,
- "type": 2,
- "channels": 6,
- "codec": "ac3",
- "language": "en",
- "audioChannelLayout": "5.1(side)",
- "requiredBandwidths": "448,448,448,448,448,448,448,448",
- "samplingRate": "48000",
- "title": "Surround 5.1"
}
]
}
]
}, - {
- "id": 157,
- "title": "In the Beginning",
- "guid": "plex://episode/5d9c13597b5c2e001e6d14d8",
- "parentTitle": "",
- "instanceRatingKey": "",
- "index": 2,
- "originallyAvailableAt": "1998-01-04",
- "addedAt": 1535655814,
- "refreshedAt": 1731766766,
- "MediaItem": [
- {
- "id": 381,
- "MediaPart": [
- {
- "metadataType": 4,
- "id": 869,
- "file": "/Volumes/Media/TV Shows/Babylon 5/Specials/Babylon 5 S00E02 In the Beginning.mkv",
- "size": 4018284691,
- "openSubtitleHash": "adb464543eaec254",
- "hash": "dca84a0062e4bab47380a8409e3175b72f0e8b86",
- "duration": 5657652,
- "MediaStream": [
- {
- "id": 2002,
- "index": 0,
- "type": 1,
- "codec": "mpeg2video",
- "language": "en",
- "anamorphic": "1",
- "bitDepth": "8",
- "chromaLocation": "left",
- "chromaSubsampling": "4:2:0",
- "codedHeight": "480",
- "codedWidth": "720",
- "colorRange": "tv",
- "frameRate": "29.970",
- "height": "480",
- "level": "8",
- "pixelAspectRatio": "853:720",
- "profile": "main",
- "refFrames": "1",
- "requiredBandwidths": "6086,5901,5671,5671,5671,5671,5671,5671",
- "scanType": "interlaced",
- "width": "720"
}, - {
- "id": 2003,
- "index": 1,
- "type": 2,
- "channels": 6,
- "codec": "ac3",
- "language": "en",
- "audioChannelLayout": "5.1(side)",
- "requiredBandwidths": "448,448,448,448,448,448,448,448",
- "samplingRate": "48000",
- "title": "Surround 5.1"
}
]
}
]
}
]
}
]
}
]
}, - {
- "id": 149,
- "title": "",
- "guid": "plex://season/602e691b66dfdb002c0a5034",
- "parentTitle": "",
- "instanceRatingKey": "",
- "index": 4,
- "originallyAvailableAt": "",
- "addedAt": 1348349390,
- "refreshedAt": 1681173733,
- "MetadataItem": [
- {
- "id": 150,
- "title": "The Illusion of Truth",
- "guid": "plex://episode/5d9c1359e264b7001fcb529c",
- "parentTitle": "",
- "instanceRatingKey": "",
- "index": 8,
- "originallyAvailableAt": "1997-02-17",
- "addedAt": 1348349390,
- "refreshedAt": 1731766766,
- "MediaItem": [
- {
- "id": 376,
- "MediaPart": [
- {
- "metadataType": 4,
- "id": 872,
- "file": "/Volumes/Media/TV Shows/Babylon 5/Season 4/Babylon 5 S04E08 The Illusion of Truth.mkv",
- "size": 1883816967,
- "openSubtitleHash": "c39a45711f9b45ce",
- "hash": "db2c2d744655454a9c714daa1f22311e3933a204",
- "duration": 2625089,
- "MediaStream": [
- {
- "id": 2008,
- "index": 0,
- "type": 1,
- "codec": "mpeg2video",
- "language": "en",
- "anamorphic": "1",
- "bitDepth": "8",
- "chromaLocation": "left",
- "chromaSubsampling": "4:2:0",
- "codedHeight": "480",
- "codedWidth": "720",
- "colorRange": "tv",
- "frameRate": "29.970",
- "height": "480",
- "level": "8",
- "pixelAspectRatio": "853:720",
- "profile": "main",
- "refFrames": "1",
- "requiredBandwidths": "6499,6124,5357,5357,5357,5357,5357,5357",
- "scanType": "interlaced",
- "width": "720"
}, - {
- "id": 2009,
- "index": 1,
- "type": 2,
- "channels": 6,
- "codec": "ac3",
- "language": "en",
- "audioChannelLayout": "5.1(side)",
- "requiredBandwidths": "448,448,448,448,448,448,448,448",
- "samplingRate": "48000",
- "title": "3/2+1"
}
]
}
]
}
]
}, - {
- "id": 151,
- "title": "No Surrender, No Retreat",
- "guid": "plex://episode/5d9c1359e264b7001fcb5296",
- "parentTitle": "",
- "instanceRatingKey": "",
- "index": 15,
- "originallyAvailableAt": "1997-05-26",
- "addedAt": 1348349511,
- "refreshedAt": 1731766766,
- "MediaItem": [
- {
- "id": 377,
- "MediaPart": [
- {
- "metadataType": 4,
- "id": 873,
- "file": "/Volumes/Media/TV Shows/Babylon 5/Season 4/Babylon 5 S04E15 No Surrender, No Retreat.mkv",
- "size": 1906783890,
- "openSubtitleHash": "f218ae96150b8943",
- "hash": "6ac941e62a1d39c09ff5fd1ee7bd9c6b517ad55c",
- "duration": 2657021,
- "MediaStream": [
- {
- "id": 2010,
- "index": 0,
- "type": 1,
- "codec": "mpeg2video",
- "language": "en",
- "anamorphic": "1",
- "bitDepth": "8",
- "chromaLocation": "left",
- "chromaSubsampling": "4:2:0",
- "codedHeight": "480",
- "codedWidth": "720",
- "colorRange": "tv",
- "frameRate": "29.970",
- "height": "480",
- "level": "8",
- "pixelAspectRatio": "853:720",
- "profile": "main",
- "refFrames": "1",
- "requiredBandwidths": "5716,5481,5481,5481,5481,5481,5481,5481",
- "scanType": "interlaced",
- "width": "720"
}, - {
- "id": 2011,
- "index": 1,
- "type": 2,
- "channels": 6,
- "codec": "ac3",
- "language": "en",
- "audioChannelLayout": "5.1(side)",
- "requiredBandwidths": "448,448,448,448,448,448,448,448",
- "samplingRate": "48000",
- "title": "3/2+1"
}
]
}
]
}
]
}
]
}, - {
- "id": 152,
- "title": "",
- "guid": "plex://season/602e691c66dfdb002c0a504b",
- "parentTitle": "",
- "instanceRatingKey": "",
- "index": 5,
- "originallyAvailableAt": "",
- "addedAt": 1352798796,
- "refreshedAt": 1681173733,
- "MetadataItem": [
- {
- "id": 153,
- "title": "Movements of Fire and Shadow (1)",
- "guid": "plex://episode/5d9c1359ba2e21001f1b6ac1",
- "parentTitle": "",
- "instanceRatingKey": "",
- "index": 17,
- "originallyAvailableAt": "1998-06-17",
- "addedAt": 1352798796,
- "refreshedAt": 1731766766,
- "MediaItem": [
- {
- "id": 378,
- "MediaPart": [
- {
- "metadataType": 4,
- "id": 866,
- "file": "/Volumes/Media/TV Shows/Babylon 5/Season 5/Babylon 5 S05E17 Movements of Fire and Shadow (1).mkv",
- "size": 1903904159,
- "openSubtitleHash": "d0ca03c8c517a440",
- "hash": "db2f9485ca2a7df94a980f854d527e9f48ff8a11",
- "duration": 2652983,
- "MediaStream": [
- {
- "id": 1993,
- "index": 0,
- "type": 1,
- "codec": "mpeg2video",
- "language": "en",
- "anamorphic": "1",
- "bitDepth": "8",
- "chromaLocation": "left",
- "chromaSubsampling": "4:2:0",
- "codedHeight": "480",
- "codedWidth": "720",
- "colorRange": "tv",
- "frameRate": "29.970",
- "height": "480",
- "level": "8",
- "pixelAspectRatio": "853:720",
- "profile": "main",
- "refFrames": "1",
- "requiredBandwidths": "6220,5545,5451,5451,5451,5451,5451,5451",
- "scanType": "interlaced",
- "width": "720"
}, - {
- "id": 1994,
- "index": 1,
- "type": 2,
- "channels": 6,
- "codec": "ac3",
- "language": "en",
- "audioChannelLayout": "5.1(side)",
- "requiredBandwidths": "448,448,448,448,448,448,448,448",
- "samplingRate": "48000",
- "title": "3/2+1"
}
]
}
]
}
]
}, - {
- "id": 154,
- "title": "The Fall of Centauri Prime (2)",
- "guid": "plex://episode/5d9c13592192ba001f38f283",
- "parentTitle": "",
- "instanceRatingKey": "",
- "index": 18,
- "originallyAvailableAt": "1998-10-28",
- "addedAt": 1352798813,
- "refreshedAt": 1731766766,
- "MediaItem": [
- {
- "id": 379,
- "MediaPart": [
- {
- "metadataType": 4,
- "id": 867,
- "file": "/Volumes/Media/TV Shows/Babylon 5/Season 5/Babylon 5 S05E18 The Fall of Centauri Prime (2).mkv",
- "size": 1904087004,
- "openSubtitleHash": "96e203e09a1844e8",
- "hash": "c68e775307bb01d9c4ffad55fae6e606c82b09ac",
- "duration": 2653250,
- "MediaStream": [
- {
- "id": 1995,
- "index": 0,
- "type": 1,
- "codec": "mpeg2video",
- "language": "en",
- "anamorphic": "1",
- "bitDepth": "8",
- "chromaLocation": "left",
- "chromaSubsampling": "4:2:0",
- "codedHeight": "480",
- "codedWidth": "720",
- "colorRange": "tv",
- "frameRate": "29.970",
- "height": "480",
- "level": "8",
- "pixelAspectRatio": "853:720",
- "profile": "main",
- "refFrames": "1",
- "requiredBandwidths": "5958,5926,5926,5926,5926,5926,5926,5926",
- "scanType": "interlaced",
- "width": "720"
}, - {
- "id": 1996,
- "index": 1,
- "type": 2,
- "channels": 6,
- "codec": "ac3",
- "language": "en",
- "audioChannelLayout": "5.1(side)",
- "requiredBandwidths": "448,448,448,448,448,448,448,448",
- "samplingRate": "48000",
- "title": "3/2+1"
}
]
}
]
}
]
}
]
}
]
}
], - "Setting": [
- {
- "id": "episodeSort",
- "label": "Episode sorting",
- "summary": "How to sort the episodes for this show.",
- "type": "text",
- "default": "-1",
- "value": "-1",
- "hidden": false,
- "advanced": false,
- "group": "",
- "enumValues": "-1:Library default|0:Oldest first|1:Newest first"
}, - {
- "id": "autoDeletionItemPolicyUnwatchedLibrary",
- "label": "Keep",
- "summary": "Set the maximum number of unplayed episodes to keep for the show.",
- "type": "int",
- "default": "0",
- "value": "0",
- "hidden": false,
- "advanced": false,
- "group": "",
- "enumValues": "0:All episodes|5:5 latest episodes|3:3 latest episodes|1:Latest episode|-3:Episodes added in the past 3 days|-7:Episodes added in the past 7 days|-30:Episodes added in the past 30 days"
}, - {
- "id": "autoDeletionItemPolicyWatchedLibrary",
- "label": "Delete episodes after playing",
- "summary": "Choose how quickly episodes are removed after the server admin has watched them.",
- "type": "int",
- "default": "0",
- "value": "0",
- "hidden": false,
- "advanced": false,
- "group": "",
- "enumValues": "0:Never|1:After a day|7:After a week|30:After a month|100:On next refresh"
}, - {
- "id": "flattenSeasons",
- "label": "Seasons",
- "summary": "Choose whether to display seasons.",
- "type": "int",
- "default": "-1",
- "value": "-1",
- "hidden": false,
- "advanced": false,
- "group": "",
- "enumValues": "-1:Library default|0:Show|1:Hide"
}, - {
- "id": "showOrdering",
- "label": "",
- "summary": "",
- "type": "text",
- "default": "",
- "value": "",
- "hidden": false,
- "advanced": false,
- "group": ""
}, - {
- "id": "audioLanguage",
- "label": "Preferred audio language",
- "summary": "",
- "type": "text",
- "default": "",
- "value": "",
- "hidden": false,
- "advanced": false,
- "group": "",
- "enumValues": ":Account default|ar-SA:Arabic (Saudi Arabia)|bg-BG:Bulgarian|ca-ES:Catalan|zh-CN:Chinese|zh-HK:Chinese (Hong Kong)|zh-TW:Chinese (Taiwan)|hr-HR:Croatian|cs-CZ:Czech|da-DK:Danish|nl-NL:Dutch|en-US:English|en-AU:English (Australia)|en-CA:English (Canada)|en-GB:English (UK)|et-EE:Estonian|fi-FI:Finnish|fr-FR:French|fr-CA:French (Canada)|de-DE:German|el-GR:Greek|he-IL:Hebrew|hi-IN:Hindi|hu-HU:Hungarian|id-ID:Indonesian|it-IT:Italian|ja-JP:Japanese|ko-KR:Korean|lv-LV:Latvian|lt-LT:Lithuanian|nb-NO:Norwegian Bokmål|fa-IR:Persian|pl-PL:Polish|pt-BR:Portuguese|pt-PT:Portuguese (Portugal)|ro-RO:Romanian|ru-RU:Russian|sk-SK:Slovak|es-ES:Spanish|es-MX:Spanish (Mexico)|sv-SE:Swedish|th-TH:Thai|tr-TR:Turkish|uk-UA:Ukrainian|vi-VN:Vietnamese"
}, - {
- "id": "subtitleLanguage",
- "label": "Preferred subtitle language",
- "summary": "",
- "type": "text",
- "default": "",
- "value": "",
- "hidden": false,
- "advanced": false,
- "group": "",
- "enumValues": ":Account default|ar-SA:Arabic (Saudi Arabia)|bg-BG:Bulgarian|ca-ES:Catalan|zh-CN:Chinese|zh-HK:Chinese (Hong Kong)|zh-TW:Chinese (Taiwan)|hr-HR:Croatian|cs-CZ:Czech|da-DK:Danish|nl-NL:Dutch|en-US:English|en-AU:English (Australia)|en-CA:English (Canada)|en-GB:English (UK)|et-EE:Estonian|fi-FI:Finnish|fr-FR:French|fr-CA:French (Canada)|de-DE:German|el-GR:Greek|he-IL:Hebrew|hi-IN:Hindi|hu-HU:Hungarian|id-ID:Indonesian|it-IT:Italian|ja-JP:Japanese|ko-KR:Korean|lv-LV:Latvian|lt-LT:Lithuanian|nb-NO:Norwegian Bokmål|fa-IR:Persian|pl-PL:Polish|pt-BR:Portuguese|pt-PT:Portuguese (Portugal)|ro-RO:Romanian|ru-RU:Russian|sk-SK:Slovak|es-ES:Spanish|es-MX:Spanish (Mexico)|sv-SE:Swedish|th-TH:Thai|tr-TR:Turkish|uk-UA:Ukrainian|vi-VN:Vietnamese"
}, - {
- "id": "subtitleMode",
- "label": "Auto-select subtitle mode",
- "summary": "",
- "type": "int",
- "default": "-1",
- "value": "-1",
- "hidden": false,
- "advanced": false,
- "group": "",
- "enumValues": "-1:Account default|0:Manually selected|1:Shown with foreign audio|2:Always enabled"
}
]
}
}Get the list of users which have played this item starting with the most
| ids required | string |
{- "MediaContainer": {
- "size": 2,
- "Account": [
- {
- "id": 1,
- "globalViewCount": 3
}, - {
- "id": 12345,
- "globalViewCount": 2
}
]
}
}Start the detection of voice in a metadata item
| ids required | string |
| force | integer Enum: 0 1 Indicate whether detection should be re-run |
| manual | integer Enum: 0 1 Indicate whether detection is manually run |
Set the artwork, thumb, element for a metadata item Generally only the admin can perform this action. The exception is if the metadata is a playlist created by the user
| ids required | string |
| element required | string Enum: "thumb" "art" "clearLogo" "banner" "poster" "theme" |
| url | string The url of the new asset. If not provided, the binary of the asset must be provided in the post body. |
Set the artwork, thumb, element for a metadata item Generally only the admin can perform this action. The exception is if the metadata is a playlist created by the user
| ids required | string |
| element required | string Enum: "thumb" "art" "clearLogo" "banner" "poster" "theme" |
| url | string The url of the new asset. |
Get the artwork, thumb, element for a metadata item
| ids required | string |
| element required | string Enum: "thumb" "art" "clearLogo" "banner" "poster" "theme" |
| timestamp required | integer A timestamp on the element used for cache management in the client |
Get augmentation status and potentially wait for completion
| augmentationId required | string The id of the augmentation |
| wait | integer Enum: 0 1 Wait for augmentation completion before returning |
Set which streams (audio/subtitle) are selected by this user
| partId required | integer The id of the part to select streams on |
| audioStreamID | integer The id of the audio stream to select in this part |
| subtitleStreamID | integer The id of the subtitle stream to select in this part. Specify 0 to select no subtitle |
| allParts | integer Enum: 0 1 Perform the same for all parts of this media selecting similar streams in each |
Get BIF index for a part by index type
| partId required | integer The part id who's index is to be fetched |
| index required | string Value: "sd" The type of index to grab. |
| interval | integer The interval between images to return in ms. |
<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>
Extract an image from the BIF for a part at a particular offset
| partId required | integer The part id who's index is to be fetched |
| index required | string Value: "sd" The type of index to grab. |
| offset required | integer The offset to seek in ms. |
<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>
Get a media part for streaming or download.
| partId required | integer The part id who's index is to be fetched |
| changestamp required | integer The changestamp of the part; used for busting potential caches. Provided in the |
| filename required | string A generic filename used for a client media stack which relies on the extension in the request. Provided in the |
| download | integer Enum: 0 1 Whether this is a file download |
<html><head><title>Forbidden</title></head><body><h1>403 Forbidden</h1></body></html>
Get details for a single actor.
required | integer or string Either the PMS tag |
{- "MediaContainer": {
- "size": 1,
- "Directory": [
- {
- "id": 53374,
- "filter": "actor=53374",
- "tag": "Jay Chandrasekhar",
- "tagType": 6,
- "tagKey": "5d7768316f4521001ea9b4bc",
}
]
}
}Get all the media for a single actor.
required | integer or string Either the PMS tag |
{- "MediaContainer": {
- "size": "1",
- "allowSync": true,
- "art": "/:/resources/movie-fanart.jpg",
- "identifier": "com.plexapp.plugins.library",
- "librarySectionID": 26,
- "librarySectionTitle": "Movies",
- "librarySectionUUID": "70cb5089-b165-429b-809a-9e0a31493abf",
- "mediaTagPrefix": "/system/bundle/media/flags/",
- "mediaTagVersion": "1436742334",
- "thumb": "/:/resources/movie.png",
- "title1": "Movies",
- "title2": "All Movies",
- "viewGroup": "movie",
- "Metadata": [
- {
- "id": "1049",
- "ratingKey": "1049",
- "key": "/library/metadata/1049",
- "studio": "Paramount Pictures",
- "type": "movie",
- "title": "Zoolander",
- "contentRating": "PG-13",
- "summary": "FunnyStuff",
- "year": 2001,
- "tagline": "3% Body Fat. 1% Brain Activity.",
- "thumb": "/library/metadata/1049/thumb/1434341184",
- "art": "/library/metadata/1049/art/1434341184",
- "duration": 5129000,
- "originallyAvailableAt": "2001-09-27",
- "addedAt": 1408525217,
- "updatedAt": 1434341184,
- "chapterSource": "media",
- "primaryExtraKey": "/library/metadata/1073",
- "rating": 6,
- "Media": [
- {
- "id": 827,
- "duration": 5129000,
- "bitrate": 6564,
- "width": 720,
- "height": 576,
- "aspectRatio": 1.78,
- "audioChannels": 6,
- "audioCodec": "ac3",
- "videoCodec": "mpeg2video",
- "container": "mkv",
- "videoFrameRate": "PAL",
- "Part": [
- {
- "id": "827",
- "key": "/library/parts/827/file.mkv",
- "duration": 5129000,
- "file": "O:\\fatboy\\Media\\Ripped\\Movies\\Zoolander (2001).mkv",
- "size": 4208219125,
- "container": "mkv"
}
]
}
], - "Image": [
- {
- "type": "coverPoster",
- "alt": "Zoolander",
- "url": "/library/metadata/1049/thumb/1434341184"
}
], - "Genre": [
- {
- "tag": "Comedy"
}
], - "Writer": [
- {
- "tag": "Drake Sather"
}, - {
- "tag": "Ben Stiller"
}
], - "Director": [
- {
- "tag": "Ben Stiller"
}
], - "Country": [
- {
- "tag": "Australia"
}, - {
- "tag": "Germany"
}
], - "Role": [
- {
- "tag": "Ben Stiller"
}, - {
- "tag": "Owen Wilson"
}, - {
- "tag": "Christine Taylor"
}
]
}
]
}
}Get random artwork across sections. This is commonly used for a screensaver.
This retrieves 100 random artwork paths in the specified sections and returns them. Restrictions are put in place to not return artwork for items the user is not allowed to access. Artwork will be for Movies, Shows, and Artists only.
| sections | Array of integers Example: sections=5,6 The sections for which to fetch artwork. |
{- "MediaContainer": {
- "size": 7,
- "Metadata": [
- {
- "title": "Lava",
- "type": "image",
- "key": "/library/metadata/34/art/1715112805"
}, - {
- "title": "Firefly",
- "type": "image",
- "key": "/library/metadata/163/art/1714485503"
}, - {
- "title": "The Lord of the Rings: The Return of the King",
- "type": "image",
- "key": "/library/metadata/65/art/1715112827"
}, - {
- "title": "La Luna",
- "type": "image",
- "key": "/library/metadata/4/art/1715112803"
}, - {
- "title": "Babylon 5",
- "type": "image",
- "key": "/library/metadata/148/art/1715112830"
}, - {
- "title": "The Expanse",
- "type": "image",
- "key": "/library/metadata/201/art/1715112832"
}, - {
- "title": "Jack-Jack Attack",
- "type": "image",
- "key": "/library/metadata/146/art/1715112830"
}
]
}
}A library section (commonly referred to as just a library) is a collection of media. Libraries are typed, and depending on their type provide either a flat or a hierarchical view of the media. For example, a music library has an artist > albums > tracks structure, whereas a movie library is flat. Libraries have features beyond just being a collection of media; for starters, they include information about supported types, filters and sorts. This allows a client to provide a rich interface around the media (e.g. allow sorting movies by release year).
{- "MediaContainer": {
- "size": 1,
- "allowSync": true,
- "title1": "Plex Library",
- "Directory": [
- {
- "allowSync": true,
- "art": "/:/resources/movie-fanart.jpg",
- "composite": "/library/sections/1/composite/1706626696",
- "filters": true,
- "refreshing": false,
- "thumb": "/:/resources/movie.png",
- "key": "1",
- "type": "movie",
- "title": "Movies",
- "agent": "tv.plex.agents.movie",
- "scanner": "Plex Movie",
- "language": "en-US",
- "updatedAt": 1689270983,
- "createdAt": 1689270983,
- "scannedAt": 1706626696,
- "content": true,
- "directory": true,
- "contentChangedAt": 1234,
- "hidden": false,
- "Location": [
- {
- "id": 1,
- "path": "O:\\fatboy\\Media\\Ripped\\Movies"
}
]
}, - {
- "allowSync": true,
- "art": "/:/resources/series-fanart.jpg",
- "composite": "/library/sections/1/composite/1714485942",
- "filters": true,
- "refreshing": false,
- "thumb": "/:/resources/series.png",
- "key": "2",
- "type": "show",
- "title": "TV Shows",
- "agent": "tv.plex.agents.series",
- "scanner": "Plex TV Series",
- "language": "en-US",
- "updatedAt": 1682628353,
- "createdAt": 1682628353,
- "scannedAt": 1714485942,
- "content": true,
- "directory": true,
- "contentChangedAt": 1235,
- "hidden": false,
- "Location": [
- {
- "id": 2,
- "path": "O:\\fatboy\\Media\\Ripped\\Shows"
}
]
}, - {
- "allowSync": true,
- "art": "/:/resources/artist-fanart.jpg",
- "composite": "/library/sections/1/composite/1690487664",
- "filters": true,
- "refreshing": false,
- "thumb": "/:/resources/artist.png",
- "key": "3",
- "type": "artist",
- "title": "Music",
- "agent": "tv.plex.agents.music",
- "scanner": "Plex Music",
- "language": "en-US",
- "updatedAt": 1691606667,
- "createdAt": 1691606667,
- "scannedAt": 1690487664,
- "content": true,
- "directory": true,
- "contentChangedAt": 1233,
- "hidden": false,
- "Location": [
- {
- "id": 3,
- "path": "O:\\fatboy\\Media\\Ripped\\Music"
}, - {
- "id": 4,
- "path": "O:\\fatboy\\Media\\My Music"
}
]
}
]
}
}Add a new library section to the server
| name required | string The name of the new section |
| type required | integer The type of library section |
| scanner | string The scanner this section should use |
| agent required | string The agent this section should use for metadata |
| metadataAgentProviderGroupId | string The agent group id for this section |
| language required | string The language of this section |
| locations | Array of strings Example: locations=O:\fatboy\Media\Ripped\Music&locations=O:\fatboy\Media\My Music The locations on disk to add to this section |
| prefs | object Example: prefs[hidden]=0&prefs[collectionMode]=2 The preferences for this section |
| relative | integer Enum: 0 1 If set, paths are relative to |
| importFromiTunes | integer Enum: 0 1 If set, import media from iTunes. |
{- "MediaContainer": {
- "allowSync": false,
- "art": "/:/resources/movie-fanart.jpg",
- "content": "secondary",
- "identifier": "com.plexapp.plugins.library",
- "librarySectionID": 1,
- "mediaTagPrefix": "/system/bundle/media/flags/",
- "mediaTagVersion": 1484125920,
- "size": 20,
- "sortAsc": true,
- "thumb": "/:/resources/movie.png",
- "title1": "Movies",
- "viewGroup": "secondary",
- "viewMode": 65592,
- "Directory": [
- {
- "key": "all",
- "title": "All Movies"
}, - {
- "key": "unwatched",
- "title": "Unwatched"
}, - {
- "key": "newest",
- "title": "Recently Released"
}, - {
- "key": "recentlyAdded",
- "title": "Recently Added"
}, - {
- "key": "recentlyViewed",
- "title": "Recently Viewed"
}, - {
- "key": "onDeck",
- "title": "On Deck"
}, - {
- "key": "collection",
- "secondary": true,
- "title": "By Collection"
}, - {
- "key": "genre",
- "secondary": true,
- "title": "By Genre"
}, - {
- "key": "year",
- "secondary": true,
- "title": "By Year"
}, - {
- "key": "decade",
- "secondary": true,
- "title": "By Decade"
}, - {
- "key": "director",
- "secondary": true,
- "title": "By Director"
}, - {
- "key": "actor",
- "secondary": true,
- "title": "By Starring Actor"
}, - {
- "key": "country",
- "secondary": true,
- "title": "By Country"
}, - {
- "key": "contentRating",
- "secondary": true,
- "title": "By Content Rating"
}, - {
- "key": "rating",
- "secondary": true,
- "title": "By Rating"
}, - {
- "key": "resolution",
- "secondary": true,
- "title": "By Resolution"
}, - {
- "key": "firstCharacter",
- "secondary": true,
- "title": "By First Letter"
}, - {
- "key": "folder",
- "title": "By Folder"
}, - {
- "key": "search?type=1",
- "prompt": "Search Movies",
- "search": true,
- "title": "Search..."
}, - {
- "key": "/library/sections/1/all?type=1",
- "title": "Movies",
- "type": "1",
- "Filter": [
- {
- "filter": "genre",
- "filterType": "string",
- "key": "/library/sections/1/genre",
- "title": "Genre",
- "type": "filter"
}, - {
- "filter": "year",
- "filterType": "integer",
- "key": "/library/sections/1/year",
- "title": "Year",
- "type": "filter"
}, - {
- "filter": "decade",
- "filterType": "integer",
- "key": "/library/sections/1/decade",
- "title": "Decade",
- "type": "filter"
}, - {
- "filter": "contentRating",
- "filterType": "string",
- "key": "/library/sections/1/contentRating",
- "title": "Content Rating",
- "type": "filter"
}, - {
- "filter": "collection",
- "filterType": "string",
- "key": "/library/sections/1/collection",
- "title": "Collection",
- "type": "filter"
}, - {
- "filter": "director",
- "filterType": "string",
- "key": "/library/sections/1/director",
- "title": "Director",
- "type": "filter"
}, - {
- "filter": "actor",
- "filterType": "string",
- "key": "/library/sections/1/actor",
- "title": "Actor",
- "type": "filter"
}, - {
- "filter": "country",
- "filterType": "string",
- "key": "/library/sections/1/country",
- "title": "Country",
- "type": "filter"
}, - {
- "filter": "studio",
- "filterType": "string",
- "key": "/library/sections/1/studio",
- "title": "Studio",
- "type": "filter"
}, - {
- "filter": "resolution",
- "filterType": "string",
- "key": "/library/sections/1/resolution",
- "title": "Resolution",
- "type": "filter"
}, - {
- "filter": "unwatched",
- "filterType": "boolean",
- "key": "/library/sections/1/unwatched",
- "title": "Unwatched",
- "type": "filter"
}, - {
- "filter": "label",
- "filterType": "string",
- "key": "/library/sections/1/label",
- "title": "Labels",
- "type": "filter"
}
], - "Sort": [
- {
- "defaultDirection": "desc",
- "descKey": "addedAt:desc",
- "key": "addedAt",
- "title": "Date Added"
}, - {
- "defaultDirection": "desc",
- "descKey": "originallyAvailableAt:desc",
- "key": "originallyAvailableAt",
- "title": "Release Date"
}, - {
- "defaultDirection": "desc",
- "descKey": "lastViewedAt:desc",
- "key": "lastViewedAt",
- "title": "Date Viewed"
}, - {
- "default": "asc",
- "defaultDirection": "asc",
- "descKey": "titleSort:desc",
- "key": "titleSort",
- "title": "Name"
}, - {
- "defaultDirection": "desc",
- "descKey": "rating:desc",
- "key": "rating",
- "title": "Rating"
}, - {
- "defaultDirection": "asc",
- "descKey": "mediaHeight:desc",
- "key": "mediaHeight",
- "title": "Resolution"
}, - {
- "defaultDirection": "desc",
- "descKey": "duration:desc",
- "key": "duration",
- "title": "Duration"
}
]
}
]
}
}{- "MediaContainer": {
- "size": 1,
- "allowCameraUpload": true,
- "allowChannelAccess": true,
- "allowMediaDeletion": true,
- "allowSharing": true,
- "allowSync": true,
- "allowTuners": true,
- "backgroundProcessing": true,
- "certificate": true,
- "companionProxy": true,
- "countryCode": "usa",
- "diagnostics": "logs,databases,streaminglogs",
- "eventStream": true,
- "friendlyName": "Server Name",
- "hubSearch": true,
- "itemClusters": true,
- "livetv": 7,
- "machineIdentifier": "c997cf82c4158cb986ccc0e8f829a6f5d5086a63",
- "mediaProviders": true,
- "multiuser": true,
- "musicAnalysis": 2,
- "myPlex": true,
- "myPlexMappingState": "mapped",
- "myPlexSigninState": "ok",
- "myPlexSubscription": true,
- "offlineTranscode": 1,
- "ownerFeatures"": "adaptive_bitrate,advanced-playback-settings,camera_upload,collections,content_filter,download_certificates,dvr,federated-auth,hardware_transcoding,home,hwtranscode,item_clusters,kevin-bacon,livetv,loudness,lyrics,music-analysis,music_videos,pass,photosV6-edit,photosV6-tv-albums,premium_music_metadata,radio,session_bandwidth_restrictions,session_kick,shared-radio,sync,trailers,tuner-sharing,type-first,ump-matching-pref,unsupportedtuners,webhooks",
- "platform": "MacOSX",
- "platformVersion": "14.4.1",
- "pluginHost": true,
- "pushNotifications": false,
- "readOnlyLibraries": false,
- "streamingBrainABRVersion": 3,
- "streamingBrainVersion": 2,
- "sync": true,
- "transcoderActiveVideoSessions": 0,
- "transcoderAudio": true,
- "transcoderLyrics": true,
- "transcoderPhoto": true,
- "transcoderSubtitles": true,
- "transcoderVideo": true,
- "transcoderVideoBitrates": "64,96,208,320,720,1500,2000,3000,4000,8000,10000,12000,20000",
- "transcoderVideoQualities": "0,1,2,3,4,5,6,7,8,9,10,11,12",
- "transcoderVideoResolutions": "128,128,160,240,320,480,768,720,720,1080,1080,1080,1080",
- "updatedAt": 1714653009,
- "updater": true,
- "version": "1.40.2.8395-c67dce28e",
- "voiceSearch": true,
- "Directory": [
- {
- "count": 1,
- "key": "key",
- "title": "title"
}
]
}
}Get a section's preferences for a metadata type
| type required | integer The metadata type |
| agent | string The metadata agent in use |
{- "MediaContainer": {
- "size": 1,
- "allowCameraUpload": true,
- "allowChannelAccess": true,
- "allowMediaDeletion": true,
- "allowSharing": true,
- "allowSync": true,
- "allowTuners": true,
- "backgroundProcessing": true,
- "certificate": true,
- "companionProxy": true,
- "countryCode": "usa",
- "diagnostics": "logs,databases,streaminglogs",
- "eventStream": true,
- "friendlyName": "Server Name",
- "hubSearch": true,
- "itemClusters": true,
- "livetv": 7,
- "machineIdentifier": "c997cf82c4158cb986ccc0e8f829a6f5d5086a63",
- "mediaProviders": true,
- "multiuser": true,
- "musicAnalysis": 2,
- "myPlex": true,
- "myPlexMappingState": "mapped",
- "myPlexSigninState": "ok",
- "myPlexSubscription": true,
- "offlineTranscode": 1,
- "ownerFeatures"": "adaptive_bitrate,advanced-playback-settings,camera_upload,collections,content_filter,download_certificates,dvr,federated-auth,hardware_transcoding,home,hwtranscode,item_clusters,kevin-bacon,livetv,loudness,lyrics,music-analysis,music_videos,pass,photosV6-edit,photosV6-tv-albums,premium_music_metadata,radio,session_bandwidth_restrictions,session_kick,shared-radio,sync,trailers,tuner-sharing,type-first,ump-matching-pref,unsupportedtuners,webhooks",
- "platform": "MacOSX",
- "platformVersion": "14.4.1",
- "pluginHost": true,
- "pushNotifications": false,
- "readOnlyLibraries": false,
- "streamingBrainABRVersion": 3,
- "streamingBrainVersion": 2,
- "sync": true,
- "transcoderActiveVideoSessions": 0,
- "transcoderAudio": true,
- "transcoderLyrics": true,
- "transcoderPhoto": true,
- "transcoderSubtitles": true,
- "transcoderVideo": true,
- "transcoderVideoBitrates": "64,96,208,320,720,1500,2000,3000,4000,8000,10000,12000,20000",
- "transcoderVideoQualities": "0,1,2,3,4,5,6,7,8,9,10,11,12",
- "transcoderVideoResolutions": "128,128,160,240,320,480,768,720,720,1080,1080,1080,1080",
- "updatedAt": 1714653009,
- "updater": true,
- "version": "1.40.2.8395-c67dce28e",
- "voiceSearch": true,
- "Directory": [
- {
- "count": 1,
- "key": "key",
- "title": "title"
}
]
}
}Returns details for the library. This can be thought of as an interstitial endpoint because it contains information about the library, rather than content itself. It often contains a list of Directory metadata objects: These used to be used by clients to build a menuing system.
| sectionId required | string The section identifier |
| includeDetails | integer Enum: 0 1 Whether or not to include details for a section (types, filters, and sorts). Only exists for backwards compatibility, media providers other than the server libraries have it on always. |
{- "MediaContainer": {
- "allowSync": false,
- "art": "/:/resources/movie-fanart.jpg",
- "content": "secondary",
- "identifier": "com.plexapp.plugins.library",
- "librarySectionID": 1,
- "mediaTagPrefix": "/system/bundle/media/flags/",
- "mediaTagVersion": 1484125920,
- "size": 20,
- "sortAsc": true,
- "thumb": "/:/resources/movie.png",
- "title1": "Movies",
- "viewGroup": "secondary",
- "viewMode": 65592,
- "Directory": [
- {
- "key": "all",
- "title": "All Movies"
}, - {
- "key": "unwatched",
- "title": "Unwatched"
}, - {
- "key": "newest",
- "title": "Recently Released"
}, - {
- "key": "recentlyAdded",
- "title": "Recently Added"
}, - {
- "key": "recentlyViewed",
- "title": "Recently Viewed"
}, - {
- "key": "onDeck",
- "title": "On Deck"
}, - {
- "key": "collection",
- "secondary": true,
- "title": "By Collection"
}, - {
- "key": "genre",
- "secondary": true,
- "title": "By Genre"
}, - {
- "key": "year",
- "secondary": true,
- "title": "By Year"
}, - {
- "key": "decade",
- "secondary": true,
- "title": "By Decade"
}, - {
- "key": "director",
- "secondary": true,
- "title": "By Director"
}, - {
- "key": "actor",
- "secondary": true,
- "title": "By Starring Actor"
}, - {
- "key": "country",
- "secondary": true,
- "title": "By Country"
}, - {
- "key": "contentRating",
- "secondary": true,
- "title": "By Content Rating"
}, - {
- "key": "rating",
- "secondary": true,
- "title": "By Rating"
}, - {
- "key": "resolution",
- "secondary": true,
- "title": "By Resolution"
}, - {
- "key": "firstCharacter",
- "secondary": true,
- "title": "By First Letter"
}, - {
- "key": "folder",
- "title": "By Folder"
}, - {
- "key": "search?type=1",
- "prompt": "Search Movies",
- "search": true,
- "title": "Search..."
}, - {
- "key": "/library/sections/1/all?type=1",
- "title": "Movies",
- "type": "1",
- "Filter": [
- {
- "filter": "genre",
- "filterType": "string",
- "key": "/library/sections/1/genre",
- "title": "Genre",
- "type": "filter"
}, - {
- "filter": "year",
- "filterType": "integer",
- "key": "/library/sections/1/year",
- "title": "Year",
- "type": "filter"
}, - {
- "filter": "decade",
- "filterType": "integer",
- "key": "/library/sections/1/decade",
- "title": "Decade",
- "type": "filter"
}, - {
- "filter": "contentRating",
- "filterType": "string",
- "key": "/library/sections/1/contentRating",
- "title": "Content Rating",
- "type": "filter"
}, - {
- "filter": "collection",
- "filterType": "string",
- "key": "/library/sections/1/collection",
- "title": "Collection",
- "type": "filter"
}, - {
- "filter": "director",
- "filterType": "string",
- "key": "/library/sections/1/director",
- "title": "Director",
- "type": "filter"
}, - {
- "filter": "actor",
- "filterType": "string",
- "key": "/library/sections/1/actor",
- "title": "Actor",
- "type": "filter"
}, - {
- "filter": "country",
- "filterType": "string",
- "key": "/library/sections/1/country",
- "title": "Country",
- "type": "filter"
}, - {
- "filter": "studio",
- "filterType": "string",
- "key": "/library/sections/1/studio",
- "title": "Studio",
- "type": "filter"
}, - {
- "filter": "resolution",
- "filterType": "string",
- "key": "/library/sections/1/resolution",
- "title": "Resolution",
- "type": "filter"
}, - {
- "filter": "unwatched",
- "filterType": "boolean",
- "key": "/library/sections/1/unwatched",
- "title": "Unwatched",
- "type": "filter"
}, - {
- "filter": "label",
- "filterType": "string",
- "key": "/library/sections/1/label",
- "title": "Labels",
- "type": "filter"
}
], - "Sort": [
- {
- "defaultDirection": "desc",
- "descKey": "addedAt:desc",
- "key": "addedAt",
- "title": "Date Added"
}, - {
- "defaultDirection": "desc",
- "descKey": "originallyAvailableAt:desc",
- "key": "originallyAvailableAt",
- "title": "Release Date"
}, - {
- "defaultDirection": "desc",
- "descKey": "lastViewedAt:desc",
- "key": "lastViewedAt",
- "title": "Date Viewed"
}, - {
- "default": "asc",
- "defaultDirection": "asc",
- "descKey": "titleSort:desc",
- "key": "titleSort",
- "title": "Name"
}, - {
- "defaultDirection": "desc",
- "descKey": "rating:desc",
- "key": "rating",
- "title": "Rating"
}, - {
- "defaultDirection": "asc",
- "descKey": "mediaHeight:desc",
- "key": "mediaHeight",
- "title": "Resolution"
}, - {
- "defaultDirection": "desc",
- "descKey": "duration:desc",
- "key": "duration",
- "title": "Duration"
}
]
}
]
}
}Delete a library section by id
| sectionId required | string The section identifier |
| async | integer Enum: 0 1 If set, response will return an activity with the actual deletion process. Otherwise request will return when deletion is complete |
Edit a library section by id setting parameters
| sectionId required | string The section identifier |
| name | string The name of the new section |
| scanner | string The scanner this section should use |
| agent required | string The agent this section should use for metadata |
| metadataAgentProviderGroupId | string The agent group id for this section |
| language | string The language of this section |
| locations | Array of strings Example: locations=O:\fatboy\Media\Ripped\Music&locations=O:\fatboy\Media\My Music The locations on disk to add to this section |
| prefs | object Example: prefs[hidden]=0&prefs[collectionMode]=2 The preferences for this section |
This endpoint takes an large possible set of values. Here are some examples.
Parameters, extra documentation
/library/sections/{id}/all?type=10&id=42&title.value=NewName/library/sections/{id}/all?type=10&id=42,43,44&title.value=NewName/library/sections/{id}/all?type=10&title.value=NewName/library/sections/{id}/all?type=9&id=42&title.value=Album 2/library/sections/{id}/all?type=9&title.value=Moo Album/library/sections/{id}/all?type=9&id=42&title.value=NewAlbumTitle/library/sections/{id}/all?type=9&title.value=NewAlbumTitle/library/sections/{id}/all?type=8&id=42&title.value=Artist 2/library/sections/{id}/all?type=8&title.value=Artist 3/library/sections/{id}/all?type=8&id=42&title.value=NewArtistTitle/library/sections/{id}/all?type=8&title.value=NewArtistTitleNotes
| sectionId required | string The id of the section |
| type | string |
| filters | string The filters to apply to determine which items should be modified |
| field.value | string Set the specified field to a new value |
| field.locked | integer Enum: 0 1 Set the specified field to locked (or unlocked if set to 0) |
| title.value | string This field is treated specially by albums or artists and may be used for implicit reparenting. |
| artist.title.value | string Reparents set of Tracks or Albums - used with album.title.* in the case of tracks |
| artist.title.id | string Reparents set of Tracks or Albums - used with album.title.* in the case of tracks |
| album.title.value | string Reparents set of Tracks - Must be used in conjunction with artist.title.value or id |
| album.title.id | string Reparents set of Tracks - Must be used in conjunction with artist.title.value or id |
| tagtype[idx].tag.tag | string Creates tag and associates it with each item in the set. - [idx] links this and the next parameters together |
| tagtype[idx].tagging.object | string Here |
| tagtype[].tag.tag- | string Remove comma separated tags from the set of items |
| tagtype[].tag | string Remove associations of this type (e.g. genre) from the set of items |
The field to autocomplete on is specified by the {field}.query parameter. For example genre.query or title.query.
Returns a set of items from the filtered items whose {field} starts with {field}.query. In the results, a {field}.queryRange will be present to express the range of the match
| sectionId required | integer Section identifier |
| type | integer Item type |
| field.query | string The "field" stands in for any field, the value is a partial string for matching |
| mediaQuery | object Examples:
This is a complex query built of several parameters. See API Info section for information on building media queries |
{- "MediaContainer": {
- "allowSync": false,
- "art": "/:/resources/movie-fanart.jpg",
- "content": "secondary",
- "identifier": "com.plexapp.plugins.library",
- "mediaTagPrefix": "/system/bundle/media/flags/",
- "mediaTagVersion": 1436742334,
- "size": 2,
- "thumb": "/:/resources/movie.png",
- "title1": "Movies",
- "viewGroup": "secondary",
- "viewMode": 65592,
- "Metadata": [
- {
- "addedAt": 1408492156,
- "art": "/library/metadata/1024/art/1434341159",
- "chapterSource": "media",
- "contentRating": "R",
- "duration": 6627200,
- "key": "/library/metadata/1024",
- "originallyAvailableAt": "2002-12-06",
- "primaryExtraKey": "/library/metadata/1051",
- "rating": 7.1,
- "ratingKey": "1024",
- "studio": "Columbia Pictures",
- "summary": "A love-lorn script writer grows increasingly desperate in his quest to adapt the book 'The Orchid Thief'.",
- "tagline": "Charlie Kaufman writes the way he lives... With Great Difficulty. His Twin Brother Donald Lives the way he writes... with foolish abandon. Susan writes about life... But can't live it. John's life is a book...Waiting to be adapted. One story... Four Lives... A million ways it can end.",
- "thumb": "/library/metadata/1024/thumb/1434341159",
- "title": "Adaptation.",
- "title.queryRange": "0,0",
- "type": "movie",
- "updatedAt": 1434341159,
- "year": 2002,
- "Media": [
- {
- "aspectRatio": 1.78,
- "audioChannels": 6,
- "audioCodec": "ac3",
- "bitrate": 5421,
- "container": "mkv",
- "duration": 6627200,
- "height": 576,
- "id": 802,
- "videoCodec": "mpeg2video",
- "videoFrameRate": "PAL",
- "videoResolution": "576",
- "width": 720,
- "Part": [
- {
- "container": "mkv",
- "duration": 6627200,
- "file": "O:\\fatboy\\Media\\Ripped\\Movies\\Adaptation (2002).mkv",
- "id": 802,
- "key": "/library/parts/802/file.mkv",
- "size": 4490974984
}
]
}
], - "Genre": [
- {
- "tag": "Comedy"
}, - {
- "tag": "Crime"
}
], - "Writer": [
- {
- "tag": "Charlie Kaufman"
}, - {
- "tag": "Donald Kaufman"
}
], - "Director": [
- {
- "tag": "Spike Jonze"
}
], - "Country": [
- {
- "tag": "USA"
}
], - "Role": [
- {
- "tag": "Nicolas Cage"
}, - {
- "tag": "Meryl Streep"
}, - {
- "tag": "Chris Cooper"
}
]
}, - {
- "addedAt": 1407669060,
- "art": "/library/metadata/1025/art/1434341158",
- "chapterSource": "media",
- "duration": 5165210,
- "key": "/library/metadata/1025",
- "originalTitle": "Neco z Alenky",
- "originallyAvailableAt": "1988-08-03",
- "rating": 6.9,
- "ratingKey": "1025",
- "studio": "Channel Four Films",
- "summary": "A memorably bizarre screen version of Lewis Carroll's novel 'Alice's Adventures in Wonderland'. The original story is followed reasonably faithfully, though those familiar with this director's other films won't be the least bit surprised by the numerous digressions into Svankmajer territory, living slabs of meat and all. As the opening narration says, it's a film made for children... perhaps?",
- "thumb": "/library/metadata/1025/thumb/1434341158",
- "title": "Alice",
- "title.queryRange": "0,0",
- "type": "movie",
- "updatedAt": 1434341158,
- "year": 1988,
- "Media": [
- {
- "aspectRatio": 1.33,
- "audioChannels": 2,
- "audioCodec": "ac3",
- "bitrate": 6672,
- "container": "mkv",
- "duration": 5165210,
- "height": 480,
- "id": 803,
- "videoCodec": "mpeg2video",
- "videoFrameRate": "NTSC",
- "videoResolution": "480",
- "width": 720,
- "Part": [
- {
- "container": "mkv",
- "duration": 5165210,
- "file": "O:\\fatboy\\Media\\Ripped\\Movies\\Alice (1988).mkv",
- "id": 803,
- "key": "/library/parts/803/file.mkv",
- "size": 430806944
}
]
}
], - "Genre": [
- {
- "tag": "Animation"
}, - {
- "tag": "Fantasy"
}
], - "Writer": [
- {
- "tag": "Jan ?vankmajer"
}
], - "Director": [
- {
- "tag": "Jan ?vankmajer"
}
], - "Country": [
- {
- "tag": "Switzerland"
}, - {
- "tag": "Czech Republic"
}
], - "Role": [
- {
- "tag": "Krist?na Kohoutov?"
}
]
}
]
}
}Get all collections in a section
| sectionId required | integer Section identifier |
| mediaQuery | object Examples:
This is a complex query built of several parameters. See API Info section for information on building media queries |
{- "MediaContainer": {
- "allowSync": true,
- "art": "/:/resources/movie-fanart.jpg",
- "identifier": "com.plexapp.plugins.library",
- "librarySectionID": 26,
- "librarySectionTitle": "Movies",
- "librarySectionUUID": "70cb5089-b165-429b-809a-9e0a31493abf",
- "mediaTagPrefix": "/system/bundle/media/flags/",
- "mediaTagVersion": 1436742334,
- "size": 1,
- "thumb": "/:/resources/movie.png",
- "title1": "Movies",
- "title2": "All Movies",
- "viewGroup": "movie",
- "viewMode": "65592",
- "Metadata": [
- {
- "addedAt": 1408525217,
- "art": "/library/metadata/1049/art/1434341184",
- "chapterSource": "media",
- "contentRating": "PG-13",
- "duration": 5129000,
- "key": "/library/metadata/1049",
- "originallyAvailableAt": "2001-09-27",
- "primaryExtraKey": "/library/metadata/1073",
- "rating": 6,
- "ratingKey": "1049",
- "studio": "Paramount Pictures",
- "summary": "FunnyStuff",
- "tagline": "3% Body Fat. 1% Brain Activity.",
- "thumb": "/library/metadata/1049/thumb/1434341184",
- "title": "Zoolander",
- "type": "movie",
- "updatedAt": 1434341184,
- "year": 2001,
- "Media": [
- {
- "aspectRatio": 1.78,
- "audioChannels": 6,
- "audioCodec": "ac3",
- "bitrate": 6564,
- "container": "mkv",
- "duration": 5129000,
- "height": 576,
- "id": 827,
- "videoCodec": "mpeg2video",
- "videoFrameRate": "PAL",
- "videoResolution": "576",
- "width": 720,
- "Part": [
- {
- "container": "mkv",
- "duration": 5129000,
- "file": "O:\\fatboy\\Media\\Ripped\\Movies\\Zoolander (2001).mkv",
- "id": 827,
- "key": "/library/parts/827/file.mkv",
- "size": 4208219125
}
]
}
], - "Genre": [
- {
- "tag": "Comedy"
}
], - "Writer": [
- {
- "tag": "Drake Sather"
}, - {
- "tag": "Ben Stiller"
}
], - "Director": [
- {
- "tag": "Ben Stiller"
}
], - "Country": [
- {
- "tag": "Australia"
}, - {
- "tag": "Germany"
}
], - "Role": [
- {
- "tag": "Ben Stiller"
}, - {
- "tag": "Owen Wilson"
}, - {
- "tag": "Christine Taylor"
}
]
}
]
}
}Represents a "Common" item. It contains only the common attributes of the items selected by the provided filter
Fields which are not common will be expressed in the mixedFields field
| sectionId required | integer Section identifier |
| type | integer Item type |
| mediaQuery | object Examples:
This is a complex query built of several parameters. See API Info section for information on building media queries |
{- "MediaContainer": {
- "allowSync": false,
- "art": "/:/resources/movie-fanart.jpg",
- "content": "secondary",
- "identifier": "com.plexapp.plugins.library",
- "mediaTagPrefix": "/system/bundle/media/flags/",
- "mediaTagVersion": 1436742334,
- "size": 1,
- "thumb": "/:/resources/movie.png",
- "title1": "Movies",
- "title2": "Common",
- "viewGroup": "secondary",
- "viewMode": 65592,
- "Metadata": [
- {
- "index": 1,
- "mixedFields": "title,ratingKey,titleSort,tagline,rating,summary,year,studio,originallyAvailableAt,originalTitle,contentRating",
- "ratingCount": 0,
- "type": "common"
}
]
}
}Get a composite image of images in this section
| sectionId required | integer Section identifier |
| updatedAt required | integer The update time of the image. Used for busting cache. |
| mediaQuery | object Examples:
This is a complex query built of several parameters. See API Info section for information on building media queries |
object Examples:
|
Get common filters on a section
| sectionId required | integer Section identifier |
{- "MediaContainer": {
- "size": 20,
- "allowSync": false,
- "art": "/:/resources/movie-fanart.jpg",
- "content": "secondary",
- "identifier": "com.plexapp.plugins.library",
- "mediaTagPrefix": "/system/bundle/media/flags/",
- "mediaTagVersion": 1680272530,
- "thumb": "/:/resources/movie.png",
- "title1": "Movies",
- "viewGroup": "secondary",
- "Directory": [
- {
- "filter": "genre",
- "filterType": "string",
- "key": "/library/sections/1/genre",
- "title": "Genre",
- "type": "filter"
}, - {
- "filter": "year",
- "filterType": "integer",
- "key": "/library/sections/1/year",
- "title": "Year",
- "type": "filter"
}, - {
- "filter": "decade",
- "filterType": "integer",
- "key": "/library/sections/1/decade",
- "title": "Decade",
- "type": "filter"
}, - {
- "filter": "contentRating",
- "filterType": "string",
- "key": "/library/sections/1/contentRating",
- "title": "Content Rating",
- "type": "filter"
}, - {
- "filter": "collection",
- "filterType": "string",
- "key": "/library/sections/1/collection",
- "title": "Collection",
- "type": "filter"
}, - {
- "filter": "director",
- "filterType": "string",
- "key": "/library/sections/1/director",
- "title": "Director",
- "type": "filter"
}, - {
- "filter": "actor",
- "filterType": "string",
- "key": "/library/sections/1/actor",
- "title": "Actor",
- "type": "filter"
}, - {
- "filter": "writer",
- "filterType": "string",
- "key": "/library/sections/1/writer",
- "title": "Writer",
- "type": "filter"
}, - {
- "filter": "producer",
- "filterType": "string",
- "key": "/library/sections/1/producer",
- "title": "Producer",
- "type": "filter"
}, - {
- "filter": "country",
- "filterType": "string",
- "key": "/library/sections/1/country",
- "title": "Country",
- "type": "filter"
}, - {
- "filter": "studio",
- "filterType": "string",
- "key": "/library/sections/1/studio",
- "title": "Studio",
- "type": "filter"
}, - {
- "filter": "resolution",
- "filterType": "string",
- "key": "/library/sections/1/resolution",
- "title": "Resolution",
- "type": "filter"
}, - {
- "filter": "hdr",
- "filterType": "boolean",
- "key": "/library/sections/1/hdr",
- "title": "HDR",
- "type": "filter"
}, - {
- "filter": "unwatched",
- "filterType": "boolean",
- "key": "/library/sections/1/unwatched",
- "title": "Unwatched",
- "type": "filter"
}, - {
- "filter": "inProgress",
- "filterType": "boolean",
- "key": "/library/sections/1/inProgress",
- "title": "In Progress",
- "type": "filter"
}, - {
- "filter": "unmatched",
- "filterType": "boolean",
- "key": "/library/sections/1/unmatched",
- "title": "Unmatched",
- "type": "filter"
}, - {
- "filter": "audioLanguage",
- "filterType": "string",
- "key": "/library/sections/1/audioLanguage",
- "title": "Audio Language",
- "type": "filter"
}, - {
- "filter": "subtitleLanguage",
- "filterType": "string",
- "key": "/library/sections/1/subtitleLanguage",
- "title": "Subtitle Language",
- "type": "filter"
}, - {
- "filter": "editionTitle",
- "filterType": "string",
- "key": "/library/sections/1/editionTitle",
- "title": "Edition",
- "type": "filter"
}, - {
- "filter": "label",
- "filterType": "string",
- "key": "/library/sections/1/label",
- "title": "Labels",
- "type": "filter"
}, - {
- "filter": "location",
- "filterType": "string",
- "key": "/library/sections/1/location",
- "title": "Folder Location",
- "type": "filter"
}
]
}
}Get list of first characters in this section
| sectionId required | integer Section identifier |
| type | integer The metadata type to filter on |
| sort | integer The metadata type to filter on |
| mediaQuery | object Examples:
This is a complex query built of several parameters. See API Info section for information on building media queries |
A small movie section
{- "MediaContainer": {
- "size": 14,
- "allowSync": false,
- "art": "/:/resources/movie-fanart.jpg",
- "content": "secondary",
- "identifier": "com.plexapp.plugins.library",
- "mediaTagPrefix": "/system/bundle/media/flags/",
- "mediaTagVersion": 1680272530,
- "thumb": "/:/resources/movie.png",
- "title1": "Movies",
- "title2": "By First Letter",
- "viewGroup": "secondary",
- "Directory": [
- {
- "size": 2,
- "key": "%23",
- "title": "#"
}, - {
- "size": 1,
- "key": "A",
- "title": "A"
}, - {
- "size": 1,
- "key": "C",
- "title": "C"
}, - {
- "size": 1,
- "key": "D",
- "title": "D"
}, - {
- "size": 1,
- "key": "E",
- "title": "E"
}, - {
- "size": 1,
- "key": "G",
- "title": "G"
}, - {
- "size": 1,
- "key": "J",
- "title": "J"
}, - {
- "size": 3,
- "key": "L",
- "title": "L"
}, - {
- "size": 1,
- "key": "M",
- "title": "M"
}, - {
- "size": 1,
- "key": "P",
- "title": "P"
}, - {
- "size": 1,
- "key": "S",
- "title": "S"
}, - {
- "size": 1,
- "key": "T",
- "title": "T"
}, - {
- "size": 2,
- "key": "V",
- "title": "V"
}, - {
- "size": 1,
- "key": "Z",
- "title": "Z"
}
]
}
}Get the prefs for a section by id and potentially overriding the agent
| sectionId required | integer Section identifier |
| agent | string |
{- "MediaContainer": {
- "size": 171,
- "Setting": [
- {
- "id": "FriendlyName",
- "label": "Friendly name",
- "summary": "This name will be used to identify this media server to other computers on your network. If you leave it blank, your computer's name will be used instead.",
- "type": "text",
- "default": "",
- "value": "",
- "hidden": false,
- "advanced": false,
- "group": "general"
}, - {
- "id": "sendCrashReports",
- "label": "Send crash reports to Plex",
- "summary": "This helps us improve your experience.",
- "type": "bool",
- "default": true,
- "value": true,
- "hidden": false,
- "advanced": false,
- "group": "general"
}, - {
- "id": "ScheduledLibraryUpdateInterval",
- "label": "Library scan interval",
- "summary": "",
- "type": "int",
- "default": 3600,
- "value": 3600,
- "hidden": false,
- "advanced": false,
- "group": "library",
- "enumValues": "900:every 15 minutes|1800:every 30 minutes|3600:hourly|7200:every 2 hours|21600:every 6 hours|43200:every 12 hours|86400:daily"
}, - {
- "id": "OnDeckWindow",
- "label": "Weeks to consider for Continue Watching",
- "summary": "Media that has not been watched in this many weeks will not appear in Continue Watching.",
- "type": "int",
- "default": 16,
- "value": 16,
- "hidden": false,
- "advanced": true,
- "group": "library"
}, - {
- "id": "LibraryVideoPlayedAtBehaviour",
- "label": "Video play completion behaviour",
- "summary": "Decide whether to use end credits markers to determine the 'watched' state of video items. When markers are not available the selected threshold percentage will be used.",
- "type": "text",
- "default": "3",
- "value": "3",
- "hidden": false,
- "advanced": true,
- "group": "library",
- "enumValues": "0:at selected threshold percentage|1:at final credits marker position|2:at first credits marker position|3:earliest between threshold percent and first credits marker"
}, - {
- "id": "TranscoderH264MinimumCRF",
- "label": "",
- "summary": "",
- "type": "double",
- "default": 16,
- "value": 16,
- "hidden": true,
- "advanced": false,
- "group": "transcoder"
}
]
}
}Start a refresh of this section
| sectionId required | integer Section identifier |
| force | integer Enum: 0 1 Whether the update of metadata and items should be performed even if modification dates indicate the items have not change |
| path | string Restrict refresh to the specified path |
Get the sort mechanisms available in a section
| sectionId required | integer Section identifier |
{- "MediaContainer": {
- "size": 9,
- "allowSync": false,
- "art": "/:/resources/movie-fanart.jpg",
- "content": "secondary",
- "identifier": "com.plexapp.plugins.library",
- "mediaTagPrefix": "/system/bundle/media/flags/",
- "mediaTagVersion": 1680272530,
- "thumb": "/:/resources/movie.png",
- "title1": "Movies",
- "viewGroup": "secondary",
- "Directory": [
- {
- "default": "asc",
- "defaultDirection": "asc",
- "descKey": "titleSort:desc",
- "firstCharacterKey": "/library/sections/1/firstCharacter",
- "key": "titleSort",
- "title": "Title"
}, - {
- "defaultDirection": "desc",
- "descKey": "originallyAvailableAt:desc",
- "key": "originallyAvailableAt",
- "title": "Release Date"
}, - {
- "defaultDirection": "desc",
- "descKey": "rating:desc",
- "key": "rating",
- "title": "Critic Rating"
}, - {
- "defaultDirection": "desc",
- "descKey": "audienceRating:desc",
- "key": "audienceRating",
- "title": "Audience Rating"
}, - {
- "defaultDirection": "desc",
- "descKey": "duration:desc",
- "key": "duration",
- "title": "Duration"
}, - {
- "defaultDirection": "desc",
- "descKey": "addedAt:desc",
- "key": "addedAt",
- "title": "Date Added"
}, - {
- "defaultDirection": "desc",
- "descKey": "lastViewedAt:desc",
- "key": "lastViewedAt",
- "title": "Date Viewed"
}, - {
- "defaultDirection": "asc",
- "descKey": "mediaHeight:desc",
- "key": "mediaHeight",
- "title": "Resolution"
}, - {
- "defaultDirection": "desc",
- "descKey": "random:desc",
- "key": "random",
- "title": "Randomly"
}
]
}
}Get a stream (such a a sidecar subtitle stream)
| streamId required | integer The id of the stream |
| ext required | string The extension of the stream. Required to fetch the |
| encoding | string The requested encoding for the subtitle (only used for text subtitles) |
| format | string The requested format for the subtitle to convert the subtitles to (only used for text subtitles) |
| autoAdjustSubtitle | integer Enum: 0 1 Whether the server should attempt to automatically adjust the subtitle timestamps to match the media |
<html><head><title>Forbidden</title></head><body><h1>403 Forbidden</h1></body></html>
Set a stream offset in ms. This may not be respected by all clients
| streamId required | integer The id of the stream |
| ext required | string This is not a part of this endpoint but documented here to satisfy OpenAPI |
| offset | integer The offest in ms |
<html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>
Delete a stream. Only applies to downloaded subtitle streams or a sidecar subtitle when media deletion is enabled.
| streamId required | integer The id of the stream |
| ext required | string This is not a part of this endpoint but documented here to satisfy OpenAPI |
The the loudness of a stream in db, one number per line, one entry per 100ms
| streamId required | integer The id of the stream |
| subsample | integer Subsample result down to return only the provided number of samples |
-40.0 -40.0 -40.0 -36.9 -25.3 -22.9 -21.5 -20.6
The the loudness of a stream in db, one entry per 100ms
| streamId required | integer The id of the stream |
| subsample | integer Subsample result down to return only the provided number of samples |
{- "MediaContainer": {
- "size": 3215,
- "totalSamples": "3215",
- "Level": [
- {
- "v": -39.9
}, - {
- "v": -39.9
}, - {
- "v": -39.9
}, - {
- "v": -36.8
}, - {
- "v": -25.2
}, - {
- "v": -22.8
}, - {
- "v": -21.4
}, - {
- "v": -20.5
}, - {
- "v": -21.1
}, - {
- "v": -21.5
}, - {
- "v": -21.6
}, - {
- "v": -21.5
}, - {
- "v": -21.6
}, - {
- "v": -20.6
}
]
}
}Get all library tags of a type
| type | integer The type of tags to fetch |
{- "MediaContainer": {
- "size": 2274,
- "identifier": "com.plexapp.plugins.library",
- "mediaTagPrefix": "/system/bundle/media/flags/",
- "mediaTagVersion": 1680272530,
- "Directory": [
- {
- "id": 15,
- "filter": "actor=15",
- "tag": "Thomas Sadoski",
- "tagType": 6,
- "tagKey": "5d77683785719b001f3a4386",
}, - {
- "id": 184,
- "filter": "actor=184",
- "tag": "Julianne Moore",
- "tagType": 6,
- "tagKey": "5d7768256f4521001ea989be",
}, - {
- "id": 267,
- "filter": "actor=267",
- "tag": "Dwayne Johnson",
- "tagType": 6,
- "tagKey": "5d77682b6f4521001ea99f61",
}
]
}
}Create a new playlist. By default the playlist is blank.
| uri | string The content URI for what we're playing (e.g. |
| playQueueID | integer To create a playlist from an existing play queue. |
A created playlist
{- "MediaContainer": {
- "size": 1,
- "Metadata": [
- {
- "addedAt": 1476942219,
- "composite": "/playlists/2561805/composite/1485900004",
- "duration": 1512000,
- "key": "/playlists/2561805/items",
- "lastViewedAt": 1484680617,
- "leafCount": 8,
- "playlistType": "video",
- "ratingKey": "2561805",
- "smart": false,
- "title": "Background videos",
- "type": "playlist",
- "updatedAt": 1485900004,
- "viewCount": 8
}
]
}
}Edits a playlist in the same manner as editing metadata
| playlistId required | integer The ID of the playlist |
Clears a playlist, only works with dumb playlists. Returns the playlist.
| playlistId required | integer The ID of the playlist |
A created playlist
{- "MediaContainer": {
- "size": 1,
- "Metadata": [
- {
- "addedAt": 1476942219,
- "composite": "/playlists/2561805/composite/1485900004",
- "duration": 1512000,
- "key": "/playlists/2561805/items",
- "lastViewedAt": 1484680617,
- "leafCount": 8,
- "playlistType": "video",
- "ratingKey": "2561805",
- "smart": false,
- "title": "Background videos",
- "type": "playlist",
- "updatedAt": 1485900004,
- "viewCount": 8
}
]
}
}Adds a generator to a playlist, same parameters as the POST above. With a dumb playlist, this adds the specified items to the playlist. With a smart playlist, passing a new uri parameter replaces the rules for the playlist. Returns the playlist.
| playlistId required | integer The ID of the playlist |
| uri | string The content URI for the playlist. |
| playQueueID | integer The play queue to add to a playlist. |
A created playlist
{- "MediaContainer": {
- "size": 1,
- "Metadata": [
- {
- "addedAt": 1476942219,
- "composite": "/playlists/2561805/composite/1485900004",
- "duration": 1512000,
- "key": "/playlists/2561805/items",
- "lastViewedAt": 1484680617,
- "leafCount": 8,
- "playlistType": "video",
- "ratingKey": "2561805",
- "smart": false,
- "title": "Background videos",
- "type": "playlist",
- "updatedAt": 1485900004,
- "viewCount": 8
}
]
}
}Get a playlist's generator. Only used for optimized versions
| playlistId required | integer The ID of the playlist |
| generatorId required | integer The generator item ID to delete. |
{- "MediaContainer": {
- "size": 1,
- "Item": [
- {
- "composite": "/playlists/3215/items/467/composite/1716402079",
- "id": 467,
- "type": 42,
- "title": "Jack-Jack Attack",
- "target": "Optimized for TV",
- "targetTagID": 2,
- "Status": {
- "itemsCount": 1,
- "itemsCompleteCount": 1,
- "itemsSuccessfulCount": 1,
- "totalSize": 196226904,
- "state": "complete"
}, - "MediaSettings": {
- "videoQuality": 99,
- "videoBitrate": 8000,
- "maxVideoBitrate": 8000,
- "subtitles": "auto",
- "advancedSubtitles": "auto",
- "videoResolution": "1920x1080"
}, - "Policy": {
- "scope": "all",
- "unwatched": false
}, - "Location": {
- "uri": "library://82503060-0d68-4603-b594-8b071d54819e/item/%2Flibrary%2Fmetadata%2F146",
- "librarySectionID": 1
}, - "Device": {
- "profile": "Universal TV"
}
}
]
}
}Deletes an item from a playlist. Only works with dumb playlists.
| playlistId required | integer The ID of the playlist |
| generatorId required | integer The generator item ID to delete. |
A created playlist
{- "MediaContainer": {
- "size": 1,
- "Metadata": [
- {
- "addedAt": 1476942219,
- "composite": "/playlists/2561805/composite/1485900004",
- "duration": 1512000,
- "key": "/playlists/2561805/items",
- "lastViewedAt": 1484680617,
- "leafCount": 8,
- "playlistType": "video",
- "ratingKey": "2561805",
- "smart": false,
- "title": "Background videos",
- "type": "playlist",
- "updatedAt": 1485900004,
- "viewCount": 8
}
]
}
}Modify a playlist generator. Only used for optimizer
| playlistId required | integer The ID of the playlist |
| generatorId required | integer The generator item ID to modify. |
object Example: Item[type]=42&Item[title]=Jack-Jack Attack&Item[target]=&Item[targetTagID]=1&Item[locationID]=-1&Item[Location]=[object Object]&Item[Policy]=[object Object] Note: OpenAPI cannot properly render this query parameter example (See GHI). It should be rendered as: Item[type]=42&Item[title]=Jack-Jack Attack&Item[target]=&Item[targetTagID]=1&Item[locationID]=-1&Item[Location][uri]=library://82503060-0d68-4603-b594-8b071d54819e/item//library/metadata/146&Item[Policy][scope]=all&Item[Policy][value]=&Item[Policy][unwatched]=0 |
A created playlist
{- "MediaContainer": {
- "size": 1,
- "Metadata": [
- {
- "addedAt": 1476942219,
- "composite": "/playlists/2561805/composite/1485900004",
- "duration": 1512000,
- "key": "/playlists/2561805/items",
- "lastViewedAt": 1484680617,
- "leafCount": 8,
- "playlistType": "video",
- "ratingKey": "2561805",
- "smart": false,
- "title": "Background videos",
- "type": "playlist",
- "updatedAt": 1485900004,
- "viewCount": 8
}
]
}
}Get a playlist generator's items
| playlistId required | integer The ID of the playlist |
| generatorId required | integer The generator item ID to delete. |
{- "MediaContainer": {
- "size": 1,
- "Metadata": {
- "processingState": "processed",
- "processingStateContext": "good",
- "ratingKey": "146",
- "key": "/library/metadata/146",
- "guid": "plex://movie/5d9f3505ca3253001ef27c9e",
- "slug": "jack-jack-attack",
- "studio": "Pixar",
- "type": "movie",
- "title": "Jack-Jack Attack",
- "contentRating": "Not Rated",
- "summary": "In a dark room, Agent Rick Dicker interrogates Kari, a young girl with braces. He asks what happened. Kari explains that she was babysitting for an infant, Jack-Jack, who seems able to levitate, float, pass through walls, catch fire, and cause havoc. Kari stays nimble but barely holds on until an odd young man with orange hair and an \"S\" on his shirt rings the bell.",
- "audienceRating": 7.6,
- "year": 2008,
- "thumb": "/library/metadata/146/thumb/1715112830",
- "art": "/library/metadata/146/art/1715112830",
- "duration": 300000,
- "originallyAvailableAt": "2008-01-11",
- "addedAt": 1657899281,
- "updatedAt": 1715112830,
- "audienceRatingImage": "imdb://image.rating"
}
}
}Make a generator reprocess (refresh)
| playlistId required | integer The ID of the playlist |
| generatorId required | integer The generator item ID to act on |
| metadataId required | integer The metadata item ID to act on |
| action required | string Enum: "reprocess" "disable" "enable" The action to perform for this item on this optimizer queue |
Moves an item in a playlist. Only works with dumb playlists.
| playlistId required | integer The ID of the playlist |
| playlistItemId required | integer The playlist item ID to move. |
| after | integer The playlist item ID to insert the new item after. If not provided, item is moved to beginning of playlist |
A created playlist
{- "MediaContainer": {
- "size": 1,
- "Metadata": [
- {
- "addedAt": 1476942219,
- "composite": "/playlists/2561805/composite/1485900004",
- "duration": 1512000,
- "key": "/playlists/2561805/items",
- "lastViewedAt": 1484680617,
- "leafCount": 8,
- "playlistType": "video",
- "ratingKey": "2561805",
- "smart": false,
- "title": "Background videos",
- "type": "playlist",
- "updatedAt": 1485900004,
- "viewCount": 8
}
]
}
}Get all the generators in a playlist
| playlistId required | integer The ID of the playlist |
{- "MediaContainer": {
- "size": 1,
- "PlayQueueGenerator": [
- {
- "id": 468,
- "playlistID": 4787,
- "uri": "library://x/directory/%2Flibrary%2Fsections%2F1%2Fall%3Ftype%3D1%26sort%3DtitleSort%26addedAt%253C%253C%3D2024-01-01",
- "createdAt": 1716403491,
- "updatedAt": 1716403491,
- "changedAt": 509850,
- "type": -1
}
]
}
}Imports m3u playlists by passing a path on the server to scan for m3u-formatted playlist files, or a path to a single playlist file.
| path | string Example: path=/home/barkley/playlist.m3u Absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server. If the |
| force | integer Enum: 0 1 Force overwriting of duplicate playlists. By default, a playlist file uploaded with the same path will overwrite the existing playlist. The |
Endpoints for manipulating collections. In addition to these endpoints, /library/collections/:collectionId/X will be rerouted to /library/metadata/:collectionId/X and respond to those endpoints as well.
Add items to a collection by uri
| collectionId required | integer The collection id |
| uri required | string The URI describing the items to add to this collection |
{- "MediaContainer": {
- "size": "1",
- "allowSync": true,
- "art": "/:/resources/movie-fanart.jpg",
- "identifier": "com.plexapp.plugins.library",
- "librarySectionID": 26,
- "librarySectionTitle": "Movies",
- "librarySectionUUID": "70cb5089-b165-429b-809a-9e0a31493abf",
- "mediaTagPrefix": "/system/bundle/media/flags/",
- "mediaTagVersion": "1436742334",
- "thumb": "/:/resources/movie.png",
- "title1": "Movies",
- "title2": "All Movies",
- "viewGroup": "movie",
- "Metadata": [
- {
- "id": "1049",
- "ratingKey": "1049",
- "key": "/library/metadata/1049",
- "studio": "Paramount Pictures",
- "type": "movie",
- "title": "Zoolander",
- "contentRating": "PG-13",
- "summary": "FunnyStuff",
- "year": 2001,
- "tagline": "3% Body Fat. 1% Brain Activity.",
- "thumb": "/library/metadata/1049/thumb/1434341184",
- "art": "/library/metadata/1049/art/1434341184",
- "duration": 5129000,
- "originallyAvailableAt": "2001-09-27",
- "addedAt": 1408525217,
- "updatedAt": 1434341184,
- "chapterSource": "media",
- "primaryExtraKey": "/library/metadata/1073",
- "rating": 6,
- "Media": [
- {
- "id": 827,
- "duration": 5129000,
- "bitrate": 6564,
- "width": 720,
- "height": 576,
- "aspectRatio": 1.78,
- "audioChannels": 6,
- "audioCodec": "ac3",
- "videoCodec": "mpeg2video",
- "container": "mkv",
- "videoFrameRate": "PAL",
- "Part": [
- {
- "id": "827",
- "key": "/library/parts/827/file.mkv",
- "duration": 5129000,
- "file": "O:\\fatboy\\Media\\Ripped\\Movies\\Zoolander (2001).mkv",
- "size": 4208219125,
- "container": "mkv"
}
]
}
], - "Image": [
- {
- "type": "coverPoster",
- "alt": "Zoolander",
- "url": "/library/metadata/1049/thumb/1434341184"
}
], - "Genre": [
- {
- "tag": "Comedy"
}
], - "Writer": [
- {
- "tag": "Drake Sather"
}, - {
- "tag": "Ben Stiller"
}
], - "Director": [
- {
- "tag": "Ben Stiller"
}
], - "Country": [
- {
- "tag": "Australia"
}, - {
- "tag": "Germany"
}
], - "Role": [
- {
- "tag": "Ben Stiller"
}, - {
- "tag": "Owen Wilson"
}, - {
- "tag": "Christine Taylor"
}
]
}
]
}
}Delete an item from a collection
| collectionId required | integer The collection id |
| itemId required | integer The item to delete |
{- "MediaContainer": {
- "size": "1",
- "allowSync": true,
- "art": "/:/resources/movie-fanart.jpg",
- "identifier": "com.plexapp.plugins.library",
- "librarySectionID": 26,
- "librarySectionTitle": "Movies",
- "librarySectionUUID": "70cb5089-b165-429b-809a-9e0a31493abf",
- "mediaTagPrefix": "/system/bundle/media/flags/",
- "mediaTagVersion": "1436742334",
- "thumb": "/:/resources/movie.png",
- "title1": "Movies",
- "title2": "All Movies",
- "viewGroup": "movie",
- "Metadata": [
- {
- "id": "1049",
- "ratingKey": "1049",
- "key": "/library/metadata/1049",
- "studio": "Paramount Pictures",
- "type": "movie",
- "title": "Zoolander",
- "contentRating": "PG-13",
- "summary": "FunnyStuff",
- "year": 2001,
- "tagline": "3% Body Fat. 1% Brain Activity.",
- "thumb": "/library/metadata/1049/thumb/1434341184",
- "art": "/library/metadata/1049/art/1434341184",
- "duration": 5129000,
- "originallyAvailableAt": "2001-09-27",
- "addedAt": 1408525217,
- "updatedAt": 1434341184,
- "chapterSource": "media",
- "primaryExtraKey": "/library/metadata/1073",
- "rating": 6,
- "Media": [
- {
- "id": 827,
- "duration": 5129000,
- "bitrate": 6564,
- "width": 720,
- "height": 576,
- "aspectRatio": 1.78,
- "audioChannels": 6,
- "audioCodec": "ac3",
- "videoCodec": "mpeg2video",
- "container": "mkv",
- "videoFrameRate": "PAL",
- "Part": [
- {
- "id": "827",
- "key": "/library/parts/827/file.mkv",
- "duration": 5129000,
- "file": "O:\\fatboy\\Media\\Ripped\\Movies\\Zoolander (2001).mkv",
- "size": 4208219125,
- "container": "mkv"
}
]
}
], - "Image": [
- {
- "type": "coverPoster",
- "alt": "Zoolander",
- "url": "/library/metadata/1049/thumb/1434341184"
}
], - "Genre": [
- {
- "tag": "Comedy"
}
], - "Writer": [
- {
- "tag": "Drake Sather"
}, - {
- "tag": "Ben Stiller"
}
], - "Director": [
- {
- "tag": "Ben Stiller"
}
], - "Country": [
- {
- "tag": "Australia"
}, - {
- "tag": "Germany"
}
], - "Role": [
- {
- "tag": "Ben Stiller"
}, - {
- "tag": "Owen Wilson"
}, - {
- "tag": "Christine Taylor"
}
]
}
]
}
}Reorder items in a collection with one item after another
| collectionId required | integer The collection id |
| itemId required | integer The item to move |
| after | integer The item to move this item after. If not provided, this item will be moved to the beginning |
{- "MediaContainer": {
- "size": "1",
- "allowSync": true,
- "art": "/:/resources/movie-fanart.jpg",
- "identifier": "com.plexapp.plugins.library",
- "librarySectionID": 26,
- "librarySectionTitle": "Movies",
- "librarySectionUUID": "70cb5089-b165-429b-809a-9e0a31493abf",
- "mediaTagPrefix": "/system/bundle/media/flags/",
- "mediaTagVersion": "1436742334",
- "thumb": "/:/resources/movie.png",
- "title1": "Movies",
- "title2": "All Movies",
- "viewGroup": "movie",
- "Metadata": [
- {
- "id": "1049",
- "ratingKey": "1049",
- "key": "/library/metadata/1049",
- "studio": "Paramount Pictures",
- "type": "movie",
- "title": "Zoolander",
- "contentRating": "PG-13",
- "summary": "FunnyStuff",
- "year": 2001,
- "tagline": "3% Body Fat. 1% Brain Activity.",
- "thumb": "/library/metadata/1049/thumb/1434341184",
- "art": "/library/metadata/1049/art/1434341184",
- "duration": 5129000,
- "originallyAvailableAt": "2001-09-27",
- "addedAt": 1408525217,
- "updatedAt": 1434341184,
- "chapterSource": "media",
- "primaryExtraKey": "/library/metadata/1073",
- "rating": 6,
- "Media": [
- {
- "id": 827,
- "duration": 5129000,
- "bitrate": 6564,
- "width": 720,
- "height": 576,
- "aspectRatio": 1.78,
- "audioChannels": 6,
- "audioCodec": "ac3",
- "videoCodec": "mpeg2video",
- "container": "mkv",
- "videoFrameRate": "PAL",
- "Part": [
- {
- "id": "827",
- "key": "/library/parts/827/file.mkv",
- "duration": 5129000,
- "file": "O:\\fatboy\\Media\\Ripped\\Movies\\Zoolander (2001).mkv",
- "size": 4208219125,
- "container": "mkv"
}
]
}
], - "Image": [
- {
- "type": "coverPoster",
- "alt": "Zoolander",
- "url": "/library/metadata/1049/thumb/1434341184"
}
], - "Genre": [
- {
- "tag": "Comedy"
}
], - "Writer": [
- {
- "tag": "Drake Sather"
}, - {
- "tag": "Ben Stiller"
}
], - "Director": [
- {
- "tag": "Ben Stiller"
}
], - "Country": [
- {
- "tag": "Australia"
}, - {
- "tag": "Germany"
}
], - "Role": [
- {
- "tag": "Ben Stiller"
}, - {
- "tag": "Owen Wilson"
}, - {
- "tag": "Christine Taylor"
}
]
}
]
}
}The status endpoints give you information about current playbacks, play history, and even terminating sessions.
A playback session
{- "MediaContainer": {
- "size": 1,
- "Metadata": [
- {
- "details": "omitted",
- "Media": [
- {
- "details": "omitted",
- "Part": [
- {
- "details": "omitted",
- "decision": "directplay",
- "Stream": [
- {
- "details": "omitted",
- "location": "direct"
}, - {
- "details": "omitted",
- "location": "direct"
}
]
}
]
}
], - "User": {
- "id": "123456789",
- "title": "username"
}, - "Player": {
- "address": "127.0.0.1",
- "machineIdentifier": "abcdefghijklmnopqrstuvwx",
- "model": "Gecko",
- "platform": "macos",
- "platformVersion": "14.4",
- "product": "Plex HTPC for Mac",
- "remotePublicAddress": "1.2.3.4",
- "state": "playing",
- "title": "name.localdomain",
- "vendor": "Plex",
- "version": "1.58.0.106-d213ced1",
- "local": true,
- "relayed": false,
- "secure": true,
- "userID": 123456789
}, - "Session": {
- "id": "cdefghijklmnopqrstuvwxyz",
- "bandwidth": 5212,
- "location": "lan"
}
}
]
}
}An example of the media optimizer running
{- "MediaContainer": {
- "size": 1,
- "TranscodeJob": [
- {
- "generatorID": 467,
- "type": "transcode",
- "key": "/transcode/sessions/fb7b6af8-e75a-4fb4-9985-990e05f62119",
- "progress": 42,
- "speed": 20.299999237060547,
- "remaining": 8,
- "size": 82313268,
- "title": "Jack-Jack Attack (2008)",
- "thumb": "/library/metadata/146/thumb/1715112830",
- "ratingKey": "146",
- "targetTagID": 2
}
]
}
}List all playback history (Admin can see all users, others can only see their own).
Pagination should be used on this endpoint. Additionally this endpoint supports includeFields, excludeFields, includeElements, and excludeElements parameters.
| accountID | integer The account id to restrict view history |
| viewedAt | integer The time period to restrict history (typically of the form |
| librarySectionID | integer The library section id to restrict view history |
| metadataItemID | integer The metadata item to restrict view history (can provide the id for a show to see all of that show's view history). Note this is translated to |
| sort | Array of strings Example: sort=viewedAt:desc,accountID The field on which to sort. Multiple orderings can be specified separated by |
OK
{- "MediaContainer": {
- "size": 1,
- "totalSize": 33,
- "offset": 0,
- "Metadata": [
- {
- "historyKey": "/status/sessions/history/12",
- "key": "/library/metadata/1234",
- "ratingKey": "1234",
- "librarySectionID": "1",
- "title": "My Wonderful Movie",
- "type": "movie",
- "thumb": "/library/metadata/1234/thumb/1234567890",
- "originallyAvailableAt": "2023-01-01",
- "viewedAt": 1345678901,
- "accountID": 123456,
- "deviceID": 12
}
]
}
}Get a single history item by id
| historyId required | integer The id of the history item (the |
OK
{- "MediaContainer": {
- "size": 1,
- "totalSize": 33,
- "offset": 0,
- "Metadata": [
- {
- "historyKey": "/status/sessions/history/12",
- "key": "/library/metadata/1234",
- "ratingKey": "1234",
- "librarySectionID": "1",
- "title": "My Wonderful Movie",
- "type": "movie",
- "thumb": "/library/metadata/1234/thumb/1234567890",
- "originallyAvailableAt": "2023-01-01",
- "viewedAt": 1345678901,
- "accountID": 123456,
- "deviceID": 12
}
]
}
}Terminate a playback session kicking off the user
| sessionId required | string Example: sessionId=cdefghijklmnopqrstuvwxyz The session id (found in the |
| reason | string Example: reason=Stop Playing The reason to give to the user (typically displayed in the client) |
Activities provide a way to monitor and control asynchronous operations on the server. In order to receive real-time updates for activities, a client would normally subscribe via either EventSource or Websocket endpoints.
Activities are associated with HTTP replies via a special X-Plex-Activity header which contains the UUID of the activity.
Activities are optional cancellable. If cancellable, they may be cancelled via the DELETE endpoint.
List all activities on the server. Admins can see all activities but other users can only see their own
Activity of updating EPG and detecting credits
{- "MediaContainer": {
- "size": 2,
- "Activity": [
- {
- "uuid": "d6199ba1-fb5e-4cae-bf17-1a5369c1cf1e",
- "cancellable": false,
- "progress": 7,
- "subtitle": "Downloaded 173 airings",
- "title": "Refreshing EPG",
- "type": "provider.epg.load",
- "userID": 1
}, - {
- "uuid": "e3c8fe07-675b-47d0-b957-8ab8c20d0d18",
- "type": "media.generate.credits",
- "cancellable": false,
- "userID": 1,
- "title": "Detecting Credits",
- "subtitle": "Firefly S01 E05",
- "progress": -1
}
]
}
}Cancel a running activity. Admins can cancel all activities but other users can only cancel their own
| activityId required | string Example: d6199ba1-fb5e-4cae-bf17-1a5369c1cf1e The UUID of the activity to cancel. |
This describes the API for searching and applying updates to the Plex Media Server. Updates to the status can be observed via the Event API.
An example of update status
{- "MediaContainer": {
- "size": 1,
- "autoUpdateVersion": 1,
- "canInstall": true,
- "checkedAt": 1715109491,
- "status": 0,
- "Release": [
- {
- "version": "1.40.2.8395-c67dce28e",
- "added": "(PLEASE NOTE) Please also be patient when updating to this version if you have a very large database and allow the upgrade process to finish.\nRename 'un/played' to 'un/watched' terminology for video types (PM-1042)\nWe have identified an issue where automatic updates were not respecting custom paths for existing Windows 64-bit installs. Unfortunately, any automatic fix would introduce security vulnerabilities so we encourage users who installed in a custom path to uninstall and then manually reinstall Plex Media Server.",
- "fixed": "(Auto Update) Custom install paths are not respected when auto-updating on 64 bit Windows. (PM-1143)\n(CreditsDetection) Retry detection only a limited amount of times on failures (PM-1093)\n(DB Optimize) Server could become unresponsive during a DB optimize in certain circumstances (PM-1129)\n(History) Query parsing would return Bad Request when encountering includeFields arguments.\n(History) View history would yield fewer entries than requested (PM-1306)\n(Loudness Analysis) Some files could cause errors when preforming Loudness Analysis. (PM-627)\n(Mac) Linker optimization would incorrectly generate code that would cause the server to unexpectedly exit while syncing view state. (PM-1308)\n(Nvidia Shield) Running on Nvidia Shield would result in 'core component problem' error. (PM-1364)\n(Push Notifications) Used expensive DB query during playback progress notifications (PM-1166)\n(Thumbnails) Thumbnails were not properly updated when underlying file changed (PM-1162)\n(Trailers) Premium trailers and extras could fail to load (PM-1347)\n(Transcoder) On Windows, headless (no display attached) Nvidia cards were not recognized (PM-962)\n(Transcoder) On Windows, the first Intel device was used for transcoding regardless of which Intel device was selected (PM-962)",
- "state": "available"
}
]
}
}Apply any downloaded updates. Note that the two parameters tonight and skip are effectively mutually exclusive. The tonight parameter takes precedence and skip will be ignored if tonight is also passed.
| tonight | integer Enum: 0 1 Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install immediately. |
| skip | integer Enum: 0 1 Indicate that the latest version should be marked as skipped. The |
The butler is responsible for running periodic tasks. Some tasks run daily, others every few days, and some weekly. These includes database maintenance, metadata updating, thumbnail generation, media analysis, and other tasks.
Get the list of butler tasks and their scheduling
Example tasks
{- "ButlerTasks": {
- "ButlerTask": [
- {
- "name": "AutomaticUpdates",
- "interval": 1,
- "scheduleRandomized": false,
- "enabled": false
}, - {
- "name": "BackupDatabase",
- "interval": 3,
- "scheduleRandomized": false,
- "enabled": true,
- "title": "Backup Database",
- "description": "Create a backup copy of the server's database in the configured backup directory"
}, - {
- "name": "ButlerTaskGenerateAdMarkers",
- "interval": 1,
- "scheduleRandomized": false,
- "enabled": false
}, - {
- "name": "ButlerTaskGenerateCreditsMarkers",
- "interval": 1,
- "scheduleRandomized": true,
- "enabled": true
}, - {
- "name": "ButlerTaskGenerateIntroMarkers",
- "interval": 1,
- "scheduleRandomized": false,
- "enabled": true
}, - {
- "name": "ButlerTaskGenerateVoiceActivity",
- "interval": 1,
- "scheduleRandomized": true,
- "enabled": true
}, - {
- "name": "CleanOldBundles",
- "interval": 7,
- "scheduleRandomized": false,
- "enabled": true
}, - {
- "name": "CleanOldCacheFiles",
- "interval": 7,
- "scheduleRandomized": false,
- "enabled": true
}, - {
- "name": "DeepMediaAnalysis",
- "interval": 1,
- "scheduleRandomized": false,
- "enabled": true
}, - {
- "name": "GarbageCollectBlobs",
- "interval": 7,
- "scheduleRandomized": false,
- "enabled": true
}, - {
- "name": "GarbageCollectLibraryMedia",
- "interval": 1,
- "scheduleRandomized": false,
- "enabled": true
}, - {
- "name": "GenerateBlurHashes",
- "interval": 1,
- "scheduleRandomized": false,
- "enabled": true
}, - {
- "name": "GenerateChapterThumbs",
- "interval": 1,
- "scheduleRandomized": false,
- "enabled": true
}, - {
- "name": "GenerateMediaIndexFiles",
- "interval": 1,
- "scheduleRandomized": false,
- "enabled": false
}, - {
- "name": "LoudnessAnalysis",
- "interval": 1,
- "scheduleRandomized": false,
- "enabled": true
}, - {
- "name": "MusicAnalysis",
- "interval": 1,
- "scheduleRandomized": false,
- "enabled": true
}, - {
- "name": "OptimizeDatabase",
- "interval": 7,
- "scheduleRandomized": false,
- "enabled": true
}, - {
- "name": "RefreshEpgGuides",
- "interval": 1,
- "scheduleRandomized": true,
- "enabled": true
}, - {
- "name": "RefreshLibraries",
- "interval": 1,
- "scheduleRandomized": false,
- "enabled": false
}, - {
- "name": "RefreshLocalMedia",
- "interval": 3,
- "scheduleRandomized": false,
- "enabled": true
}, - {
- "name": "RefreshPeriodicMetadata",
- "interval": 1,
- "scheduleRandomized": true,
- "enabled": true
}, - {
- "name": "UpgradeMediaAnalysis",
- "interval": 1,
- "scheduleRandomized": false,
- "enabled": true
}
]
}
}This endpoint will attempt to start all Butler tasks that are enabled in the settings. Butler tasks normally run automatically during a time window configured on the server's Settings page but can be manually started using this endpoint. Tasks will run with the following criteria:
This endpoint will attempt to start a specific Butler task by name.
| task required | string Enum: "AutomaticUpdates" "BackupDatabase" "ButlerTaskGenerateAdMarkers" "ButlerTaskGenerateCreditsMarkers" "ButlerTaskGenerateIntroMarkers" "ButlerTaskGenerateVoiceActivity" "CleanOldBundles" "CleanOldCacheFiles" "DeepMediaAnalysis" "GarbageCollectBlobs" "GarbageCollectLibraryMedia" "GenerateBlurHashes" "GenerateChapterThumbs" "GenerateMediaIndexFiles" "LoudnessAnalysis" "MusicAnalysis" "OptimizeDatabase" "RefreshEpgGuides" "RefreshLibraries" "RefreshLocalMedia" "RefreshPeriodicMetadata" "UpgradeMediaAnalysis" The task name |
This endpoint will stop a currently running task by name, or remove it from the list of scheduled tasks if it exists
| task required | string Enum: "AutomaticUpdates" "BackupDatabase" "ButlerTaskGenerateAdMarkers" "ButlerTaskGenerateCreditsMarkers" "ButlerTaskGenerateIntroMarkers" "ButlerTaskGenerateVoiceActivity" "CleanOldBundles" "CleanOldCacheFiles" "DeepMediaAnalysis" "GarbageCollectBlobs" "GarbageCollectLibraryMedia" "GenerateBlurHashes" "GenerateChapterThumbs" "GenerateMediaIndexFiles" "LoudnessAnalysis" "MusicAnalysis" "OptimizeDatabase" "RefreshEpgGuides" "RefreshLibraries" "RefreshLocalMedia" "RefreshPeriodicMetadata" "UpgradeMediaAnalysis" The task name |
The server can notify clients in real-time of a wide range of events, from library scanning, to preferences being modified, to changes to media, and many other things. This is also the mechanism by which activity progress is reported.
Two protocols for receiving the events are available: EventSource (also known as SSE), and WebSocket.
Connect to the event source to get a stream of events
| filter | Array of strings By default, all events except logs are sent. A rich filtering mechanism is provided to allow clients to opt into or out of each event type using the
|
Connect to the web socket to get a stream of events
| filter | Array of strings By default, all events except logs are sent. A rich filtering mechanism is provided to allow clients to opt into or out of each event type using the
|
This endpoint will write a single-line log message, including a level and source to the main Plex Media Server log.
Note: This endpoint responds to all HTTP verbs except POST but PUT is preferred
| level | integer Enum: 0 1 2 3 4 An integer log level to write to the PMS log with.
|
| message | string The text of the message to write to the log. |
| source | string A string indicating the source of the message. |
This endpoint will write multiple lines to the main Plex Media Server log in a single request. It takes a set of query strings as would normally sent to the above PUT endpoint as a linefeed-separated block of POST data. The parameters for each query string match as above.
Line separated list of log items
level=3&source=diskless%20client&Things%20are%20OK%20right%20now level=0&source=diskless%20client&We%20have%20a%20problem
This endpoint will enable all Plex Media Serverlogs to be sent to the Papertrail networked logging site for a period of time
Note: This endpoint responds to all HTTP verbs but POST is preferred
| minutes | integer The number of minutes logging should be sent to Papertrail |
{- "MediaContainer": {
- "size": 171,
- "Setting": [
- {
- "id": "FriendlyName",
- "label": "Friendly name",
- "summary": "This name will be used to identify this media server to other computers on your network. If you leave it blank, your computer's name will be used instead.",
- "type": "text",
- "default": "",
- "value": "",
- "hidden": false,
- "advanced": false,
- "group": "general"
}, - {
- "id": "sendCrashReports",
- "label": "Send crash reports to Plex",
- "summary": "This helps us improve your experience.",
- "type": "bool",
- "default": true,
- "value": true,
- "hidden": false,
- "advanced": false,
- "group": "general"
}, - {
- "id": "ScheduledLibraryUpdateInterval",
- "label": "Library scan interval",
- "summary": "",
- "type": "int",
- "default": 3600,
- "value": 3600,
- "hidden": false,
- "advanced": false,
- "group": "library",
- "enumValues": "900:every 15 minutes|1800:every 30 minutes|3600:hourly|7200:every 2 hours|21600:every 6 hours|43200:every 12 hours|86400:daily"
}, - {
- "id": "OnDeckWindow",
- "label": "Weeks to consider for Continue Watching",
- "summary": "Media that has not been watched in this many weeks will not appear in Continue Watching.",
- "type": "int",
- "default": 16,
- "value": 16,
- "hidden": false,
- "advanced": true,
- "group": "library"
}, - {
- "id": "LibraryVideoPlayedAtBehaviour",
- "label": "Video play completion behaviour",
- "summary": "Decide whether to use end credits markers to determine the 'watched' state of video items. When markers are not available the selected threshold percentage will be used.",
- "type": "text",
- "default": "3",
- "value": "3",
- "hidden": false,
- "advanced": true,
- "group": "library",
- "enumValues": "0:at selected threshold percentage|1:at final credits marker position|2:at first credits marker position|3:earliest between threshold percent and first credits marker"
}, - {
- "id": "TranscoderH264MinimumCRF",
- "label": "",
- "summary": "",
- "type": "double",
- "default": 16,
- "value": 16,
- "hidden": true,
- "advanced": false,
- "group": "transcoder"
}
]
}
}Get a single preference and value
| id | string The preference to fetch |
{- "MediaContainer": {
- "size": 1,
- "Setting": [
- {
- "id": "FriendlyName",
- "label": "Friendly name",
- "summary": "This name will be used to identify this media server to other computers on your network. If you leave it blank, your computer's name will be used instead.",
- "type": "text",
- "default": "",
- "value": "",
- "hidden": false,
- "advanced": false,
- "group": "general"
}
]
}
}Available: 0.2.0
Get or create a download queue for this client by its client id and for this user as identified by the token
{- "MediaContainer": {
- "size": 1,
- "DownloadQueue": [
- {
- "id": 1,
- "status": "done",
- "itemCount": 0
}
]
}
}Available: 0.2.0
Get a download queue by its id
| queueId required | integer The queue id |
{- "MediaContainer": {
- "size": 1,
- "DownloadQueue": [
- {
- "id": 1,
- "status": "done",
- "itemCount": 0
}
]
}
}Available: 0.2.0
Add items to the download queue
| queueId required | integer The queue id |
| keys required | Array of strings Example: keys=/library/metadata/3,/library/metadata/6 Keys to add |
| advancedSubtitles | string Enum: "burn" "text" "unknown" Example: advancedSubtitles=burn Indicates how incompatible advanced subtitles (such as ass/ssa) should be included: * 'burn' - Burn incompatible advanced text subtitles into the video stream * 'text' - Transcode incompatible advanced text subtitles to a compatible text format, even if some markup is lost |
| audioBoost | integer >= 1 Example: audioBoost=50 Percentage of original audio loudness to use when transcoding (100 is equivalent to original volume, 50 is half, 200 is double, etc) |
| audioChannelCount | integer [ 1 .. 8 ] Example: audioChannelCount=5 Target video number of audio channels. |
| autoAdjustQuality | integer Enum: 0 1 Example: autoAdjustQuality=1 Indicates the client supports ABR. |
| autoAdjustSubtitle | integer Enum: 0 1 Example: autoAdjustSubtitle=1 Indicates if the server should adjust subtitles based on Voice Activity Data. |
| directPlay | integer Enum: 0 1 Example: directPlay=1 Indicates the client supports direct playing the indicated content. |
| directStream | integer Enum: 0 1 Example: directStream=1 Indicates the client supports direct streaming the video of the indicated content. |
| directStreamAudio | integer Enum: 0 1 Example: directStreamAudio=1 Indicates the client supports direct streaming the audio of the indicated content. |
| disableResolutionRotation | integer Enum: 0 1 Example: disableResolutionRotation=1 Indicates if resolution should be adjusted for orientation. |
| hasMDE | integer Enum: 0 1 Example: hasMDE=1 Ignore client profiles when determining if direct play is possible. Only has an effect when directPlay=1 and both mediaIndex and partIndex are specified and neither are -1 |
| location | string Enum: "lan" "wan" "cellular" Example: location=wan Network type of the client, can be used to help determine target bitrate. |
| mediaBufferSize | integer Example: mediaBufferSize=102400 Buffer size used in playback (in KB). Clients should specify a lower bound if not known exactly. This value could make the difference between transcoding and direct play on bandwidth constrained networks. |
| mediaIndex | integer Index of the media to transcode. -1 or not specified indicates let the server choose. |
| musicBitrate | integer >= 0 Example: musicBitrate=5000 Target bitrate for audio only files (in kbps, used to transcode). |
| offset | number Example: offset=90.5 Offset from the start of the media (in seconds). |
| partIndex | integer Index of the part to transcode. -1 or not specified indicates the server should join parts together in a transcode |
| path | string Example: path=/library/metadata/151671 Internal PMS path of the media to transcode. |
| peakBitrate | integer >= 0 Example: peakBitrate=12000 Maximum bitrate (in kbps) to use in ABR. |
| photoResolution | string^\d[x:]\d$ Example: photoResolution=1080x1080 Target photo resolution. |
| protocol | string Enum: "http" "hls" "dash" Example: protocol=dash Indicates the network streaming protocol to be used for the transcode session: * 'http' - include the file in the http response such as MKV streaming * 'hls' - hls stream (RFC 8216) * 'dash' - dash stream (ISO/IEC 23009-1:2022) |
| secondsPerSegment | integer Example: secondsPerSegment=5 Number of seconds to include in each transcoded segment |
| subtitleSize | integer >= 1 Example: subtitleSize=50 Percentage of original subtitle size to use when burning subtitles (100 is equivalent to original size, 50 is half, ect) |
| subtitles | string Enum: "auto" "burn" "none" "sidecar" "embedded" "segmented" "unknown" Example: subtitles=Burn Indicates how subtitles should be included: * 'auto' - Compute the appropriate subtitle setting automatically * 'burn' - Burn the selected subtitle; auto if no selected subtitle * 'none' - Ignore all subtitle streams * 'sidecar' - The selected subtitle should be provided as a sidecar * 'embedded' - The selected subtitle should be provided as an embedded stream * 'segmented' - The selected subtitle should be provided as a segmented stream |
| videoBitrate | integer >= 0 Example: videoBitrate=12000 Target video bitrate (in kbps). |
| videoQuality | integer [ 0 .. 99 ] Example: videoQuality=50 Target photo quality. |
| videoResolution | string^\d[x:]\d$ Example: videoResolution=1080x1080 Target maximum video resolution. |
| X-Plex-Client-Identifier required | string Unique per client. |
| X-Plex-Client-Profile-Extra | string Example: add-limitation(scope=videoCodec&scopeName=*&type=upperBound&name=video.frameRate&value=60&replace=true)+append-transcode-target-codec(type=videoProfile&context=streaming&videoCodec=h264,hevc&audioCodec=aac&protocol=dash) See Profile Augmentations . |
| X-Plex-Client-Profile-Name | string Example: generic Which built in Client Profile to use in the decision. Generally should only be used to specify the Generic profile. |
| X-Plex-Device | string Example: Windows Device the client is running on |
| X-Plex-Model | string Example: standalone Model of the device the client is running on |
| X-Plex-Platform | string Example: Chrome Client Platform |
| X-Plex-Platform-Version | string Example: 135 Client Platform Version |
| X-Plex-Session-Identifier | string Unique per client playback session. Used if a client can playback multiple items at a time (such as a browser with multiple tabs) |
{- "MediaContainer": {
- "size": 1,
- "AddedQueueItems": [
- {
- "key": "/library/metadata/146",
- "id": 23
}, - {
- "key": "/library/metadata/147",
- "id": 24
}
]
}
}Available: 0.2.0
Grab the decision for a download queue item
| queueId required | integer The queue id |
| itemId required | integer Example: 32 The item ids |
{- "MediaContainer": {
- "allowSync": "1",
- "directPlayDecisionCode": 3000,
- "directPlayDecisionText": "App cannot direct play this item. Direct play is disabled.",
- "generalDecisionCode": 1001,
- "generalDecisionText": "Direct play not available; Conversion OK.",
- "identifier": "com.plexapp.plugins.library",
- "librarySectionID": "60",
- "librarySectionTitle": "Test Files",
- "librarySectionUUID": "32ed11af-f829-4ee3-ae64-2665c66ced52",
- "mediaTagPrefix": "/system/bundle/media/flags/",
- "mediaTagVersion": "1663870359",
- "Metadata": [
- {
- "addedAt": 1745854354,
- "art": "/library/metadata/151671/art/1745854446",
- "createdAtAccuracy": "epoch,local",
- "createdAtTZOffset": "0",
- "duration": 634533,
- "Genre": [
- {
- "filter": "genre=1328",
- "id": "1328",
- "tag": "Animation"
}
], - "guid": "com.plexapp.agents.none://0abf533a5e478d72fb6f2aaa2543511f9bdaa269?lang=xn",
- "key": "/library/metadata/151671",
- "librarySectionID": "60",
- "librarySectionKey": "/library/sections/60",
- "librarySectionTitle": "Test Files",
- "Media": [
- {
- "audioChannels": 2,
- "audioCodec": "opus",
- "bitrate": 3538,
- "container": "mkv",
- "duration": 634533,
- "hasVoiceActivity": "0",
- "height": 720,
- "id": "221632",
- "Part": [
- {
- "bitrate": 3538,
- "container": "mkv",
- "decision": "transcode",
- "duration": 634533,
- "height": 720,
- "id": "221638",
- "protocol": "hls",
- "selected": true,
- "Stream": [
- {
- "bitDepth": 8,
- "bitrate": 3419,
- "codec": "h264",
- "decision": "transcode",
- "default": true,
- "displayTitle": "1080p",
- "extendedDisplayTitle": "1080p (H.264)",
- "frameRate": 60,
- "height": 720,
- "id": "332899",
- "location": "segments-av",
- "streamType": 1,
- "width": 1280
}, - {
- "bitrate": 119,
- "bitrateMode": "cbr",
- "channels": 2,
- "codec": "opus",
- "decision": "transcode",
- "default": true,
- "displayTitle": "Unknown (MP3 Stereo)",
- "extendedDisplayTitle": "Unknown (MP3 Stereo)",
- "id": "332900",
- "location": "segments-av",
- "selected": true,
- "streamType": 2
}
], - "videoProfile": "high",
- "width": 1280
}
], - "protocol": "hls",
- "selected": true,
- "videoCodec": "h264",
- "videoFrameRate": "60p",
- "videoProfile": "high",
- "videoResolution": "720p",
- "width": 1280
}
], - "originallyAvailableAt": "2025-04-28",
- "ratingKey": "151671",
- "Role": [
- {
- "filter": "actor=429547",
- "id": "429547",
- "tag": "Blender Foundation 2008"
}, - {
- "filter": "actor=429548",
- "id": "429548",
- "tag": "Janus Bager Kristensen 2013"
}
], - "subtype": "clip",
- "thumb": "/library/metadata/151671/thumb/1745854446",
- "title": "big-buck-bunny",
- "type": "movie",
- "UltraBlurColors": [
- {
- "bottomLeft": "61252d",
- "bottomRight": "2b6770",
- "topLeft": "1a2c53",
- "topRight": "2b686b"
}
], - "updatedAt": 1745854446,
- "year": 2025
}
], - "resourceSession": "E26A4C81-FB5E-4B49-BE2C-5973D7F5A98C",
- "size": 1,
- "transcodeDecisionCode": 1001,
- "transcodeDecisionText": "Direct play not available; Conversion OK."
}
}Available: 0.2.0
Get items from a download queue
| queueId required | integer The queue id |
{- "MediaContainer": {
- "size": 1,
- "DownloadQueueItem": [
- {
- "id": 1,
- "queueId": 1,
- "key": "/library/metadata/3",
- "status": "available",
- "DecisionResult": {
- "generalDecisionCode": 1000,
- "generalDecisionText": "Direct play OK.",
- "directPlayDecisionCode": 1000,
- "directPlayDecisionText": "Direct play OK."
}
}
]
}
}Available: 0.2.0
Get items from a download queue
| queueId required | integer The queue id |
| itemId required | Array of integers Example: 32,345,23 The item ids |
{- "MediaContainer": {
- "size": 1,
- "DownloadQueueItem": [
- {
- "id": 1,
- "queueId": 1,
- "key": "/library/metadata/3",
- "status": "available",
- "DecisionResult": {
- "generalDecisionCode": 1000,
- "generalDecisionText": "Direct play OK.",
- "directPlayDecisionCode": 1000,
- "directPlayDecisionText": "Direct play OK."
}
}
]
}
}Available: 0.2.0
Reprocess download queue items with previous decision parameters
| queueId required | integer The queue id |
| itemId required | Array of integers Example: 32,345,23 The item ids |
Retrieves the four colors extracted from an image for clients to use to generate an ultrablur image.
| url | string Example: url=/library/metadata/217745/art/1718931408 Url for image which requires color extraction. Can be relative PMS library path or absolute url. |
Colors extracted from provided image url.
{- "MediaContainer": {
- "size": 1,
- "UltraBlurColors": [
- {
- "topLeft": "44181b",
- "topRight": "55140b",
- "bottomRight": "9a3936",
- "bottomLeft": "31313a"
}
]
}
}Retrieves a server-side generated UltraBlur image based on the provided color inputs. Clients should always call this via the photo transcoder endpoint.
| topLeft | string Example: topLeft=3f280a The base color (hex) for the top left quadrant. |
| topRight | string Example: topRight=6b4713 The base color (hex) for the top right quadrant. |
| bottomRight | string Example: bottomRight=0f2a43 The base color (hex) for the bottom right quadrant. |
| bottomLeft | string Example: bottomLeft=1c425d The base color (hex) for the bottom left quadrant. |
| width | integer [ 320 .. 3840 ] Example: width=1920 Width in pixels for the image. |
| height | integer [ 240 .. 2160 ] Example: height=1080 Height in pixels for the image. |
| noise | integer Enum: 0 1 Example: noise=1 Whether to add noise to the ouput image. Noise can reduce color banding with the gradients. Image sizes with noise will be larger. |
<html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>
Transcode an image, possibly changing format or size
| url | string Example: url=/library/metadata/265/thumb/1715112705 The source URL for the image to transcode. Note, if this URL requires a token such as |
| format | string Enum: "jpg" "jpeg" "png" "ppm" The output format for the image; defaults to jpg |
| width | integer The desired width of the output image |
| height | integer The desired height of the output image |
| quality | integer [ -1 .. 127 ] The desired quality of the output. -1 means the highest quality. Defaults to -1 |
| background | string Example: background=#ff5522 The background color to apply before painting the image. Only really applicable if image has transparency. Defaults to none |
| upscale | integer Enum: 0 1 Indicates if image should be upscaled to the desired width/height. Defaults to false |
| minSize | integer Enum: 0 1 Indicates if image should be scaled to fit the smaller dimension. By default (false) the image is scaled to fit within the width/height specified but if this parameter is true, it will allow overflowing one dimension to fit the other. Essentially it is making the width/height minimum sizes of the image or sizing the image to fill the entire width/height even if it overflows one dimension. |
| rotate | integer Enum: 0 1 Obey the rotation values specified in EXIF data. Defaults to true. |
| blur | integer Apply a blur to the image, Defaults to 0 (none) |
| saturation | integer [ 0 .. 100 ] Scale the image saturation by the specified percentage. Defaults to 100 |
| opacity | integer [ 0 .. 100 ] Render the image at the specified opacity percentage. Defaults to 100 |
| chromaSubsampling | integer Enum: 0 1 2 3 Use the specified chroma subsambling.
|
| blendColor | string Example: blendColor=#ff5522 The color to blend with the image. Defaults to none |
<html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>
Make a decision on media playback based on client profile, and requested settings such as bandwidth and resolution.
| transcodeType required | string Enum: "video" "music" "audio" "subtitles" Type of transcode media |
| transcodeSessionId | string Transcode session UUID |
| advancedSubtitles | string Enum: "burn" "text" "unknown" Example: advancedSubtitles=burn Indicates how incompatible advanced subtitles (such as ass/ssa) should be included: * 'burn' - Burn incompatible advanced text subtitles into the video stream * 'text' - Transcode incompatible advanced text subtitles to a compatible text format, even if some markup is lost |
| audioBoost | integer >= 1 Example: audioBoost=50 Percentage of original audio loudness to use when transcoding (100 is equivalent to original volume, 50 is half, 200 is double, etc) |
| audioChannelCount | integer [ 1 .. 8 ] Example: audioChannelCount=5 Target video number of audio channels. |
| autoAdjustQuality | integer Enum: 0 1 Example: autoAdjustQuality=1 Indicates the client supports ABR. |
| autoAdjustSubtitle | integer Enum: 0 1 Example: autoAdjustSubtitle=1 Indicates if the server should adjust subtitles based on Voice Activity Data. |
| directPlay | integer Enum: 0 1 Example: directPlay=1 Indicates the client supports direct playing the indicated content. |
| directStream | integer Enum: 0 1 Example: directStream=1 Indicates the client supports direct streaming the video of the indicated content. |
| directStreamAudio | integer Enum: 0 1 Example: directStreamAudio=1 Indicates the client supports direct streaming the audio of the indicated content. |
| disableResolutionRotation | integer Enum: 0 1 Example: disableResolutionRotation=1 Indicates if resolution should be adjusted for orientation. |
| hasMDE | integer Enum: 0 1 Example: hasMDE=1 Ignore client profiles when determining if direct play is possible. Only has an effect when directPlay=1 and both mediaIndex and partIndex are specified and neither are -1 |
| location | string Enum: "lan" "wan" "cellular" Example: location=wan Network type of the client, can be used to help determine target bitrate. |
| mediaBufferSize | integer Example: mediaBufferSize=102400 Buffer size used in playback (in KB). Clients should specify a lower bound if not known exactly. This value could make the difference between transcoding and direct play on bandwidth constrained networks. |
| mediaIndex | integer Index of the media to transcode. -1 or not specified indicates let the server choose. |
| musicBitrate | integer >= 0 Example: musicBitrate=5000 Target bitrate for audio only files (in kbps, used to transcode). |
| offset | number Example: offset=90.5 Offset from the start of the media (in seconds). |
| partIndex | integer Index of the part to transcode. -1 or not specified indicates the server should join parts together in a transcode |
| path | string Example: path=/library/metadata/151671 Internal PMS path of the media to transcode. |
| peakBitrate | integer >= 0 Example: peakBitrate=12000 Maximum bitrate (in kbps) to use in ABR. |
| photoResolution | string^\d[x:]\d$ Example: photoResolution=1080x1080 Target photo resolution. |
| protocol | string Enum: "http" "hls" "dash" Example: protocol=dash Indicates the network streaming protocol to be used for the transcode session: * 'http' - include the file in the http response such as MKV streaming * 'hls' - hls stream (RFC 8216) * 'dash' - dash stream (ISO/IEC 23009-1:2022) |
| secondsPerSegment | integer Example: secondsPerSegment=5 Number of seconds to include in each transcoded segment |
| subtitleSize | integer >= 1 Example: subtitleSize=50 Percentage of original subtitle size to use when burning subtitles (100 is equivalent to original size, 50 is half, ect) |
| subtitles | string Enum: "auto" "burn" "none" "sidecar" "embedded" "segmented" "unknown" Example: subtitles=Burn Indicates how subtitles should be included: * 'auto' - Compute the appropriate subtitle setting automatically * 'burn' - Burn the selected subtitle; auto if no selected subtitle * 'none' - Ignore all subtitle streams * 'sidecar' - The selected subtitle should be provided as a sidecar * 'embedded' - The selected subtitle should be provided as an embedded stream * 'segmented' - The selected subtitle should be provided as a segmented stream |
| videoBitrate | integer >= 0 Example: videoBitrate=12000 Target video bitrate (in kbps). |
| videoQuality | integer [ 0 .. 99 ] Example: videoQuality=50 Target photo quality. |
| videoResolution | string^\d[x:]\d$ Example: videoResolution=1080x1080 Target maximum video resolution. |
| X-Plex-Client-Identifier required | string Unique per client. |
| X-Plex-Client-Profile-Extra | string Example: add-limitation(scope=videoCodec&scopeName=*&type=upperBound&name=video.frameRate&value=60&replace=true)+append-transcode-target-codec(type=videoProfile&context=streaming&videoCodec=h264,hevc&audioCodec=aac&protocol=dash) See Profile Augmentations . |
| X-Plex-Client-Profile-Name | string Example: generic Which built in Client Profile to use in the decision. Generally should only be used to specify the Generic profile. |
| X-Plex-Device | string Example: Windows Device the client is running on |
| X-Plex-Model | string Example: standalone Model of the device the client is running on |
| X-Plex-Platform | string Example: Chrome Client Platform |
| X-Plex-Platform-Version | string Example: 135 Client Platform Version |
| X-Plex-Session-Identifier | string Unique per client playback session. Used if a client can playback multiple items at a time (such as a browser with multiple tabs) |
{- "MediaContainer": {
- "allowSync": "1",
- "directPlayDecisionCode": 3000,
- "directPlayDecisionText": "App cannot direct play this item. Direct play is disabled.",
- "generalDecisionCode": 1001,
- "generalDecisionText": "Direct play not available; Conversion OK.",
- "identifier": "com.plexapp.plugins.library",
- "librarySectionID": "60",
- "librarySectionTitle": "Test Files",
- "librarySectionUUID": "32ed11af-f829-4ee3-ae64-2665c66ced52",
- "mediaTagPrefix": "/system/bundle/media/flags/",
- "mediaTagVersion": "1663870359",
- "Metadata": [
- {
- "addedAt": 1745854354,
- "art": "/library/metadata/151671/art/1745854446",
- "createdAtAccuracy": "epoch,local",
- "createdAtTZOffset": "0",
- "duration": 634533,
- "Genre": [
- {
- "filter": "genre=1328",
- "id": "1328",
- "tag": "Animation"
}
], - "guid": "com.plexapp.agents.none://0abf533a5e478d72fb6f2aaa2543511f9bdaa269?lang=xn",
- "key": "/library/metadata/151671",
- "librarySectionID": "60",
- "librarySectionKey": "/library/sections/60",
- "librarySectionTitle": "Test Files",
- "Media": [
- {
- "audioChannels": 2,
- "audioCodec": "opus",
- "bitrate": 3538,
- "container": "mkv",
- "duration": 634533,
- "hasVoiceActivity": "0",
- "height": 720,
- "id": "221632",
- "Part": [
- {
- "bitrate": 3538,
- "container": "mkv",
- "decision": "transcode",
- "duration": 634533,
- "height": 720,
- "id": "221638",
- "protocol": "hls",
- "selected": true,
- "Stream": [
- {
- "bitDepth": 8,
- "bitrate": 3419,
- "codec": "h264",
- "decision": "transcode",
- "default": true,
- "displayTitle": "1080p",
- "extendedDisplayTitle": "1080p (H.264)",
- "frameRate": 60,
- "height": 720,
- "id": "332899",
- "location": "segments-av",
- "streamType": 1,
- "width": 1280
}, - {
- "bitrate": 119,
- "bitrateMode": "cbr",
- "channels": 2,
- "codec": "opus",
- "decision": "transcode",
- "default": true,
- "displayTitle": "Unknown (MP3 Stereo)",
- "extendedDisplayTitle": "Unknown (MP3 Stereo)",
- "id": "332900",
- "location": "segments-av",
- "selected": true,
- "streamType": 2
}
], - "videoProfile": "high",
- "width": 1280
}
], - "protocol": "hls",
- "selected": true,
- "videoCodec": "h264",
- "videoFrameRate": "60p",
- "videoProfile": "high",
- "videoResolution": "720p",
- "width": 1280
}
], - "originallyAvailableAt": "2025-04-28",
- "ratingKey": "151671",
- "Role": [
- {
- "filter": "actor=429547",
- "id": "429547",
- "tag": "Blender Foundation 2008"
}, - {
- "filter": "actor=429548",
- "id": "429548",
- "tag": "Janus Bager Kristensen 2013"
}
], - "subtype": "clip",
- "thumb": "/library/metadata/151671/thumb/1745854446",
- "title": "big-buck-bunny",
- "type": "movie",
- "UltraBlurColors": [
- {
- "bottomLeft": "61252d",
- "bottomRight": "2b6770",
- "topLeft": "1a2c53",
- "topRight": "2b686b"
}
], - "updatedAt": 1745854446,
- "year": 2025
}
], - "resourceSession": "E26A4C81-FB5E-4B49-BE2C-5973D7F5A98C",
- "size": 1,
- "transcodeDecisionCode": 1001,
- "transcodeDecisionText": "Direct play not available; Conversion OK."
}
}Manually trigger a transcoder fallback ex: HEVC to h.264 or hw to sw
| transcodeType required | string Enum: "video" "music" "audio" "subtitles" Type of transcode media |
| transcodeSessionId | string Transcode session UUID |
Starts the transcoder and returns the corresponding streaming resource document.
| transcodeType required | string Enum: "video" "music" "audio" "subtitles" Type of transcode media |
| transcodeSessionId | string Transcode session UUID |
| advancedSubtitles | string Enum: "burn" "text" "unknown" Example: advancedSubtitles=burn Indicates how incompatible advanced subtitles (such as ass/ssa) should be included: * 'burn' - Burn incompatible advanced text subtitles into the video stream * 'text' - Transcode incompatible advanced text subtitles to a compatible text format, even if some markup is lost |
| audioBoost | integer >= 1 Example: audioBoost=50 Percentage of original audio loudness to use when transcoding (100 is equivalent to original volume, 50 is half, 200 is double, etc) |
| audioChannelCount | integer [ 1 .. 8 ] Example: audioChannelCount=5 Target video number of audio channels. |
| autoAdjustQuality | integer Enum: 0 1 Example: autoAdjustQuality=1 Indicates the client supports ABR. |
| autoAdjustSubtitle | integer Enum: 0 1 Example: autoAdjustSubtitle=1 Indicates if the server should adjust subtitles based on Voice Activity Data. |
| directPlay | integer Enum: 0 1 Example: directPlay=1 Indicates the client supports direct playing the indicated content. |
| directStream | integer Enum: 0 1 Example: directStream=1 Indicates the client supports direct streaming the video of the indicated content. |
| directStreamAudio | integer Enum: 0 1 Example: directStreamAudio=1 Indicates the client supports direct streaming the audio of the indicated content. |
| disableResolutionRotation | integer Enum: 0 1 Example: disableResolutionRotation=1 Indicates if resolution should be adjusted for orientation. |
| hasMDE | integer Enum: 0 1 Example: hasMDE=1 Ignore client profiles when determining if direct play is possible. Only has an effect when directPlay=1 and both mediaIndex and partIndex are specified and neither are -1 |
| location | string Enum: "lan" "wan" "cellular" Example: location=wan Network type of the client, can be used to help determine target bitrate. |
| mediaBufferSize | integer Example: mediaBufferSize=102400 Buffer size used in playback (in KB). Clients should specify a lower bound if not known exactly. This value could make the difference between transcoding and direct play on bandwidth constrained networks. |
| mediaIndex | integer Index of the media to transcode. -1 or not specified indicates let the server choose. |
| musicBitrate | integer >= 0 Example: musicBitrate=5000 Target bitrate for audio only files (in kbps, used to transcode). |
| offset | number Example: offset=90.5 Offset from the start of the media (in seconds). |
| partIndex | integer Index of the part to transcode. -1 or not specified indicates the server should join parts together in a transcode |
| path | string Example: path=/library/metadata/151671 Internal PMS path of the media to transcode. |
| peakBitrate | integer >= 0 Example: peakBitrate=12000 Maximum bitrate (in kbps) to use in ABR. |
| photoResolution | string^\d[x:]\d$ Example: photoResolution=1080x1080 Target photo resolution. |
| protocol | string Enum: "http" "hls" "dash" Example: protocol=dash Indicates the network streaming protocol to be used for the transcode session: * 'http' - include the file in the http response such as MKV streaming * 'hls' - hls stream (RFC 8216) * 'dash' - dash stream (ISO/IEC 23009-1:2022) |
| secondsPerSegment | integer Example: secondsPerSegment=5 Number of seconds to include in each transcoded segment |
| subtitleSize | integer >= 1 Example: subtitleSize=50 Percentage of original subtitle size to use when burning subtitles (100 is equivalent to original size, 50 is half, ect) |
| subtitles | string Enum: "auto" "burn" "none" "sidecar" "embedded" "segmented" "unknown" Example: subtitles=Burn Indicates how subtitles should be included: * 'auto' - Compute the appropriate subtitle setting automatically * 'burn' - Burn the selected subtitle; auto if no selected subtitle * 'none' - Ignore all subtitle streams * 'sidecar' - The selected subtitle should be provided as a sidecar * 'embedded' - The selected subtitle should be provided as an embedded stream * 'segmented' - The selected subtitle should be provided as a segmented stream |
| videoBitrate | integer >= 0 Example: videoBitrate=12000 Target video bitrate (in kbps). |
| videoQuality | integer [ 0 .. 99 ] Example: videoQuality=50 Target photo quality. |
| videoResolution | string^\d[x:]\d$ Example: videoResolution=1080x1080 Target maximum video resolution. |
| X-Plex-Client-Identifier required | string Unique per client. |
| X-Plex-Client-Profile-Extra | string Example: add-limitation(scope=videoCodec&scopeName=*&type=upperBound&name=video.frameRate&value=60&replace=true)+append-transcode-target-codec(type=videoProfile&context=streaming&videoCodec=h264,hevc&audioCodec=aac&protocol=dash) See Profile Augmentations . |
| X-Plex-Client-Profile-Name | string Example: generic Which built in Client Profile to use in the decision. Generally should only be used to specify the Generic profile. |
| X-Plex-Device | string Example: Windows Device the client is running on |
| X-Plex-Model | string Example: standalone Model of the device the client is running on |
| X-Plex-Platform | string Example: Chrome Client Platform |
| X-Plex-Platform-Version | string Example: 135 Client Platform Version |
| X-Plex-Session-Identifier | string Unique per client playback session. Used if a client can playback multiple items at a time (such as a browser with multiple tabs) |
<?xml version="1.0" encoding="utf-8"?> <MPD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:mpeg:dash:schema:mpd:2011" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="urn:mpeg:dash:schema:mpd:2011 http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-DASH_schema_files/DASH-MPD.xsd" profiles="urn:mpeg:dash:profile:isoff-live:2011" type="static" mediaPresentationDuration="PT0H10M34.5333S" maxSegmentDuration="PT2S" minBufferTime="PT10S"> <Period start="PT0S" id="0" duration="PT0H10M34.5333S"> <AdaptationSet segmentAlignment="true"> <SegmentTemplate timescale="1" duration="1" initialization="session/00lsab52ccmh9htfgwqz0o8k/$RepresentationID$/header" media="session/00lsab52ccmh9htfgwqz0o8k/$RepresentationID$/$Number$.m4s" startNumber="0"> </SegmentTemplate> <Representation id="0" mimeType="video/mp4" codecs="avc1.640028" bandwidth="20000000" width="1920" height="1080"> </Representation> </AdaptationSet> <AdaptationSet segmentAlignment="true"> <SegmentTemplate timescale="1" duration="1" initialization="session/00lsab52ccmh9htfgwqz0o8k/$RepresentationID$/header" media="session/00lsab52ccmh9htfgwqz0o8k/$RepresentationID$/$Number$.m4s" startNumber="0"> </SegmentTemplate> <Representation id="1" mimeType="audio/mp4" codecs="mp4a.40.2" bandwidth="256000" audioSamplingRate="48000"> <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/> </Representation> </AdaptationSet> </Period> </MPD>
Only transcode subtitle streams.
| transcodeType required | string Enum: "video" "music" "audio" "subtitles" Type of transcode media |
| transcodeSessionId | string Transcode session UUID |
| advancedSubtitles | string Enum: "burn" "text" "unknown" Example: advancedSubtitles=burn Indicates how incompatible advanced subtitles (such as ass/ssa) should be included: * 'burn' - Burn incompatible advanced text subtitles into the video stream * 'text' - Transcode incompatible advanced text subtitles to a compatible text format, even if some markup is lost |
| audioBoost | integer >= 1 Example: audioBoost=50 Percentage of original audio loudness to use when transcoding (100 is equivalent to original volume, 50 is half, 200 is double, etc) |
| audioChannelCount | integer [ 1 .. 8 ] Example: audioChannelCount=5 Target video number of audio channels. |
| autoAdjustQuality | integer Enum: 0 1 Example: autoAdjustQuality=1 Indicates the client supports ABR. |
| autoAdjustSubtitle | integer Enum: 0 1 Example: autoAdjustSubtitle=1 Indicates if the server should adjust subtitles based on Voice Activity Data. |
| directPlay | integer Enum: 0 1 Example: directPlay=1 Indicates the client supports direct playing the indicated content. |
| directStream | integer Enum: 0 1 Example: directStream=1 Indicates the client supports direct streaming the video of the indicated content. |
| directStreamAudio | integer Enum: 0 1 Example: directStreamAudio=1 Indicates the client supports direct streaming the audio of the indicated content. |
| disableResolutionRotation | integer Enum: 0 1 Example: disableResolutionRotation=1 Indicates if resolution should be adjusted for orientation. |
| hasMDE | integer Enum: 0 1 Example: hasMDE=1 Ignore client profiles when determining if direct play is possible. Only has an effect when directPlay=1 and both mediaIndex and partIndex are specified and neither are -1 |
| location | string Enum: "lan" "wan" "cellular" Example: location=wan Network type of the client, can be used to help determine target bitrate. |
| mediaBufferSize | integer Example: mediaBufferSize=102400 Buffer size used in playback (in KB). Clients should specify a lower bound if not known exactly. This value could make the difference between transcoding and direct play on bandwidth constrained networks. |
| mediaIndex | integer Index of the media to transcode. -1 or not specified indicates let the server choose. |
| musicBitrate | integer >= 0 Example: musicBitrate=5000 Target bitrate for audio only files (in kbps, used to transcode). |
| offset | number Example: offset=90.5 Offset from the start of the media (in seconds). |
| partIndex | integer Index of the part to transcode. -1 or not specified indicates the server should join parts together in a transcode |
| path | string Example: path=/library/metadata/151671 Internal PMS path of the media to transcode. |
| peakBitrate | integer >= 0 Example: peakBitrate=12000 Maximum bitrate (in kbps) to use in ABR. |
| photoResolution | string^\d[x:]\d$ Example: photoResolution=1080x1080 Target photo resolution. |
| protocol | string Enum: "http" "hls" "dash" Example: protocol=dash Indicates the network streaming protocol to be used for the transcode session: * 'http' - include the file in the http response such as MKV streaming * 'hls' - hls stream (RFC 8216) * 'dash' - dash stream (ISO/IEC 23009-1:2022) |
| secondsPerSegment | integer Example: secondsPerSegment=5 Number of seconds to include in each transcoded segment |
| subtitleSize | integer >= 1 Example: subtitleSize=50 Percentage of original subtitle size to use when burning subtitles (100 is equivalent to original size, 50 is half, ect) |
| subtitles | string Enum: "auto" "burn" "none" "sidecar" "embedded" "segmented" "unknown" Example: subtitles=Burn Indicates how subtitles should be included: * 'auto' - Compute the appropriate subtitle setting automatically * 'burn' - Burn the selected subtitle; auto if no selected subtitle * 'none' - Ignore all subtitle streams * 'sidecar' - The selected subtitle should be provided as a sidecar * 'embedded' - The selected subtitle should be provided as an embedded stream * 'segmented' - The selected subtitle should be provided as a segmented stream |
| videoBitrate | integer >= 0 Example: videoBitrate=12000 Target video bitrate (in kbps). |
| videoQuality | integer [ 0 .. 99 ] Example: videoQuality=50 Target photo quality. |
| videoResolution | string^\d[x:]\d$ Example: videoResolution=1080x1080 Target maximum video resolution. |
| X-Plex-Client-Identifier required | string Unique per client. |
| X-Plex-Client-Profile-Extra | string Example: add-limitation(scope=videoCodec&scopeName=*&type=upperBound&name=video.frameRate&value=60&replace=true)+append-transcode-target-codec(type=videoProfile&context=streaming&videoCodec=h264,hevc&audioCodec=aac&protocol=dash) See Profile Augmentations . |
| X-Plex-Client-Profile-Name | string Example: generic Which built in Client Profile to use in the decision. Generally should only be used to specify the Generic profile. |
| X-Plex-Device | string Example: Windows Device the client is running on |
| X-Plex-Model | string Example: standalone Model of the device the client is running on |
| X-Plex-Platform | string Example: Chrome Client Platform |
| X-Plex-Platform-Version | string Example: 135 Client Platform Version |
| X-Plex-Session-Identifier | string Unique per client playback session. Used if a client can playback multiple items at a time (such as a browser with multiple tabs) |
1 00:00:02,499 --> 00:00:06,416 [SERENE MUSIC] 2 00:00:11,791 --> 00:00:13,958 [BROOK BABBLES] [FLY BUZZES] 3 00:00:16,166 --> 00:00:17,666 [BIRD TWEETS] 4 00:00:17,666 --> 00:00:18,708 [WINGS FLAP] 5 00:00:19,833 --> 00:00:20,374 [BIRD TWEETS] [WINGS FLAP] 6 00:00:20,374 --> 00:00:21,041 [THUD] 7 00:00:21,374 --> 00:00:22,249 [THUD] 8 00:00:22,249 --> 00:00:23,083 [SQUIRREL LAUGHS] 9 00:00:26,249 --> 00:00:27,541 [SNORES] 10 00:00:29,416 --> 00:00:30,708 [SNORES] 11 00:00:32,749 --> 00:00:34,041 [BUNNY SNORES] 12 00:00:35,916 --> 00:00:37,249 [BUNNY SNORES]
Media providers are the starting points for the entire Plex Media Server media library API. It defines the paths for the groups of endpoints. The /media/providers should be the only hard-coded path in clients when accessing the media library. Non-media library endpoints are outside the scope of the media provider. See the description in See the section in API Info for more information on how to use media providers.
Get the list of all available media providers for this PMS. This will generally include the library provider and possibly EPG if DVR is set up.
{- "MediaContainer": {
- "size": 2,
- "allowCameraUpload": true,
- "allowChannelAccess": true,
- "allowMediaDeletion": true,
- "allowSharing": true,
- "allowSync": true,
- "allowTuners": true,
- "backgroundProcessing": true,
- "certificate": true,
- "companionProxy": true,
- "countryCode": "usa",
- "diagnostics": "logs,databases,streaminglogs",
- "eventStream": true,
- "friendlyName": "Server Name",
- "hubSearch": true,
- "itemClusters": true,
- "livetv": 7,
- "machineIdentifier": "c997cf82c4158cb986ccc0e8f829a6f5d5086a63",
- "mediaProviders": true,
- "multiuser": true,
- "musicAnalysis": 2,
- "myPlex": true,
- "myPlexMappingState": "mapped",
- "myPlexSigninState": "ok",
- "myPlexSubscription": true,
- "offlineTranscode": 1,
- "ownerFeatures": "adaptive_bitrate,advanced-playback-settings,camera_upload,collections,content_filter,download_certificates,dvr,federated-auth,hardware_transcoding,home,hwtranscode,item_clusters,kevin-bacon,livetv,loudness,lyrics,music-analysis,music_videos,pass,photosV6-edit,photosV6-tv-albums,premium_music_metadata,radio,session_bandwidth_restrictions,session_kick,shared-radio,sync,trailers,tuner-sharing,type-first,ump-matching-pref,unsupportedtuners,webhooks",
- "platform": "MacOSX",
- "platformVersion": "14.4.1",
- "pluginHost": true,
- "pushNotifications": false,
- "readOnlyLibraries": false,
- "streamingBrainABRVersion": 3,
- "streamingBrainVersion": 2,
- "sync": true,
- "transcoderActiveVideoSessions": 0,
- "transcoderAudio": true,
- "transcoderLyrics": true,
- "transcoderPhoto": true,
- "transcoderSubtitles": true,
- "transcoderVideo": true,
- "transcoderVideoBitrates": "64,96,208,320,720,1500,2000,3000,4000,8000,10000,12000,20000",
- "transcoderVideoQualities": "0,1,2,3,4,5,6,7,8,9,10,11,12",
- "transcoderVideoResolutions": "128,128,160,240,320,480,768,720,720,1080,1080,1080,1080",
- "updatedAt": 1714653009,
- "updater": true,
- "version": "1.40.2.8395-c67dce28e",
- "voiceSearch": true,
- "MediaProvider": [
- {
- "identifier": "com.plexapp.plugins.library",
- "title": "Library",
- "types": "video,audio,photo",
- "protocols": "stream,download",
- "Feature": [
- {
- "key": "/library/sections",
- "type": "content",
- "Directory": [
- {
- "hubKey": "/hubs",
- "title": "Home"
}, - {
- "agent": "tv.plex.agents.movie",
- "language": "en-US",
- "refreshing": false,
- "scanner": "Plex Movie",
- "uuid": "82503060-0d68-4603-b594-8b071d54819e",
- "id": "1",
- "key": "/library/sections/1",
- "hubKey": "/hubs/sections/1",
- "type": "movie",
- "title": "Movies",
- "updatedAt": 1689270983,
- "scannedAt": 1706626696,
- "Pivot": [
- {
- "id": "recommended",
- "key": "/hubs/sections/1",
- "type": "hub",
- "title": "Recommended",
- "context": "content.discover",
- "symbol": "star"
}, - {
- "id": "library",
- "key": "/library/sections/1/all?type=1",
- "type": "list",
- "title": "Library",
- "context": "content.library",
- "symbol": "library"
}, - {
- "id": "collections",
- "key": "/library/sections/1/collections",
- "type": "list",
- "title": "Collections",
- "context": "content.collections",
- "symbol": "stack"
}, - {
- "id": "categories",
- "key": "/library/sections/1/categories",
- "type": "list",
- "title": "Categories",
- "context": "content.categories",
- "symbol": "stack"
}
]
}, - {
- "agent": "tv.plex.agents.series",
- "language": "en-US",
- "refreshing": false,
- "scanner": "Plex TV Series",
- "uuid": "3a85ee1d-238c-4af9-88ee-45fc634fc478",
- "id": "2",
- "key": "/library/sections/2",
- "hubKey": "/hubs/sections/2",
- "type": "show",
- "title": "TV Shows",
- "updatedAt": 1682628353,
- "scannedAt": 1714485942,
- "Pivot": [
- {
- "id": "recommended",
- "key": "/hubs/sections/2",
- "type": "hub",
- "title": "Recommended",
- "context": "content.discover",
- "symbol": "star"
}, - {
- "id": "library",
- "key": "/library/sections/2/all?type=2",
- "type": "list",
- "title": "Library",
- "context": "content.library",
- "symbol": "library"
}, - {
- "id": "categories",
- "key": "/library/sections/2/categories",
- "type": "list",
- "title": "Categories",
- "context": "content.categories",
- "symbol": "stack"
}
]
}, - {
- "agent": "tv.plex.agents.music",
- "language": "en-US",
- "refreshing": false,
- "scanner": "Plex Music",
- "uuid": "d7fd8c81-a345-4e68-8113-92f23cb47e70",
- "id": "3",
- "key": "/library/sections/3",
- "hubKey": "/hubs/sections/3",
- "type": "artist",
- "title": "Music",
- "updatedAt": 1691606667,
- "scannedAt": 1690487664,
- "Pivot": [
- {
- "id": "recommended",
- "key": "/hubs/sections/3",
- "type": "hub",
- "title": "Recommended",
- "context": "content.discover",
- "symbol": "star"
}, - {
- "id": "library",
- "key": "/library/sections/3/all?type=8",
- "type": "list",
- "title": "Library",
- "context": "content.library",
- "symbol": "library"
}, - {
- "id": "playlists",
- "key": "/playlists?type=15§ionID=3&playlistType=audio",
- "type": "list",
- "title": "Playlists",
- "context": "content.playlists",
- "symbol": "playlist"
}
]
}, - {
- "id": "playlists",
- "key": "/playlists",
- "type": "playlist",
- "title": "Playlists",
- "Pivot": [
- {
- "id": "playlists.audio",
- "key": "/playlists?playlistType=audio",
- "type": "list",
- "title": "Music",
- "context": "content.playlists.music",
- "symbol": "playlist"
}, - {
- "id": "playlists.video",
- "key": "/playlists?playlistType=video",
- "type": "list",
- "title": "Video",
- "context": "content.playlists.video",
- "symbol": "playlist"
}
]
}
]
}, - {
- "key": "/hubs/search",
- "type": "search"
}, - {
- "key": "/library/matches",
- "type": "match"
}, - {
- "key": "/library/metadata",
- "type": "metadata"
}, - {
- "key": "/:/rate",
- "type": "rate"
}, - {
- "key": "/photo/:/transcode",
- "type": "imagetranscoder"
}, - {
- "key": "/hubs/promoted",
- "type": "promoted"
}, - {
- "key": "/hubs/continueWatching",
- "type": "continuewatching"
}, - {
- "key": "/actions",
- "type": "actions",
- "Action": [
- {
- "id": "removeFromContinueWatching",
- "key": "/actions/removeFromContinueWatching"
}
]
}, - {
- "flavor": "universal",
- "key": "/playlists",
- "type": "playlist"
}, - {
- "flavor": "universal",
- "key": "/playQueues",
- "type": "playqueue"
}, - {
- "key": "/library/collections",
- "type": "collection"
}, - {
- "scrobbleKey": "/:/scrobble",
- "unscrobbleKey": "/:/unscrobble",
- "key": "/:/timeline",
- "type": "timeline"
}, - {
- "type": "manage"
}, - {
- "type": "queryParser"
}, - {
- "flavor": "download",
- "type": "subscribe"
}
]
}, - {
- "id": 13,
- "parentID": 12,
- "identifier": "tv.plex.providers.epg.cloud:12",
- "providerIdentifier": "tv.plex.providers.epg.cloud",
- "title": "Live TV & DVR",
- "types": "video",
- "protocols": "livetv",
- "epgSource": "Gracenote",
- "friendlyName": "My Server",
- "Feature": [
- {
- "key": "/tv.plex.providers.epg.cloud:12/sections",
- "type": "content",
- "Directory": [
- {
- "id": "tv.plex.providers.epg.cloud:12",
- "hubKey": "/tv.plex.providers.epg.cloud:12/hubs/discover",
- "title": "Live TV & DVR",
- "Pivot": [
- {
- "id": "dvr.whatson",
- "key": "/tv.plex.providers.epg.cloud:12/hubs/discover",
- "type": "hub",
- "title": "What's On",
- "context": "content.dvr.discover",
- "symbol": "star"
}, - {
- "id": "dvr.guide",
- "key": "view://dvr/guide",
- "type": "view",
- "title": "Guide",
- "context": "content.dvr.guide",
- "symbol": "guide"
}, - {
- "id": "dvr.schedule",
- "key": "view://dvr/recording-schedule",
- "type": "view",
- "title": "DVR Schedule",
- "context": "content.dvr.schedule",
- "symbol": "schedule"
}, - {
- "id": "dvr.priority",
- "key": "view://dvr/recording-priority",
- "type": "view",
- "title": "Recording Priority",
- "context": "content.dvr.priority",
- "symbol": "list"
}, - {
- "id": "dvr.browse",
- "key": "/tv.plex.providers.epg.cloud:12/sections/2/all?type=4",
- "type": "list",
- "title": "Browse",
- "context": "content.dvr.browse",
- "symbol": "library"
}
]
}, - {
- "type": "mixed",
- "key": "/tv.plex.providers.epg.cloud:12/watchnow",
- "title": "Guide",
- "icon": "/:/resources/dvr/dvr-watchnow-icon.png"
}, - {
- "key": "/tv.plex.providers.epg.cloud:12/sections/1",
- "type": "movie",
- "title": "Movies",
- "icon": "/:/resources/dvr/dvr-movies-icon.png",
- "updatedAt": "171458958\""
}, - {
- "key": "/tv.plex.providers.epg.cloud:12/sections/2",
- "type": "show",
- "title": "Shows",
- "icon": "/:/resources/dvr/dvr-allshows-icon.png",
- "updatedAt": "171458958\""
}, - {
- "key": "/tv.plex.providers.epg.cloud:12/sections/3",
- "type": "show",
- "title": "Sports",
- "icon": "/:/resources/dvr/dvr-sports-icon.png",
- "updatedAt": "171458958\""
}
]
}, - {
- "key": "/tv.plex.providers.epg.cloud:12/hubs/search",
- "type": "search"
}, - {
- "key": "/tv.plex.providers.epg.cloud:12/matches",
- "type": "match"
}, - {
- "key": "/tv.plex.providers.epg.cloud:12/metadata",
- "type": "metadata"
}, - {
- "key": "/photo/:/transcode",
- "type": "imagetranscoder"
}, - {
- "key": "/tv.plex.providers.epg.cloud:12/hubs/discover?promoted=1&includeTypeFirst=1",
- "type": "promoted"
}, - {
- "key": "/tv.plex.providers.epg.cloud:12/grid",
- "type": "grid",
- "GridChannelFilter": [
- {
- "key": "/tv.plex.providers.epg.cloud:12/lineups/dvr/channels?genre=genre_6006cc1a610ee2002c74f34a",
- "title": "Hit TV",
- "genreRatingKey": "genre_6006cc1a610ee2002c74f34a"
}, - {
- "key": "/tv.plex.providers.epg.cloud:12/lineups/dvr/channels?genre=genre_6006cc1a610ee2002c74f33f",
- "title": "Crime",
- "genreRatingKey": "genre_6006cc1a610ee2002c74f33f"
}, - {
- "key": "/tv.plex.providers.epg.cloud:12/lineups/dvr/channels?genre=genre_6006cc1d610ee2002c74f38c",
- "title": "Reality",
- "genreRatingKey": "genre_6006cc1d610ee2002c74f38c"
}, - {
- "key": "/tv.plex.providers.epg.cloud:12/lineups/dvr/channels?genre=genre_6006cc1d610ee2002c74f37a",
- "title": "News",
- "genreRatingKey": "genre_6006cc1d610ee2002c74f37a"
}, - {
- "key": "/tv.plex.providers.epg.cloud:12/lineups/dvr/channels?genre=genre_620143f98578b9238e1cdb8a",
- "title": "Sports",
- "genreRatingKey": "genre_620143f98578b9238e1cdb8a"
}, - {
- "key": "/tv.plex.providers.epg.cloud:12/lineups/dvr/channels?genre=genre_6006cc1b610ee2002c74f358",
- "title": "Game Shows",
- "genreRatingKey": "genre_6006cc1b610ee2002c74f358"
}, - {
- "key": "/tv.plex.providers.epg.cloud:12/lineups/dvr/channels?genre=genre_6529021f0f3f142ea6049ecc",
- "title": "History & Science",
- "genreRatingKey": "genre_6529021f0f3f142ea6049ecc"
}, - {
- "key": "/tv.plex.providers.epg.cloud:12/lineups/dvr/channels?genre=genre_6006cc18610ee2002c74f2f6",
- "title": "Sci-Fi & Action",
- "genreRatingKey": "genre_6006cc18610ee2002c74f2f6"
}, - {
- "key": "/tv.plex.providers.epg.cloud:12/lineups/dvr/channels?genre=genre_620143f98578b9238e1cdb89",
- "title": "Movies",
- "genreRatingKey": "genre_620143f98578b9238e1cdb89"
}, - {
- "key": "/tv.plex.providers.epg.cloud:12/lineups/dvr/channels?genre=genre_6006cc18610ee2002c74f308",
- "title": "Chills & Thrills",
- "genreRatingKey": "genre_6006cc18610ee2002c74f308"
}, - {
- "key": "/tv.plex.providers.epg.cloud:12/lineups/dvr/channels?genre=genre_6529021f0f3f142ea6049ecb",
- "title": "Classic TV",
- "genreRatingKey": "genre_6529021f0f3f142ea6049ecb"
}, - {
- "key": "/tv.plex.providers.epg.cloud:12/lineups/dvr/channels?genre=genre_6529021f0f3f142ea6049ecd",
- "title": "Nature & Travel",
- "genreRatingKey": "genre_6529021f0f3f142ea6049ecd"
}, - {
- "key": "/tv.plex.providers.epg.cloud:12/lineups/dvr/channels?genre=genre_6006cc18610ee2002c74f2f9",
- "title": "Comedy",
- "genreRatingKey": "genre_6006cc18610ee2002c74f2f9"
}, - {
- "key": "/tv.plex.providers.epg.cloud:12/lineups/dvr/channels?genre=genre_6529021f0f3f142ea6049ece",
- "title": "Black Entertainment",
- "genreRatingKey": "genre_6529021f0f3f142ea6049ece"
}, - {
- "key": "/tv.plex.providers.epg.cloud:12/lineups/dvr/channels?genre=genre_6006cc1a610ee2002c74f33b",
- "title": "Cooking",
- "genreRatingKey": "genre_6006cc1a610ee2002c74f33b"
}, - {
- "key": "/tv.plex.providers.epg.cloud:12/lineups/dvr/channels?genre=genre_6006cc1b610ee2002c74f361",
- "title": "Home",
- "genreRatingKey": "genre_6006cc1b610ee2002c74f361"
}, - {
- "key": "/tv.plex.providers.epg.cloud:12/lineups/dvr/channels?genre=genre_6074b802507c8d42cf7e1678",
- "title": "Kids & Family",
- "genreRatingKey": "genre_6074b802507c8d42cf7e1678"
}, - {
- "key": "/tv.plex.providers.epg.cloud:12/lineups/dvr/channels?genre=genre_6529021f0f3f142ea6049ed0",
- "title": "Sporting",
- "genreRatingKey": "genre_6529021f0f3f142ea6049ed0"
}, - {
- "key": "/tv.plex.providers.epg.cloud:12/lineups/dvr/channels?genre=genre_6171e01d4c451f5a44debdf6",
- "title": "En Español",
- "genreRatingKey": "genre_6171e01d4c451f5a44debdf6"
}, - {
- "key": "/tv.plex.providers.epg.cloud:12/lineups/dvr/channels?genre=genre_6529021f0f3f142ea6049ecf",
- "title": "International",
- "genreRatingKey": "genre_6529021f0f3f142ea6049ecf"
}, - {
- "key": "/tv.plex.providers.epg.cloud:12/lineups/dvr/channels?genre=genre_60d37385f631b9aabb67bf37",
- "title": "Gaming & Anime",
- "genreRatingKey": "genre_60d37385f631b9aabb67bf37"
}, - {
- "key": "/tv.plex.providers.epg.cloud:12/lineups/dvr/channels?genre=genre_620143f98578b9238e1cdb88",
- "title": "Lifestyle",
- "genreRatingKey": "genre_620143f98578b9238e1cdb88"
}, - {
- "key": "/tv.plex.providers.epg.cloud:12/lineups/dvr/channels?genre=genre_6006cc1c610ee2002c74f378",
- "title": "Music",
- "genreRatingKey": "genre_6006cc1c610ee2002c74f378"
}
]
}, - {
- "key": "/tv.plex.providers.epg.cloud:12/collections",
- "type": "collection"
}, - {
- "scrobbleKey": "/:/scrobble",
- "unscrobbleKey": "/:/unscrobble",
- "key": "/:/timeline",
- "type": "timeline"
}, - {
- "flavor": "record",
- "type": "subscribe"
}
]
}
]
}
}This endpoint registers a media provider with the server. Once registered, the media server acts as a reverse proxy to the provider, allowing both local and remote providers to work.
| url required | string The URL of the media provider to add. |
Get an image for the collection based on the items within
| collectionId required | integer The collection id |
| updatedAt required | integer The update time of the image. Used for busting cache. |
object Examples:
|
<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>
Get items in a collection. Note if this collection contains more than 100 items, paging must be used.
| collectionId required | integer The collection id |
{- "MediaContainer": {
- "size": "1",
- "allowSync": true,
- "art": "/:/resources/movie-fanart.jpg",
- "identifier": "com.plexapp.plugins.library",
- "librarySectionID": 26,
- "librarySectionTitle": "Movies",
- "librarySectionUUID": "70cb5089-b165-429b-809a-9e0a31493abf",
- "mediaTagPrefix": "/system/bundle/media/flags/",
- "mediaTagVersion": "1436742334",
- "thumb": "/:/resources/movie.png",
- "title1": "Movies",
- "title2": "All Movies",
- "viewGroup": "movie",
- "Metadata": [
- {
- "id": "1049",
- "ratingKey": "1049",
- "key": "/library/metadata/1049",
- "studio": "Paramount Pictures",
- "type": "movie",
- "title": "Zoolander",
- "contentRating": "PG-13",
- "summary": "FunnyStuff",
- "year": 2001,
- "tagline": "3% Body Fat. 1% Brain Activity.",
- "thumb": "/library/metadata/1049/thumb/1434341184",
- "art": "/library/metadata/1049/art/1434341184",
- "duration": 5129000,
- "originallyAvailableAt": "2001-09-27",
- "addedAt": 1408525217,
- "updatedAt": 1434341184,
- "chapterSource": "media",
- "primaryExtraKey": "/library/metadata/1073",
- "rating": 6,
- "Media": [
- {
- "id": 827,
- "duration": 5129000,
- "bitrate": 6564,
- "width": 720,
- "height": 576,
- "aspectRatio": 1.78,
- "audioChannels": 6,
- "audioCodec": "ac3",
- "videoCodec": "mpeg2video",
- "container": "mkv",
- "videoFrameRate": "PAL",
- "Part": [
- {
- "id": "827",
- "key": "/library/parts/827/file.mkv",
- "duration": 5129000,
- "file": "O:\\fatboy\\Media\\Ripped\\Movies\\Zoolander (2001).mkv",
- "size": 4208219125,
- "container": "mkv"
}
]
}
], - "Image": [
- {
- "type": "coverPoster",
- "alt": "Zoolander",
- "url": "/library/metadata/1049/thumb/1434341184"
}
], - "Genre": [
- {
- "tag": "Comedy"
}
], - "Writer": [
- {
- "tag": "Drake Sather"
}, - {
- "tag": "Ben Stiller"
}
], - "Director": [
- {
- "tag": "Ben Stiller"
}
], - "Country": [
- {
- "tag": "Australia"
}, - {
- "tag": "Germany"
}
], - "Role": [
- {
- "tag": "Ben Stiller"
}, - {
- "tag": "Owen Wilson"
}, - {
- "tag": "Christine Taylor"
}
]
}
]
}
}Get one or more metadata items.
| ids required | Array of strings |
| asyncCheckFiles | integer Enum: 0 1 Determines if file check should be performed asynchronously. An activity is created to indicate progress. Default is false. |
| asyncRefreshLocalMediaAgent | integer Enum: 0 1 Determines if local media agent refresh should be performed asynchronously. An activity is created to indicate progress. Default is false. |
| asyncRefreshAnalysis | integer Enum: 0 1 Determines if analysis refresh should be performed asynchronously. An activity is created to indicate progress. Default is false. |
| checkFiles | integer Enum: 0 1 Determines if file check should be performed synchronously. Specifying |
| skipRefresh | integer Enum: 0 1 Determines if synchronous local media agent and analysis refresh should be skipped. Specifying async versions will cause synchronous versions to be skipped. Default is false. |
| checkFileAvailability | integer Enum: 0 1 Determines if file existence check should be performed synchronously. Specifying |
| asyncAugmentMetadata | integer Enum: 0 1 Add metadata augmentations. An activity is created to indicate progress. Option will be ignored if specified by non-admin or if multiple metadata items are requested. Default is false. |
| augmentCount | integer Enum: 0 1 Number of augmentations to add. Requires |
{- "MediaContainer": {
- "size": "1",
- "allowSync": true,
- "art": "/:/resources/movie-fanart.jpg",
- "identifier": "com.plexapp.plugins.library",
- "librarySectionID": 26,
- "librarySectionTitle": "Movies",
- "librarySectionUUID": "70cb5089-b165-429b-809a-9e0a31493abf",
- "mediaTagPrefix": "/system/bundle/media/flags/",
- "mediaTagVersion": "1436742334",
- "thumb": "/:/resources/movie.png",
- "title1": "Movies",
- "title2": "All Movies",
- "viewGroup": "movie",
- "Metadata": [
- {
- "id": "1049",
- "ratingKey": "1049",
- "key": "/library/metadata/1049",
- "studio": "Paramount Pictures",
- "type": "movie",
- "title": "Zoolander",
- "contentRating": "PG-13",
- "summary": "FunnyStuff",
- "year": 2001,
- "tagline": "3% Body Fat. 1% Brain Activity.",
- "thumb": "/library/metadata/1049/thumb/1434341184",
- "art": "/library/metadata/1049/art/1434341184",
- "duration": 5129000,
- "originallyAvailableAt": "2001-09-27",
- "addedAt": 1408525217,
- "updatedAt": 1434341184,
- "chapterSource": "media",
- "primaryExtraKey": "/library/metadata/1073",
- "rating": 6,
- "Media": [
- {
- "id": 827,
- "duration": 5129000,
- "bitrate": 6564,
- "width": 720,
- "height": 576,
- "aspectRatio": 1.78,
- "audioChannels": 6,
- "audioCodec": "ac3",
- "videoCodec": "mpeg2video",
- "container": "mkv",
- "videoFrameRate": "PAL",
- "Part": [
- {
- "id": "827",
- "key": "/library/parts/827/file.mkv",
- "duration": 5129000,
- "file": "O:\\fatboy\\Media\\Ripped\\Movies\\Zoolander (2001).mkv",
- "size": 4208219125,
- "container": "mkv"
}
]
}
], - "Image": [
- {
- "type": "coverPoster",
- "alt": "Zoolander",
- "url": "/library/metadata/1049/thumb/1434341184"
}
], - "Genre": [
- {
- "tag": "Comedy"
}
], - "Writer": [
- {
- "tag": "Drake Sather"
}, - {
- "tag": "Ben Stiller"
}
], - "Director": [
- {
- "tag": "Ben Stiller"
}
], - "Country": [
- {
- "tag": "Australia"
}, - {
- "tag": "Germany"
}
], - "Role": [
- {
- "tag": "Ben Stiller"
}, - {
- "tag": "Owen Wilson"
}, - {
- "tag": "Christine Taylor"
}
]
}
]
}
}Get the items in a section, potentially filtering them
| sectionId required | string The id of the section |
| mediaQuery | object Examples:
This is a complex query built of several parameters. See API Info section for information on building media queries |
{- "MediaContainer": {
- "allowSync": true,
- "art": "/:/resources/movie-fanart.jpg",
- "identifier": "com.plexapp.plugins.library",
- "librarySectionID": 26,
- "librarySectionTitle": "Movies",
- "librarySectionUUID": "70cb5089-b165-429b-809a-9e0a31493abf",
- "mediaTagPrefix": "/system/bundle/media/flags/",
- "mediaTagVersion": 1436742334,
- "size": 1,
- "thumb": "/:/resources/movie.png",
- "title1": "Movies",
- "title2": "All Movies",
- "viewGroup": "movie",
- "viewMode": "65592",
- "Metadata": [
- {
- "addedAt": 1408525217,
- "art": "/library/metadata/1049/art/1434341184",
- "chapterSource": "media",
- "contentRating": "PG-13",
- "duration": 5129000,
- "key": "/library/metadata/1049",
- "originallyAvailableAt": "2001-09-27",
- "primaryExtraKey": "/library/metadata/1073",
- "rating": 6,
- "ratingKey": "1049",
- "studio": "Paramount Pictures",
- "summary": "FunnyStuff",
- "tagline": "3% Body Fat. 1% Brain Activity.",
- "thumb": "/library/metadata/1049/thumb/1434341184",
- "title": "Zoolander",
- "type": "movie",
- "updatedAt": 1434341184,
- "year": 2001,
- "Media": [
- {
- "aspectRatio": 1.78,
- "audioChannels": 6,
- "audioCodec": "ac3",
- "bitrate": 6564,
- "container": "mkv",
- "duration": 5129000,
- "height": 576,
- "id": 827,
- "videoCodec": "mpeg2video",
- "videoFrameRate": "PAL",
- "videoResolution": "576",
- "width": 720,
- "Part": [
- {
- "container": "mkv",
- "duration": 5129000,
- "file": "O:\\fatboy\\Media\\Ripped\\Movies\\Zoolander (2001).mkv",
- "id": 827,
- "key": "/library/parts/827/file.mkv",
- "size": 4208219125
}
]
}
], - "Genre": [
- {
- "tag": "Comedy"
}
], - "Writer": [
- {
- "tag": "Drake Sather"
}, - {
- "tag": "Ben Stiller"
}
], - "Director": [
- {
- "tag": "Ben Stiller"
}
], - "Country": [
- {
- "tag": "Australia"
}, - {
- "tag": "Germany"
}
], - "Role": [
- {
- "tag": "Ben Stiller"
}, - {
- "tag": "Owen Wilson"
}, - {
- "tag": "Christine Taylor"
}
]
}
]
}
}Get all leaves in a section (such as episodes in a show section)
| sectionId required | integer Section identifier |
{- "MediaContainer": {
- "size": 41,
- "allowSync": false,
- "art": "/:/resources/show-fanart.jpg",
- "content": "secondary",
- "identifier": "com.plexapp.plugins.library",
- "mediaTagPrefix": "/system/bundle/media/flags/",
- "mediaTagVersion": 1680272530,
- "nocache": true,
- "thumb": "/:/resources/show.png",
- "title1": "TV Shows",
- "viewGroup": "show",
- "Metadata": [
- {
- "ratingKey": "150",
- "key": "/library/metadata/150",
- "parentRatingKey": "149",
- "grandparentRatingKey": "148",
- "guid": "plex://episode/5d9c1359e264b7001fcb529c",
- "parentGuid": "plex://season/602e691b66dfdb002c0a5034",
- "grandparentGuid": "plex://show/5d9c087202391c001f58a287",
- "grandparentSlug": "babylon-5",
- "type": "episode",
- "title": "The Illusion of Truth",
- "titleSort": "Illusion of Truth",
- "grandparentKey": "/library/metadata/148",
- "parentKey": "/library/metadata/149",
- "grandparentTitle": "Babylon 5",
- "parentTitle": "Season 4",
- "contentRating": "TV-PG",
- "summary": "A team of ISN reporters arrives at the station wanting to do a story about Babylon 5. Sheridan refuses at first, but finally agrees on the theory that at least a small part of their side of the conflict will be shown.",
- "index": 8,
- "parentIndex": 4,
- "audienceRating": 7.7,
- "viewCount": 1,
- "lastViewedAt": 1612468663,
- "year": 1997,
- "thumb": "/library/metadata/150/thumb/1681283788",
- "art": "/library/metadata/148/art/1715112830",
- "parentThumb": "/library/metadata/149/thumb/1681152133",
- "grandparentThumb": "/library/metadata/148/thumb/1715112830",
- "grandparentArt": "/library/metadata/148/art/1715112830",
- "grandparentTheme": "/library/metadata/148/theme/1715112830",
- "duration": 2625089,
- "originallyAvailableAt": "1997-02-17",
- "addedAt": 1348327790,
- "updatedAt": 1681283788,
- "audienceRatingImage": "themoviedb://image.rating",
- "chapterSource": "media",
- "Media": [
- {
- "id": 376,
- "duration": 2625089,
- "bitrate": 5741,
- "width": 720,
- "height": 480,
- "aspectRatio": 1.78,
- "audioChannels": 6,
- "audioCodec": "ac3",
- "videoCodec": "mpeg2video",
- "videoResolution": "480",
- "container": "mkv",
- "videoFrameRate": "NTSC",
- "videoProfile": "main",
- "Part": [
- {
- "id": 872,
- "key": "/library/parts/872/1348327790/file.mkv",
- "duration": 2625089,
- "file": "/Volumes/Media/TV Shows/Babylon 5/Season 4/Babylon 5 S04E08 The Illusion of Truth.mkv",
- "size": 1883816967,
- "container": "mkv",
- "videoProfile": "main"
}
]
}
], - "Director": [
- {
- "tag": "Stephen Furst"
}
], - "Writer": [
- {
- "tag": "J. Michael Straczynski"
}
], - "Role": [
- {
- "tag": "Hank Delgado"
}, - {
- "tag": "Diana Morgan"
}, - {
- "tag": "Jeff Griggs"
}
]
}
]
}
}Get artwork for a library section
| sectionId required | integer Section identifier |
{- "MediaContainer": {
- "size": 7,
- "Metadata": [
- {
- "title": "Lava",
- "type": "image",
- "key": "/library/metadata/34/art/1715112805"
}, - {
- "title": "The Lord of the Rings: The Return of the King",
- "type": "image",
- "key": "/library/metadata/65/art/1715112827"
}, - {
- "title": "La Luna",
- "type": "image",
- "key": "/library/metadata/4/art/1715112803"
}, - {
- "title": "Jack-Jack Attack",
- "type": "image",
- "key": "/library/metadata/146/art/1715112830"
}
]
}
}Get all albums in a music section
| sectionId required | integer Section identifier |
{- "MediaContainer": {
- "size": 12,
- "allowSync": false,
- "art": "/:/resources/artist-fanart.jpg",
- "content": "secondary",
- "identifier": "com.plexapp.plugins.library",
- "mediaTagPrefix": "/system/bundle/media/flags/",
- "mediaTagVersion": 1680272530,
- "mixedParents": true,
- "nocache": true,
- "thumb": "/:/resources/artist.png",
- "title1": "Music",
- "title2": "By Album",
- "viewGroup": "album",
- "Metadata": [
- {
- "allowSync": true,
- "librarySectionID": 3,
- "librarySectionTitle": "Music",
- "librarySectionUUID": "d7fd8c81-a345-4e68-8113-92f23cb47e70",
- "ratingKey": "265",
- "key": "/library/metadata/265/children",
- "parentRatingKey": "251",
- "guid": "plex://album/5d07c894403c640290c0e196",
- "parentGuid": "plex://artist/5d07bbfc403c6402904a60e7",
- "studio": "RCA",
- "type": "album",
- "title": "Mandatory Fun",
- "parentKey": "/library/metadata/251",
- "parentTitle": "“Weird Al” Yankovic",
- "summary": "Already accepted as a bona fide talent in the world of parody -- his musicianship, comedic timing, his pop-culture reference awareness, and his great wordplay are all well-documented -- the only thing that matters when it comes to \"Weird Al\" Yankovic albums is how inspired the king of novelty songs sounds on any given LP. On his 14th studio album, Mandatory Fun, the inspiration meter goes well into the red, something heard instantly as Iggy Azalea's electro-rap \"Fancy\" does a complete 180 thematically on the opening \"Handy,\" the song now heading toward the local home improvement store where the craftsmen vogue in their orange vests and blow sweet come-ons like \"I'll bring you up to code\" and \"My socket wrenches are second to none.\" Pharrell's \"Happy\" becomes \"Tacky\" and Al's amazing ability to follow an everyday poke (\"Wear my Ed Hardy shirt with fluorescent orange pants\") with something brainy and reserved (\"Got my new résumé, it's printed in Comic Sans\") surprises once more, but for end-to-end \"wows,\" it's his brilliant redo of Robin Thicke's \"Blurred Lines,\" now the smug and twerking \"Word Crimes,\" which gives copy editors, English professors, and grammar nerds a reason to hit the dancefloor (\"And listen up when I tell you this/I hope you never use quotation marks for emphasis!\"). Hardcore and hilarious musical moments start to happen when Imagine Dragons' \"Radioactive\" becomes \"Inactive,\" a singalong anthem for the sluggish and the slovenly (\"Near comatose, no exercise/Don't tag my toe, I'm still alive\") with a dubstep-rock bassline that sounds like Galactus burping. Better still is the every-Al-album pop-polka medley, this time called \"Now That's What I Call Polka!\" which polkas-up Daft Punk (\"Get Lucky\"), PSY (\"Gangnam Style\"), and Miley Cyrus (\"Wrecking Ball\"), and with more Spike Jones-styled sound effects than usual. As for the originals this time out, the \"you suck!\"-minded \"Sports Song\" will be unavoidable under Friday night lights once a teen gets hold of it, while the ranting and wonderfully weird \"First World Problems\" sounds more like the Pixies than anything the Pixies did in 2014. Wonders never cease on Mandatory Fun, and neither do the laughs. ~ David Jeffries",
- "index": 1,
- "rating": 8,
- "year": 2014,
- "thumb": "/library/metadata/265/thumb/1715112705",
- "art": "/library/metadata/251/art/1716801576",
- "parentThumb": "/library/metadata/251/thumb/1716801576",
- "originallyAvailableAt": "2014-07-15",
- "leafCount": 12,
- "addedAt": 1681152176,
- "updatedAt": 1715112705,
- "deletedAt": 1682628386,
- "loudnessAnalysisVersion": "2",
- "Genre": [
- {
- "tag": "Comedy/Spoken"
}
]
}
]
}
}Get categories in a library section
| sectionId required | integer Section identifier |
{- "MediaContainer": {
- "size": 16,
- "allowSync": false,
- "art": "/:/resources/show-fanart.jpg",
- "content": "secondary",
- "identifier": "com.plexapp.plugins.library",
- "mediaTagPrefix": "/system/bundle/media/flags/",
- "mediaTagVersion": 1680272530,
- "nocache": true,
- "thumb": "/:/resources/show.png",
- "title1": "TV Shows",
- "title2": "",
- "viewGroup": "secondary",
- "Meta": {
- "Type": [
- {
- "key": "/library/sections/2/categories",
- "type": "directory",
- "title": "Categories",
- "active": true
}
]
}, - "Directory": [
- {
- "thumb": "/photo/:/transcode?blendColor=2B717E&width=2560&height=1440&url=%2Flibrary%2Fmetadata%2F183%2Fart%2F1715112831",
- "type": "directory",
- "key": "/library/sections/2/all?genre=5",
- "title": "Action"
}, - {
- "thumb": "/photo/:/transcode?blendColor=4C561B&width=2560&height=1440&url=%2Flibrary%2Fmetadata%2F234%2Fart%2F1715112832",
- "type": "directory",
- "key": "/library/sections/2/all?genre=263",
- "title": "Adventure"
}, - {
- "thumb": "/photo/:/transcode?blendColor=51284C&width=2560&height=1440&url=%2Flibrary%2Fmetadata%2F206%2Fart%2F1715112832",
- "type": "directory",
- "key": "/library/sections/2/all?genre=176",
- "title": "Comedy"
}
]
}
}Get clusters in a library section (typically for photos)
| sectionId required | integer Section identifier |
{- "MediaContainer": {
- "size": 19,
- "allowSync": false,
- "art": "/:/resources/photo-fanart.jpg",
- "clusterZoomLevel": 1,
- "clusteringActive": false,
- "content": "secondary",
- "identifier": "com.plexapp.plugins.library",
- "key": "/library/sections/5/all?clusterZoomLevel=1&clustering<=4154",
- "mediaTagPrefix": "/system/bundle/media/flags/",
- "mediaTagVersion": 1680272530,
- "nocache": true,
- "thumb": "/:/resources/photo.png",
- "title1": "Photos",
- "title2": "By Moment",
- "viewGroup": "secondary",
- "Directory": [
- {
- "fastKey": "/library/sections/5/all?cluster=46&clustering<=4154",
- "title": "Oct 24, 2017",
- "id": 46,
- "size": 1,
- "startsAt": 1508885256,
- "endsAt": 1508885256,
- "avgAR": "1.78"
}, - {
- "fastKey": "/library/sections/5/all?cluster=42&clustering<=4154",
- "title": "Oct 14, 2017",
- "id": 42,
- "size": 1,
- "startsAt": 1507945565,
- "endsAt": 1507945565,
- "avgAR": "1.78"
}, - {
- "fastKey": "/library/sections/5/all?cluster=44&clustering<=4154",
- "title": "Oct 25, 2016",
- "id": 44,
- "size": 2,
- "startsAt": 1477353502,
- "endsAt": 1477353842,
- "avgAR": "1.78"
}, - {
- "fastKey": "/library/sections/5/all?cluster=17&clustering<=4154",
- "title": "Oct 20, 2016",
- "id": 17,
- "size": 804,
- "startsAt": 1477019560,
- "endsAt": 1477022904,
- "avgAR": "1.43"
}
]
}
}Get a list of audio tracks starting at one and ending at another which are similar across the path
| sectionId required | integer Section identifier |
| startID required | integer The starting metadata item id |
| endID required | integer The ending metadata item id |
| count | integer The number of items along the path; defaults to 50 |
| maxDistance | number The maximum distance allowed along the path; defaults to 0.25 |
{- "MediaContainer": {
- "size": "1",
- "allowSync": true,
- "art": "/:/resources/movie-fanart.jpg",
- "identifier": "com.plexapp.plugins.library",
- "librarySectionID": 26,
- "librarySectionTitle": "Movies",
- "librarySectionUUID": "70cb5089-b165-429b-809a-9e0a31493abf",
- "mediaTagPrefix": "/system/bundle/media/flags/",
- "mediaTagVersion": "1436742334",
- "thumb": "/:/resources/movie.png",
- "title1": "Movies",
- "title2": "All Movies",
- "viewGroup": "movie",
- "Metadata": [
- {
- "id": "1049",
- "ratingKey": "1049",
- "key": "/library/metadata/1049",
- "studio": "Paramount Pictures",
- "type": "movie",
- "title": "Zoolander",
- "contentRating": "PG-13",
- "summary": "FunnyStuff",
- "year": 2001,
- "tagline": "3% Body Fat. 1% Brain Activity.",
- "thumb": "/library/metadata/1049/thumb/1434341184",
- "art": "/library/metadata/1049/art/1434341184",
- "duration": 5129000,
- "originallyAvailableAt": "2001-09-27",
- "addedAt": 1408525217,
- "updatedAt": 1434341184,
- "chapterSource": "media",
- "primaryExtraKey": "/library/metadata/1073",
- "rating": 6,
- "Media": [
- {
- "id": 827,
- "duration": 5129000,
- "bitrate": 6564,
- "width": 720,
- "height": 576,
- "aspectRatio": 1.78,
- "audioChannels": 6,
- "audioCodec": "ac3",
- "videoCodec": "mpeg2video",
- "container": "mkv",
- "videoFrameRate": "PAL",
- "Part": [
- {
- "id": "827",
- "key": "/library/parts/827/file.mkv",
- "duration": 5129000,
- "file": "O:\\fatboy\\Media\\Ripped\\Movies\\Zoolander (2001).mkv",
- "size": 4208219125,
- "container": "mkv"
}
]
}
], - "Image": [
- {
- "type": "coverPoster",
- "alt": "Zoolander",
- "url": "/library/metadata/1049/thumb/1434341184"
}
], - "Genre": [
- {
- "tag": "Comedy"
}
], - "Writer": [
- {
- "tag": "Drake Sather"
}, - {
- "tag": "Ben Stiller"
}
], - "Director": [
- {
- "tag": "Ben Stiller"
}
], - "Country": [
- {
- "tag": "Australia"
}, - {
- "tag": "Germany"
}
], - "Role": [
- {
- "tag": "Ben Stiller"
}, - {
- "tag": "Owen Wilson"
}, - {
- "tag": "Christine Taylor"
}
]
}
]
}
}Get all folder locations of the media in a section
| sectionId required | integer Section identifier |
{- "MediaContainer": {
- "identifier": "string",
- "size": 0,
- "totalSize": 0,
- "offset": 0,
- "Directory": [
- {
- "fastKey": "string",
- "key": "string",
- "title": "string"
}
]
}
}Get the nearest audio tracks to a particular analysis
| sectionId required | integer Section identifier |
| type | integer The metadata type to fetch (should be 10 for audio track) |
| values required | Array of integers[ items [ 50 .. 50 ] ] The music analysis to center the search. Typically obtained from the |
| limit | integer The limit of the number of items to fetch; defaults to 50 |
| maxDistance | number The maximum distance to search, defaults to 0.25 |
{- "MediaContainer": {
- "size": "1",
- "allowSync": true,
- "art": "/:/resources/movie-fanart.jpg",
- "identifier": "com.plexapp.plugins.library",
- "librarySectionID": 26,
- "librarySectionTitle": "Movies",
- "librarySectionUUID": "70cb5089-b165-429b-809a-9e0a31493abf",
- "mediaTagPrefix": "/system/bundle/media/flags/",
- "mediaTagVersion": "1436742334",
- "thumb": "/:/resources/movie.png",
- "title1": "Movies",
- "title2": "All Movies",
- "viewGroup": "movie",
- "Metadata": [
- {
- "id": "1049",
- "ratingKey": "1049",
- "key": "/library/metadata/1049",
- "studio": "Paramount Pictures",
- "type": "movie",
- "title": "Zoolander",
- "contentRating": "PG-13",
- "summary": "FunnyStuff",
- "year": 2001,
- "tagline": "3% Body Fat. 1% Brain Activity.",
- "thumb": "/library/metadata/1049/thumb/1434341184",
- "art": "/library/metadata/1049/art/1434341184",
- "duration": 5129000,
- "originallyAvailableAt": "2001-09-27",
- "addedAt": 1408525217,
- "updatedAt": 1434341184,
- "chapterSource": "media",
- "primaryExtraKey": "/library/metadata/1073",
- "rating": 6,
- "Media": [
- {
- "id": 827,
- "duration": 5129000,
- "bitrate": 6564,
- "width": 720,
- "height": 576,
- "aspectRatio": 1.78,
- "audioChannels": 6,
- "audioCodec": "ac3",
- "videoCodec": "mpeg2video",
- "container": "mkv",
- "videoFrameRate": "PAL",
- "Part": [
- {
- "id": "827",
- "key": "/library/parts/827/file.mkv",
- "duration": 5129000,
- "file": "O:\\fatboy\\Media\\Ripped\\Movies\\Zoolander (2001).mkv",
- "size": 4208219125,
- "container": "mkv"
}
]
}
], - "Image": [
- {
- "type": "coverPoster",
- "alt": "Zoolander",
- "url": "/library/metadata/1049/thumb/1434341184"
}
], - "Genre": [
- {
- "tag": "Comedy"
}
], - "Writer": [
- {
- "tag": "Drake Sather"
}, - {
- "tag": "Ben Stiller"
}
], - "Director": [
- {
- "tag": "Ben Stiller"
}
], - "Country": [
- {
- "tag": "Australia"
}, - {
- "tag": "Germany"
}
], - "Role": [
- {
- "tag": "Ben Stiller"
}, - {
- "tag": "Owen Wilson"
}, - {
- "tag": "Christine Taylor"
}
]
}
]
}
}Get moments in a library section (typically for photos)
| sectionId required | integer Section identifier |
{- "MediaContainer": {
- "size": 19,
- "allowSync": false,
- "art": "/:/resources/photo-fanart.jpg",
- "clusterZoomLevel": 1,
- "clusteringActive": false,
- "content": "secondary",
- "identifier": "com.plexapp.plugins.library",
- "key": "/library/sections/5/all?clusterZoomLevel=1&clustering<=4154",
- "mediaTagPrefix": "/system/bundle/media/flags/",
- "mediaTagVersion": 1680272530,
- "nocache": true,
- "thumb": "/:/resources/photo.png",
- "title1": "Photos",
- "title2": "By Moment",
- "viewGroup": "secondary",
- "Directory": [
- {
- "fastKey": "/library/sections/5/all?cluster=46&clustering<=4154",
- "title": "Oct 24, 2017",
- "id": 46,
- "size": 1,
- "startsAt": 1508885256,
- "endsAt": 1508885256,
- "avgAR": "1.78"
}, - {
- "fastKey": "/library/sections/5/all?cluster=42&clustering<=4154",
- "title": "Oct 14, 2017",
- "id": 42,
- "size": 1,
- "startsAt": 1507945565,
- "endsAt": 1507945565,
- "avgAR": "1.78"
}, - {
- "fastKey": "/library/sections/5/all?cluster=44&clustering<=4154",
- "title": "Oct 25, 2016",
- "id": 44,
- "size": 2,
- "startsAt": 1477353502,
- "endsAt": 1477353842,
- "avgAR": "1.78"
}, - {
- "fastKey": "/library/sections/5/all?cluster=17&clustering<=4154",
- "title": "Oct 20, 2016",
- "id": 17,
- "size": 804,
- "startsAt": 1477019560,
- "endsAt": 1477022904,
- "avgAR": "1.43"
}
]
}
}Get the global hubs in this PMS
| count | integer Limit hub entries to count items |
| onlyTransient | integer Enum: 0 1 Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added) |
| identifier | Array of strings If provided, limit to only specified hubs |
{- "MediaContainer": {
- "size": 8,
- "allowSync": true,
- "identifier": "com.plexapp.plugins.library",
- "Hub": [
- {
- "hubKey": "/library/metadata/37",
- "key": "/hubs/home/continueWatching",
- "title": "Continue Watching",
- "type": "mixed",
- "hubIdentifier": "home.continue",
- "context": "hub.home.continue",
- "size": 1,
- "more": false,
- "style": "hero",
- "promoted": true,
- "Metadata": [ ]
}, - {
- "hubKey": "/library/metadata/217",
- "key": "/hubs/home/onDeck",
- "title": "On Deck",
- "type": "episode",
- "hubIdentifier": "home.ondeck",
- "context": "hub.home.ondeck",
- "size": 1,
- "more": false,
- "style": "shelf",
- "promoted": true,
- "Metadata": [ ]
}, - {
- "hubKey": "/library/metadata/146,37,38,67,81,3",
- "key": "/hubs/home/recentlyAdded?type=1",
- "title": "Recently Added Movies",
- "type": "movie",
- "hubIdentifier": "home.movies.recent",
- "context": "hub.home.movies.recent",
- "size": 6,
- "more": true,
- "style": "shelf",
- "promoted": true,
- "Metadata": [ ]
}, - {
- "hubKey": "/library/metadata/192,164,203,155,199,236",
- "key": "/hubs/home/recentlyAdded?type=2",
- "title": "Recently Added TV",
- "type": "mixed",
- "hubIdentifier": "home.television.recent",
- "context": "hub.home.television.recent",
- "size": 6,
- "more": true,
- "style": "shelf",
- "promoted": true,
- "Metadata": [ ]
}, - {
- "hubKey": "/library/metadata/370,365,334,308,294,281",
- "key": "/hubs/home/recentlyAdded?type=8",
- "title": "Recently Added Music",
- "type": "album",
- "hubIdentifier": "home.music.recent",
- "context": "hub.home.music.recent",
- "size": 6,
- "more": true,
- "style": "shelf",
- "promoted": true,
- "Metadata": [ ]
}, - {
- "hubKey": "/library/metadata/3390,3391,3392,3393,4230,4229",
- "key": "/hubs/home/recentlyAdded?type=13",
- "title": "Recently Added Photos",
- "type": "photo",
- "hubIdentifier": "home.photos.recent",
- "context": "hub.home.photos.recent",
- "size": 6,
- "more": true,
- "style": "shelf",
- "promoted": true,
- "Metadata": [ ]
}, - {
- "hubKey": "/library/metadata/3376,3339,3340,3341,3342,3343",
- "key": "/hubs/home/recentlyAdded?type=1&personal=1",
- "title": "Recently Added Videos",
- "type": "clip",
- "hubIdentifier": "home.videos.recent",
- "context": "hub.home.videos.recent",
- "size": 6,
- "more": true,
- "style": "shelf",
- "promoted": true,
- "Metadata": [ ]
}, - {
- "hubKey": "/library/metadata/3373,3225",
- "key": "/playlists/all?type=15&sort=lastViewedAt:desc&playlistType=video,audio",
- "title": "Recent Playlists",
- "type": "playlist",
- "hubIdentifier": "home.playlists",
- "context": "hub.home.playlists",
- "size": 2,
- "more": false,
- "style": "shelf",
- "promoted": true,
- "Metadata": [ ]
}
]
}
}Get the items within a single hub specified by identifier
| count | integer Limit hub entry to count items |
| identifier required | Array of strings If provided, limit to only specified hubs |
{- "MediaContainer": {
- "identifier": "string",
- "size": 0,
- "totalSize": 0,
- "offset": 0,
- "Metadata": [
- {
- "type": null,
- "subtype": null,
- "key": null,
- "ratingKey": null,
- "title": null,
- "titleSort": null,
- "originalTitle": null,
- "year": 0,
- "index": 0,
- "absoluteIndex": 0,
- "originallyAvailableAt": null,
- "duration": 0,
- "summary": null,
- "tagline": null,
- "thumb": null,
- "art": null,
- "banner": null,
- "hero": null,
- "theme": null,
- "composite": null,
- "studio": null,
- "contentRating": null,
- "rating": 10,
- "ratingImage": null,
- "audienceRating": 10,
- "audienceRatingImage": null,
- "userRating": 10,
- "viewOffset": 0,
- "viewCount": 0,
- "lastViewedAt": 0,
- "addedAt": 0,
- "updatedAt": 0,
- "chapterSource": null,
- "primaryExtraKey": null,
- "skipChildren": true,
- "skipParent": true,
- "leafCount": 0,
- "viewedLeafCount": 0,
- "parentKey": "string",
- "grandparentKey": "string",
- "parentRatingKey": "string",
- "grandparentRatingKey": "string",
- "parentThumb": "string",
- "grandparentThumb": "string",
- "grandparentArt": "string",
- "parentHero": "string",
- "grandparentHero": "string",
- "grandparentTheme": "string",
- "parentTitle": "string",
- "grandparentTitle": "string",
- "parentIndex": 0,
- "secondary": true,
- "prompt": "string",
- "search": true,
- "ratingCount": 0,
- "Media": [
- {
- "aspectRatio": 2.35,
- "audioChannels": 2,
- "audioCodec": "aac",
- "audioProfile": "lc",
- "bitrate": 5612,
- "container": "mov",
- "duration": 150192,
- "has64bitOffsets": false,
- "hasVoiceActivity": true,
- "height": 544,
- "id": 1,
- "optimizedForStreaming": false,
- "videoCodec": "h264",
- "videoFrameRate": "24p",
- "videoProfile": "main",
- "videoResolution": "720",
- "width": 1280,
- "Part": [
- {
- "audioProfile": "lc",
- "container": "mov",
- "duration": 150192,
- "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov",
- "has64bitOffsets": false,
- "id": 1,
- "key": "/library/parts/1/1531779263/file.mov",
- "optimizedForStreaming": false,
- "size": 105355654,
- "videoProfile": "main",
- "Stream": [
- {
- "audioChannelLayout": null,
- "bitDepth": null,
- "bitrate": null,
- "canAutoSync": null,
- "chromaLocation": null,
- "chromaSubsampling": null,
- "codec": null,
- "colorPrimaries": null,
- "colorRange": null,
- "colorSpace": null,
- "colorTrc": null,
- "default": null,
- "displayTitle": null,
- "frameRate": null,
- "hasScalingMatrix": null,
- "height": null,
- "id": null,
- "index": null,
- "key": null,
- "language": null,
- "languageCode": null,
- "level": null,
- "profile": null,
- "refFrames": null,
- "samplingRate": null,
- "selected": null,
- "streamIdentifier": null,
- "streamType": null,
- "width": null
}
]
}
]
}
], - "Image": [
- {
- "type": "background",
- "url": "string",
- "alt": "string"
}
], - "Genre": [
- {
- "id": 0,
- "tag": "Shaun Lawton",
- "tagKey": "5d3ee12c4cde6a001c3e0b27",
- "tagType": 0,
- "filter": "actor=49",
- "role": "Secretary",
- "context": "string",
- "ratingKey": "string",
- "confidence": 0
}
], - "Country": [
- {
- "id": 0,
- "tag": "Shaun Lawton",
- "tagKey": "5d3ee12c4cde6a001c3e0b27",
- "tagType": 0,
- "filter": "actor=49",
- "role": "Secretary",
- "context": "string",
- "ratingKey": "string",
- "confidence": 0
}
], - "Guid": [
- {
- "id": 0,
- "tag": "Shaun Lawton",
- "tagKey": "5d3ee12c4cde6a001c3e0b27",
- "tagType": 0,
- "filter": "actor=49",
- "role": "Secretary",
- "context": "string",
- "ratingKey": "string",
- "confidence": 0
}
], - "Rating": [
- {
- "id": 0,
- "tag": "Shaun Lawton",
- "tagKey": "5d3ee12c4cde6a001c3e0b27",
- "tagType": 0,
- "filter": "actor=49",
- "role": "Secretary",
- "context": "string",
- "ratingKey": "string",
- "confidence": 0
}
], - "Director": [
- {
- "id": 0,
- "tag": "Shaun Lawton",
- "tagKey": "5d3ee12c4cde6a001c3e0b27",
- "tagType": 0,
- "filter": "actor=49",
- "role": "Secretary",
- "context": "string",
- "ratingKey": "string",
- "confidence": 0
}
], - "Writer": [
- {
- "id": 0,
- "tag": "Shaun Lawton",
- "tagKey": "5d3ee12c4cde6a001c3e0b27",
- "tagType": 0,
- "filter": "actor=49",
- "role": "Secretary",
- "context": "string",
- "ratingKey": "string",
- "confidence": 0
}
], - "Role": [
- {
- "id": 0,
- "tag": "Shaun Lawton",
- "tagKey": "5d3ee12c4cde6a001c3e0b27",
- "tagType": 0,
- "filter": "actor=49",
- "role": "Secretary",
- "context": "string",
- "ratingKey": "string",
- "confidence": 0
}
], - "Autotag": [
- {
- "id": 0,
- "tag": "Shaun Lawton",
- "tagKey": "5d3ee12c4cde6a001c3e0b27",
- "tagType": 0,
- "filter": "actor=49",
- "role": "Secretary",
- "context": "string",
- "ratingKey": "string",
- "confidence": 0
}
], - "Filter": [
- {
- "hubKey": "string",
- "key": "string",
- "title": "string",
- "thumb": "string",
- "art": "string",
- "share": 0,
- "hasStoreServices": true,
- "hasPrefs": true,
- "identifier": "string",
- "titleBar": "string",
- "lastAccessedAt": 0,
- "type": "string",
- "content": true,
- "filter": "string",
- "Pivot": [
- {
- "id": "string",
- "key": "string",
- "type": "string",
- "title": "string",
- "context": "string",
- "symbol": "string"
}
], - "filterType": "string"
}
], - "Sort": [
- {
- "hubKey": "string",
- "key": "string",
- "title": "string",
- "thumb": "string",
- "art": "string",
- "share": 0,
- "hasStoreServices": true,
- "hasPrefs": true,
- "identifier": "string",
- "titleBar": "string",
- "lastAccessedAt": 0,
- "type": "string",
- "content": true,
- "filter": "string",
- "Pivot": [
- {
- "id": "string",
- "key": "string",
- "type": "string",
- "title": "string",
- "context": "string",
- "symbol": "string"
}
], - "defaultDirection": "asc",
- "default": "asc",
- "descKey": "string",
- "firstCharacterKey": "string"
}
]
}
]
}
}Get the global continue watching hub
| count | integer Limit hub entry to count items |
{- "MediaContainer": {
- "size": 8,
- "allowSync": true,
- "identifier": "com.plexapp.plugins.library",
- "Hub": [
- {
- "hubKey": "/library/metadata/37",
- "key": "/hubs/home/continueWatching",
- "title": "Continue Watching",
- "type": "mixed",
- "hubIdentifier": "home.continue",
- "context": "hub.home.continue",
- "size": 1,
- "more": false,
- "style": "hero",
- "promoted": true,
- "Metadata": [ ]
}, - {
- "hubKey": "/library/metadata/217",
- "key": "/hubs/home/onDeck",
- "title": "On Deck",
- "type": "episode",
- "hubIdentifier": "home.ondeck",
- "context": "hub.home.ondeck",
- "size": 1,
- "more": false,
- "style": "shelf",
- "promoted": true,
- "Metadata": [ ]
}, - {
- "hubKey": "/library/metadata/146,37,38,67,81,3",
- "key": "/hubs/home/recentlyAdded?type=1",
- "title": "Recently Added Movies",
- "type": "movie",
- "hubIdentifier": "home.movies.recent",
- "context": "hub.home.movies.recent",
- "size": 6,
- "more": true,
- "style": "shelf",
- "promoted": true,
- "Metadata": [ ]
}, - {
- "hubKey": "/library/metadata/192,164,203,155,199,236",
- "key": "/hubs/home/recentlyAdded?type=2",
- "title": "Recently Added TV",
- "type": "mixed",
- "hubIdentifier": "home.television.recent",
- "context": "hub.home.television.recent",
- "size": 6,
- "more": true,
- "style": "shelf",
- "promoted": true,
- "Metadata": [ ]
}, - {
- "hubKey": "/library/metadata/370,365,334,308,294,281",
- "key": "/hubs/home/recentlyAdded?type=8",
- "title": "Recently Added Music",
- "type": "album",
- "hubIdentifier": "home.music.recent",
- "context": "hub.home.music.recent",
- "size": 6,
- "more": true,
- "style": "shelf",
- "promoted": true,
- "Metadata": [ ]
}, - {
- "hubKey": "/library/metadata/3390,3391,3392,3393,4230,4229",
- "key": "/hubs/home/recentlyAdded?type=13",
- "title": "Recently Added Photos",
- "type": "photo",
- "hubIdentifier": "home.photos.recent",
- "context": "hub.home.photos.recent",
- "size": 6,
- "more": true,
- "style": "shelf",
- "promoted": true,
- "Metadata": [ ]
}, - {
- "hubKey": "/library/metadata/3376,3339,3340,3341,3342,3343",
- "key": "/hubs/home/recentlyAdded?type=1&personal=1",
- "title": "Recently Added Videos",
- "type": "clip",
- "hubIdentifier": "home.videos.recent",
- "context": "hub.home.videos.recent",
- "size": 6,
- "more": true,
- "style": "shelf",
- "promoted": true,
- "Metadata": [ ]
}, - {
- "hubKey": "/library/metadata/3373,3225",
- "key": "/playlists/all?type=15&sort=lastViewedAt:desc&playlistType=video,audio",
- "title": "Recent Playlists",
- "type": "playlist",
- "hubIdentifier": "home.playlists",
- "context": "hub.home.playlists",
- "size": 2,
- "more": false,
- "style": "shelf",
- "promoted": true,
- "Metadata": [ ]
}
]
}
}Get the global hubs which are promoted (should be displayed on the home screen)
| count | integer Limit hub entry to count items |
{- "MediaContainer": {
- "size": 8,
- "allowSync": true,
- "identifier": "com.plexapp.plugins.library",
- "Hub": [
- {
- "hubKey": "/library/metadata/37",
- "key": "/hubs/home/continueWatching",
- "title": "Continue Watching",
- "type": "mixed",
- "hubIdentifier": "home.continue",
- "context": "hub.home.continue",
- "size": 1,
- "more": false,
- "style": "hero",
- "promoted": true,
- "Metadata": [ ]
}, - {
- "hubKey": "/library/metadata/217",
- "key": "/hubs/home/onDeck",
- "title": "On Deck",
- "type": "episode",
- "hubIdentifier": "home.ondeck",
- "context": "hub.home.ondeck",
- "size": 1,
- "more": false,
- "style": "shelf",
- "promoted": true,
- "Metadata": [ ]
}, - {
- "hubKey": "/library/metadata/146,37,38,67,81,3",
- "key": "/hubs/home/recentlyAdded?type=1",
- "title": "Recently Added Movies",
- "type": "movie",
- "hubIdentifier": "home.movies.recent",
- "context": "hub.home.movies.recent",
- "size": 6,
- "more": true,
- "style": "shelf",
- "promoted": true,
- "Metadata": [ ]
}, - {
- "hubKey": "/library/metadata/192,164,203,155,199,236",
- "key": "/hubs/home/recentlyAdded?type=2",
- "title": "Recently Added TV",
- "type": "mixed",
- "hubIdentifier": "home.television.recent",
- "context": "hub.home.television.recent",
- "size": 6,
- "more": true,
- "style": "shelf",
- "promoted": true,
- "Metadata": [ ]
}, - {
- "hubKey": "/library/metadata/370,365,334,308,294,281",
- "key": "/hubs/home/recentlyAdded?type=8",
- "title": "Recently Added Music",
- "type": "album",
- "hubIdentifier": "home.music.recent",
- "context": "hub.home.music.recent",
- "size": 6,
- "more": true,
- "style": "shelf",
- "promoted": true,
- "Metadata": [ ]
}, - {
- "hubKey": "/library/metadata/3390,3391,3392,3393,4230,4229",
- "key": "/hubs/home/recentlyAdded?type=13",
- "title": "Recently Added Photos",
- "type": "photo",
- "hubIdentifier": "home.photos.recent",
- "context": "hub.home.photos.recent",
- "size": 6,
- "more": true,
- "style": "shelf",
- "promoted": true,
- "Metadata": [ ]
}, - {
- "hubKey": "/library/metadata/3376,3339,3340,3341,3342,3343",
- "key": "/hubs/home/recentlyAdded?type=1&personal=1",
- "title": "Recently Added Videos",
- "type": "clip",
- "hubIdentifier": "home.videos.recent",
- "context": "hub.home.videos.recent",
- "size": 6,
- "more": true,
- "style": "shelf",
- "promoted": true,
- "Metadata": [ ]
}, - {
- "hubKey": "/library/metadata/3373,3225",
- "key": "/playlists/all?type=15&sort=lastViewedAt:desc&playlistType=video,audio",
- "title": "Recent Playlists",
- "type": "playlist",
- "hubIdentifier": "home.playlists",
- "context": "hub.home.playlists",
- "size": 2,
- "more": false,
- "style": "shelf",
- "promoted": true,
- "Metadata": [ ]
}
]
}
}Get the hubs for a section by metadata item. Currently only for music sections
| metadataId required | integer The metadata ID for the hubs to fetch |
| count | integer Limit hub entries to count items |
| onlyTransient | integer Enum: 0 1 Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added) |
{- "MediaContainer": {
- "size": 8,
- "allowSync": true,
- "identifier": "com.plexapp.plugins.library",
- "Hub": [
- {
- "hubKey": "/library/metadata/37",
- "key": "/hubs/home/continueWatching",
- "title": "Continue Watching",
- "type": "mixed",
- "hubIdentifier": "home.continue",
- "context": "hub.home.continue",
- "size": 1,
- "more": false,
- "style": "hero",
- "promoted": true,
- "Metadata": [ ]
}, - {
- "hubKey": "/library/metadata/217",
- "key": "/hubs/home/onDeck",
- "title": "On Deck",
- "type": "episode",
- "hubIdentifier": "home.ondeck",
- "context": "hub.home.ondeck",
- "size": 1,
- "more": false,
- "style": "shelf",
- "promoted": true,
- "Metadata": [ ]
}, - {
- "hubKey": "/library/metadata/146,37,38,67,81,3",
- "key": "/hubs/home/recentlyAdded?type=1",
- "title": "Recently Added Movies",
- "type": "movie",
- "hubIdentifier": "home.movies.recent",
- "context": "hub.home.movies.recent",
- "size": 6,
- "more": true,
- "style": "shelf",
- "promoted": true,
- "Metadata": [ ]
}, - {
- "hubKey": "/library/metadata/192,164,203,155,199,236",
- "key": "/hubs/home/recentlyAdded?type=2",
- "title": "Recently Added TV",
- "type": "mixed",
- "hubIdentifier": "home.television.recent",
- "context": "hub.home.television.recent",
- "size": 6,
- "more": true,
- "style": "shelf",
- "promoted": true,
- "Metadata": [ ]
}, - {
- "hubKey": "/library/metadata/370,365,334,308,294,281",
- "key": "/hubs/home/recentlyAdded?type=8",
- "title": "Recently Added Music",
- "type": "album",
- "hubIdentifier": "home.music.recent",
- "context": "hub.home.music.recent",
- "size": 6,
- "more": true,
- "style": "shelf",
- "promoted": true,
- "Metadata": [ ]
}, - {
- "hubKey": "/library/metadata/3390,3391,3392,3393,4230,4229",
- "key": "/hubs/home/recentlyAdded?type=13",
- "title": "Recently Added Photos",
- "type": "photo",
- "hubIdentifier": "home.photos.recent",
- "context": "hub.home.photos.recent",
- "size": 6,
- "more": true,
- "style": "shelf",
- "promoted": true,
- "Metadata": [ ]
}, - {
- "hubKey": "/library/metadata/3376,3339,3340,3341,3342,3343",
- "key": "/hubs/home/recentlyAdded?type=1&personal=1",
- "title": "Recently Added Videos",
- "type": "clip",
- "hubIdentifier": "home.videos.recent",
- "context": "hub.home.videos.recent",
- "size": 6,
- "more": true,
- "style": "shelf",
- "promoted": true,
- "Metadata": [ ]
}, - {
- "hubKey": "/library/metadata/3373,3225",
- "key": "/playlists/all?type=15&sort=lastViewedAt:desc&playlistType=video,audio",
- "title": "Recent Playlists",
- "type": "playlist",
- "hubIdentifier": "home.playlists",
- "context": "hub.home.playlists",
- "size": 2,
- "more": false,
- "style": "shelf",
- "promoted": true,
- "Metadata": [ ]
}
]
}
}Get the hubs for a metadata related to the provided metadata item
| metadataId required | integer The metadata ID for the hubs to fetch |
| count | integer Limit hub entries to count items |
| onlyTransient | integer Enum: 0 1 Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added) |
{- "MediaContainer": {
- "size": 8,
- "allowSync": true,
- "identifier": "com.plexapp.plugins.library",
- "Hub": [
- {
- "hubKey": "/library/metadata/37",
- "key": "/hubs/home/continueWatching",
- "title": "Continue Watching",
- "type": "mixed",
- "hubIdentifier": "home.continue",
- "context": "hub.home.continue",
- "size": 1,
- "more": false,
- "style": "hero",
- "promoted": true,
- "Metadata": [ ]
}, - {
- "hubKey": "/library/metadata/217",
- "key": "/hubs/home/onDeck",
- "title": "On Deck",
- "type": "episode",
- "hubIdentifier": "home.ondeck",
- "context": "hub.home.ondeck",
- "size": 1,
- "more": false,
- "style": "shelf",
- "promoted": true,
- "Metadata": [ ]
}, - {
- "hubKey": "/library/metadata/146,37,38,67,81,3",
- "key": "/hubs/home/recentlyAdded?type=1",
- "title": "Recently Added Movies",
- "type": "movie",
- "hubIdentifier": "home.movies.recent",
- "context": "hub.home.movies.recent",
- "size": 6,
- "more": true,
- "style": "shelf",
- "promoted": true,
- "Metadata": [ ]
}, - {
- "hubKey": "/library/metadata/192,164,203,155,199,236",
- "key": "/hubs/home/recentlyAdded?type=2",
- "title": "Recently Added TV",
- "type": "mixed",
- "hubIdentifier": "home.television.recent",
- "context": "hub.home.television.recent",
- "size": 6,
- "more": true,
- "style": "shelf",
- "promoted": true,
- "Metadata": [ ]
}, - {
- "hubKey": "/library/metadata/370,365,334,308,294,281",
- "key": "/hubs/home/recentlyAdded?type=8",
- "title": "Recently Added Music",
- "type": "album",
- "hubIdentifier": "home.music.recent",
- "context": "hub.home.music.recent",
- "size": 6,
- "more": true,
- "style": "shelf",
- "promoted": true,
- "Metadata": [ ]
}, - {
- "hubKey": "/library/metadata/3390,3391,3392,3393,4230,4229",
- "key": "/hubs/home/recentlyAdded?type=13",
- "title": "Recently Added Photos",
- "type": "photo",
- "hubIdentifier": "home.photos.recent",
- "context": "hub.home.photos.recent",
- "size": 6,
- "more": true,
- "style": "shelf",
- "promoted": true,
- "Metadata": [ ]
}, - {
- "hubKey": "/library/metadata/3376,3339,3340,3341,3342,3343",
- "key": "/hubs/home/recentlyAdded?type=1&personal=1",
- "title": "Recently Added Videos",
- "type": "clip",
- "hubIdentifier": "home.videos.recent",
- "context": "hub.home.videos.recent",
- "size": 6,
- "more": true,
- "style": "shelf",
- "promoted": true,
- "Metadata": [ ]
}, - {
- "hubKey": "/library/metadata/3373,3225",
- "key": "/playlists/all?type=15&sort=lastViewedAt:desc&playlistType=video,audio",
- "title": "Recent Playlists",
- "type": "playlist",
- "hubIdentifier": "home.playlists",
- "context": "hub.home.playlists",
- "size": 2,
- "more": false,
- "style": "shelf",
- "promoted": true,
- "Metadata": [ ]
}
]
}
}Get the hubs for a metadata to be displayed in post play
| metadataId required | integer The metadata ID for the hubs to fetch |
| count | integer Limit hub entries to count items |
| onlyTransient | integer Enum: 0 1 Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added) |
{- "MediaContainer": {
- "size": 8,
- "allowSync": true,
- "identifier": "com.plexapp.plugins.library",
- "Hub": [
- {
- "hubKey": "/library/metadata/37",
- "key": "/hubs/home/continueWatching",
- "title": "Continue Watching",
- "type": "mixed",
- "hubIdentifier": "home.continue",
- "context": "hub.home.continue",
- "size": 1,
- "more": false,
- "style": "hero",
- "promoted": true,
- "Metadata": [ ]
}, - {
- "hubKey": "/library/metadata/217",
- "key": "/hubs/home/onDeck",
- "title": "On Deck",
- "type": "episode",
- "hubIdentifier": "home.ondeck",
- "context": "hub.home.ondeck",
- "size": 1,
- "more": false,
- "style": "shelf",
- "promoted": true,
- "Metadata": [ ]
}, - {
- "hubKey": "/library/metadata/146,37,38,67,81,3",
- "key": "/hubs/home/recentlyAdded?type=1",
- "title": "Recently Added Movies",
- "type": "movie",
- "hubIdentifier": "home.movies.recent",
- "context": "hub.home.movies.recent",
- "size": 6,
- "more": true,
- "style": "shelf",
- "promoted": true,
- "Metadata": [ ]
}, - {
- "hubKey": "/library/metadata/192,164,203,155,199,236",
- "key": "/hubs/home/recentlyAdded?type=2",
- "title": "Recently Added TV",
- "type": "mixed",
- "hubIdentifier": "home.television.recent",
- "context": "hub.home.television.recent",
- "size": 6,
- "more": true,
- "style": "shelf",
- "promoted": true,
- "Metadata": [ ]
}, - {
- "hubKey": "/library/metadata/370,365,334,308,294,281",
- "key": "/hubs/home/recentlyAdded?type=8",
- "title": "Recently Added Music",
- "type": "album",
- "hubIdentifier": "home.music.recent",
- "context": "hub.home.music.recent",
- "size": 6,
- "more": true,
- "style": "shelf",
- "promoted": true,
- "Metadata": [ ]
}, - {
- "hubKey": "/library/metadata/3390,3391,3392,3393,4230,4229",
- "key": "/hubs/home/recentlyAdded?type=13",
- "title": "Recently Added Photos",
- "type": "photo",
- "hubIdentifier": "home.photos.recent",
- "context": "hub.home.photos.recent",
- "size": 6,
- "more": true,
- "style": "shelf",
- "promoted": true,
- "Metadata": [ ]
}, - {
- "hubKey": "/library/metadata/3376,3339,3340,3341,3342,3343",
- "key": "/hubs/home/recentlyAdded?type=1&personal=1",
- "title": "Recently Added Videos",
- "type": "clip",
- "hubIdentifier": "home.videos.recent",
- "context": "hub.home.videos.recent",
- "size": 6,
- "more": true,
- "style": "shelf",
- "promoted": true,
- "Metadata": [ ]
}, - {
- "hubKey": "/library/metadata/3373,3225",
- "key": "/playlists/all?type=15&sort=lastViewedAt:desc&playlistType=video,audio",
- "title": "Recent Playlists",
- "type": "playlist",
- "hubIdentifier": "home.playlists",
- "context": "hub.home.playlists",
- "size": 2,
- "more": false,
- "style": "shelf",
- "promoted": true,
- "Metadata": [ ]
}
]
}
}Get the hubs for a single section
| sectionId required | integer The section ID for the hubs to fetch |
| count | integer Limit hub entries to count items |
| onlyTransient | integer Enum: 0 1 Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added) |
{- "MediaContainer": {
- "size": 7,
- "allowSync": true,
- "identifier": "com.plexapp.plugins.library",
- "librarySectionID": 1,
- "librarySectionTitle": "Movies",
- "librarySectionUUID": "82503060-0d68-4603-b594-8b071d54819e",
- "Hub": [
- {
- "hubKey": "/library/metadata/37",
- "key": "/hubs/sections/1/continueWatching/items",
- "title": "Continue Watching",
- "type": "movie",
- "hubIdentifier": "movie.inprogress.1",
- "context": "hub.movie.inprogress",
- "size": 1,
- "more": false,
- "style": "shelf",
- "Metadata": [ ]
}, - {
- "key": "/library/sections/1/all?sort=originallyAvailableAt:desc&originallyAvailableAt>=-1y",
- "title": "Recently Released Movies",
- "type": "movie",
- "hubIdentifier": "movie.recentlyreleased.1",
- "context": "hub.movie.recentlyreleased",
- "size": 0,
- "more": false,
- "style": "shelf"
}, - {
- "hubKey": "/library/metadata/146,37,38,67,81,3",
- "key": "/library/sections/1/all?sort=addedAt:desc",
- "title": "Recently Added in Movies",
- "type": "movie",
- "hubIdentifier": "movie.recentlyadded.1",
- "context": "hub.movie.recentlyadded",
- "size": 6,
- "more": true,
- "style": "shelf",
- "promoted": true,
- "Metadata": [ ]
}, - {
- "hubKey": "/library/metadata/146,81",
- "key": "/library/sections/1/all?unwatched=1&genre=176&audienceRating>=7.0",
- "title": "Top Movies in Comedy",
- "type": "movie",
- "hubIdentifier": "movie.genre.1.176",
- "context": "hub.movie.genre",
- "size": 2,
- "more": false,
- "style": "shelf",
- "Metadata": [ ]
}, - {
- "key": "/library/sections/1/all?unwatched=1&director=252&sort=audienceRating:desc",
- "title": "Top Movies by James Ford Murphy",
- "type": "movie",
- "hubIdentifier": "movie.by.actor.or.director.1.252",
- "context": "hub.movie.by.actor.or.director",
- "size": 0,
- "more": false,
- "random": true,
- "style": "shelf"
}, - {
- "hubKey": "/library/metadata/121,65,123,2,146,81",
- "key": "/library/sections/1/all?unwatched=1&audienceRating>=7.0&sort=audienceRating:desc",
- "title": "Top Unwatched Movies",
- "type": "movie",
- "hubIdentifier": "movie.topunwatched.1",
- "context": "hub.movie.topunwatched",
- "size": 6,
- "more": false,
- "random": true,
- "style": "shelf",
- "Metadata": [ ]
}, - {
- "hubKey": "/library/metadata/66,38,78,4,1,3",
- "key": "/library/sections/1/all?sort=lastViewedAt:desc&unwatched=0&viewOffset=0",
- "title": "Recently Watched Movies",
- "type": "movie",
- "hubIdentifier": "movie.recentlyviewed.1",
- "context": "hub.movie.recentlyviewed",
- "size": 6,
- "more": true,
- "style": "shelf",
- "Metadata": [ ]
}
]
}
}Get the list of hubs including both built-in and custom
| sectionId required | integer The section ID for the hubs to reorder |
| metadataItemId | integer Restrict hubs to ones relevant to the provided metadata item |
{- "MediaContainer": {
- "size": 8,
- "Hub": [
- {
- "identifier": "movie.recentlyreleased",
- "title": "Recently Released Movies",
- "recommendationsVisibility": "all",
- "homeVisibility": "none",
- "promotedToRecommended": true,
- "promotedToOwnHome": false,
- "promotedToSharedHome": false
}, - {
- "identifier": "movie.recentlyadded",
- "title": "Recently Added Movies",
- "recommendationsVisibility": "all",
- "homeVisibility": "all",
- "promotedToRecommended": true,
- "promotedToOwnHome": true,
- "promotedToSharedHome": true
}, - {
- "identifier": "recent.library.playlists",
- "title": "Library Playlists",
- "recommendationsVisibility": "all",
- "homeVisibility": "none",
- "promotedToRecommended": true,
- "promotedToOwnHome": false,
- "promotedToSharedHome": false
}, - {
- "identifier": "movie.genre",
- "title": "Top Movies in (Genre)",
- "recommendationsVisibility": "all",
- "homeVisibility": "none",
- "promotedToRecommended": true,
- "promotedToOwnHome": false,
- "promotedToSharedHome": false
}, - {
- "identifier": "movie.by.actor.or.director",
- "title": "Top Movies by (Actor or Director)",
- "recommendationsVisibility": "all",
- "homeVisibility": "none",
- "promotedToRecommended": true,
- "promotedToOwnHome": false,
- "promotedToSharedHome": false
}, - {
- "identifier": "movie.topunwatched",
- "title": "Top Unplayed Movies",
- "recommendationsVisibility": "all",
- "homeVisibility": "none",
- "promotedToRecommended": true,
- "promotedToOwnHome": false,
- "promotedToSharedHome": false
}, - {
- "identifier": "movie.curated",
- "title": "Seasonal Movies",
- "recommendationsVisibility": "all",
- "homeVisibility": "all",
- "promotedToRecommended": true,
- "promotedToOwnHome": true,
- "promotedToSharedHome": true
}, - {
- "identifier": "movie.recentlyviewed",
- "title": "Recently Played Movies",
- "recommendationsVisibility": "all",
- "homeVisibility": "none",
- "promotedToRecommended": true,
- "promotedToOwnHome": false,
- "promotedToSharedHome": false
}
]
}
}Create a custom hub based on a metadata item
| sectionId required | integer The section ID for the hubs to reorder |
| metadataItemId required | integer The metadata item on which to base this hub. This must currently be a collection |
| promotedToRecommended | integer Enum: 0 1 Whether this hub should be displayed in recommended |
| promotedToOwnHome | integer Enum: 0 1 Whether this hub should be displayed in admin's home |
| promotedToSharedHome | integer Enum: 0 1 Whether this hub should be displayed in shared user's home |
Changed the ordering of a hub among others hubs
| sectionId required | integer The section ID for the hubs to reorder |
| identifier required | string The identifier of the hub to move |
| after | string The identifier of the hub to order this hub after (or empty/missing to put this hub first) |
{- "MediaContainer": {
- "size": 8,
- "Hub": [
- {
- "identifier": "movie.recentlyreleased",
- "title": "Recently Released Movies",
- "recommendationsVisibility": "all",
- "homeVisibility": "none",
- "promotedToRecommended": true,
- "promotedToOwnHome": false,
- "promotedToSharedHome": false
}, - {
- "identifier": "movie.recentlyadded",
- "title": "Recently Added Movies",
- "recommendationsVisibility": "all",
- "homeVisibility": "all",
- "promotedToRecommended": true,
- "promotedToOwnHome": true,
- "promotedToSharedHome": true
}, - {
- "identifier": "recent.library.playlists",
- "title": "Library Playlists",
- "recommendationsVisibility": "all",
- "homeVisibility": "none",
- "promotedToRecommended": true,
- "promotedToOwnHome": false,
- "promotedToSharedHome": false
}, - {
- "identifier": "movie.genre",
- "title": "Top Movies in (Genre)",
- "recommendationsVisibility": "all",
- "homeVisibility": "none",
- "promotedToRecommended": true,
- "promotedToOwnHome": false,
- "promotedToSharedHome": false
}, - {
- "identifier": "movie.by.actor.or.director",
- "title": "Top Movies by (Actor or Director)",
- "recommendationsVisibility": "all",
- "homeVisibility": "none",
- "promotedToRecommended": true,
- "promotedToOwnHome": false,
- "promotedToSharedHome": false
}, - {
- "identifier": "movie.topunwatched",
- "title": "Top Unplayed Movies",
- "recommendationsVisibility": "all",
- "homeVisibility": "none",
- "promotedToRecommended": true,
- "promotedToOwnHome": false,
- "promotedToSharedHome": false
}, - {
- "identifier": "movie.curated",
- "title": "Seasonal Movies",
- "recommendationsVisibility": "all",
- "homeVisibility": "all",
- "promotedToRecommended": true,
- "promotedToOwnHome": true,
- "promotedToSharedHome": true
}, - {
- "identifier": "movie.recentlyviewed",
- "title": "Recently Played Movies",
- "recommendationsVisibility": "all",
- "homeVisibility": "none",
- "promotedToRecommended": true,
- "promotedToOwnHome": false,
- "promotedToSharedHome": false
}
]
}
}Changed the visibility of a hub for both the admin and shared users
| sectionId required | integer The section ID for the hubs to change |
| identifier required | string The identifier of the hub to change |
| promotedToRecommended | integer Enum: 0 1 Whether this hub should be displayed in recommended |
| promotedToOwnHome | integer Enum: 0 1 Whether this hub should be displayed in admin's home |
| promotedToSharedHome | integer Enum: 0 1 Whether this hub should be displayed in shared user's home |
Perform a search and get the result as hubs
This endpoint performs a search across all library sections, or a single section, and returns matches as hubs, split up by type. It performs spell checking, looks for partial matches, and orders the hubs based on quality of results. In addition, based on matches, it will return other related matches (e.g. for a genre match, it may return movies in that genre, or for an actor match, movies with that actor).
In the response's items, the following extra attributes are returned to further describe or disambiguate the result:
reason: The reason for the result, if not because of a direct search term match; can be either:section: There are multiple identical results from different sections.originalTitle: There was a search term match from the original title field (sometimes those can be very different or in a foreign language).<hub identifier>: If the reason for the result is due to a result in another hub, the source hub identifier is returned. For example, if the search is for "dylan" then Bob Dylan may be returned as an artist result, an a few of his albums returned as album results with a reason code of artist (the identifier of that particular hub). Or if the search is for "arnold", there might be movie results returned with a reason of actorreasonTitle: The string associated with the reason code. For a section reason, it'll be the section name; For a hub identifier, it'll be a string associated with the match (e.g. Arnold Schwarzenegger for movies which were returned because the search was for "arnold").reasonID: The ID of the item associated with the reason for the result. This might be a section ID, a tag ID, an artist ID, or a show ID.This request is intended to be very fast, and called as the user types.
| query required | string The query term |
| sectionId | integer Example: sectionId=1 This gives context to the search, and can result in re-ordering of search result hubs. |
| limit | integer The number of items to return per hub. 3 if not specified |
{- "MediaContainer": {
- "size": 12,
- "Hub": [
- {
- "hubIdentifier": "show",
- "more": false,
- "size": 1,
- "title": "Shows",
- "type": "show",
- "Directory": [
- {
- "title": "The Simpsons",
- "titleSort": "Simpsons",
- "type": "show",
- "more": "metadata"
}
]
}, - {
- "hubIdentifier": "movie",
- "more": false,
- "size": 1,
- "title": "Movies",
- "type": "movie",
- "Metadata": [
- {
- "title": "The Simpsons Movie",
- "type": "movie",
- "more": "metadata"
}
]
}
]
}
}Perform a search tailored to voice input and get the result as hubs
This endpoint performs a search specifically tailored towards voice or other imprecise input which may work badly with the substring and spell-checking heuristics used by the /hubs/search endpoint. It uses a Levenshtein distance heuristic to search titles, and as such is much slower than the other search endpoint. Whenever possible, clients should limit the search to the appropriate type.
Results, as well as their containing per-type hubs, contain a distance attribute which can be used to judge result quality.
| query required | string The query term |
| type | integer Example: type=8 The type of thing to limit the search to. |
| limit | integer The number of items to return per hub. 3 if not specified |
{- "MediaContainer": {
- "size": 2,
- "Hub": [
- {
- "distance": 3,
- "hubIdentifier": "results.search.1",
- "size": 2,
- "title": "movie",
- "type": "movie",
- "Metadata": [
- {
- "distance": 3,
- "title": "Deadpool",
- "type": "movie"
}, - {
- "distance": 4,
- "title": "Dead Snow",
- "type": "movie"
}
]
}, - {
- "distance": 4,
- "hubIdentifier": "results.search.2",
- "size": 1,
- "title": "show",
- "type": "show",
- "Directory": [
- {
- "distance": 4,
- "title": "Deadwood",
- "type": "show"
}
]
}
]
}
}Set the rating on an item. This API does respond to the GET verb but applications should use PUT
| identifier required | string The identifier of the media provider containing the media to rate. Typically |
| key required | string The key of the item to rate. This is the |
| rating required | number [ 0 .. 10 ] The rating to give the item. |
| ratedAt | integer The time when the rating occurred. If not present, interpreted as now. |
The playlist feature within a media provider Playlists are ordered collections of media. They can be dumb (just a list of media) or smart (based on a media query, such as "all albums from 2017"). They can be organized in (optionally nesting) folders. Retrieving a playlist, or its items, will trigger a refresh of its metadata. This may cause the duration and number of items to change.
Gets a list of playlists and playlist folders for a user. General filters are permitted, such as sort=lastViewedAt:desc. A flat playlist list can be retrieved using type=15 to limit the collection to just playlists.
| playlistType | string Enum: "audio" "video" "photo" Limit to a type of playlist |
| smart | integer Enum: 0 1 Type of playlists to return, smart or not. When not provided, will return both. |
A list of playlists
{- "MediaContainer": {
- "size": 2,
- "Metadata": [
- {
- "addedAt": 1476942219,
- "composite": "/playlists/2561805/composite/1485900004",
- "duration": 1512000,
- "key": "/playlists/2561805/items",
- "lastViewedAt": 1484680617,
- "leafCount": 8,
- "playlistType": "video",
- "ratingKey": "2561805",
- "smart": false,
- "title": "Background videos",
- "type": "playlist",
- "updatedAt": 1485900004,
- "viewCount": 8
}, - {
- "addedAt": 1428993345,
- "composite": "/playlists/1956389/composite/1486498661",
- "duration": 938507000,
- "key": "/playlists/1956389/items",
- "leafCount": 3934,
- "playlistType": "audio",
- "ratingKey": "1956389",
- "smart": true,
- "title": "Fairly Recent",
- "type": "playlist",
- "updatedAt": 1486498661
}
]
}
}Gets detailed metadata for a playlist. A playlist for many purposes (rating, editing metadata, tagging), can be treated like a regular metadata item:
Smart playlist details contain the content attribute. This is the content URI for the generator. This can then be parsed by a client to provide smart playlist editing.
| playlistId required | integer The ID of the playlist |
An example playlist
{- "MediaContainer": {
- "size": 1,
- "Metadata": [
- {
- "addedAt"": 1428993345,
- "composite"": "/playlists/1956389/composite/1486764293",
- "content"": "library://22d0bfe3-21ce-4a67-9065-ccaf470cb3c2/directory/%2Flibrary%2Fsections%2F1224%2Fall%3Ftrack%2EaddedAt%3E%3D-12mon%26album%2Egenre!%3DPodcast%26album%2Egenre!%3DBooks%2520%2526%2520Spoken%26artist%2Etitle!%3DAOL%2520Music",
- "duration"": 957684000,
- "guid"": "com.plexapp.plugins.itunes://9F7B78609597F45F",
- "key"": "/playlists/1956389/items",
- "leafCount"": 4015,
- "playlistType"": "audio",
- "ratingKey"": "1956389",
- "smart"": true,
- "title"": "Fairly Recent",
- "type"": "playlist",
- "updatedAt"": 1486764293
}
]
}
}Gets the contents if a playlist. Should be paged by clients via standard mechanisms. By default leaves are returned (e.g. episodes, movies). In order to return other types you can use the type parameter. For example, you could use this to display a list of recently added albums vis a smart playlist. Note that for dumb playlists, items have a playlistItemID attribute which is used for deleting or moving items.
| playlistId required | integer The ID of the playlist |
| type | Array of integers The metadata types of the item to return. Values past the first are only used in fetching items from the background processing playlist. |
Example playlist items
{- "MediaContainer": {
- "size": 100,
- "Metadata": [
- {
- "playlistItemID": 123,
- "restOf": "metadataHere"
}
]
}
}The playqueue feature within a media provider
A play queue represents the current list of media for playback. Although queues are persisted by the server, they should be regarded by the user as a fairly lightweight, an ephemeral list of items queued up for playback in a session. There is generally one active queue for each type of media (music, video, photos) that can be added to or destroyed and replaced with a fresh queue.
Play Queues has a region, which we refer to in this doc (partially for historical reasons) as "Up Next". This region is defined by playQueueLastAddedItemID existing on the media container. This follows iTunes' terminology. It is a special region after the currently playing item but before the originally-played items. This enables "Party Mode" listening/viewing, where items can be added on-the-fly, and normal queue playback resumed when completed.
You can visualize the play queue as a sliding window in the complete list of media queued for playback. This model is important when scaling to larger play queues (e.g. shuffling 40,000 audio tracks). The client only needs visibility into small areas of the queue at any given time, and the server can optimize access in this fashion.
All created play queues will have an empty "Up Next" area - unless the item is an album and no key is provided. In this case the "Up Next" area will be populated by the contents of the album. This is to allow queueing of multiple albums - since the 'Add to Up Next' will insert after all the tracks. This means that If you're creating a PQ from an album, you can only shuffle it if you set key. This is due to the above implicit queueing of albums when no key is provided as well as the current limitation that you cannot shuffle a PQ with an "Up Next" area.
The play queue window advances as the server receives timeline requests. The client needs to retrieve the play queue as the “now playing” item changes. There is no play queue API to update the playing item.
Makes a new play queue for a device. The source of the playqueue can either be a URI, or a playlist. The response is a media container with the initial items in the queue. Each item in the queue will be a regular item but with playQueueItemID - a unique ID since the queue could have repeated items with the same ratingKey.
Note: Either uri or playlistID must be specified
| uri | string The content URI for what we're playing. |
| playlistID | integer the ID of the playlist we're playing. |
| type required | string Enum: "audio" "video" "photo" The type of play queue to create |
| key | string The key of the first item to play, defaults to the first in the play queue. |
| shuffle | integer Enum: 0 1 Whether to shuffle the playlist, defaults to 0. |
| repeat | integer Enum: 0 1 If the PQ is bigger than the window, fill any empty space with wraparound items, defaults to 0. |
| continuous | integer Enum: 0 1 Whether to create a continuous play queue (e.g. from an episode), defaults to 0. |
| extrasPrefixCount | integer Number of trailers to prepend a movie with not including the pre-roll. If omitted the pre-roll will not be returned in the play queue. When resuming a movie |
| recursive | integer Enum: 0 1 Only applies to queues of type photo, whether to retrieve all descendent photos from an album or section, defaults to 1. |
| onDeck | integer Enum: 0 1 Only applies to queues of type show or seasons, whether to return a queue that is started on the On Deck episode if one exists. Otherwise begins the play queue on the beginning of the show or season. |
A play queue
{- "MediaContainer": {
- "playQueueID": 9631,
- "playQueueSelectedItemID": 2211762,
- "playQueueSelectedItemOffset": 0,
- "playQueueSelectedMetadataItemID": 1941458,
- "playQueueShuffled": false,
- "playQueueSourceURI": "library://2d8ea42e-7845-498b-b349-095ecaa3c451/item/%2Flibrary%2Fmetadata%2F1906642",
- "playQueueTotalCount": 22,
- "playQueueVersion": 1,
- "size": 21,
- "Metadata": [
- {
- "playQueueItemID": 2211762,
- "restOf": "metadataHere"
}
]
}
}Retrieves the play queue, centered at current item. This can be treated as a regular container by play queue-oblivious clients, but they may wish to request a large window onto the queue since they won't know to refresh.
| playQueueId required | integer The ID of the play queue. |
| own | integer Enum: 0 1 If the server should transfer ownership to the requesting client (used in remote control scenarios). |
| center | string The play queue item ID for the center of the window - this doesn't change the current selected item. |
| window | integer How many items on each side of the center of the window |
| includeBefore | integer Enum: 0 1 Whether to include the items before the center (if 0, center is not included either), defaults to 1. |
| includeAfter | integer Enum: 0 1 Whether to include the items after the center (if 0, center is not included either), defaults to 1. |
A created playlist
{- "MediaContainer": {
- "size": 1,
- "Metadata": [
- {
- "addedAt": 1476942219,
- "composite": "/playlists/2561805/composite/1485900004",
- "duration": 1512000,
- "key": "/playlists/2561805/items",
- "lastViewedAt": 1484680617,
- "leafCount": 8,
- "playlistType": "video",
- "ratingKey": "2561805",
- "smart": false,
- "title": "Background videos",
- "type": "playlist",
- "updatedAt": 1485900004,
- "viewCount": 8
}
]
}
}Adds an item to a play queue (e.g. party mode). Increments the version of the play queue. Takes the following parameters (uri and playlistID are mutually exclusive). Returns the modified play queue.
| playQueueId required | integer The ID of the play queue. |
| uri | string The content URI for what we're adding to the queue. |
| playlistID | string The ID of the playlist to add to the playQueue. |
| next | integer Enum: 0 1 Play this item next (defaults to 0 - queueing at the end of manually queued items). |
A created playlist
{- "MediaContainer": {
- "size": 1,
- "Metadata": [
- {
- "addedAt": 1476942219,
- "composite": "/playlists/2561805/composite/1485900004",
- "duration": 1512000,
- "key": "/playlists/2561805/items",
- "lastViewedAt": 1484680617,
- "leafCount": 8,
- "playlistType": "video",
- "ratingKey": "2561805",
- "smart": false,
- "title": "Background videos",
- "type": "playlist",
- "updatedAt": 1485900004,
- "viewCount": 8
}
]
}
}Deletes all items in the play queue, and increases the version of the play queue.
| playQueueId required | integer The ID of the play queue. |
An empty play queue
{- "MediaContainer": {
- "playQueueID": 9631,
- "playQueueSelectedItemID": 2211762,
- "playQueueSelectedItemOffset": 0,
- "playQueueSelectedMetadataItemID": 1941458,
- "playQueueShuffled": false,
- "playQueueTotalCount": 0,
- "playQueueVersion": 2,
- "size": 0
}
}Deletes an item in a play queue. Increments the version of the play queue. Returns the modified play queue.
| playQueueId required | integer The ID of the play queue. |
| playQueueItemId required | integer The play queue item ID to delete. |
A created playlist
{- "MediaContainer": {
- "size": 1,
- "Metadata": [
- {
- "addedAt": 1476942219,
- "composite": "/playlists/2561805/composite/1485900004",
- "duration": 1512000,
- "key": "/playlists/2561805/items",
- "lastViewedAt": 1484680617,
- "leafCount": 8,
- "playlistType": "video",
- "ratingKey": "2561805",
- "smart": false,
- "title": "Background videos",
- "type": "playlist",
- "updatedAt": 1485900004,
- "viewCount": 8
}
]
}
}Moves an item in a play queue, and increases the version of the play queue. Returns the modified play queue.
| playQueueId required | integer The ID of the play queue. |
| playQueueItemId required | integer The play queue item ID to delete. |
| after | integer The play queue item ID to insert the new item after. If not present, moves to the beginning. |
A created playlist
{- "MediaContainer": {
- "size": 1,
- "Metadata": [
- {
- "addedAt": 1476942219,
- "composite": "/playlists/2561805/composite/1485900004",
- "duration": 1512000,
- "key": "/playlists/2561805/items",
- "lastViewedAt": 1484680617,
- "leafCount": 8,
- "playlistType": "video",
- "ratingKey": "2561805",
- "smart": false,
- "title": "Background videos",
- "type": "playlist",
- "updatedAt": 1485900004,
- "viewCount": 8
}
]
}
}Reset a play queue to the first item being the current item
| playQueueId required | integer The ID of the play queue. |
A created playlist
{- "MediaContainer": {
- "size": 1,
- "Metadata": [
- {
- "addedAt": 1476942219,
- "composite": "/playlists/2561805/composite/1485900004",
- "duration": 1512000,
- "key": "/playlists/2561805/items",
- "lastViewedAt": 1484680617,
- "leafCount": 8,
- "playlistType": "video",
- "ratingKey": "2561805",
- "smart": false,
- "title": "Background videos",
- "type": "playlist",
- "updatedAt": 1485900004,
- "viewCount": 8
}
]
}
}Shuffle a play queue (or reshuffles if already shuffled). The currently selected item is maintained. Note that this is currently only supported for play queues without an Up Next area. Returns the modified play queue.
| playQueueId required | integer The ID of the play queue. |
A shuffled play queue
{- "MediaContainer": {
- "playQueueID": 9631,
- "playQueueSelectedItemID": 2211762,
- "playQueueSelectedItemOffset": 0,
- "playQueueSelectedMetadataItemID": 1941458,
- "playQueueShuffled": true,
- "playQueueSourceURI": "library://2d8ea42e-7845-498b-b349-095ecaa3c451/item/%2Flibrary%2Fmetadata%2F1906642",
- "playQueueTotalCount": 22,
- "playQueueVersion": 1,
- "size": 21,
- "Metadata": [
- {
- "playQueueItemID": 2211762,
- "restOf": "metadataHere"
}
]
}
}Unshuffles a play queue and restores "natural order". Note that this is currently only supported for play queues without an Up Next area. Returns the modified play queue.
| playQueueId required | integer The ID of the play queue. |
A created playlist
{- "MediaContainer": {
- "size": 1,
- "Metadata": [
- {
- "addedAt": 1476942219,
- "composite": "/playlists/2561805/composite/1485900004",
- "duration": 1512000,
- "key": "/playlists/2561805/items",
- "lastViewedAt": 1484680617,
- "leafCount": 8,
- "playlistType": "video",
- "ratingKey": "2561805",
- "smart": false,
- "title": "Background videos",
- "type": "playlist",
- "updatedAt": 1485900004,
- "viewCount": 8
}
]
}
}Mark an item as played. Note, this does not create any view history of this item but rather just sets the state as played. The client must provide either the key or uri query parameter
This API does respond to the GET verb but applications should use PUT
| identifier required | string The identifier of the media provider containing the media to rate. Typically |
| key | string The key of the item to rate. This is the |
| uri | string The URI of the item to mark as played. See intro for description of the URIs |
This endpoint is hit during media playback for an item. It must be hit whenever the play state changes, or in the absence of a play state change, in a regular fashion (generally this means every 10 seconds on a LAN/WAN, and every 20 seconds over cellular).
| key | string Example: key=/foo The details key for the item. |
| ratingKey | string Example: ratingKey=xyz The rating key attribute for the item. |
| state | string Enum: "stopped" "buffering" "playing" "paused" Example: state=playing The current state of the media. |
| playQueueItemID | string Example: playQueueItemID=123 If playing media from a play queue, the play queue's ID. |
| time | integer The current time offset of playback in ms. |
| duration | integer Example: duration=10000 The total duration of the item in ms. |
| continuing | integer Enum: 0 1 Example: continuing=1 When state is |
| updated | integer Example: updated=14200000 Used when a sync client comes online and is syncing media timelines, holds the time at which the playback state was last updated. |
| offline | integer Enum: 0 1 Example: offline=1 Also used by sync clients, used to indicate that a timeline is being synced from being offline, as opposed to being "live". |
| timeToFirstFrame | integer Example: timeToFirstFrame=1000 Time in seconds till first frame is displayed. Sent only on the first playing timeline request. |
| timeStalled | integer Example: timeStalled=1000 Time in seconds spent buffering since last request. |
| bandwidth | integer Example: bandwidth=100 Bandwidth in kbps as estimated by the client. |
| bufferedTime | integer Example: bufferedTime=100 Amount of time in seconds buffered by client. Omit if computed by |
| bufferedSize | integer Example: bufferedSize=1024 Size in kilobytes of data buffered by client. Omit if computed by |
| X-Plex-Client-Identifier required | string Unique per client. |
| X-Plex-Session-Identifier | string Unique per client playback session. Used if a client can playback multiple items at a time (such as a browser with multiple tabs) |
Normal response
{- "MediaContainer": {
- "size": 0
}
}Mark an item as unplayed. The client must provide either the key or uri query parameter
This API does respond to the GET verb but applications should use PUT
| identifier required | string The identifier of the media provider containing the media to rate. Typically |
| key | string The key of the item to rate. This is the |
| uri | string The URI of the item to mark as played. See intro for description of the URIs |
The DVR provides means to watch and record live TV. This section of endpoints describes how to setup the DVR itself
{- "MediaContainer": {
- "size": 1,
- "Dvr": [
- {
- "key": "28",
- "language": "eng",
- "lineup": "lineup://tv.plex.providers.epg.onconnect/USA-HI51418-X",
- "uuid": "811e2e8a-f98f-4d1f-a26a-8bc26e4999a7"
}, - {
- "key": "17",
- "lastSeenAt": "1463297728",
- "make": "Silicondust",
- "model": "HDHomeRun EXTEND",
- "modelNumber": "HDTC-2US",
- "protocol": "livetv",
- "sources": "0,1",
- "state": "1",
- "status": "1",
- "tuners": "2",
- "uuid": "device://tv.plex.grabbers.hdhomerun/1053C0CA"
}
], - "ChannelMapping": [
- {
- "channelKey": "5cc83d73af4a72001e9b16d7-5cab3c634df507001fefcad0",
- "deviceIdentifier": "46.3",
- "enabled": "1",
- "lineupIdentifier": "002"
}, - {
- "channelKey": "5cc83d73af4a72001e9b16d7-5cab3d20d30eca001db32922",
- "deviceIdentifier": "48.1",
- "enabled": "1",
- "lineupIdentifier": "009"
}
]
}
}Creation of a DVR, after creation of a devcie and a lineup is selected
| lineup | string Example: lineup=lineup://tv.plex.providers.epg.onconnect/USA-HI51418-DEFAULT The EPG lineup. |
| device | Array of strings Example: device=device[]=device://tv.plex.grabbers.hdhomerun/1053C0CA The device. |
| language | string Example: language=eng The language. |
{- "MediaContainer": {
- "size": 1,
- "Dvr": [
- {
- "key": "28",
- "language": "eng",
- "lineup": "lineup://tv.plex.providers.epg.onconnect/USA-HI51418-X",
- "uuid": "811e2e8a-f98f-4d1f-a26a-8bc26e4999a7"
}, - {
- "key": "17",
- "lastSeenAt": "1463297728",
- "make": "Silicondust",
- "model": "HDHomeRun EXTEND",
- "modelNumber": "HDTC-2US",
- "protocol": "livetv",
- "sources": "0,1",
- "state": "1",
- "status": "1",
- "tuners": "2",
- "uuid": "device://tv.plex.grabbers.hdhomerun/1053C0CA"
}
], - "ChannelMapping": [
- {
- "channelKey": "5cc83d73af4a72001e9b16d7-5cab3c634df507001fefcad0",
- "deviceIdentifier": "46.3",
- "enabled": "1",
- "lineupIdentifier": "002"
}, - {
- "channelKey": "5cc83d73af4a72001e9b16d7-5cab3d20d30eca001db32922",
- "deviceIdentifier": "48.1",
- "enabled": "1",
- "lineupIdentifier": "009"
}
]
}
}Get a single DVR by its id (key)
| dvrId required | integer The ID of the DVR. |
{- "MediaContainer": {
- "size": 1,
- "Dvr": [
- {
- "key": "28",
- "language": "eng",
- "lineup": "lineup://tv.plex.providers.epg.onconnect/USA-HI51418-X",
- "uuid": "811e2e8a-f98f-4d1f-a26a-8bc26e4999a7"
}, - {
- "key": "17",
- "lastSeenAt": "1463297728",
- "make": "Silicondust",
- "model": "HDHomeRun EXTEND",
- "modelNumber": "HDTC-2US",
- "protocol": "livetv",
- "sources": "0,1",
- "state": "1",
- "status": "1",
- "tuners": "2",
- "uuid": "device://tv.plex.grabbers.hdhomerun/1053C0CA"
}
], - "ChannelMapping": [
- {
- "channelKey": "5cc83d73af4a72001e9b16d7-5cab3c634df507001fefcad0",
- "deviceIdentifier": "46.3",
- "enabled": "1",
- "lineupIdentifier": "002"
}, - {
- "channelKey": "5cc83d73af4a72001e9b16d7-5cab3d20d30eca001db32922",
- "deviceIdentifier": "48.1",
- "enabled": "1",
- "lineupIdentifier": "009"
}
]
}
}Tune a channel on a DVR to the provided channel
| dvrId required | integer The ID of the DVR. |
| channel required | string Example: 2.1 The channel ID to tune |
{- "MediaContainer": {
- "size": 1,
- "Metadata": [
- {
- "genuineMediaAnalysis": true,
- "live": true,
- "Media": [
- {
- "uuid": "dc30f95e-6379-44f7-8168-172ffc820496",
- "Part": [
- {
- "Stream": [
- {
- "codec": "h264",
- "frameRate": 29.97,
- "height": 1080,
- "index": 0,
- "level": 40,
- "pixelAspectRatio": "1:1",
- "profile": "high",
- "scanType": "interlaced",
- "streamType": 1,
- "width": 1920
}, - {
- "audioChannelLayout": "5.1(side)",
- "channels": 6,
- "codec": "ac3",
- "index": 1,
- "samplingRate": 48000,
- "streamType": 2
}
]
}
]
}
]
}
]
}
}Add a device to an existing DVR
| dvrId required | integer The ID of the DVR. |
| deviceId required | integer The ID of the device to add. |
{- "MediaContainer": {
- "size": 1,
- "Dvr": [
- {
- "key": "28",
- "language": "eng",
- "lineup": "lineup://tv.plex.providers.epg.onconnect/USA-HI51418-X",
- "uuid": "811e2e8a-f98f-4d1f-a26a-8bc26e4999a7"
}, - {
- "key": "17",
- "lastSeenAt": "1463297728",
- "make": "Silicondust",
- "model": "HDHomeRun EXTEND",
- "modelNumber": "HDTC-2US",
- "protocol": "livetv",
- "sources": "0,1",
- "state": "1",
- "status": "1",
- "tuners": "2",
- "uuid": "device://tv.plex.grabbers.hdhomerun/1053C0CA"
}
], - "ChannelMapping": [
- {
- "channelKey": "5cc83d73af4a72001e9b16d7-5cab3c634df507001fefcad0",
- "deviceIdentifier": "46.3",
- "enabled": "1",
- "lineupIdentifier": "002"
}, - {
- "channelKey": "5cc83d73af4a72001e9b16d7-5cab3d20d30eca001db32922",
- "deviceIdentifier": "48.1",
- "enabled": "1",
- "lineupIdentifier": "009"
}
]
}
}Remove a device from an existing DVR
| dvrId required | integer The ID of the DVR. |
| deviceId required | integer The ID of the device to add. |
{- "MediaContainer": {
- "size": 1,
- "Dvr": [
- {
- "key": "28",
- "language": "eng",
- "lineup": "lineup://tv.plex.providers.epg.onconnect/USA-HI51418-X",
- "uuid": "811e2e8a-f98f-4d1f-a26a-8bc26e4999a7"
}, - {
- "key": "17",
- "lastSeenAt": "1463297728",
- "make": "Silicondust",
- "model": "HDHomeRun EXTEND",
- "modelNumber": "HDTC-2US",
- "protocol": "livetv",
- "sources": "0,1",
- "state": "1",
- "status": "1",
- "tuners": "2",
- "uuid": "device://tv.plex.grabbers.hdhomerun/1053C0CA"
}
], - "ChannelMapping": [
- {
- "channelKey": "5cc83d73af4a72001e9b16d7-5cab3c634df507001fefcad0",
- "deviceIdentifier": "46.3",
- "enabled": "1",
- "lineupIdentifier": "002"
}, - {
- "channelKey": "5cc83d73af4a72001e9b16d7-5cab3d20d30eca001db32922",
- "deviceIdentifier": "48.1",
- "enabled": "1",
- "lineupIdentifier": "009"
}
]
}
}Add a lineup to a DVR device's set of lineups.
| dvrId required | integer The ID of the DVR. |
| lineup required | string The lineup to delete |
{- "MediaContainer": {
- "size": 1,
- "Dvr": [
- {
- "key": "28",
- "language": "eng",
- "lineup": "lineup://tv.plex.providers.epg.onconnect/USA-HI51418-X",
- "uuid": "811e2e8a-f98f-4d1f-a26a-8bc26e4999a7"
}, - {
- "key": "17",
- "lastSeenAt": "1463297728",
- "make": "Silicondust",
- "model": "HDHomeRun EXTEND",
- "modelNumber": "HDTC-2US",
- "protocol": "livetv",
- "sources": "0,1",
- "state": "1",
- "status": "1",
- "tuners": "2",
- "uuid": "device://tv.plex.grabbers.hdhomerun/1053C0CA"
}
], - "ChannelMapping": [
- {
- "channelKey": "5cc83d73af4a72001e9b16d7-5cab3c634df507001fefcad0",
- "deviceIdentifier": "46.3",
- "enabled": "1",
- "lineupIdentifier": "002"
}, - {
- "channelKey": "5cc83d73af4a72001e9b16d7-5cab3d20d30eca001db32922",
- "deviceIdentifier": "48.1",
- "enabled": "1",
- "lineupIdentifier": "009"
}
]
}
}Deletes a DVR device's lineup.
| dvrId required | integer The ID of the DVR. |
| lineup required | string The lineup to delete |
{- "MediaContainer": {
- "size": 1,
- "Dvr": [
- {
- "key": "28",
- "language": "eng",
- "lineup": "lineup://tv.plex.providers.epg.onconnect/USA-HI51418-X",
- "uuid": "811e2e8a-f98f-4d1f-a26a-8bc26e4999a7"
}, - {
- "key": "17",
- "lastSeenAt": "1463297728",
- "make": "Silicondust",
- "model": "HDHomeRun EXTEND",
- "modelNumber": "HDTC-2US",
- "protocol": "livetv",
- "sources": "0,1",
- "state": "1",
- "status": "1",
- "tuners": "2",
- "uuid": "device://tv.plex.grabbers.hdhomerun/1053C0CA"
}
], - "ChannelMapping": [
- {
- "channelKey": "5cc83d73af4a72001e9b16d7-5cab3c634df507001fefcad0",
- "deviceIdentifier": "46.3",
- "enabled": "1",
- "lineupIdentifier": "002"
}, - {
- "channelKey": "5cc83d73af4a72001e9b16d7-5cab3d20d30eca001db32922",
- "deviceIdentifier": "48.1",
- "enabled": "1",
- "lineupIdentifier": "009"
}
]
}
}Set DVR preferences by name avd value
| dvrId required | integer The ID of the DVR. |
| name | string Set the |
{- "MediaContainer": {
- "size": 1,
- "Dvr": [
- {
- "key": "28",
- "language": "eng",
- "lineup": "lineup://tv.plex.providers.epg.onconnect/USA-HI51418-X",
- "uuid": "811e2e8a-f98f-4d1f-a26a-8bc26e4999a7"
}, - {
- "key": "17",
- "lastSeenAt": "1463297728",
- "make": "Silicondust",
- "model": "HDHomeRun EXTEND",
- "modelNumber": "HDTC-2US",
- "protocol": "livetv",
- "sources": "0,1",
- "state": "1",
- "status": "1",
- "tuners": "2",
- "uuid": "device://tv.plex.grabbers.hdhomerun/1053C0CA"
}
], - "ChannelMapping": [
- {
- "channelKey": "5cc83d73af4a72001e9b16d7-5cab3c634df507001fefcad0",
- "deviceIdentifier": "46.3",
- "enabled": "1",
- "lineupIdentifier": "002"
}, - {
- "channelKey": "5cc83d73af4a72001e9b16d7-5cab3d20d30eca001db32922",
- "deviceIdentifier": "48.1",
- "enabled": "1",
- "lineupIdentifier": "009"
}
]
}
}Media grabbers provide ways for media to be obtained for a given protocol. The simplest ones are stream and download. More complex grabbers can have associated devices
Network tuners can present themselves on the network using the Simple Service Discovery Protocol and Plex Media Server will discover them. The following XML is an example of the data returned from SSDP. The deviceType, serviceType, and serviceId values must remain as they are in the example in order for PMS to properly discover the device. Other less-obvious fields are described in the parameters section below.
Example SSDP output
<root xmlns="urn:schemas-upnp-org:device-1-0">
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<device>
<deviceType>urn:plex-tv:device:Media:1</deviceType>
<friendlyName>Turing Hopper 3000</friendlyName>
<manufacturer>Plex, Inc.</manufacturer>
<manufacturerURL>https://plex.tv/</manufacturerURL>
<modelDescription>Turing Hopper 3000 Media Grabber</modelDescription>
<modelName>Plex Media Grabber</modelName>
<modelNumber>1</modelNumber>
<modelURL>https://plex.tv</modelURL>
<UDN>uuid:42fde8e4-93b6-41e5-8a63-12d848655811</UDN>
<serviceList>
<service>
<URLBase>http://10.0.0.5:8088</URLBase>
<serviceType>urn:plex-tv:service:MediaGrabber:1</serviceType>
<serviceId>urn:plex-tv:serviceId:MediaGrabber</serviceId>
</service>
</serviceList>
</device>
</root>
Get available grabbers visible to the server
| protocol | string Example: protocol=livetv Only return grabbers providing this protocol. |
{- "MediaContainer": {
- "size": 3,
- "MediaGrabber": [
- {
- "identifier": "tv.plex.grabbers.hdhomerun",
- "protocol": "livetv",
- "title": "HDHomerun"
}, - {
- "identifier": "tv.plex.grabbers.stream",
- "protocol": "stream",
- "title": "Stream"
}, - {
- "identifier": "tv.plex.grabbers.download",
- "protocol": "download",
- "title": "Download"
}
]
}
}{- "MediaContainer": {
- "size": 2,
- "Devices": [
- {
- "key": "1053C0CA",
- "lastSeenAt": "1461450473",
- "make": "Silicondust",
- "model": "HDHomeRun EXTEND",
- "modelNumber": "HDTC-2US",
- "protocol": "livetv",
- "tuners": "2",
- "sources": "Antenna,Cable",
- "uuid": "1053C0CA"
}, - {
- "key": "141007E7",
- "lastSeenAt": "1461450479",
- "make": "Silicondust",
- "model": "HDHomeRun EXPAND",
- "modelNumber": "HDHR3-4DC",
- "protocol": "livetv",
- "tuners": "4",
- "sources": "Cable",
- "uuid": "141007E7"
}
]
}
}This endpoint adds a device to an existing grabber. The device is identified, and added to the correct grabber.
| uri | string Example: uri=http://10.0.0.5 The URI of the device. |
{- "MediaContainer": {
- "size": 1,
- "Device": [
- {
- "key": "1053C0CA",
- "lastSeenAt": 1461450473,
- "make": "Silicondust",
- "model": "HDHomeRun EXTEND",
- "modelNumber": "HDTC-2US",
- "protocol": "livetv",
- "tuners": "2",
- "uuid": "1053C0CA"
}
]
}
}Tell grabbers to discover devices
{- "MediaContainer": {
- "size": 1,
- "Device": [
- {
- "key": "1053C0CA",
- "lastSeenAt": 1461450473,
- "make": "Silicondust",
- "model": "HDHomeRun EXTEND",
- "modelNumber": "HDTC-2US",
- "protocol": "livetv",
- "tuners": "2",
- "uuid": "1053C0CA"
}
]
}
}Get a device's details by its id
| deviceId required | integer The ID of the device. |
{- "MediaContainer": {
- "size": 1,
- "Device": [
- {
- "key": "6",
- "lastSeenAt": 1461737032,
- "make": "Silicondust",
- "model": "HDHomeRun EXPAND",
- "modelNumber": "HDHR3-4DC",
- "protocol": "livetv",
- "sources": "Cable",
- "state": "1",
- "status": "1",
- "tuners": "4",
- "uuid": "141007E7",
- "ChannelMapping": [
- {
- "channelKey": "5cc83d73af4a72001e9b16d7-5cab3c634df507001fefcad0",
- "deviceIdentifier": "46.3",
- "enabled": "1",
- "lineupIdentifier": "002"
}, - {
- "channelKey": "5cc83d73af4a72001e9b16d7-5cab3d20d30eca001db32922",
- "deviceIdentifier": "48.9",
- "enabled": "0",
- "lineupIdentifier": "004"
}, - {
- "channelKey": "5cc83d73af4a72001e9b16d7-5cab3d07771bb2001ef88f72",
- "deviceIdentifier": "49.12",
- "enabled": "1",
- "lineupIdentifier": "011"
}, - {
- "channelKey": "5cc83d73af4a72001e9b16d7-5cab3c63de29da001cf021c2",
- "deviceIdentifier": "49.3",
- "enabled": "0",
- "lineupIdentifier": "008"
}, - {
- "channelKey": "5cc83d73af4a72001e9b16d7-5cab3c63e3ef4d001d05ba70",
- "deviceIdentifier": "10.4",
- "enabled": "1"
}
]
}
]
}
}Enable or disable a device by its id
| deviceId required | integer The ID of the device. |
| enabled | integer Enum: 0 1 Whether to enable the device |
{- "MediaContainer": {
- "size": 0,
- "message": "",
- "status": 0
}
}Set a device's channel mapping
| deviceId required | integer The ID of the device. |
| channelMapping | object Example: channelMapping[46.3]=2&channelMapping[48.9]=4 The mapping of changes, passed as a map of device channel to lineup VCN. |
| channelMappingByKey | object Example: channelMappingByKey[46.3]=5cc83d73af4a72001e9b16d7-5cab3c634df507001fefcad0&channelMappingByKey[48.9]=5cc83d73af4a72001e9b16d7-5cab3c63ec158a001d32db8d The mapping of changes, passed as a map of device channel to lineup key. |
| channelsEnabled | Array of strings Example: channelsEnabled=46.1,44.1,45.1 The channels which are enabled. |
{- "MediaContainer": {
- "message": "",
- "size": 0,
- "status": 0
}
}Get a device's channels by its id
| deviceId required | integer The ID of the device. |
{- "MediaContainer": {
- "size": 48,
- "DeviceChannel": [
- {
- "drm": false,
- "hd": false,
- "identifier": "46.1",
- "name": "KPXO HD"
}, - {
- "drm": false,
- "hd": false,
- "identifier": "46.3",
- "name": "KHON HD"
}
]
}
}Tell a device to scan for channels
| deviceId required | integer The ID of the device. |
| source | string Example: source=Cable A valid source for the scan |
{- "MediaContainer": {
- "message": "",
- "size": 0,
- "status": 0
}
}Get a device's thumb for display to the user
| deviceId required | integer The ID of the device. |
| version required | integer A version number of the thumb used for busting cache |
<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>
The EPG (Electronic Program Guide) is responsible for obtaining metadata for what is airing on each channel and when
Compute the best channel map, given device and lineup
| device required | string The URI describing the device |
| lineup required | string The URI describing the lineup |
{- "MediaContainer": {
- "size": 1,
- "ChannelMapping": [
- {
- "channelKey": "5cc83d73af4a72001e9b16d7-5cab3c634df507001fefcad0",
- "deviceIdentifier": "48.9",
- "lineupIdentifier": "103"
}
]
}
}Get channels for a lineup within an EPG provider
| lineup required | string The URI describing the lineup |
{- "MediaContainer": {
- "size": 2,
- "Channel": [
- {
- "callSign": "BBC1SCO",
- "identifier": "001",
}, - {
- "callSign": "BBC2SCO",
- "identifier": "002"
}
]
}
}This endpoint returns a list of countries which EPG data is available for. There are three flavors, as specfied by the flavor attribute
{- "MediaContainer": {
- "size": 3,
- "Country": [
- {
- "key": "aia/tv.plex.providers.epg.onconnect/lineups",
- "type": "country",
- "title": "Anguilla",
- "code": "aia",
- "language": "eng",
- "languageTitle": "English",
- "example": "AI-2640",
- "flavor": 2
}, - {
- "key": "atg/tv.plex.providers.epg.onconnect/lineups",
- "type": "country",
- "title": "Antigua and Barbuda",
- "code": "atg",
- "language": "eng",
- "languageTitle": "English",
- "example": "AG",
- "flavor": 2
}, - {
- "key": "arg/tv.plex.providers.epg.onconnect/lineups",
- "type": "country",
- "title": "Argentina",
- "code": "arg",
- "language": "spa",
- "languageTitle": "Español",
- "example": "A4190",
- "flavor": 1
}
]
}
}Returns a list of lineups for a given country, EPG provider and postal code
| country required | string 3 letter country code |
| epgId required | string The |
| postalCode | string The postal code for the lineups to fetch |
{- "MediaContainer": {
- "size": 3,
- "uuid": "lineup-group://tv.plex.providers.epg.onconnect/aia/AI-2640",
- "Lineup": [
- {
- "uuid": "lineup://tv.plex.providers.epg.onconnect/AIA-0000040-DEFAULT#Caribbean%20Cable%20Communications%20-%20Anguilla",
- "type": "lineup",
- "title": "Caribbean Cable Communications - Anguilla",
- "lineupType": 1,
- "location": "The Valley"
}, - {
- "uuid": "lineup://tv.plex.providers.epg.onconnect/AIA-0000040-X#Caribbean%20Cable%20Communications%20-%20Anguilla%20-%20Digital",
- "type": "lineup",
- "title": "Caribbean Cable Communications - Anguilla - Digital",
- "lineupType": 1,
- "location": "The Valley"
}, - {
- "uuid": "lineup://tv.plex.providers.epg.onconnect/AIA-0002293-X#DirecTV%20Anguilla%20-%20Digital",
- "type": "lineup",
- "title": "DirecTV Anguilla - Digital",
- "lineupType": 1,
- "location": "The Valley"
}
]
}
}Get regions for a country within an EPG provider
| country required | string 3 letter country code |
| epgId required | string The |
{- "MediaContainer": {
- "size": 2,
- "Region": [
- {
- "key": "132718/lineups",
- "type": "region",
- "title": "Bruxelles"
}, - {
- "key": "116043/lineups",
- "type": "region",
- "title": "Région wallonne"
}
]
}
}Get lineups for a region within an EPG provider
| country required | string 3 letter country code |
| epgId required | string The |
| region required | string The region for the lineup |
{- "MediaContainer": {
- "size": 1,
- "uuid": "lineup-group://tv.plex.providers.epg.eyeq/bhr/134535",
- "Lineup": [
- {
- "uuid": "lineup://tv.plex.providers.epg.eyeq/410357488-CE9BE5630D077FE397F3B42E984AC8DD/bhr#OSN",
- "type": "lineup",
- "title": "OSN",
- "lineupType": 2
}
]
}
}Returns a list of all possible languages for EPG data.
{- "MediaContainer": {
- "size": 3,
- "Language": [
- {
- "code": "aar",
- "title": "Afaraf"
}, - {
- "code": "abk",
- "title": "аҧсуа"
}, - {
- "code": "afr",
- "title": "Afrikaans"
}
]
}
}Compute the best lineup, given lineup group and device
| device required | string The URI describing the device |
| lineupGroup required | string The URI describing the lineupGroup |
<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>
Get the channels across multiple lineups
| lineup required | Array of strings The URIs describing the lineups |
A lineup channels
{- "MediaContainer": {
- "size": 1,
- "Lineup": [
- {
- "uuid": "lineup://tv.plex.providers.epg.cloud/0123456789abcdef01234567",
- "type": "lineup",
- "lineupType": -1,
- "Channel": [
- {
- "key": "0123456789abcdef01234567-5cab3c634df507001fefcad0",
- "channelVcn": "001",
- "title": "WINS",
- "callSign": "WINS",
- "language": "en"
}
]
}
]
}
}Subscriptions determine which media will be recorded and the criteria for selecting an airing when multiple are available
Cancels an existing media grab (recording). It can be used to resolve a conflict which exists for a rolling subscription. Note: This cancellation does not persist across a server restart, but neither does a rolling subscription itself.
| operationId required | string The ID of the operation. |
Get all subscriptions and potentially the grabs too
| includeGrabs | integer Enum: 0 1 Indicates whether the active grabs should be included as well |
| includeStorage | integer Enum: 0 1 Compute the storage of recorded items desired by this subscription |
{- "MediaContainer": {
- "size": 1,
- "MediaSubscription": [
- {
- "key": "1",
- "type": 2,
- "targetLibrarySectionID": 2,
- "title": "fresh off the boat",
- "Setting": [
- {
- "advanced": false,
- "default": false,
- "enumValues": "0:all episodes|1:only new episodes",
- "group": "",
- "hidden": false,
- "id": "newnessPolicy",
- "label": "Record",
- "summary": "",
- "type": "int",
- "value": false
}
]
}
]
}
}Create a subscription. The query parameters should be mostly derived from the template
| targetLibrarySectionID | integer Example: targetLibrarySectionID=1 The library section into which we'll grab the media. Not actually required when the subscription is to a playlist. |
| targetSectionLocationID | integer Example: targetSectionLocationID=3 The section location into which to grab. |
| type | integer Example: type=2 The type of the thing we're subscribing too (e.g. show, season). |
| hints | object Example: hints[title]=Family Guy Hints describing what we're looking for. Note: The hint |
| prefs | object Example: prefs[minVideoQuality]=720 Subscription preferences. |
| params | object Example: params[mediaProviderID]=1 Subscription parameters.
|
{- "MediaContainer": {
- "size": 1,
- "MediaSubscription": [
- {
- "key": "18",
- "type": 2,
- "targetLibrarySectionID": 2,
- "title": "Family Guy",
- "Video": {
- "beginsAt": "1465814100",
- "endsAt": "1465815900",
- "mediaSubscriptionID": "19",
- "status": "1",
- "addedAt": 1464994517,
- "contentRating": "TV-14",
- "duration": 1800000,
- "grandparentTitle": "Family Guy",
- "index": 1,
- "key": "/tv.plex.providers.epg.onconnect-811e2e8a-f98f-4d1f-a26a-8bc26e4999a7/metadata/2214",
- "originallyAvailableAt": "1999-01-31",
- "parentIndex": 1,
- "parentKey": "/tv.plex.providers.epg.onconnect-811e2e8a-f98f-4d1f-a26a-8bc26e4999a7/metadata/2213",
- "parentRatingKey": "2213",
- "ratingKey": "com.gracenote.onconnect://episode/EP002960010001",
- "summary": "After Peter gets fired following a riotous bachelor party, he receives a check for $150,000 from the welfare department.",
- "title": "Death Has a Shadow",
- "type": "episode",
- "year": 1999,
- "Media": [
- {
- "audioChannels": 2,
- "beginsAt": "1465814100",
- "channelID": "32",
- "channelIdentifier": "005",
- "duration": 1800000,
- "endsAt": "1465815900",
- "id": 2052,
- "protocol": "livetv",
- "videoResolution": "480",
- "Part": [
- {
- "id": 2052,
- "key": "/library/parts/2052/0/file"
}
]
}
]
}, - "Setting": [
- {
- "advanced": false,
- "default": 0,
- "enumValues": "0:all episodes|1:only new episodes",
- "group": "",
- "hidden": false,
- "id": "newnessPolicy",
- "label": "Record",
- "summary": "",
- "type": "int",
- "value": 0
}, - {
- "advanced": false,
- "default": 0,
- "enumValues": "0:never|1:with higher resolution recordings",
- "group": "",
- "hidden": false,
- "id": "replacementPolicy",
- "label": "Replacement existing media",
- "summary": "",
- "type": "int",
- "value": 0
}, - {
- "advanced": false,
- "default": 0,
- "enumValues": "0:none|720:HD",
- "group": "",
- "hidden": false,
- "id": "minVideoQuality",
- "label": "Minimum resolution",
- "summary": "",
- "type": "int",
- "value": 720
}, - {
- "advanced": false,
- "default": "",
- "group": "",
- "hidden": false,
- "id": "lineupChannel",
- "label": "Channel to record from",
- "summary": "",
- "type": "text",
- "value": ""
}, - {
- "advanced": false,
- "default": 0,
- "group": "",
- "hidden": false,
- "id": "startOffsetSeconds",
- "label": "Padding before show starts",
- "summary": "",
- "type": "int",
- "value": 0
}, - {
- "advanced": false,
- "default": 0,
- "group": "",
- "hidden": false,
- "id": "endOffsetSeconds",
- "label": "Padding after show ends",
- "summary": "",
- "type": "int",
- "value": 0
}, - {
- "advanced": false,
- "default": true,
- "group": "",
- "hidden": false,
- "id": "recordPartials",
- "label": "Record partial media",
- "summary": "",
- "type": "bool",
- "value": true
}
]
}
]
}
}Get a single subscription and potentially the grabs too
| subscriptionId required | integer |
| includeGrabs | integer Enum: 0 1 Indicates whether the active grabs should be included as well |
| includeStorage | integer Enum: 0 1 Compute the storage of recorded items desired by this subscription |
{- "MediaContainer": {
- "size": 1,
- "MediaSubscription": [
- {
- "key": "1",
- "type": 2,
- "targetLibrarySectionID": 2,
- "title": "fresh off the boat",
- "Setting": [
- {
- "advanced": false,
- "default": 0,
- "enumValues": "0:all episodes|1:only new episodes",
- "group": "",
- "hidden": false,
- "id": "newnessPolicy",
- "label": "Record",
- "summary": "",
- "type": "int",
- "value": 0
}
]
}
]
}
}Edit a subscription's preferences
| subscriptionId required | integer |
| prefs | object Example: prefs[minVideoQuality]=720 |
{- "MediaContainer": {
- "size": 1,
- "MediaSubscription": [
- {
- "key": "1",
- "type": 2,
- "targetLibrarySectionID": 2,
- "title": "fresh off the boat",
- "Setting": [
- {
- "advanced": false,
- "default": 0,
- "enumValues": "0:all episodes|1:only new episodes",
- "group": "",
- "hidden": false,
- "id": "newnessPolicy",
- "label": "Record",
- "summary": "",
- "type": "int",
- "value": 0
}
]
}
]
}
}Re-order a subscription to change its priority
| subscriptionId required | integer |
| after | integer The subscription to move this sub after. If missing will insert at the beginning of the list |
{- "MediaContainer": {
- "size": 1,
- "MediaSubscription": [
- {
- "key": "1",
- "type": 2,
- "targetLibrarySectionID": 2,
- "title": "fresh off the boat",
- "Setting": [
- {
- "advanced": false,
- "default": 0,
- "enumValues": "0:all episodes|1:only new episodes",
- "group": "",
- "hidden": false,
- "id": "newnessPolicy",
- "label": "Record",
- "summary": "",
- "type": "int",
- "value": 0
}
]
}
]
}
}Get all scheduled recordings across all subscriptions
{- "MediaContainer": {
- "size": 1,
- "MediaGrabOperation": [
- {
- "mediaSubscriptionID": 1,
- "status": "scheduled",
- "Metadata": {
- "addedAt": 1464994564,
- "contentRating": "TV-PG",
- "duration": 1800000,
- "grandparentTitle": "Fresh Off the Boat",
- "index": 5,
- "key": "/tv.plex.providers.epg.onconnect-811e2e8a-f98f-4d1f-a26a-8bc26e4999a7/metadata/2543",
- "originallyAvailableAt": "2015-10-27",
- "parentIndex": 2,
- "parentKey": "/tv.plex.providers.epg.onconnect-811e2e8a-f98f-4d1f-a26a-8bc26e4999a7/metadata/2542",
- "parentRatingKey": "2542",
- "ratingKey": "com.gracenote.onconnect://episode/EP019218760019",
- "summary": "Louis wants to make his street a prime trick-or-treat destination.",
- "title": "Miracle on Dead Street",
- "type": "episode",
- "year": 2015,
- "Media": [
- {
- "audioChannels": 2,
- "beginsAt": 1466060400,
- "channelID": "21",
- "channelIdentifier": "004",
- "duration": 1800000,
- "endsAt": "1466062200",
- "id": 2581,
- "protocol": "livetv",
- "videoResolution": "480",
- "Part": [
- {
- "id": 2581,
- "key": "/library/parts/2581/0/file"
}
]
}
]
}
}
]
}
}Get the templates for a piece of media which could include fetching one airing, season, the whole show, etc.
| guid | string Example: guid=plex://episode/5fc70265c40548002d539d23 The guid of the item for which to get the template |
{- "MediaContainer": {
- "size": 1,
- "SubscriptionTemplate": [
- {
- "MediaSubscription": [
- {
- "parameters": "hints%5BgrandparentGuid%5D=plex%3A%2F%2Fshow%2F5fc6af416b022a002d70b32b&hints%5BgrandparentThumb%5D=https%3A%2F%2Fmetadata-static%2Eplex%2Etv%2F1%2Fgracenote%2F1df5e54a60dfe28b4afac1a445fc86df%2Ejpg&hints%5BgrandparentTitle%5D=Law%20%26%20Order%3A%20Special%20Victims%20Unit&hints%5BgrandparentYear%5D=1999&hints%5Bguid%5D=plex%3A%2F%2Fepisode%2F5fc70265c40548002d539d23&hints%5Bindex%5D=4&hints%5BoriginallyAvailableAt%5D=2010-10-06&hints%5BparentGuid%5D=plex%3A%2F%2Fseason%2F5fc6af416b022a002d70b32b%2F12&hints%5BparentIndex%5D=12&hints%5BparentTitle%5D=Season%2012&hints%5BratingKey%5D=plex%253A%252F%252Fepisode%252F5fc70265c40548002d539d23&hints%5Bthumb%5D=https%3A%2F%2Fmetadata-static%2Eplex%2Etv%2F4%2Fgracenote%2F499a3c4f04eb050705ade1eab8b5a61a%2Ejpg&hints%5Btitle%5D=Merchandise&hints%5Btype%5D=4&hints%5Byear%5D=2010¶ms%5BairingChannels%5D=5fc76db1286b56002e2bed03-5fc705ea104230002d14d8f1%253D3%25252E2%252520KBTXDT2%252520%252528The%252520CW%252529¶ms%5BairingTimes%5D=1715319000%252C1715281200¶ms%5BlibraryType%5D=2¶ms%5BmediaProviderID%5D=13",
- "selected": true,
- "type": 4,
- "targetLibrarySectionID": 2,
- "title": "This Episode",
- "airingsType": "New Airings Only",
- "Video": {
- "grandparentGuid": "plex://show/5fc6af416b022a002d70b32b",
- "grandparentThumb": "https://metadata-static.plex.tv/1/gracenote/1df5e54a60dfe28b4afac1a445fc86df.jpg",
- "grandparentTitle": "Law & Order: Special Victims Unit",
- "grandparentYear": "1999",
- "guid": "plex://episode/5fc70265c40548002d539d23",
- "index": 4,
- "mediaProviderID": "13",
- "originallyAvailableAt": "2010-10-06",
- "parentGuid": "plex://season/5fc6af416b022a002d70b32b/12",
- "parentIndex": 12,
- "parentTitle": "Season 12",
- "ratingKey": "plex%3A%2F%2Fepisode%2F5fc70265c40548002d539d23",
- "title": "Merchandise",
- "type": "episode",
- "year": 2010
}, - "Setting": [
- {
- "id": "minVideoQuality",
- "label": "Resolution",
- "summary": "Choose the minimum resolution for airings to be recorded.",
- "type": "int",
- "default": "0",
- "value": "0",
- "hidden": false,
- "advanced": true,
- "group": "",
- "enumValues": "0:Prefer HD|720:HD only"
}, - {
- "id": "replaceLowerQuality",
- "label": "Replace lower resolution items",
- "summary": "Set whether items in your library may be replaced by higher resolution recordings. This will replace any matching items in your library, not just prior DVR recordings.",
- "type": "bool",
- "default": "false",
- "value": "false",
- "hidden": false,
- "advanced": true,
- "group": ""
}, - {
- "id": "recordPartials",
- "label": "Allow partial airings",
- "summary": "Choose whether a recording may begin for an airing already in progress.",
- "type": "bool",
- "default": "true",
- "value": "true",
- "hidden": false,
- "advanced": true,
- "group": ""
}, - {
- "id": "startOffsetMinutes",
- "label": "Minutes before start",
- "summary": "Increase the recording duration by adding minutes before the scheduled time.",
- "type": "int",
- "default": "0",
- "value": "0",
- "hidden": false,
- "advanced": true,
- "group": ""
}, - {
- "id": "endOffsetMinutes",
- "label": "Minutes after end",
- "summary": "Increase the recording duration by adding minutes after the scheduled time.",
- "type": "int",
- "default": "0",
- "value": "0",
- "hidden": false,
- "advanced": true,
- "group": ""
}, - {
- "id": "lineupChannel",
- "label": "Limit to channel",
- "summary": "Choose whether to restrict recording to a specific channel.",
- "type": "text",
- "default": "",
- "value": "",
- "hidden": false,
- "advanced": true,
- "group": "",
- "enumValues": ":Any|5fc76db1286b56002e2bed03-5fc705ea104230002d14d8f1:3.2 KBTXDT2 (The CW)"
}, - {
- "id": "startTimeslot",
- "label": "Limit to airing time",
- "summary": "Choose whether to restrict recording to a specific airing time.",
- "type": "int",
- "default": "-1",
- "value": "-1",
- "hidden": false,
- "advanced": true,
- "group": "",
- "enumValues": "-1:Any|1715319000:12%3A30 AM|1715281200:02%3A00 PM"
}, - {
- "id": "comskipEnabled",
- "label": "",
- "summary": "",
- "type": "int",
- "default": "-1",
- "value": "-1",
- "hidden": true,
- "advanced": false,
- "group": ""
}, - {
- "id": "comskipMethod",
- "label": "Detect commercials",
- "summary": "Attempt to automatically detect and remove commercials from recordings. This process may take a long time and cause high CPU usage. 'Detect and delete commercials' will delete detected commercial footage from your video files. 'Detect commercials and mark for skip' will leave the video files intact.",
- "type": "int",
- "default": "-1",
- "value": "0",
- "hidden": false,
- "advanced": true,
- "group": "",
- "enumValues": "-1:Use DVR Setting|0:Disabled|1:Detect and delete commercials|2:Detect commercials and mark for skip"
}, - {
- "id": "oneShot",
- "label": "",
- "summary": "",
- "type": "bool",
- "default": "false",
- "value": "true",
- "hidden": true,
- "advanced": false,
- "group": ""
}, - {
- "id": "remoteMedia",
- "label": "",
- "summary": "",
- "type": "bool",
- "default": "false",
- "value": "false",
- "hidden": true,
- "advanced": false,
- "group": ""
}
]
}, - {
- "parameters": "hints%5Bguid%5D=plex%3A%2F%2Fshow%2F5fc6af416b022a002d70b32b&hints%5BratingKey%5D=plex%253A%252F%252Fshow%252F5fc6af416b022a002d70b32b&hints%5Bthumb%5D=https%3A%2F%2Fmetadata-static%2Eplex%2Etv%2F1%2Fgracenote%2F1df5e54a60dfe28b4afac1a445fc86df%2Ejpg&hints%5Btitle%5D=Law%20%26%20Order%3A%20Special%20Victims%20Unit&hints%5Btype%5D=2&hints%5Byear%5D=1999¶ms%5BairingChannels%5D=5fc76db1286b56002e2bed03-5fc705ea104230002d14d8f1%253D3%25252E2%252520KBTXDT2%252520%252528The%252520CW%252529¶ms%5BairingTimes%5D=1715319000%252C1715281200¶ms%5BlibraryType%5D=2¶ms%5BmediaProviderID%5D=13",
- "type": 2,
- "targetLibrarySectionID": 2,
- "title": "All Episodes",
- "airingsType": "New Airings Only",
- "librarySectionTitle": "TV Shows",
- "locationPath": "/Volumes/Media/TV Shows",
- "Directory": {
- "guid": "plex://show/5fc6af416b022a002d70b32b",
- "mediaProviderID": "13",
- "ratingKey": "plex%3A%2F%2Fshow%2F5fc6af416b022a002d70b32b",
- "title": "Law & Order: Special Victims Unit",
- "type": "show",
- "year": 1999
}, - "Setting": [
- {
- "id": "onlyNewAirings",
- "label": "Airings",
- "summary": "",
- "type": "int",
- "default": "0",
- "value": "1",
- "hidden": false,
- "advanced": false,
- "group": "",
- "enumValues": "0:New and Repeat Airings|1:New Airings Only"
}, - {
- "id": "minVideoQuality",
- "label": "Resolution",
- "summary": "Choose the minimum resolution for airings to be recorded.",
- "type": "int",
- "default": "0",
- "value": "0",
- "hidden": false,
- "advanced": true,
- "group": "",
- "enumValues": "0:Prefer HD|720:HD only"
}, - {
- "id": "replaceLowerQuality",
- "label": "Replace lower resolution items",
- "summary": "Set whether items in your library may be replaced by higher resolution recordings. This will replace any matching items in your library, not just prior DVR recordings.",
- "type": "bool",
- "default": "false",
- "value": "false",
- "hidden": false,
- "advanced": true,
- "group": ""
}, - {
- "id": "recordPartials",
- "label": "Allow partial airings",
- "summary": "Choose whether a recording may begin for an airing already in progress.",
- "type": "bool",
- "default": "true",
- "value": "true",
- "hidden": false,
- "advanced": true,
- "group": ""
}, - {
- "id": "startOffsetMinutes",
- "label": "Minutes before start",
- "summary": "Increase the recording duration by adding minutes before the scheduled time.",
- "type": "int",
- "default": "0",
- "value": "0",
- "hidden": false,
- "advanced": true,
- "group": ""
}, - {
- "id": "endOffsetMinutes",
- "label": "Minutes after end",
- "summary": "Increase the recording duration by adding minutes after the scheduled time.",
- "type": "int",
- "default": "0",
- "value": "0",
- "hidden": false,
- "advanced": true,
- "group": ""
}, - {
- "id": "lineupChannel",
- "label": "Limit to channel",
- "summary": "Choose whether to restrict recording to a specific channel.",
- "type": "text",
- "default": "",
- "value": "",
- "hidden": false,
- "advanced": true,
- "group": "",
- "enumValues": ":Any|5fc76db1286b56002e2bed03-5fc705ea104230002d14d8f1:3.2 KBTXDT2 (The CW)"
}, - {
- "id": "startTimeslot",
- "label": "Limit to airing time",
- "summary": "Choose whether to restrict recording to a specific airing time.",
- "type": "int",
- "default": "-1",
- "value": "-1",
- "hidden": false,
- "advanced": true,
- "group": "",
- "enumValues": "-1:Any|1715319000:12%3A30 AM|1715281200:02%3A00 PM"
}, - {
- "id": "comskipEnabled",
- "label": "",
- "summary": "",
- "type": "int",
- "default": "-1",
- "value": "-1",
- "hidden": true,
- "advanced": false,
- "group": ""
}, - {
- "id": "comskipMethod",
- "label": "Detect commercials",
- "summary": "Attempt to automatically detect and remove commercials from recordings. This process may take a long time and cause high CPU usage. 'Detect and delete commercials' will delete detected commercial footage from your video files. 'Detect commercials and mark for skip' will leave the video files intact.",
- "type": "int",
- "default": "-1",
- "value": "0",
- "hidden": false,
- "advanced": true,
- "group": "",
- "enumValues": "-1:Use DVR Setting|0:Disabled|1:Detect and delete commercials|2:Detect commercials and mark for skip"
}, - {
- "id": "oneShot",
- "label": "",
- "summary": "",
- "type": "bool",
- "default": "false",
- "value": "false",
- "hidden": true,
- "advanced": false,
- "group": ""
}, - {
- "id": "remoteMedia",
- "label": "",
- "summary": "",
- "type": "bool",
- "default": "false",
- "value": "false",
- "hidden": true,
- "advanced": false,
- "group": ""
}, - {
- "id": "autoDeletionItemPolicyUnwatchedLibrary",
- "label": "Keep",
- "summary": "Set the maximum number of unplayed episodes to keep for the show.",
- "type": "int",
- "default": "0",
- "value": "0",
- "hidden": false,
- "advanced": true,
- "group": "",
- "enumValues": "0:All episodes|5:5 latest episodes|3:3 latest episodes|1:Latest episode|-3:Episodes added in the past 3 days|-7:Episodes added in the past 7 days|-30:Episodes added in the past 30 days"
}, - {
- "id": "autoDeletionItemPolicyWatchedLibrary",
- "label": "Delete episodes after playing",
- "summary": "Choose how quickly episodes are removed after the server admin has watched them.",
- "type": "int",
- "default": "0",
- "value": "0",
- "hidden": false,
- "advanced": true,
- "group": "",
- "enumValues": "0:Never|1:After a day|7:After a week|30:After a month|100:On next refresh"
}
]
}
]
}
]
}
}{- "MediaContainer": {
- "identifier": "string",
- "size": 0,
- "totalSize": 0,
- "offset": 0,
- "Metadata": [
- {
- "type": null,
- "subtype": null,
- "key": null,
- "ratingKey": null,
- "title": null,
- "titleSort": null,
- "originalTitle": null,
- "year": 0,
- "index": 0,
- "absoluteIndex": 0,
- "originallyAvailableAt": null,
- "duration": 0,
- "summary": null,
- "tagline": null,
- "thumb": null,
- "art": null,
- "banner": null,
- "hero": null,
- "theme": null,
- "composite": null,
- "studio": null,
- "contentRating": null,
- "rating": 10,
- "ratingImage": null,
- "audienceRating": 10,
- "audienceRatingImage": null,
- "userRating": 10,
- "viewOffset": 0,
- "viewCount": 0,
- "lastViewedAt": 0,
- "addedAt": 0,
- "updatedAt": 0,
- "chapterSource": null,
- "primaryExtraKey": null,
- "skipChildren": true,
- "skipParent": true,
- "leafCount": 0,
- "viewedLeafCount": 0,
- "parentKey": "string",
- "grandparentKey": "string",
- "parentRatingKey": "string",
- "grandparentRatingKey": "string",
- "parentThumb": "string",
- "grandparentThumb": "string",
- "grandparentArt": "string",
- "parentHero": "string",
- "grandparentHero": "string",
- "grandparentTheme": "string",
- "parentTitle": "string",
- "grandparentTitle": "string",
- "parentIndex": 0,
- "secondary": true,
- "prompt": "string",
- "search": true,
- "ratingCount": 0,
- "Media": [
- {
- "aspectRatio": 2.35,
- "audioChannels": 2,
- "audioCodec": "aac",
- "audioProfile": "lc",
- "bitrate": 5612,
- "container": "mov",
- "duration": 150192,
- "has64bitOffsets": false,
- "hasVoiceActivity": true,
- "height": 544,
- "id": 1,
- "optimizedForStreaming": false,
- "videoCodec": "h264",
- "videoFrameRate": "24p",
- "videoProfile": "main",
- "videoResolution": "720",
- "width": 1280,
- "Part": [
- {
- "audioProfile": "lc",
- "container": "mov",
- "duration": 150192,
- "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov",
- "has64bitOffsets": false,
- "id": 1,
- "key": "/library/parts/1/1531779263/file.mov",
- "optimizedForStreaming": false,
- "size": 105355654,
- "videoProfile": "main",
- "Stream": [
- {
- "audioChannelLayout": null,
- "bitDepth": null,
- "bitrate": null,
- "canAutoSync": null,
- "chromaLocation": null,
- "chromaSubsampling": null,
- "codec": null,
- "colorPrimaries": null,
- "colorRange": null,
- "colorSpace": null,
- "colorTrc": null,
- "default": null,
- "displayTitle": null,
- "frameRate": null,
- "hasScalingMatrix": null,
- "height": null,
- "id": null,
- "index": null,
- "key": null,
- "language": null,
- "languageCode": null,
- "level": null,
- "profile": null,
- "refFrames": null,
- "samplingRate": null,
- "selected": null,
- "streamIdentifier": null,
- "streamType": null,
- "width": null
}
]
}
]
}
], - "Image": [
- {
- "type": "background",
- "url": "string",
- "alt": "string"
}
], - "Genre": [
- {
- "id": 0,
- "tag": "Shaun Lawton",
- "tagKey": "5d3ee12c4cde6a001c3e0b27",
- "tagType": 0,
- "filter": "actor=49",
- "role": "Secretary",
- "context": "string",
- "ratingKey": "string",
- "confidence": 0
}
], - "Country": [
- {
- "id": 0,
- "tag": "Shaun Lawton",
- "tagKey": "5d3ee12c4cde6a001c3e0b27",
- "tagType": 0,
- "filter": "actor=49",
- "role": "Secretary",
- "context": "string",
- "ratingKey": "string",
- "confidence": 0
}
], - "Guid": [
- {
- "id": 0,
- "tag": "Shaun Lawton",
- "tagKey": "5d3ee12c4cde6a001c3e0b27",
- "tagType": 0,
- "filter": "actor=49",
- "role": "Secretary",
- "context": "string",
- "ratingKey": "string",
- "confidence": 0
}
], - "Rating": [
- {
- "id": 0,
- "tag": "Shaun Lawton",
- "tagKey": "5d3ee12c4cde6a001c3e0b27",
- "tagType": 0,
- "filter": "actor=49",
- "role": "Secretary",
- "context": "string",
- "ratingKey": "string",
- "confidence": 0
}
], - "Director": [
- {
- "id": 0,
- "tag": "Shaun Lawton",
- "tagKey": "5d3ee12c4cde6a001c3e0b27",
- "tagType": 0,
- "filter": "actor=49",
- "role": "Secretary",
- "context": "string",
- "ratingKey": "string",
- "confidence": 0
}
], - "Writer": [
- {
- "id": 0,
- "tag": "Shaun Lawton",
- "tagKey": "5d3ee12c4cde6a001c3e0b27",
- "tagType": 0,
- "filter": "actor=49",
- "role": "Secretary",
- "context": "string",
- "ratingKey": "string",
- "confidence": 0
}
], - "Role": [
- {
- "id": 0,
- "tag": "Shaun Lawton",
- "tagKey": "5d3ee12c4cde6a001c3e0b27",
- "tagType": 0,
- "filter": "actor=49",
- "role": "Secretary",
- "context": "string",
- "ratingKey": "string",
- "confidence": 0
}
], - "Autotag": [
- {
- "id": 0,
- "tag": "Shaun Lawton",
- "tagKey": "5d3ee12c4cde6a001c3e0b27",
- "tagType": 0,
- "filter": "actor=49",
- "role": "Secretary",
- "context": "string",
- "ratingKey": "string",
- "confidence": 0
}
], - "Filter": [
- {
- "hubKey": "string",
- "key": "string",
- "title": "string",
- "thumb": "string",
- "art": "string",
- "share": 0,
- "hasStoreServices": true,
- "hasPrefs": true,
- "identifier": "string",
- "titleBar": "string",
- "lastAccessedAt": 0,
- "type": "string",
- "content": true,
- "filter": "string",
- "Pivot": [
- {
- "id": "string",
- "key": "string",
- "type": "string",
- "title": "string",
- "context": "string",
- "symbol": "string"
}
], - "filterType": "string"
}
], - "Sort": [
- {
- "hubKey": "string",
- "key": "string",
- "title": "string",
- "thumb": "string",
- "art": "string",
- "share": 0,
- "hasStoreServices": true,
- "hasPrefs": true,
- "identifier": "string",
- "titleBar": "string",
- "lastAccessedAt": 0,
- "type": "string",
- "content": true,
- "filter": "string",
- "Pivot": [
- {
- "id": "string",
- "key": "string",
- "type": "string",
- "title": "string",
- "context": "string",
- "symbol": "string"
}
], - "defaultDirection": "asc",
- "default": "asc",
- "descKey": "string",
- "firstCharacterKey": "string"
}
]
}
]
}
}Get a single livetv session and metadata
| sessionId required | string The session id |
{- "MediaContainer": {
- "identifier": "string",
- "size": 0,
- "totalSize": 0,
- "offset": 0,
- "Metadata": [
- {
- "type": null,
- "subtype": null,
- "key": null,
- "ratingKey": null,
- "title": null,
- "titleSort": null,
- "originalTitle": null,
- "year": 0,
- "index": 0,
- "absoluteIndex": 0,
- "originallyAvailableAt": null,
- "duration": 0,
- "summary": null,
- "tagline": null,
- "thumb": null,
- "art": null,
- "banner": null,
- "hero": null,
- "theme": null,
- "composite": null,
- "studio": null,
- "contentRating": null,
- "rating": 10,
- "ratingImage": null,
- "audienceRating": 10,
- "audienceRatingImage": null,
- "userRating": 10,
- "viewOffset": 0,
- "viewCount": 0,
- "lastViewedAt": 0,
- "addedAt": 0,
- "updatedAt": 0,
- "chapterSource": null,
- "primaryExtraKey": null,
- "skipChildren": true,
- "skipParent": true,
- "leafCount": 0,
- "viewedLeafCount": 0,
- "parentKey": "string",
- "grandparentKey": "string",
- "parentRatingKey": "string",
- "grandparentRatingKey": "string",
- "parentThumb": "string",
- "grandparentThumb": "string",
- "grandparentArt": "string",
- "parentHero": "string",
- "grandparentHero": "string",
- "grandparentTheme": "string",
- "parentTitle": "string",
- "grandparentTitle": "string",
- "parentIndex": 0,
- "secondary": true,
- "prompt": "string",
- "search": true,
- "ratingCount": 0,
- "Media": [
- {
- "aspectRatio": 2.35,
- "audioChannels": 2,
- "audioCodec": "aac",
- "audioProfile": "lc",
- "bitrate": 5612,
- "container": "mov",
- "duration": 150192,
- "has64bitOffsets": false,
- "hasVoiceActivity": true,
- "height": 544,
- "id": 1,
- "optimizedForStreaming": false,
- "videoCodec": "h264",
- "videoFrameRate": "24p",
- "videoProfile": "main",
- "videoResolution": "720",
- "width": 1280,
- "Part": [
- {
- "audioProfile": "lc",
- "container": "mov",
- "duration": 150192,
- "file": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov",
- "has64bitOffsets": false,
- "id": 1,
- "key": "/library/parts/1/1531779263/file.mov",
- "optimizedForStreaming": false,
- "size": 105355654,
- "videoProfile": "main",
- "Stream": [
- {
- "audioChannelLayout": null,
- "bitDepth": null,
- "bitrate": null,
- "canAutoSync": null,
- "chromaLocation": null,
- "chromaSubsampling": null,
- "codec": null,
- "colorPrimaries": null,
- "colorRange": null,
- "colorSpace": null,
- "colorTrc": null,
- "default": null,
- "displayTitle": null,
- "frameRate": null,
- "hasScalingMatrix": null,
- "height": null,
- "id": null,
- "index": null,
- "key": null,
- "language": null,
- "languageCode": null,
- "level": null,
- "profile": null,
- "refFrames": null,
- "samplingRate": null,
- "selected": null,
- "streamIdentifier": null,
- "streamType": null,
- "width": null
}
]
}
]
}
], - "Image": [
- {
- "type": "background",
- "url": "string",
- "alt": "string"
}
], - "Genre": [
- {
- "id": 0,
- "tag": "Shaun Lawton",
- "tagKey": "5d3ee12c4cde6a001c3e0b27",
- "tagType": 0,
- "filter": "actor=49",
- "role": "Secretary",
- "context": "string",
- "ratingKey": "string",
- "confidence": 0
}
], - "Country": [
- {
- "id": 0,
- "tag": "Shaun Lawton",
- "tagKey": "5d3ee12c4cde6a001c3e0b27",
- "tagType": 0,
- "filter": "actor=49",
- "role": "Secretary",
- "context": "string",
- "ratingKey": "string",
- "confidence": 0
}
], - "Guid": [
- {
- "id": 0,
- "tag": "Shaun Lawton",
- "tagKey": "5d3ee12c4cde6a001c3e0b27",
- "tagType": 0,
- "filter": "actor=49",
- "role": "Secretary",
- "context": "string",
- "ratingKey": "string",
- "confidence": 0
}
], - "Rating": [
- {
- "id": 0,
- "tag": "Shaun Lawton",
- "tagKey": "5d3ee12c4cde6a001c3e0b27",
- "tagType": 0,
- "filter": "actor=49",
- "role": "Secretary",
- "context": "string",
- "ratingKey": "string",
- "confidence": 0
}
], - "Director": [
- {
- "id": 0,
- "tag": "Shaun Lawton",
- "tagKey": "5d3ee12c4cde6a001c3e0b27",
- "tagType": 0,
- "filter": "actor=49",
- "role": "Secretary",
- "context": "string",
- "ratingKey": "string",
- "confidence": 0
}
], - "Writer": [
- {
- "id": 0,
- "tag": "Shaun Lawton",
- "tagKey": "5d3ee12c4cde6a001c3e0b27",
- "tagType": 0,
- "filter": "actor=49",
- "role": "Secretary",
- "context": "string",
- "ratingKey": "string",
- "confidence": 0
}
], - "Role": [
- {
- "id": 0,
- "tag": "Shaun Lawton",
- "tagKey": "5d3ee12c4cde6a001c3e0b27",
- "tagType": 0,
- "filter": "actor=49",
- "role": "Secretary",
- "context": "string",
- "ratingKey": "string",
- "confidence": 0
}
], - "Autotag": [
- {
- "id": 0,
- "tag": "Shaun Lawton",
- "tagKey": "5d3ee12c4cde6a001c3e0b27",
- "tagType": 0,
- "filter": "actor=49",
- "role": "Secretary",
- "context": "string",
- "ratingKey": "string",
- "confidence": 0
}
], - "Filter": [
- {
- "hubKey": "string",
- "key": "string",
- "title": "string",
- "thumb": "string",
- "art": "string",
- "share": 0,
- "hasStoreServices": true,
- "hasPrefs": true,
- "identifier": "string",
- "titleBar": "string",
- "lastAccessedAt": 0,
- "type": "string",
- "content": true,
- "filter": "string",
- "Pivot": [
- {
- "id": "string",
- "key": "string",
- "type": "string",
- "title": "string",
- "context": "string",
- "symbol": "string"
}
], - "filterType": "string"
}
], - "Sort": [
- {
- "hubKey": "string",
- "key": "string",
- "title": "string",
- "thumb": "string",
- "art": "string",
- "share": 0,
- "hasStoreServices": true,
- "hasPrefs": true,
- "identifier": "string",
- "titleBar": "string",
- "lastAccessedAt": 0,
- "type": "string",
- "content": true,
- "filter": "string",
- "Pivot": [
- {
- "id": "string",
- "key": "string",
- "type": "string",
- "title": "string",
- "context": "string",
- "symbol": "string"
}
], - "defaultDirection": "asc",
- "default": "asc",
- "descKey": "string",
- "firstCharacterKey": "string"
}
]
}
]
}
}Get a playlist index for playing this session
| sessionId required | string The session id |
| consumerId required | string The consumer id |
#EXTM3U #EXT-X-VERSION:4 #EXT-X-TARGETDURATION:3 #EXT-X-MEDIA-SEQUENCE:0 #EXT-X-PROGRAM-DATE-TIME:2024-05-22T17:18:48.044851000Z #EXTINF:0.551044, nodesc 00000.ts #EXTINF:1.001000, nodesc 00001.ts #EXTINF:1.067323, nodesc 00002.ts #EXTINF:1.001000, nodesc 00003.ts