Files
channels-seerr/openapi.json

29744 lines
1.2 MiB

{
"openapi": "3.1.0",
"info": {
"title": "Plex Media Server",
"version": "1.2.0\n",
"license": {
"name": "Apache 2.0",
"url": "https://www.apache.org/licenses/LICENSE-2.0.html"
},
"description": "# API Info\n## Content Types\nThe 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.\n\nThroughout the docs, it's common for a examples to be given in JSON only since the JSON response would be preferred for new applications.\n\n## Headers\n\nPMS 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:\n\n| Header | Description | Sample |\n| --- | --- | --- |\n| X-Plex-Client-Identifier | An opaque identifier unique to the client | abc123 |\n| X-Plex-Token | An authentication token, obtained from plex.tv | XXXXXXXXXXXX |\n| X-Plex-Product | The name of the client product | Plex for Roku |\n| X-Plex-Version | The version of the client application | 2.4.1 |\n| X-Plex-Platform | The platform of the client | Roku |\n| X-Plex-Platform-Version | The version of the platform | 4.3 build 1057 |\n| X-Plex-Device | A relatively friendly name for the client device | Roku 3 |\n| X-Plex-Model | A potentially less friendly identifier for the device model | 4200X |\n| X-Plex-Device-Vendor | The device vendor | Roku |\n| X-Plex-Device-Name | A friendly name for the client | Living Room TV |\n| X-Plex-Marketplace | The marketplace on which the client application is distributed | googlePlay |\n\n`X-Plex-Client-Identifier` is typically required, as is `X-Plex-Token` for authentication.\n\nThere'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.\n\nThese are referred to as headers throughout documentation, but all `X-Plex-` headers can also be sent as query string arguments.\n\n## Auth\n\nMost 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 <a href=\"#section/API-Info/Authenticating-with-Plex\">Authenticating with Plex</a> section.\n\n## Paths and Keys\n\nMany 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.\n\n- For a request to `/library/sections` that includes an item with a `key` of `home` in the response, that item can be fetched at `/library/sections/home`.\n- For a request to `/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`.\n\nWe say this follows a \"sort of\" relative URL resolution pattern because all requests are treated as though they have a trailing slash.\n\n```\n/library/sections/ + home => /library/sections/home\n/library/sections + home => /library/sections/home\n/library/sections + /library/sections/home => /library/sections/home\n```\n\nJust 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.\n\nAlso 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.\n\nFinally, it's worth noting that many paths can potentially be discovered by walking API responses and fetching `key`s, 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.\n\n## Types\n\nMany 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\n\n### List of Metadata Types\n\n| Type Name | Type Number |\n| -- | -- |\n| `movie` | 1 |\n| `show` | 2 |\n| `season` | 3 |\n| `episode` | 4 |\n| `trailer` | 5 |\n| `person` | 7 |\n| `artist` | 8 |\n| `album` | 9 |\n| `track` | 10 |\n| `clip` | 12 |\n| `photo` | 13 |\n| `photoalbum` | 14 |\n| `playlist` | 15 |\n| `playlistfolder` | 16 |\n| `collection` | 18 |\n\nWhen 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:\n\n```json\n[\n {\n \"key\": \"/foo\",\n \"type\": \"movie\",\n \"title\": \"A Movie\"\n },\n {\n \"key\": \"/bar\",\n \"type\": \"collection\",\n \"title\": \"My Favorite Movies\"\n },\n {\n \"key\": \"/baz\",\n \"type\": \"show\",\n \"title\": \"A Show\"\n }\n]\n```\n\nIn 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.\n\nSome 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.\n\n### List of Metadata Subtypes\n\n- `podcast`\n- `webshow`\n- `news`\n- `photo`\n\n#### Collection Subtypes\n\n- `movie`\n- `show`\n- `artist`\n- `album`\n\n#### Extras Subtypes\n\n- `trailer`\n- `deletedScene`\n- `interview`\n- `musicVideo`\n- `behindTheScenes`\n- `sceneOrSample`\n- `liveMusicVideo`\n- `lyricMusicVideo`\n- `concert`\n- `featurette`\n- `short`\n- `other`\n\n## Sources\n\nSource 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.\n\nA source URI from a media server uses the `server` scheme while a cloud provider uses the `provider` scheme.\n\n```\nserver://{SERVER_ID}/{PROVIDER_ID}/{PATH}\nprovider://{PROVIDER_ID}/{PATH}\n```\n\nAs a single regular expression, that's:\n\n```\n/^(server|provider):\\/\\/([a-fA-F0-9-]+)?\\/?([^/]+)([^\\?]+)\\??(.*)?/\n```\n\nThe 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.\n\nSome examples may be helpful:\n\n```\nserver://546684a3d18ac5c39037360ec9ce900b7af9cc36/com.plexapp.plugins.library/library/metadata/2814936\nprovider://tv.plex.provider.podcasts/library/sections/audio/all\n```\n\nThe `source` attribute has the same structure as the source URI, but omits the path.\n\n```\n{SOURCE_TYPE}://{SOURCE_ID}/{PROVIDER_ID?}\n```\n```\n/^(server|provider):\\/\\/([a-fA-F0-9-]+)?\\/?([^/]+)$/\n```\n\n```\nsource=\"server://546684a3d18ac5c39037360ec9ce900b7af9cc36/com.plexapp.plugins.library\"\nsource=\"provider://tv.plex.provider.podcasts\"\n```\n\nSource attributes can be used as a base and combined with `key` or other root-relative path components to construct unique source URIs.\n\n## Pagination\n\nMany 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.\n\n- **X-Plex-Container-Start** - The desired starting offset\n- **X-Plex-Container-Size** - The desired number of items\n\nBoth 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.\n\nThe 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:\n\n- **X-Plex-Container-Start** - The offset of the first returned item\n- **X-Plex-Container-Total-Size** - The **total** size of the collection (optional but typically present)\n\nThe 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.\n\n```\nHTTP/1.1 200 OK\nX-Plex-Container-Start: 2\nX-Plex-Container-Total-Size: 5\nContent-Type: application/xml\n\n{\n \"MediaContainer\": {\n \"size\": 3,\n \"totalSize\": 5,\n \"offset\": 2,\n \"Metadata\" : [\n …\n ]\n }\n}\n```\n\nRather 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.\n\n- **X-Plex-Container-Focus-Key** - The key of an item to center on\n- **X-Plex-Container-Size** - The desired number of items\n\nThe 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.\n\nEndpoints 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:\n\n1. When using `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.\n2. The request may be more efficient when using `limit`, since the total size doesn't have to be known.\n\nIf the total size of the collection isn't needed, use `limit`, since the request may be more efficient.\n\nNote 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`.\n\n## API Versioning\n\nPMS 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.\n\n### API Changes\n - 1.0.0 (Supported in PMS >= 1.41.9)\n - Added `/downloadQueue` endpoints.\n - Public release of API.\n - 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.\n\n\n- 1.1.0 (Supported in PMS >= 1.42.0)\n - Added ability to filter '/media/providers/metadata' endpoint by metadata types (PM-3702)\n - Changed `types` in `/playlists/{playlistId}/items` to array of integers.\n - Document the `/photo/:/transcode` endpoints\n - Fixed serialization of MetadataType objects for '/media/providers/metadata' calls.\n\n\n- 1.1.1 (Supported in PMS >= 1.42.2)\n - Added 'metadataAgentProviderGroupId' query param to create and edit library section (PM-3577)\n - Fixed Add library section method type.\n\n\n- 1.2.0 (Supported in PMS >= 1.43.0)\n - Added 'squareArt' as additional element type for image assets (PM-2959)\n - Added `/media/providers/metadata` endpoints (PM-1012)\n - Added delete method for /library/metadata/{id}/{element} (PM-4094)\n - Added documentation for Metadata-type Media Providers (PM-3051)\n\n## Response Customization\n\nMany 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.\n\nAttributes 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.\n\nChild 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.\n\nIn 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.\n\nTrimming 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`.\n\nNote 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.\n\n## Media Providers\n\nMedia 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.\n\n### Client Guide to Media Providers\n\nThe 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:\n- Consume `/media/providers` instead of `/library/sections`\n\n 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).\n\n- Gate management functionality on the `manage` feature\n\n Server libraries allow management (e.g. media deletion). The correct way to gate this functionality is via the manage feature.\n\n- Make sure key construction is correct for things like genre lists\n\n 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.\n\n- Don't call `/library/sections/X/filters|sorts`\n\n 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.\n\n- Respect the Type keys in `/library/sections/x`\n\n 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.\n\n- Look for the `skipChildren`/`skipParent` attributes for shows\n\n 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.\n\n### Features\n\nThe 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.\n\n- **search**: This feature implies that it supports search via the provided key.\n\n- **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).\n\n- **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:\n\n - `hubKey`: This implies it supports a discovery endpoint with hubs.\n - `key`: This implies it supports a content catalog.\n - `icon`: Optional, specifies the icon used for a content directory.\n\n Each content feature can contain one or both of these keys, depending on the structure. More details on the various combinations are provided below.\n\n- **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.\n\n- **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.\n\n- **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.\n\n- **rate**: This feature implies the provider supports the endpoint which allows rating content.\n\n- **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`.\n\n- **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.\n\n- **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.\n\n- **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.\n\n- **continuewatching**: This feature allows the provider to supply an endpoint that will return a hub for merging into a global Continue Watching hub.\n\n- **collection**: This feature implies the provider supports the collection family of endpoints.\n\n- **actions**\n - **removeFromContinueWatching** - Action to remove an item from continue watching\n\n- **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\n\n- **queryParser** - This feature implies the provider supports the media queries language below\n\n- **grid** - This feature implies the provider supports displaying metadata in a grid over time (such as live TV)\n\n##### Home discovery and browsable libraries\n\nShown in the example in [/media/providers](#tag/Provider/operation/getMediaProviders), 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.\n\nThe 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`.\n\n##### Minimal provider\n\nThere'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.\n\n##### Deeper Hierarchies\n\nIf 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.\n\n##### Extensions to regular libraries\n\nThis section examines extensions to plain libraries which content providers can use, and which clients need to be aware of.\n\n- **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.\n\n ```json\n {\n \"Directory\":[\n {\n \"key\":\"foo\",\n \"hubKey\":\"foo2\",\n \"type\":\"content\",\n \"aspectRatio\":\"1:1\",\n \"title\":\"Genres and Moods\"\n }\n ]\n }\n ```\n\n- **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.\n\n## Metadata Providers\n\nThis section describes the specific Media Providers which supply the `metadata` feature. These providers can be created and used in Plex Media Server to supply metadata to items inside Movie and TV Show libraries (music libraries are currently not supported).\n\n### Common Request Headers\n\nThere are a few headers which are common to both the Metadata and Match features. These can be passed as either headers or query parameters.\n\n| Header | Support Required? | Description |\n|--------|-------------------|-------------|\n| X-Plex-Language | No | IETF language tag including the region subtag (e.g. 'en-US', 'de-DE'). Used for localization.\n| X-Plex-Country | No | ISO 3166 two-letter country code. Used primarily to define the country for certification data, or can be used to determine release dates for the specific country.\n| X-Plex-Container-Size | Yes | For paged requests. This determines what the maximum container size should be of a single response.\n| X-Plex-Container-Start | Yes | For paged requests. This determines the starting index for the paged request.\n\n### Response Paging\n\nCertain responses may contain a large number of objects. The consumer may want to limit the size of the MediaContainer by paging through them using the `X-Plex-Container-Size` and `X-Plex-Container-Start` headers/params. Responses should them limit the object count inside the MediaContainer to `X-Plex-Container-Size` and start at the index provided by `X-Plex-Container-Start`.\n\nSee the [Pagination](#pagination) section for more details on how paging works.\n\nThe only two endpoints that require mandatory paging are the Metadata `/children` and `/grandchildren` endpoints as these will potentially contain many items. Passing no paging headers here should only return the first 20 Metadata objects.\n\n### Common return codes\n\nIt is important to return the correct HTTP return codes.\n\n| Code | Common Name | Description |\n|------|-------------|-------------|\n| 200 | OK | An response for an item or match is successfully returned |\n| 404 | Not Found | If an item with the requested ratingKey is not found (Metadata feature only) |\n| 400 | Bad Request | A request was made which cannot be fulfilled because the request is malformed |\n| 500 | Internal Server Error | A request was made which cannot be fulfilled because the server encountered an internal error |\n\n### Response Customization (Optional)\n\nThere may be cases where a reduced response is wanted, i.e. we only want to return specific attributes or exclude specific attributes. These are handled with `includeFields`, `excludeFields`, `includeElements` and `excludeElements`.\n\nInformation on its use can be found in the [Response Customization](#response-customization).\n\nYou may wish to add support for this to keep response sizes down, however it is not required and you can safely ignore when these parameters are passed.\n\n### Metadata Feature\n\nThis is a path to retrieve metadata for a specific piece of content by its id.\n\nIt is called by making a `GET` request to the path defined by the `Metadata` feature inside the root of your provider with the `ratingKey` of the metadata item.\n\nFor example, the request may be something like `GET http://localhost/library/metadata/tmdb-movie-123` which should return a [Metadata Object](#metadata-object) for the item with the `ratingKey` of \"tmdb-movie-123\".\n\nSee some [Example Responses](#example-responses)\n\n#### Supported Query Parameters\n\nThere are some query parameters available to media provider to augment the responses. Not all of these are required to be supported by all providers, support requirement is detailed in the below table.\n\n| Param | Type | Support Required? | Description |\n|-------|------|-------------------|-------------|\n| `includeChildren` | integer (1/0) | Yes (TV Shows/Seasons only) | Returns a [Children Object](#children-object) when the metadata type has direct child objects (e.g. a TV Show should return Season Children)\n| `episodeOrder` | string | No | When making a request that returns seasons in the response, pass back the appropriate season items for the requested [SeasonType id](#seasontype-array-optional). It is expected that if no seasons exist for the requested episodeOrder, that no season data should be returned.\n\n#### Image endpoint (Recommended)\n\nThe Metadata feature should also provide a `/images` path for calls to specific items, e.g. `/library/metadata/tmdb-movie-123/images`. This endpoint should return a [MediaContainer](#mediacontainer) object containing and [Image Array](#image-array-highly-recommended) of all the available image assets for that item.\n\nExample:\n\n```json\n{\n \"MediaContainer\": {\n \"offset\": 0,\n \"totalSize\": 3,\n \"identifier\": \"tv.plex.provider.metadata\",\n \"size\": 3,\n \"Image\": [\n {\n \"type\": \"coverPoster\",\n \"url\": \"https://image.tmdb.org/t/p/original/qk3eQ8jW4opJ48gFWYUXWaMT4l.jpg\",\n },\n {\n \"type\": \"background\",\n \"url\": \"https://image.tmdb.org/t/p/original/3uE9SUywNbj1qSAuYCGgbTTYku5.jpg\",\n },\n {\n \"type\": \"clearLogo\",\n \"url\": \"https://image.tmdb.org/t/p/original/rIi0lY2UftYuKDJ4OlIefDdijve.png\",\n }\n ]\n }\n}\n```\n\n### Children and Grandchildren Requests\n\nFor items which contain child items, like TV Shows and Seasons, these types should also respond to requests for `/children` and `/grandchildren`, e.g. `/library/metadata/tmdb-show-123/children`.\n\nFor TV Shows and Seasons this should return a [MediaContainer](#mediacontainer) object with an array of [Metadata Objects](#metadata-object) for their Seasons and Episodes respectively.\n\nIt is required that these two endpoints support paged requests via the `X-Plex-Container-Size` and `X-Plex-Container-Start` headers/params.\n\n### Match Feature\n\nThis is a path to retrieve potential matches to metadata items based on contextual hints passed in your request body. This should return a [MediaContainer Object](#mediacontainer) possibly containing multiple Metadata objects (by default should only return the best result only).\n\nIt is called by making a `POST` request to the path defined by the `Match` feature inside the root of your provider.\n\nThis may be where it is useful supporting [Response Customization](#response-customization-optional) as match responses don't always need to contain the full Metadata object responses.\n\nA request body is required which can contain the attributes listed below.\n\n| Attribute | Type | Support Required? | Optional | Description |\n|-----------|------|-------------------|----------|-------------|\n| `type` | integer | Yes | No | The numeric metadata type for the requested match. See [Metadata Types Table](#metadata-types-table) |\n| `title` | string | Yes | No* | A title for the item. *Movies and TV Shows only. |\n| `parentTitle` | string | Yes | No* | A title for the TV Show. *Seasons only. |\n| `grandparentTitle` | string | Yes | No* | A title for the TV Show. *Episodes only. |\n| `includeChildren` | integer (1/0) | Yes (TV Shows/Seasons only) | Yes* | Returns a [Children Object](#children-object) when the metadata type has direct child objects (e.g. a TV Show should return Season Children). *Is only optional for Movie and Episode types.\n| `episodeOrder` | string | No | Yes | When making a request that returns seasons in the response, pass back the appropriate season items for the requested [SeasonType id](#seasontype-array-optional). It is expected that if no seasons exist for the requested episodeOrder, that no season data should be returned. |\n| `year` | integer | Yes | Yes | The release year for the requested match. |\n| `guid` | string | Yes | Yes | An external id which can help matching precisely (e.g. `tvdb://12345) |\n| `index` | integer | Yes | Yes* | For Seasons, the season number. For Episodes, the episode number. |\n| `parentIndex` | integer | Yes | Yes* | For Episodes, the season number. |\n| `filename` | string | No | Yes | The relative path for the underlying media file. For TV Shows and Seasons this will return the first file found. e.g. `/Movies/Back to the Future (1985).mp4` |\n| `date` | string | Yes | Yes* | When matching an TV Episode, if `index` and `parentIndex` are not available, a date must be passed representing the air date of the episode.\n| `manual` | integer (1/0) | Yes | Yes | When a value of `1` is passed, the response should contain an array of the best matches for the request ordered by highest to lowest confidence. When this value is not passed or is `0`, only the best match should be returned. |\n| `includeAdult` | integer (1/0) | No | Yes | If your provider supports explicit/adult content this value should be taken into consideration when returning responses and any explicit results should be filtered out unless a value of `1` is passed. |\n\n#### Match Example\n\n##### JSON Body\n\n```json\n{\n \"parentTitle\": \"Adventure Time\",\n \"type\": 3,\n \"index\": 8,\n \"filename\": \"TV Shows/Adventure Time/Adventure Time S08E01.mp4\",\n \"includeElements\": \"Metadata,Children\",\n \"includeFields\": \"guid,parentGuid,title,parentTitle,thumb,parentThumb,index,originallyAvailableAt,year,type\",\n \"includeChildren\": 1\n}\n```\n\n##### CURL Command\n\n```\ncurl -X POST \\\n 'http://localhost/library/metadata/matches?X-Plex-Country=US&X-Plex-Language=en-US' \\\n --header 'Accept: application/json' \\\n --header 'Content-Type: application/json' \\\n --data-raw '{\n \"parentTitle\": \"Adventure Time\",\n \"type\": 3,\n \"index\": 8,\n \"filename\": \"TV Shows/Adventure Time/Adventure Time S08E01.mp4\",\n \"includeElements\": \"Metadata,Children\",\n \"includeFields\": \"guid,parentGuid,title,parentTitle,thumb,parentThumb,index,originallyAvailableAt,year,type\",\n \"includeChildren\": 1\n}'\n```\n\n##### Response\n\n```json\n{\n \"MediaContainer\": {\n \"offset\": 0,\n \"totalSize\": 1,\n \"identifier\": \"tv.plex.provider.metadata\",\n \"size\": 1,\n \"Metadata\": [\n {\n \"guid\": \"plex://season/5d9c0939e9d5a1001f4def89\",\n \"type\": \"season\",\n \"thumb\": \"https://image.tmdb.org/t/p/original/zIDoU6YZXE3oz9MNBjE2Ld94Xuu.jpg\",\n \"title\": \"Season 8\",\n \"parentTitle\": \"Adventure Time\",\n \"parentThumb\": \"https://image.tmdb.org/t/p/original/qk3eQ8jW4opJ48gFWYUXWaMT4l.jpg\",\n \"parentGuid\": \"plex://show/5d9c07f72df347001e3a70b4\",\n \"index\": 8,\n \"originallyAvailableAt\": \"2016-03-26\",\n \"year\": 2016,\n \"Children\": {\n \"size\": 2,\n \"Metadata\": [\n {\n \"guid\": \"plex://episode/5eeb4fc1d39938003f7753c0\",\n \"type\": \"episode\",\n \"thumb\": \"https://image.tmdb.org/t/p/original/3WXclCno2MYKhdnUidQVsPSpolk.jpg\",\n \"title\": \"Broke His Crown\",\n \"parentTitle\": \"Season 8\",\n \"parentThumb\": \"https://image.tmdb.org/t/p/original/zIDoU6YZXE3oz9MNBjE2Ld94Xuu.jpg\",\n \"parentGuid\": \"plex://season/5d9c0939e9d5a1001f4def89\",\n \"index\": 1,\n \"originallyAvailableAt\": \"2016-03-26\",\n \"year\": 2016\n },\n {\n \"guid\": \"plex://episode/5eeb4fc1d39938003f7753be\",\n \"type\": \"episode\",\n \"thumb\": \"https://image.tmdb.org/t/p/original/mhhq4BXNmnZZfzfqsBvZwMvcngt.jpg\",\n \"title\": \"Don't Look\",\n \"parentTitle\": \"Season 8\",\n \"parentThumb\": \"https://image.tmdb.org/t/p/original/zIDoU6YZXE3oz9MNBjE2Ld94Xuu.jpg\",\n \"parentGuid\": \"plex://season/5d9c0939e9d5a1001f4def89\",\n \"index\": 2,\n \"originallyAvailableAt\": \"2016-04-02\",\n \"year\": 2016\n }\n ]\n }\n }\n ]\n }\n}\n```\n\n## MediaProvider Response\n\nThis document describes the JSON response schema for Plex-compatible metadata-specific Media Providers.\n\nThe root of the Media Provider must return some necessary attributes which define a metadata provider.\n\n### MediaProvider\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `identifier` | string | Yes | Unique identifier for this media provider |\n| `title` | string | Yes | A human readable title for the media provider |\n| `version` | string | No | The version of the API being called |\n| `Feature` | array | Yes | Array containing the features provided by the media provider |\n\n### `Types` Array (Required)\n\nThis defines what metadata types are supported by the provider.\n\nPlease note that is recommended to support one specific metadata parent type per provider as this will make it easier for consumers to combine this provider with others inside Plex Media Server. This is because in order to combine providers, each provider in a combine group must support the types the other supports as well. Limiting the scope of types will make it more widely compatible.\n\nIf you wish to support both movie and TV Shows, consider creating two separate providers. This isn't a hard requirement but is recommended.\n\nWhen supporting TV Shows, it is necessary to add a type for TV Shows, Seasons and Episodes (i.e. types 2, 3 and 4).\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `type` | integer | Yes | The metadata type represented by its numeric value (see mapping table below) |\n| `Scheme` | array | Yes | Array defining the GUID-scheme (the prefix) for items returned by this provider |\n\n### `Scheme` Array (Required)\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `scheme` | string | Yes | The GUID-scheme. Should be identical to the provider identifier. |\n\n#### Metadata Types Table\n\nCustom metadata provider currently support a subset of the full metadata types outline in the [Metadata Types](#metadata-types) section.\n\n| Type Name | Type Number |\n|-----------|-------------|\n| `movie` | 1 |\n| `show` | 2 |\n| `season` | 3 |\n| `episode` | 4 |\n\n### `Feature` Array (Required)\n\nA feature, as its name implies, defines a feature available to the specific provider.\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `type` | string | Yes | Feature type (see feature table below) |\n| `key` | string | Yes | API endpoint path to call this feature |\n\n#### Available Features\n\n| Type | Required | Description |\n|------|----------|-------------|\n| metadata | Yes | Path to retrieve metadata for a specific piece of content by its id. See Metadata Feature section. |\n| match | Yes | Path to return a potential match for a specific piece of content using contextual hints. See Match Feature section. |\n\n### Example Response\n\n```json\n{\n \"MediaProvider\": {\n \"identifier\": \"tv.plex.agents.custom.johnz.tmdb\",\n \"title\": \"John Z's TV Show Provider\",\n \"version\": \"1.0.0\",\n \"Types\": [\n {\n \"type\": 2,\n \"Scheme\": [\n {\n \"scheme\": \"tv.plex.agents.custom.johnz.tmdb\"\n }\n ]\n },\n {\n \"type\": 3,\n \"Scheme\": [\n {\n \"scheme\": \"tv.plex.agents.custom.johnz.tmdb\"\n }\n ]\n },\n {\n \"type\": 4,\n \"Scheme\": [\n {\n \"scheme\": \"tv.plex.agents.custom.johnz.tmdb\"\n }\n ]\n }\n ],\n \"Feature\": [\n {\n \"type\": \"metadata\",\n \"key\": \"/library/metadata\"\n },\n {\n \"type\": \"match\",\n \"key\": \"/library/metadata/matches\"\n }\n ]\n }\n}\n```\n\n### Defining an identifier\n\nCustom metadata providers need to provide an identifier using a scheme with the `tv.plex.agents.custom.` prefix. A custom provider can choose its own scheme as long as it is prefixed with this value, for example a provider for a custom TheMovieDB implementation might use a scheme like:\n\n`tv.plex.agents.custom.johnz.tmdb`\n\nIt is important to note that you should try and keep the identifier unique as there is no guarantee that it will be the only provider added to a Plex user's server and could conflict with a another existing provider already in use. So avoid using very generic suffixes like `tmdb`, `tvdb`, etc.\n\nThe characters allowed for your suffix is very strict and can only contain ASCII letters, numbers and periods (`regex [a-zA-Z0-9.]`).\n\nThis identifier must be used as the scheme for the Metadata items the provider returns. See [GUID Construction](#guid-construction).\n\n## Metadata Response\n\nThis section describes the JSON response schema for Plex-compatible metadata responses from Media Providers. This does not describe the Metadata response in its entirety only what is required for Media Provider responses.\n\nThe response consists of a `MediaContainer` object that wraps `Metadata` objects representing the movie, TV show, season or episode data.\n\nThe different metadata types may have specific attributes only returned by that type. e.g. Season and episode types will have some attributes specific to their parent like `parentTitle` which would not be serialized by a movie or TV show type.\n\n### MediaContainer\n\nThe root object that contains metadata and pagination information.\n\n| Field | Type | Description |\n|-------|------|-------------|\n| `offset` | integer | The starting position in the result set (always 0 for single items) |\n| `totalSize` | integer | Total number of items in the response (always 1 for single items) |\n| `identifier` | string | The provider identifier (e.g., \"tv.plex.provider.metadata\") |\n| `size` | integer | Number of items in the current response (always 1 for single items) |\n| `Metadata` | array | Array containing a single movie metadata object |\n\n### Metadata Object\n\nThe main object containing all the item information.\n\n#### Core Attributes (applicable to all metadata types)\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `ratingKey` | string | Yes | Unique identifier for this metadata item in Plex |\n| `key` | string | Yes | API endpoint path to retrieve this metadata |\n| `guid` | string | Yes | Global unique identifier in Plex-compatible format. See the 'Guid construction' section. |\n| `type` | string | Yes | Content type (`movie`, `show`, `season` or `episode`) |\n| `title` | string | Yes | The metadata title, e.g. \"Back to the Future\" |\n| `originallyAvailableAt` | string | Yes | Original release date in ISO 8601 format (YYYY-MM-DD) |\n| `thumb` | string | No | A publicly accessible URL to the default poster/thumbnail for the item |\n| `art` | string | No | A publicly accessible URL to the default background artwork for the item |\n| `contentRating` | string | No | Age rating/certification (e.g., \"PG\", \"R\", \"PG-13\"). For non-US ratings please prepend 2-letter country code followed by a forward slash (e.g. za/15) |\n| `originalTitle` | string | No | If the request is made for language that is different to the original language of the release, return the title in its original language. |\n| `titleSort` | string | No | Returned if the content should be sorted by a different value, e.g. \"Quiet Place, A\". This will be added automatically by the media server, so its inclusion is only necessary if you require a specific sorting value which the media server does not accommodate. |\n| `year` | integer | No | Release year |\n| `summary` | string | No | Full plot synopsis |\n| `isAdult` | bool | No | Return `true` for explicit/adult content. |\n\n#### Movie, TV Show and Episode Attributes\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `duration` | integer | No | Runtime in milliseconds |\n\n#### Movie and TV Show Attributes\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `tagline` | string | No | Movie tagline or promotional text |\n| `studio` | string | No | Primary production studio |\n| `theme` | string | No | A publicly accessible URL to an audio snippet of the item's theme music (MP3 only, preferably keep max length to around 30 seconds) |\n\n#### Season and Episode Attributes\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `parentRatingKey` | string | Yes | Unique identifier for parent (the TV show for a season and the season for an episode) metadata item in Plex |\n| `parentKey` | string | Yes | API endpoint path to retrieve the parent metadata |\n| `parentGuid` | string | Yes | Global unique identifier in Plex-compatible format for the parent. See the 'Guid construction' section. |\n| `parentType` | string | Yes | the content type of the parent (i.e. `show` for a season, `season` for an episode) |\n| `parentTitle` | string | Yes | The metadata title of the parent. |\n| `parentThumb` | string | No | A publicly accessible URL to the default poster/thubnail for the parent |\n| `index` | integer | Yes | The item index. For a season this is the season number, for an episode it's the episode number |\n\n#### Episode Attributes\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `grandparentRatingKey` | string | Yes | Unique identifier for grandparent (the TV Show item) metadata item in Plex |\n| `grandparentKey` | string | Yes | API endpoint path to retrieve the grandparent metadata |\n| `grandparentGuid` | string | Yes | Global unique identifier in Plex-compatible format for the grandparent. See the 'Guid construction' section. |\n| `grandparentType` | string | Yes | `show` - the content type of the grandparent |\n| `grandparentTitle` | string | Yes | The metadata title of the grandparent e.g. `Adventure Time` |\n| `grandparentThumb` | string | No | A publicly accessible URL to the default poster/thubnail for the grandparent |\n| `parentIndex` | integer | Yes | The season index, e.g. `8` |\n\n#### `Image` Array (Highly Recommended)\n\nArray of all available image assets in various dimensions.\n\nNot all types are required but it is recommended to supply at least \"coverPoster\" (or \"snapshot\" for episode items) and \"background\". \"clearLogo\" and \"backgroundSquare\" are also utilized inside Plex client applications for movies and TV shows and should be supplied to provide the best experience for these types.\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `type` | string | Yes | Image type: \"background\", \"backgroundSquare\", \"clearLogo\", \"coverPoster\", \"snapshot\" |\n| `url` | string | Yes | Full URL to the image asset |\n| `alt` | string | No | Alt text for accessibility (typically movie title) |\n\n#### `OriginalImage` Array (Recommended)\n\nThe same attributes as `Image` but provides images in the original language of the content if the requested language doesn't match the original language.\n\n#### `Genre` Array (Recommended)\n\nArray of genres associated with the content.\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `tag` | string | Yes | Display name of the genre (e.g. \"Action\") |\n| `originalTag` | string | No | Original language of genre name if request is made in a language different from the original |\n\n#### `Guid` Array (Optional)\n\nArray of external identifier mappings. This is very useful to provide exact mappings to other metadata providers which can improve matching accuracy and speed when combining multiple metadata providers.\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `id` | string | Yes | External ID in format \"provider://id\" (e.g., \"imdb://tt0088763\", \"tmdb://105\") |\n\nInternally supported providers include:\n- `imdb` - IMDb\n- `tmdb` - TheMovieDB\n- `tvdb` - TVDB\n\n#### `Country` Array (Optional)\n\nArray of production countries.\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `tag` | string | Yes | Full country name |\n\n#### People\n\nThere are common attributes among `Role`, `Producer`, `Director` and `Writer` arrays.\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `tag` | string | Yes | Person's full name |\n| `thumb` | string | No | URL to person's photo |\n| `role` | string | No | Character name or role description |\n| `order` | integer | No | Display order in cast list |\n\n#### `Role` Array (Recommended)\n\nArray of cast members and their characters.\n\nSee \"People\" section for attributes.\n\n#### `Director` Array (Recommended)\n\nArray of directors.\n\nSee \"People\" section for attributes.\n\n#### `Producer` Array (Recommended)\n\nArray of producers.\n\nSee \"People\" section for attributes.\n\n#### `Writer` Array (Recommended)\n\nArray of writers/screenwriters.\n\nSee \"People\" section for attributes.\n\n#### `Similar` Array (Optional)\n\nArray of similar titles.\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `guid` | string | Yes | GUID for the similar movie |\n| `tag` | string | No | Title of the similar movie |\n\n#### `Studio` Array (Optional)\n\nArray of production studios and companies.\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `tag` | string | Yes | Studio/company name |\n\n#### `Rating` Array (Optional)\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `image` | string | Yes | Image identifier for critic rating badge (see supported identifiers below) |\n| `type` | string | Yes | `audience` or `critic` - always `audience` for user-generated ratings |\n| `value` | float | Yes | The rating represented by a floating point value between 0 and 10 |\n\n#### Rating image identifiers\n\nThese are built-in mappings to display the appropriate badge inside the Plex client. Adding new types is not currently supported.\n\n| Identifier | Source |\n|------------|--------|\n| `imdb://image.rating` | IMDb ratings |\n| `themoviedb://image.rating` | TheMovieDb ratings |\n| `rottentomatoes://image.rating.ripe` | Rotten Tomatoes for critic ratings |\n| `rottentomatoes://image.rating.upright` | Rotten Tomatoes for audience ratings |\n\n#### `Network` Array (Optional)\n\nTV Shows only.\n\nArray of television networks that the TV Show originally aired on.\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `tag` | string | Yes | Network name |\n\n#### `SeasonType` Array (Optional)\n\nTV Shows only.\n\nThe provider must support the `episodeOrdering` query parameter to use this.\n\nArray of available episode orderings for a specific TV Show e.g. (\"DVD Order\", \"Airing Order\", etc.).\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `id` | string | Yes | Unique identifier for the SeasonType, used as query parameter when making requests for TV Shows. ASCII characters only (e.g. \"blurayOrder\") |\n| `source` | string | Yes | The source of the data, e.g. \"tmdb\" |\n| `tag` | string | Yes | A human readable descriptor for the SeasonType, e.g. \"Bluray\" or \"Airing\" |\n| `title` | string | Yes | A full description for the SeasonType as shown in the Plex UI (e.g. \"TheMovieDB (Netflix Order)\") |\n\n#### `Children` Object\n\nThis is required to be supported for TV Shows and Seasons and should only be returned when a request with `includeChildren=1` is passed.\n\nThis is a simplified `MediaContainer` object inside a `Metadata` object which provides an array of child items for the parent object (i.e. when requesting a TV Show, `Children` will contain the list of Seasons of that TV Show).\n\nNote: it is expected that all the child objects be returned in this array. In some edge cases this may result in very large arrays. Please see fit to ensure your provider can handle this and simplify the child objects with only the required attributes if necessary.\n\n| Field | Type | Description |\n|-------|------|-------------|\n| `size` | integer | Number of items in the `Metadata` array |\n| `Metadata` | array | Array containing all child `Metadata` objects |\n\n### GUID construction\n\nPlex-compatible GUIDs are constructed out of the following components:\n\n`{scheme}://{metadataType}/{ratingKey}`\n\nFor an item from the Plex metadata provider this will look something like this:\n\n`plex://movie/5d7768244de0ee001fcc7fed`\n\n#### `Scheme` component\n\nCustom metadata providers need to provide a GUID in this same format using a scheme with the `tv.plex.agents.custom.` prefix. The scheme should match the metadata provider's `identifier` (see [Defining an identifier](#defining-an-identifier)), for example a provider for a custom TheMovieDB implementation might use a scheme like:\n\n`tv.plex.agents.custom.johnz.tmdb`\n\n#### `metadataType` component\n\nThis should just be the string representation of the metadata type being returned, i.e. `movie`, `show`, `season` or `episode`.\n\n#### `ratingKey` component\n\nThis value should match the `ratingKey` attribute on the metadata item and is what is used when making a metadata request to the provider (e.g. `http://localhost/library/metadata/{ratingKey}`).\n\nThe `ratingKey` can constist of ASCII letters, numbers, dashes and underscores (`regex [a-zA-Z0-9_-]`).\n\n#### Custom GUID examples\n\nSome valid GUIDs could look like this:\n\n- `tv.plex.agents.custom.johnz.tmdb://movie/tmdb-movie-19934`\n- `tv.plex.agents.custom.barkley.tvdb://show/78874`\n- `tv.plex.agents.custom.finn.imdb://movie/tt0379786`\n\n### Example Responses\n\n#### Movie Type\n```json\n{\n \"MediaContainer\": {\n \"offset\": 0,\n \"totalSize\": 1,\n \"identifier\": \"tv.plex.provider.metadata\",\n \"size\": 1,\n \"Metadata\": [\n {\n \"art\": \"https://metadata-static.plex.tv/d/gracenote/dc6be8ceb098b8e14a708786ea071c6e.jpg\",\n \"guid\": \"plex://movie/5d7768244de0ee001fcc7fed\",\n \"key\": \"/library/metadata/5d7768244de0ee001fcc7fed\",\n \"ratingKey\": \"5d7768244de0ee001fcc7fed\",\n \"studio\": \"Universal Pictures\",\n \"summary\": \"Marty McFly, a typical American teenager of the Eighties, is accidentally sent back to 1955 in a plutonium-powered DeLorean \\\"time machine\\\" invented by a slightly mad scientist. During his often hysterical, always amazing trip back in time, Marty must make sure his teenage parents-to-be meet and fall in love to get back to the future.\",\n \"tagline\": \"He was never in time for his classes... He wasn't in time for his dinner... Then one day... he wasn't in his time at all.\",\n \"type\": \"movie\",\n \"thumb\": \"https://metadata-static.plex.tv/9/gracenote/9cf50a3c04a44ff7d53e1134222e3929.jpg\",\n \"duration\": 6960000,\n \"title\": \"Back to the Future\",\n \"contentRating\": \"PG\",\n \"originallyAvailableAt\": \"1985-07-03\",\n \"year\": 1985,\n \"Image\": [\n {\n \"alt\": \"Back to the Future\",\n \"type\": \"background\",\n \"url\": \"https://metadata-static.plex.tv/d/gracenote/dc6be8ceb098b8e14a708786ea071c6e.jpg\"\n },\n {\n \"alt\": \"Back to the Future\",\n \"type\": \"backgroundSquare\",\n \"url\": \"https://metadata-static.plex.tv/a/gracenote/ab63d5222db8e9b9c319b478f81bf1b6.jpg\"\n },\n {\n \"alt\": \"Back to the Future\",\n \"type\": \"clearLogo\",\n \"url\": \"https://metadata-static.plex.tv/f/683a142553/f44fe9b4a2cb1a6eb3eadbd22eb09add.png\"\n },\n {\n \"alt\": \"Back to the Future\",\n \"type\": \"coverPoster\",\n \"url\": \"https://metadata-static.plex.tv/9/gracenote/9cf50a3c04a44ff7d53e1134222e3929.jpg\"\n }\n ],\n \"Genre\": [\n {\n \"tag\": \"Adventure\",\n },\n {\n \"tag\": \"Comedy\",\n },\n {\n \"tag\": \"Science Fiction\",\n }\n ],\n \"Guid\": [\n {\n \"id\": \"imdb://tt0088763\"\n },\n {\n \"id\": \"tmdb://105\"\n },\n {\n \"id\": \"tvdb://299\"\n }\n ],\n \"Rating\": [\n {\n \"image\": \"imdb://image.rating\",\n \"type\": \"audience\",\n \"value\": 8.5\n },\n {\n \"image\": \"rottentomatoes://image.rating.ripe\",\n \"type\": \"critic\",\n \"value\": 9.3\n },\n {\n \"image\": \"rottentomatoes://image.rating.upright\",\n \"type\": \"audience\",\n \"value\": 9.5\n },\n {\n \"image\": \"themoviedb://image.rating\",\n \"type\": \"audience\",\n \"value\": 8.321\n }\n ],\n \"Country\": [\n {\n \"tag\": \"United States of America\"\n }\n ],\n \"Role\": [\n {\n \"order\": 1,\n \"tag\": \"Michael J. Fox\",\n \"thumb\": \"https://metadata-static.plex.tv/8/people/835031cfa837a2bee58d4c0c345f617b.jpg\",\n \"role\": \"Marty McFly\"\n },\n {\n \"order\": 2,\n \"tag\": \"Christopher Lloyd\",\n \"thumb\": \"https://metadata-static.plex.tv/2/people/21ab248996f621004036e057a1bad43e.jpg\",\n \"role\": \"Emmett Brown\"\n },\n {\n \"order\": 3,\n \"tag\": \"Crispin Glover\",\n \"thumb\": \"https://metadata-static.plex.tv/4/people/490bb62cd498add695195a06dd0ca87e.jpg\",\n \"role\": \"George McFly\"\n },\n {\n \"order\": 4,\n \"tag\": \"Lea Thompson\",\n \"thumb\": \"https://metadata-static.plex.tv/1/people/170afcdfe5b74c88f5ea5f74a31d107d.jpg\",\n \"role\": \"Lorraine Baines\"\n }\n ],\n \"Director\": [\n {\n \"tag\": \"Robert Zemeckis\",\n \"thumb\": \"https://metadata-static.plex.tv/b/people/b6a7e4d5e61c2c4613be3ece75dace8e.jpg\",\n \"role\": \"Director\"\n }\n ],\n \"Producer\": [\n {\n \"tag\": \"Neil Canton\",\n \"thumb\": \"https://metadata-static.plex.tv/4/people/481b0c2f5f012c3a532e2bf48fef1d80.jpg\",\n \"role\": \"Producer\"\n },\n {\n \"tag\": \"Bob Gale\",\n \"thumb\": \"https://metadata-static.plex.tv/people/5d7768244de0ee001fcc80b8.jpg\",\n \"role\": \"Producer\"\n }\n ],\n \"Writer\": [\n {\n \"tag\": \"Robert Zemeckis\",\n \"thumb\": \"https://metadata-static.plex.tv/b/people/b6a7e4d5e61c2c4613be3ece75dace8e.jpg\",\n \"role\": \"Writer\"\n },\n {\n \"tag\": \"Bob Gale\",\n \"thumb\": \"https://metadata-static.plex.tv/people/5d7768244de0ee001fcc80b8.jpg\",\n \"role\": \"Writer\"\n }\n ],\n \"Similar\": [\n {\n \"guid\": \"plex://movie/5d776d1023d5a3001f52001d\",\n \"tag\": \"Back to the Future Part II\"\n },\n {\n \"guid\": \"plex://movie/5d776d1723d5a3001f520400\",\n \"tag\": \"The Karate Kid\"\n },\n {\n \"guid\": \"plex://movie/5d776d10fb0d55001f596237\",\n \"tag\": \"Back to the Future Part III\"\n },\n {\n \"guid\": \"plex://movie/5d77682a6f4521001ea99e2c\",\n \"tag\": \"The Breakfast Club\"\n }\n ],\n \"Studio\": [\n {\n \"tag\": \"Universal Pictures\"\n },\n {\n \"tag\": \"Amblin Entertainment\"\n }\n ]\n }\n ]\n }\n}\n```\n\n#### Show Type\n\n```json\n{\n \"MediaContainer\": {\n \"offset\": 0,\n \"totalSize\": 1,\n \"identifier\": \"tv.plex.provider.metadata\",\n \"size\": 1,\n \"Metadata\": [\n {\n \"art\": \"https://image.tmdb.org/t/p/original/3uE9SUywNbj1qSAuYCGgbTTYku5.jpg\",\n \"guid\": \"plex://show/5d9c07f72df347001e3a70b4\",\n \"key\": \"/library/metadata/5d9c07f72df347001e3a70b4/children\",\n \"ratingKey\": \"5d9c07f72df347001e3a70b4\",\n \"studio\": \"Frederator Studios\",\n \"summary\": \"Unlikely heroes Finn and Jake are buddies who traverse the mystical Land of Ooo. The best of friends, our heroes always find themselves in the middle of escapades. Finn and Jake depend on each other through thick and thin.\",\n \"type\": \"show\",\n \"theme\": \"https://tvthemes.plexapp.com/152831.mp3\",\n \"thumb\": \"https://image.tmdb.org/t/p/original/qk3eQ8jW4opJ48gFWYUXWaMT4l.jpg\",\n \"duration\": 660000,\n \"title\": \"Adventure Time\",\n \"contentRating\": \"TV-PG\",\n \"originallyAvailableAt\": \"2010-04-05\",\n \"year\": 2010,\n \"Image\": [\n {\n \"alt\": \"Adventure Time\",\n \"type\": \"background\",\n \"url\": \"https://image.tmdb.org/t/p/original/3uE9SUywNbj1qSAuYCGgbTTYku5.jpg\"\n },\n {\n \"alt\": \"Adventure Time\",\n \"type\": \"backgroundSquare\",\n \"url\": \"https://metadata-static.plex.tv/1/gracenote/1c09b028e1b15c0325917c51966a47d7.jpg\"\n },\n {\n \"alt\": \"Adventure Time\",\n \"type\": \"clearLogo\",\n \"url\": \"https://metadata-static.plex.tv/9/683a142553/9bf0c95f0dede66fce0e507fbfedc653.png\"\n },\n {\n \"alt\": \"Adventure Time\",\n \"type\": \"coverPoster\",\n \"url\": \"https://image.tmdb.org/t/p/original/qk3eQ8jW4opJ48gFWYUXWaMT4l.jpg\"\n }\n ],\n \"Genre\": [\n {\n \"tag\": \"Animation\"\n },\n {\n \"tag\": \"Comedy\"\n },\n {\n \"tag\": \"Action\"\n },\n {\n \"tag\": \"Adventure\"\n },\n {\n \"tag\": \"Family\"\n },\n {\n \"tag\": \"Fantasy\"\n },\n {\n \"tag\": \"Science Fiction\"\n },\n {\n \"tag\": \"Sci-Fi & Fantasy\"\n },\n {\n \"tag\": \"Children\"\n }\n ],\n \"Guid\": [\n {\n \"id\": \"imdb://tt1305826\"\n },\n {\n \"id\": \"tmdb://15260\"\n },\n {\n \"id\": \"tvdb://152831\"\n }\n ],\n \"Rating\": [\n {\n \"image\": \"imdb://image.rating\",\n \"type\": \"audience\",\n \"value\": 8.6\n },\n {\n \"image\": \"rottentomatoes://image.rating.ripe\",\n \"type\": \"critic\",\n \"value\": 10\n },\n {\n \"image\": \"rottentomatoes://image.rating.upright\",\n \"type\": \"audience\",\n \"value\": 9.4\n },\n {\n \"image\": \"themoviedb://image.rating\",\n \"type\": \"audience\",\n \"value\": 8.504\n }\n ],\n \"Country\": [\n {\n \"tag\": \"United States of America\"\n }\n ],\n \"Role\": [\n {\n \"order\": 1,\n \"tag\": \"Jeremy Shada\",\n \"thumb\": \"https://metadata-static.plex.tv/b/people/ba6413846e4fc49884ec7694d012b198.jpg\",\n \"role\": \"Finn the Human (voice)\"\n },\n {\n \"order\": 2,\n \"tag\": \"John DiMaggio\",\n \"thumb\": \"https://metadata-static.plex.tv/0/people/0a945543418d442fea7ae4948b2a2fda.jpg\",\n \"role\": \"Jake the Dog (voice)\"\n },\n {\n \"order\": 3,\n \"tag\": \"Tom Kenny\",\n \"thumb\": \"https://metadata-static.plex.tv/7/people/7a7654471f4b87c2f8ce757357e860b5.jpg\",\n \"role\": \"Ice King (voice)\"\n },\n {\n \"order\": 4,\n \"tag\": \"Hynden Walch\",\n \"thumb\": \"https://metadata-static.plex.tv/b/people/b2588be9b38393facd27de7fc4081720.jpg\",\n \"role\": \"Princess Bubblegum (voice)\"\n },\n {\n \"order\": 5,\n \"tag\": \"Olivia Olson\",\n \"thumb\": \"https://metadata-static.plex.tv/4/people/4eec0b6c6d36f6c4cd0574af354d74aa.jpg\",\n \"role\": \"Marceline the Vampire Queen (voice)\"\n }\n ],\n \"Director\": [\n {\n \"tag\": \"Larry Leichliter\",\n \"role\": \"Director\"\n },\n {\n \"tag\": \"Adam Muto\",\n \"thumb\": \"https://metadata-static.plex.tv/e/people/e385c2d25614f10d505701e5f590372a.jpg\",\n \"role\": \"Director\"\n }\n ],\n \"Producer\": [\n {\n \"tag\": \"Derek Drymon\",\n \"thumb\": \"https://metadata-static.plex.tv/c/people/cb057ffd3860076eb0f0c1fb55c8fef1.jpg\",\n \"role\": \"Producer\"\n },\n {\n \"tag\": \"Kelly Crews\",\n \"role\": \"Producer\"\n }\n ],\n \"Writer\": [\n {\n \"tag\": \"Tim McKeon\",\n \"role\": \"Writer\"\n },\n {\n \"tag\": \"Sean Jimenez\",\n \"role\": \"Writer\"\n }\n ],\n \"Network\": [\n {\n \"tag\": \"Cartoon Network\"\n }\n ],\n \"SeasonType\": [\n {\n \"id\": \"tmdbAiring\",\n \"source\": \"tmdb\",\n \"tag\": \"Aired\",\n \"title\": \"The Movie Database (Aired)\"\n },\n {\n \"id\": \"tvdbAiring\",\n \"source\": \"tvdb\",\n \"tag\": \"Aired\",\n \"title\": \"TheTVDB (Aired)\"\n },\n {\n \"id\": \"tvdbDvd\",\n \"source\": \"tvdb\",\n \"tag\": \"DVD\",\n \"title\": \"TheTVDB (DVD)\"\n },\n {\n \"id\": \"tvdbAbsolute\",\n \"source\": \"tvdb\",\n \"tag\": \"Absolute\",\n \"title\": \"TheTVDB (Absolute)\"\n }\n ],\n \"Similar\": [\n {\n \"guid\": \"plex://show/611cdc357032b6002cb92e97\",\n \"tag\": \"Adventure Time: Fionna & Cake\"\n },\n {\n \"guid\": \"plex://show/5d9c0875ba6eb9001fba4e43\",\n \"tag\": \"Johnny Bravo\"\n },\n {\n \"guid\": \"plex://show/5d9c084de264b7001fc4088c\",\n \"tag\": \"Regular Show\"\n }\n ],\n \"Studio\": [\n {\n \"tag\": \"Frederator Studios\"\n },\n {\n \"tag\": \"Cartoon Network Studios\"\n }\n ]\n }\n ]\n }\n}\n```\n\n#### Season Type (with `Children`)\n\n```json\n{\n \"MediaContainer\": {\n \"offset\": 0,\n \"totalSize\": 1,\n \"identifier\": \"tv.plex.provider.metadata\",\n \"size\": 1,\n \"Metadata\": [\n {\n \"guid\": \"plex://season/602e59ccfdd281002cddb790\",\n \"key\": \"/library/metadata/602e59ccfdd281002cddb790/children\",\n \"ratingKey\": \"602e59ccfdd281002cddb790\",\n \"type\": \"season\",\n \"thumb\": \"http://assets.fanart.tv/fanart/tv/152831/seasonposter/adventure-time-with-finn-and-jake-5c8d180f9b002.jpg\",\n \"title\": \"Season 10\",\n \"parentTitle\": \"Adventure Time\",\n \"parentType\": \"show\",\n \"parentArt\": \"https://image.tmdb.org/t/p/original/3uE9SUywNbj1qSAuYCGgbTTYku5.jpg\",\n \"parentThumb\": \"https://image.tmdb.org/t/p/original/qk3eQ8jW4opJ48gFWYUXWaMT4l.jpg\",\n \"parentRatingKey\": \"5d9c07f72df347001e3a70b4\",\n \"parentGuid\": \"plex://show/5d9c07f72df347001e3a70b4\",\n \"parentKey\": \"/library/metadata/5d9c07f72df347001e3a70b4\",\n \"index\": 10,\n \"contentRating\": \"TV-PG\",\n \"originallyAvailableAt\": \"2017-09-17\",\n \"year\": 2017,\n \"Image\": [\n {\n \"alt\": \"Season 10\",\n \"type\": \"background\",\n \"url\": \"https://image.tmdb.org/t/p/original/3uE9SUywNbj1qSAuYCGgbTTYku5.jpg\"\n },\n {\n \"alt\": \"Season 10\",\n \"type\": \"backgroundSquare\",\n \"url\": \"https://metadata-static.plex.tv/1/gracenote/1c09b028e1b15c0325917c51966a47d7.jpg\"\n },\n {\n \"alt\": \"Season 10\",\n \"type\": \"coverPoster\",\n \"url\": \"http://assets.fanart.tv/fanart/tv/152831/seasonposter/adventure-time-with-finn-and-jake-5c8d180f9b002.jpg\"\n }\n ],\n \"Guid\": [\n {\n \"id\": \"tvdb://1823714\"\n }\n ],\n \"Children\": {\n \"size\": 2,\n \"Metadata\": [\n {\n \"guid\": \"plex://episode/5d9c0b7ee98e47001eb2e3a0\",\n \"key\": \"/library/metadata/5d9c0b7ee98e47001eb2e3a0\",\n \"ratingKey\": \"5d9c0b7ee98e47001eb2e3a0\",\n \"summary\": \"A fierce creature is terrorizing the Candy Kingdom but before Finn can slay the beast, he must first overcome a guilty conscience.\",\n \"type\": \"episode\",\n \"thumb\": \"https://image.tmdb.org/t/p/original/qgKsxcwvkDbAIjUceuDrv2AgtOF.jpg\",\n \"duration\": 660000,\n \"title\": \"The Wild Hunt\",\n \"grandparentTitle\": \"Adventure Time\",\n \"grandparentType\": \"show\",\n \"grandparentArt\": \"https://image.tmdb.org/t/p/original/3uE9SUywNbj1qSAuYCGgbTTYku5.jpg\",\n \"grandparentThumb\": \"https://image.tmdb.org/t/p/original/qk3eQ8jW4opJ48gFWYUXWaMT4l.jpg\",\n \"grandparentRatingKey\": \"5d9c07f72df347001e3a70b4\",\n \"grandparentGuid\": \"plex://show/5d9c07f72df347001e3a70b4\",\n \"grandparentKey\": \"/library/metadata/5d9c07f72df347001e3a70b4\",\n \"parentTitle\": \"Season 10\",\n \"parentType\": \"season\",\n \"parentArt\": \"https://metadata-static.plex.tv/9/gracenote/9e06ae7ff36bd8d62fa1600287f80794.jpg\",\n \"parentThumb\": \"https://image.tmdb.org/t/p/original/w8mYplN3ysIJ5DIYYgmfGTvuNzd.jpg\",\n \"parentRatingKey\": \"5d9c0939e9d5a1001f4def80\",\n \"parentGuid\": \"plex://season/5d9c0939e9d5a1001f4def80\",\n \"parentKey\": \"/library/metadata/5d9c0939e9d5a1001f4def80\",\n \"index\": 1,\n \"parentIndex\": 10,\n \"contentRating\": \"TV-PG\",\n \"originallyAvailableAt\": \"2017-09-17\",\n \"year\": 2017,\n \"Image\": [\n {\n \"alt\": \"The Wild Hunt\",\n \"type\": \"snapshot\",\n \"url\": \"https://image.tmdb.org/t/p/original/qgKsxcwvkDbAIjUceuDrv2AgtOF.jpg\"\n }\n ],\n \"Guid\": [\n {\n \"id\": \"imdb://tt7308394\"\n },\n {\n \"id\": \"tmdb://1418023\"\n },\n {\n \"id\": \"tvdb://6179251\"\n }\n ],\n \"Rating\": [\n {\n \"image\": \"imdb://image.rating\",\n \"type\": \"audience\",\n \"value\": 8.3\n },\n {\n \"image\": \"themoviedb://image.rating\",\n \"type\": \"audience\",\n \"value\": 7.9\n }\n ],\n \"Role\": [\n {\n \"order\": 1,\n \"tag\": \"Jeremy Shada\",\n \"thumb\": \"https://metadata-static.plex.tv/b/people/ba6413846e4fc49884ec7694d012b198.jpg\",\n \"role\": \"Finn the Human (voice)\"\n },\n {\n \"order\": 2,\n \"tag\": \"John DiMaggio\",\n \"thumb\": \"https://metadata-static.plex.tv/0/people/0a945543418d442fea7ae4948b2a2fda.jpg\",\n \"role\": \"Jake the Dog (voice)\"\n }\n ],\n \"Producer\": [\n {\n \"tag\": \"Adam Muto\",\n \"thumb\": \"https://metadata-static.plex.tv/e/people/e385c2d25614f10d505701e5f590372a.jpg\",\n \"role\": \"Producer\"\n }\n ],\n \"Writer\": [\n {\n \"tag\": \"Pendleton Ward\",\n \"thumb\": \"https://metadata-static.plex.tv/8/people/83eb3402f017498e3a0fd5e44af8d1ae.jpg\",\n \"role\": \"Creator\"\n }\n ]\n },\n {\n \"guid\": \"plex://episode/5d9c0b7ee98e47001eb2e38b\",\n \"key\": \"/library/metadata/5d9c0b7ee98e47001eb2e38b\",\n \"ratingKey\": \"5d9c0b7ee98e47001eb2e38b\",\n \"summary\": \"BMO and Ice King hit the road as door to door salesmen and stumble upon an irresistible opportunity.\",\n \"type\": \"episode\",\n \"thumb\": \"https://image.tmdb.org/t/p/original/fvREJ2bNoXM2WAGVPCGa3ryQtJs.jpg\",\n \"duration\": 660000,\n \"title\": \"Always BMO Closing\",\n \"grandparentTitle\": \"Adventure Time\",\n \"grandparentType\": \"show\",\n \"grandparentArt\": \"https://image.tmdb.org/t/p/original/3uE9SUywNbj1qSAuYCGgbTTYku5.jpg\",\n \"grandparentThumb\": \"https://image.tmdb.org/t/p/original/qk3eQ8jW4opJ48gFWYUXWaMT4l.jpg\",\n \"grandparentRatingKey\": \"5d9c07f72df347001e3a70b4\",\n \"grandparentGuid\": \"plex://show/5d9c07f72df347001e3a70b4\",\n \"grandparentKey\": \"/library/metadata/5d9c07f72df347001e3a70b4\",\n \"parentTitle\": \"Season 10\",\n \"parentType\": \"season\",\n \"parentArt\": \"https://metadata-static.plex.tv/9/gracenote/9e06ae7ff36bd8d62fa1600287f80794.jpg\",\n \"parentThumb\": \"https://image.tmdb.org/t/p/original/w8mYplN3ysIJ5DIYYgmfGTvuNzd.jpg\",\n \"parentRatingKey\": \"5d9c0939e9d5a1001f4def80\",\n \"parentGuid\": \"plex://season/5d9c0939e9d5a1001f4def80\",\n \"parentKey\": \"/library/metadata/5d9c0939e9d5a1001f4def80\",\n \"index\": 2,\n \"parentIndex\": 10,\n \"contentRating\": \"TV-PG\",\n \"originallyAvailableAt\": \"2017-09-17\",\n \"year\": 2017,\n \"Image\": [\n {\n \"alt\": \"Always BMO Closing\",\n \"type\": \"snapshot\",\n \"url\": \"https://image.tmdb.org/t/p/original/fvREJ2bNoXM2WAGVPCGa3ryQtJs.jpg\"\n }\n ],\n \"Guid\": [\n {\n \"id\": \"imdb://tt7308402\"\n },\n {\n \"id\": \"tmdb://1418024\"\n },\n {\n \"id\": \"tvdb://6305580\"\n }\n ],\n \"Rating\": [\n {\n \"image\": \"imdb://image.rating\",\n \"type\": \"audience\",\n \"value\": 7.6\n },\n {\n \"image\": \"themoviedb://image.rating\",\n \"type\": \"audience\",\n \"value\": 6.7\n }\n ],\n \"Role\": [\n {\n \"order\": 1,\n \"tag\": \"Jeremy Shada\",\n \"thumb\": \"https://metadata-static.plex.tv/b/people/ba6413846e4fc49884ec7694d012b198.jpg\",\n \"role\": \"Finn the Human (voice)\"\n },\n {\n \"order\": 2,\n \"tag\": \"John DiMaggio\",\n \"thumb\": \"https://metadata-static.plex.tv/0/people/0a945543418d442fea7ae4948b2a2fda.jpg\",\n \"role\": \"Jake the Dog (voice)\"\n }\n ],\n \"Producer\": [\n {\n \"tag\": \"Adam Muto\",\n \"thumb\": \"https://metadata-static.plex.tv/e/people/e385c2d25614f10d505701e5f590372a.jpg\",\n \"role\": \"Producer\"\n }\n ],\n \"Writer\": [\n {\n \"tag\": \"Pendleton Ward\",\n \"thumb\": \"https://metadata-static.plex.tv/8/people/83eb3402f017498e3a0fd5e44af8d1ae.jpg\",\n \"role\": \"Creator\"\n }\n ]\n }\n ]\n }\n }\n ]\n }\n}\n```\n\n#### Episode Type\n\n```json\n{\n \"MediaContainer\": {\n \"offset\": 0,\n \"totalSize\": 1,\n \"identifier\": \"tv.plex.provider.metadata\",\n \"size\": 1,\n \"Metadata\": [\n {\n \"guid\": \"plex://episode/5d9c0b7ee98e47001eb2e3a0\",\n \"key\": \"/library/metadata/5d9c0b7ee98e47001eb2e3a0\",\n \"ratingKey\": \"5d9c0b7ee98e47001eb2e3a0\",\n \"summary\": \"A fierce creature is terrorizing the Candy Kingdom but before Finn can slay the beast, he must first overcome a guilty conscience.\",\n \"type\": \"episode\",\n \"thumb\": \"https://image.tmdb.org/t/p/original/qgKsxcwvkDbAIjUceuDrv2AgtOF.jpg\",\n \"duration\": 660000,\n \"title\": \"The Wild Hunt\",\n \"grandparentTitle\": \"Adventure Time\",\n \"grandparentType\": \"show\",\n \"grandparentArt\": \"https://image.tmdb.org/t/p/original/3uE9SUywNbj1qSAuYCGgbTTYku5.jpg\",\n \"grandparentThumb\": \"https://image.tmdb.org/t/p/original/qk3eQ8jW4opJ48gFWYUXWaMT4l.jpg\",\n \"grandparentRatingKey\": \"5d9c07f72df347001e3a70b4\",\n \"grandparentGuid\": \"plex://show/5d9c07f72df347001e3a70b4\",\n \"grandparentKey\": \"/library/metadata/5d9c07f72df347001e3a70b4\",\n \"parentTitle\": \"Season 10\",\n \"parentType\": \"season\",\n \"parentArt\": \"https://metadata-static.plex.tv/9/gracenote/9e06ae7ff36bd8d62fa1600287f80794.jpg\",\n \"parentThumb\": \"https://image.tmdb.org/t/p/original/w8mYplN3ysIJ5DIYYgmfGTvuNzd.jpg\",\n \"parentRatingKey\": \"5d9c0939e9d5a1001f4def80\",\n \"parentGuid\": \"plex://season/5d9c0939e9d5a1001f4def80\",\n \"parentKey\": \"/library/metadata/5d9c0939e9d5a1001f4def80\",\n \"index\": 1,\n \"parentIndex\": 10,\n \"contentRating\": \"TV-PG\",\n \"originallyAvailableAt\": \"2017-09-17\",\n \"year\": 2017,\n \"Image\": [\n {\n \"alt\": \"The Wild Hunt\",\n \"type\": \"snapshot\",\n \"url\": \"https://image.tmdb.org/t/p/original/qgKsxcwvkDbAIjUceuDrv2AgtOF.jpg\"\n }\n ],\n \"Guid\": [\n {\n \"id\": \"imdb://tt7308394\"\n },\n {\n \"id\": \"tmdb://1418023\"\n },\n {\n \"id\": \"tvdb://6179251\"\n }\n ],\n \"Rating\": [\n {\n \"image\": \"imdb://image.rating\",\n \"type\": \"audience\",\n \"value\": 8.3\n },\n {\n \"image\": \"themoviedb://image.rating\",\n \"type\": \"audience\",\n \"value\": 7.9\n }\n ],\n \"Role\": [\n {\n \"order\": 1,\n \"tag\": \"Jeremy Shada\",\n \"thumb\": \"https://metadata-static.plex.tv/b/people/ba6413846e4fc49884ec7694d012b198.jpg\",\n \"role\": \"Finn the Human (voice)\"\n },\n {\n \"order\": 2,\n \"tag\": \"John DiMaggio\",\n \"thumb\": \"https://metadata-static.plex.tv/0/people/0a945543418d442fea7ae4948b2a2fda.jpg\",\n \"role\": \"Jake the Dog (voice)\"\n }\n ],\n \"Producer\": [\n {\n \"tag\": \"Adam Muto\",\n \"thumb\": \"https://metadata-static.plex.tv/e/people/e385c2d25614f10d505701e5f590372a.jpg\",\n \"role\": \"Producer\"\n }\n ],\n \"Writer\": [\n {\n \"tag\": \"Pendleton Ward\",\n \"thumb\": \"https://metadata-static.plex.tv/8/people/83eb3402f017498e3a0fd5e44af8d1ae.jpg\",\n \"role\": \"Creator\"\n }\n ]\n }\n ]\n }\n}\n\n```\n\n## Media Queries\n\nMedia 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.\n\n### Fields\n\nQueries reference fields, which can be of a few types:\n\n - *integer*: numbers\n - *boolean*: true/false\n - *tag*: integers representing tag IDs.\n - *string*: strings\n - *date*: epoch seconds\n - *language*: string in ISO639-2b format.\n\nThese fields are detailed in `Field` elements in the section description endpoint (e.g. `/library/sections/X?includeDetails=1`).\n\n### Operators\n\nGiven 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.\n\nOperators are defined per type:\n\n - *integer*: `=` (equals), `!=` (not equals), `>>=` (greater than), `<<=` (less than), `<=` (less than or equals), `>=` (greater than or equals)\n - *boolean*: `=0` (false) and `=1` (true)\n - *tag*: `=` (is) and `!=` (is not)\n - *string*: `=` (contains), `!=` (does not contain), `==` (equals), `!==` (does not equal), `<=` (begins with), `>=` (ends with)\n - *date*: `=` (equals), `!=` (not equals), `>>=` (after), `<<=` (before)\n - *language*: `=` (equals), `!=` (not equals)\n\n### Relative Values and Units\n\nFor 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).\n\nIn addition, the following unit suffixes can be used on date values:\n\n - *m*: minutes\n - *h*: hours\n - *d*: days\n - *w*: weeks\n - *mon*: months\n - *y*: years\n\nFor example, `>>=-3y` means “within the last 3 years”.\n\n### Field Scoping\n\nSome 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.\n\n - A `type` parameter must be included to specify the result type.\n - Any non-qualified field is defaulted to refer to the result type.\n - In order to refer to other levels of the hierarchy, use the scoping operator, e.g. `show.title` or `episode.year`. A query may be comprised of multiple fields from different levels of the hierarchy.\n - the `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”.\n\n### Sorting\n\nThe `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.\n\nFor example, `sort=title,index` means “sort first by title ascending, then by index”. Sort features are:\n\n - *desc*: indicates a descending sort.\n - *nullsLast*: indicates that null values are sorted last.\n\nSort features may be mixed and matched, e.g. `sort=title,index:desc`.\n\n### Grouping\n\nThe `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.\n\n### Limits\n\nThe `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_.\n\n### Boolean Operators\n\nGiven 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”.\n\nWe 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)`.\n\n### Complex Expressions\n\nThere'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:\n\n - *push=1* and *pop=1*: These are the equivalent of opening and closing parenthesis.\n - *or=1*: These is an explicit OR operator.\n\nAs 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.\n\nHappy query building!\n\n## Profile Augmentations\n\nThe universal transcode endpoint supports the following header or query string parameter: ```X-Plex-Client-Profile-Extra```.\n\nThe value of this parameter is url-encoded. When url-decoded, it consists of a string expressed in the following (poor man's) BNF grammar:\n\n```\n<ProfileExtension> ::= <Directive> \"+\" <Directive>*\n<Directive> :: = <Verb> <Arguments>\n<Verb> ::= \"add-direct-play-profile\" | \"add-limitation\" | \"add-transcode-target-codec\" | \"append-transcode-target-codec\" | \"add-transcode-target\" | \"add-settings\"\n<Arguments> ::= \"(\" (<Name> \"=\" <Value>) \"&\")*\n<Name> ::= <Text>\n<Value> ::= <Text>\n```\n\n### add-direct-play-profile\nThis directive augments the set of Direct Play profiles in the client profile. The following parameters are required:\n\n- `type` = \"videoProfile\" | \"musicProfile\" | \"photoProfile\" | \"subtitleProfile\"\n- `container` = * or a comma-separated list of containers\n- `videoCodec` = * or a comma-separated list of video codecs\n- `audioCodec` = * or a comma-separated list of audio codecs\n- `subtitleCodec` = * or a comma-separated list of subtitle formats\n\n`*` means to use all existing matching values in the profile. At least one of the `videoCodec`, `audioCodec` and `subtitleCodec` parameters must not be `*`.\n\n\n#### add-direct-play-profile example\nTo add `ac3` as a video audio codec for mp4 and mov containers:\n\n```\nadd-direct-play-profile(type=videoProfile&container=mp4,mov&videoCodec=*&audioCodec=ac3&subtitleCodec=*)\n```\n\n### add-limitation\nThis directive adds a scoped limitation to the profile. The following parameters are required:\n\n- `scope` = \"videoContainer\" | \"musicContainer\" | \"photoContainer\" | \"videoCodec\" | \"videoAudioCodec\" | \"musicCodec\" | \"subtitleCodec\" | \"transcodeTarget\"\n- `scopeName` = the name of the relevant container or codec\n- `type` = \"match\" | \"notMatch\" | \"upperBound\" | \"lowerBound\"\n- `name` = the name of the limitation\n\nThe following parameters are optional:\n- `isRequired` = true|false (default is false)\n- `allStreams` = true|false (default is false)\n- `replace` = true|false (default is false)\n\nIf 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.\n\nExactly one of the following three parameters is required:\n- `value` = the value of the limitation\n- `substring` = the substring of the limitation\n- `regex` = the regex of the limitation\n\nThe `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.\n\n\n#### add-limitation examples\nTo add a limitation on ac3 audio tracks in video media specifying a maximum of 6 channels:\n```\nadd-limitation(scope=videoAudioCodec&scopeName=ac3&type=upperBound&name=audio.channels&value=6)\n```\n\nTo add a limitation on ac3 audio tracks in video media specifying a maximum bitrate:\n```\nadd-limitation(scope=videoAudioCodec&scopeName=ac3&type=upperBound&name=audio.bitrate&value=160)\n```\n\nTo add a limitation on h264 video specifying a maximum level:\n```\nadd-limitation(scope=videoCodec&scopeName=h264&type=upperBound&name=video.level&value=40&isRequired=true)\n```\n\nTo add a limitation to a transcode target:\n```\nadd-limitation(scope=transcodeTarget&scopeName=MyTranscodeProfile&type=upperBound&name=audio.channels&value=2)\n```\n\n### add-transcode-target-codec\nThis directive adds additional codecs to the beginning of the audioCodec and/or subtitleCodec lists for the specified transcode target. The following parameters are required:\n\n- `type` = \"videoProfile\" | \"musicProfile\" | \"photoProfile\" | \"subtitleProfile\"\n\nEither `id` or `context` and `protocol` are required:\n\n- `id` = a transcode target identifier\n- `context` = a transcode context (\"streaming\" | \"static\")\n- `protocol` = a protocol (\"hls\" | \"http\" | \"slss\" ... )\n\nAt least one of the following parameters are also required:\n\n- `videoCodec` = a comma-separated list of videoCodecs, which are added to the set of video codecs on the target.\n- `audioCodec` = a comma-separated list of audioCodecs, which are added to the set of audio codecs on the target.\n- `subtitleCodec` = a comma-separated list of audioCodecs, which are added to the set of subtitle codecs on the target.\n\n#### add-transcode-target-codec example\nTo add `ac3` as an additional transcode target option to a HTTP Live Streaming target:\n\n```\nadd-transcode-target-codec(type=videoProfile&context=streaming&protocol=hls&audioCodec=ac3)\n```\n\n### append-transcode-target-codec\nThis 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`.\n\n```\nappend-transcode-target-codec(type=videoProfile&context=streaming&protocol=hls&audioCodec=dca)\n```\n\n### add-transcode-target\nThis 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:\n\n- `type` = \"videoProfile\" | \"musicProfile\" | \"photoProfile\" | \"subtitleProfile\"\n- `context` = a transcode context (\"streaming\" | \"static\")\n- `protocol` = a protocol (\"hls\" | \"http\" | \"slss\" ... )\n- `container` = a container\n\nThe following parameters are optional:\n\n- `id` = a transcode target identifier\n- `replace` = true|false (default is false)\n\nIf 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.\n\nThe following parameters are required, depending on the type:\n\n- `videoCodec` = a video codec (required for video) or a comma-separated list of video codecs\n- `audioCodec` = an audio codec (required for music and video) or a comma-separated list of audio codecs\n- `subtitleCodec` = an subtitle codec (required for subtitles and optional for video) or a comma-separated list of subtitle codecs\n\n#### add-transcode-target examples\n\n```\nadd-transcode-target(type=videoProfile&context=streaming&protocol=http&container=mkv&videoCodec=h264&audioCodec=aac,ac3&subtitleCodec=srt)\n```\n\n```\nadd-transcode-target(type=musicProfile&context=streaming&protocol=http&container=flac&audioCodec=flac)\n```\n\n```\nadd-transcode-target(type=subtitleProfile&context=all&protocol=http&container=webvtt&subtitleCodec=webvtt)\n```\n\n### add-settings\nThis directive overrides global settings for the profile. The parameters are name/value pairs matching existing client profile settings.\n\n```\nadd-settings(DirectPlayStreamSelection=false&RandomAccessDataModel=limited)\n```\n\n## Authenticating with Plex\n\nPlex supports two authentication methods:\n\n### JWT Authentication (Recommended)\n\nPlex now supports JSON Web Token (JWT) authentication that provides better security, shorter token lifespans, and improved protection against potential security breaches.\n\n#### Why JWT Authentication?\n\nThe new JWT system addresses security concerns by:\n- **Short-lived tokens**: Tokens expire after 7 days\n- **Public-key cryptography**: Uses modern cryptographic standards (ED25519) for enhanced security\n- **Better clock synchronization**: Built-in timestamp validation helps devices stay in sync\n\n#### How JWT Authentication Works\n\n**1. Register your public key**\n\nThe new system uses a public-key authentication model where each device uploads a public key (JWK) and then requests short-lived JWT tokens. There are two ways to get started with JWT authentication:\n\n**Option 1: PIN Authentication Flow (Recommended for New Apps)**\n\nThis method allows you to get JWT tokens without needing any existing tokens first. It's the preferred approach for new applications.\n\n**Step 1: Generate a PIN with JWK**\n\n```bash\nPOST https://clients.plex.tv/api/v2/pins\nHeaders:\n X-Plex-Client-Identifier: your-device-identifier\n\nBody:\n{\n \"jwk\": {\n \"kty\": \"OKP\",\n \"crv\": \"Ed25519\",\n \"x\": \"your-public-key-data\",\n \"kid\": \"your-key-id\",\n \"alg\": \"EdDSA\"\n },\n \"strong\": true\n}\n```\n\n**Step 2: User Authentication**\n\nConstruct the Auth App URL and have the user authenticate:\n```\nhttps://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\n```\n\nFor 4-digit pins, you need to use the link page: `https://plex.tv/link/?pin=<code>`\n\n**Step 3: Exchange PIN for JWT Token**\n\n```bash\nGET https://clients.plex.tv/api/v2/pins/<pinID>?deviceJWT=<signedJWT>\n```\n\nThe signed JWT must include:\n- `\"aud\": \"plex.tv\"`\n- `\"iss\": \"<clientIdentifier>\"`\n- `\"kid\"` and `\"alg\"` in the header\n\nYou will get the Plex JWT token in the `authToken` field of the response.\n\n**Option 2: Register your public key with existing tokens (For Existing Apps)**\n\nIf you already have a legacy token, you can use it to register your device for JWT authentication:\n\n```bash\nPOST https://clients.plex.tv/api/v2/auth/jwk\nHeaders:\n X-Plex-Client-Identifier: your-device-identifier\n X-Plex-Token: your-existing-token\n\nBody:\n{\n \"jwk\": {\n \"kty\": \"OKP\",\n \"crv\": \"Ed25519\",\n \"x\": \"your-public-key-data\",\n \"kid\": \"your-key-id\",\n \"use\": \"sig\",\n \"alg\": \"EdDSA\"\n }\n}\n```\n\nAfter registering your public key, you should follow the same steps described below to refresh your token to get your first JWT.\n\n**2. Token Refresh Process**\n\nOnce registered, your device must refresh its token every 7 days using this three-step process:\n\n**Step 1: Get a Nonce**\n\n```bash\nGET https://clients.plex.tv/api/v2/auth/nonce\nHeaders:\n X-Plex-Client-Identifier: your-device-identifier\n```\n\nThis returns a unique nonce valid for 5 minutes:\n```json\n{\n \"nonce\": \"7c415b56-8f48-488a-98ab-847ef4460442\"\n}\n```\n\n**Step 2: Create a Device JWT**\n\nYour device creates a JWT containing:\n- The nonce from step 1\n- Required scope permissions (see Scope Details below)\n- Audience set to `plex.tv`\n- Issuer set to your `client_identifier`\n- Signed with your device's private key\n\n**Important JWT Header Requirements:**\n\nYour JWT must include these header fields:\n- `\"kid\"`: The key identifier from your JWK registration\n- `\"alg\"`: Must be `\"EdDSA\"` for ED25519 signatures, or `\"RS256\"` for RSA signatures\n\n**Scope Details:**\n\nThe scope field in your device JWT should contain comma-separated values for the user data you need included in the JWT:\n- `username` - Access to the user's username\n- `email` - Access to the user's email address\n- `friendly_name` - Access to the user's friendly name\n- `restricted` - Access to the user's restricted status\n- `anonymous` - Access to the user's anonymous status\n- `joinedAt` - Access to the user's account creation timestamp\n\n**Example Device JWT Header:**\n\n```json\n{\n \"kid\": \"your-key-id\",\n \"alg\": \"EdDSA\",\n \"typ\": \"JWT\"\n}\n```\n\n**Example Device JWT Payload:**\n\n```json\n{\n \"nonce\": \"7c415b56-8f48-488a-98ab-847ef4460442\",\n \"scope\": \"username,email,friendly_name\",\n \"aud\": \"plex.tv\",\n \"iss\": \"your-client-identifier\",\n \"iat\": 1705785603,\n \"exp\": 1705789203\n}\n```\n\n**Step 3: Exchange for Plex Token**\n\n```bash\nPOST https://clients.plex.tv/api/v2/auth/token\nHeaders:\n X-Plex-Client-Identifier: your-device-identifier\n\nBody:\n{\n \"jwt\": \"your-device-signed-jwt\"\n}\n```\n\nThis returns a new Plex.tv JWT valid for 7 days:\n\n```json\n{\n \"auth_token\": \"eyJraWQiOiJYeVRRN21seXFtVmhJcEo0U1pDZGltdXo3ZjdEYXU1Ym9MLXU2MG5JeEdJIiwidHlwIjoiSldUIiwiYWxnIjoiRWREU0EifQ...\"\n}\n```\n\n**Using Your JWT Token**\n\nOnce you have a JWT token, use it exactly like the old tokens in the `X-Plex-Token` header. Note it can be used to access any Plex.tv endpoint or your Plex Media Server instance:\n\n```bash\nGET http://your-plex-server:32400/library/sections\nHeaders:\n X-Plex-Token: your-jwt-token\n```\n\n#### JWT Authentication Benefits\n\n**Security Features:**\n\n- **Token Rotation**: Automatic expiration every 7 days\n- **Individual Revocation**: Each device can be individually disabled\n- **Cryptographic Verification**: Uses industry-standard ED25519 signatures\n- **Nonce Protection**: Prevents replay attacks\n\n**Developer Experience:**\n\n- **Familiar Interface**: Same `X-Plex-Token` header usage\n- **Automatic Clock Sync**: Built-in timestamp validation\n- **Clear Error Codes**: Specific error responses for different failure modes\n- **Rate Limiting**: Built-in protection against abuse\n\n#### Error Handling\n\nThe JWT system provides clear error responses with specific HTTP status codes:\n\n**Common Error Responses:**\n\n- **498 Token Expired**: Your JWT has expired and needs refresh\n- **422 Signature Verification Failed**: Invalid device signature or JWT structure\n- **422 Thumbprint Already Taken**: JWK already registered by another device\n- **400 Bad Request**: Invalid request format or missing required fields\n- **429 Too Many Requests**: Rate limit exceeded (nonce requests are rate-limited)\n\n**Troubleshooting Tips:**\n\n- **Missing `kid` field**: Ensure your JWT header includes the `kid` field matching your registered JWK\n- **Invalid signature**: Verify your private key matches the public key you registered\n- **Clock synchronization**: Ensure your device's clock is accurate (JWT includes timestamp validation)\n- **Nonce expiration**: Nonces are only valid for 5 minutes - request a new one if yours has expired\n- **Rate limiting**: Nonce requests are rate-limited to prevent abuse\n\n#### Migration Guide\n\n**For New Applications or new users:**\n\n1. Generate an ED25519 key pair for your device\n2. Use the PIN authentication flow (Option 1 above) to register your device and get JWT tokens\n3. Implement the token refresh flow for ongoing authentication\n4. Use the returned JWT in your `X-Plex-Token` header\n\n**To replace legacy tokens of existing applications:**\n\n1. Continue using your current token for now\n2. Register your public key with your existing tokens (Option 2 above)\n3. Generate your first JWT token using the token refresh process (Your legacy token will expire after this process)\n4. Implement the token refresh flow for ongoing authentication\n5. Use the returned JWT in your `X-Plex-Token` header\n\n\n**Token Refresh:**\n\nJWT tokens expire after 7 days but can be refreshed at any time, including after expiration. Use the token refresh process described above.\n\n### Traditional Token Authentication (Legacy)\n\nYou'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.\n\n#### High-level Steps\n\n1. Choose a unique app name, like \"My Cool App\"\n2. Check storage for your app's Client Identifier; generate and store one if none is present.\n3. Check storage for the user's Access Token; if present, verify its validity and carry on.\n4. If an Access Token is missing or invalid, generate a PIN, and store its `id`.\n5. Construct an Auth App url and send the user's browser there to authenticate.\n6. After authentication, check the PIN's `id` to obtain and store the user's Access Token.\n\n#### Detailed Steps\n\n1. Choose a unique app name\n\n 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.\n\n1. Generate a Client Identifier\n\n 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.\n\n1. Verify stored Access Token validity\n\n 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.\n\n ```\n $ curl -X GET https://plex.tv/api/v2/user \\\n -H 'Accept: application/json' \\\n -H 'X-Plex-Product: My Cool App' \\\n -H 'X-Plex-Client-Identifier: <clientIdentifier>' \\\n -H 'X-Plex-Token: <userToken>'\n ```\n\n | HTTP Status Code | |\n |-|-|\n | `200` | Access Token is valid |\n | `401` | Access Token is invalid |\n\n If an Access Token is invalid, it should be discarded, and new one should be obtained through the authentication process.\n\n 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.\n\n\n1. Generate a PIN\n\n 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.\n\n ```\n $ curl -X POST https://plex.tv/api/v2/pins?strong=true \\\n -H 'Accept: application/json' \\\n -H 'X-Plex-Product: My Cool App' \\\n -H 'X-Plex-Client-Identifier: <clientIdentifier>'\n ```\n\n 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.\n\n 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.\n\n ```\n {\n \"id\": 564964751,\n \"code\": \"8lzjqnq8lye02n52jq3fqxf8e\",\n …\n }\n ```\n\n1. Checking the PIN\n\n There are two primary ways apps interact with the Auth App and the PIN-claiming process; **Forwarding** and **Polling**.\n\n **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.\n\n **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.\n\n1. Construct the Auth App url\n\n The user will authenticate with the plex.tv Auth App through their web browser.\n\n 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.\n\n 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.\n\n Append these parameters to construct the final URL.\n\n | Parameter | |\n |----------------------------------|-----------------------------------------------------------------|\n | `clientID` | Your client identifier |\n | `code` | The `code` from the generated PIN |\n | `forwardUrl` | The url to which the user will be returned after authenticating. |\n | `context%5Bdevice%5D%5Bproduct%5D` | The name of your App; ex \"My Cool App\" |\n\n *Example*\n\n ```\n 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\n ```\n\n You can use the [`qs`](https://www.npmjs.com/package/qs) module to encode all necessary parameters, including the nested `context` parameter.\n\n\n ```js\n const authAppUrl =\n 'https://app.plex.tv/auth#?' +\n require('qs').stringify({\n clientID: '<clientIdentifier>',\n code: '<pinCode>',\n forwardUrl: 'https://my-cool-plex-app.com',\n context: {\n device: {\n product: 'My Cool App',\n },\n },\n });\n ```\n\n1. Send user's browser to constructed Auth App url\n\n Once the Auth App URL has been constructed, send the user's browser there to authenticate.\n\n1. Check PIN\n\n 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.\n\n 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`.\n\n ```\n $ curl -X GET 'https://plex.tv/api/v2/pins/<pinID>' \\\n -H 'Accept: application/json' \\\n -H 'X-Plex-Client-Identifier: <clientIdentifier>'\n ```\n### Talking to PMS\n\nOnce 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.\n\n```\n$ curl https://clients.plex.tv/api/v2/resources?includeHttps=1&includeRelay=1&includeIPv6=1 \\\n -H 'Accept: application/json' \\\n -H 'X-Plex-Product: My Cool App' \\\n -H 'X-Plex-Client-Identifier: <clientIdentifier>' \\\n -H 'X-Plex-Token: <userToken>'\n```\n\nThe 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.\n"
},
"servers": [
{
"url": "https://{IP-description}.{identifier}.plex.direct:{port}",
"variables": {
"IP-description": {
"default": "1-2-3-4",
"description": "A `-` separated string of the IPv4 or IPv6 address components"
},
"identifier": {
"default": "0123456789abcdef0123456789abcdef",
"description": "The unique identifier of this particular PMS"
},
"port": {
"default": "32400"
}
}
}
],
"security": [
{
"user_token": ["shared user", "admin"]
}
],
"components": {
"securitySchemes": {
"user_token": {
"type": "apiKey",
"in": "header",
"name": "X-Plex-Token",
"description": "The token which identifies the user accessing the PMS. This is typically provided to the client by plex.tv. This can be either a traditional access token or a JWT token obtained through the JWT authentication flow."
}
},
"schemas": {
"MediaContainer": {
"type": "object",
"properties": {
"identifier": {
"type": "string"
},
"size": {
"type": "integer"
},
"totalSize": {
"type": "integer",
"description": "The total size of objects available. Also provided in the X-Plex-Container-Total-Size header"
},
"offset": {
"type": "integer",
"description": "The offset of where this container page starts among the total objects available. Also provided in the X-Plex-Container-Start header"
}
}
},
"serverConfiguration": {
"allOf": [
{
"$ref": "#/components/schemas/MediaContainer"
},
{
"type": "object",
"properties": {
"allowCameraUpload": {
"type": "boolean"
},
"allowChannelAccess": {
"type": "boolean"
},
"allowMediaDeletion": {
"type": "boolean"
},
"allowSharing": {
"type": "boolean"
},
"allowSync": {
"type": "boolean"
},
"allowTuners": {
"type": "boolean"
},
"backgroundProcessing": {
"type": "boolean"
},
"certificate": {
"type": "boolean"
},
"companionProxy": {
"type": "boolean"
},
"countryCode": {
"type": "string"
},
"diagnostics": {
"type": "string"
},
"eventStream": {
"type": "boolean"
},
"friendlyName": {
"type": "string"
},
"hubSearch": {
"type": "boolean"
},
"itemClusters": {
"type": "boolean"
},
"livetv": {
"type": "integer",
"example": 7
},
"machineIdentifier": {
"example": "0123456789abcdef0123456789abcdef012345678"
},
"mediaProviders": {
"type": "boolean"
},
"multiuser": {
"type": "boolean"
},
"musicAnalysis": {
"type": "integer",
"example": 2
},
"myPlex": {
"type": "boolean"
},
"myPlexMappingState": {
"example": "mapped"
},
"myPlexSigninState": {
"example": "ok"
},
"myPlexSubscription": {
"type": "boolean"
},
"myPlexUsername": {
"type": "string"
},
"offlineTranscode": {
"example": 1
},
"ownerFeatures": {
"description": "A comma-separated list of features which are enabled for the server owner",
"type": "string"
},
"platform": {
"type": "string"
},
"platformVersion": {
"type": "string"
},
"pluginHost": {
"type": "boolean"
},
"pushNotifications": {
"type": "boolean"
},
"readOnlyLibraries": {
"type": "boolean"
},
"streamingBrainABRVersion": {
"type": "integer"
},
"streamingBrainVersion": {
"type": "integer"
},
"sync": {
"type": "boolean"
},
"transcoderActiveVideoSessions": {
"type": "integer"
},
"transcoderAudio": {
"type": "boolean"
},
"transcoderLyrics": {
"type": "boolean"
},
"transcoderPhoto": {
"type": "boolean"
},
"transcoderSubtitles": {
"type": "boolean"
},
"transcoderVideo": {
"type": "boolean"
},
"transcoderVideoBitrates": {
"description": "The suggested video quality bitrates to present to the user"
},
"transcoderVideoQualities": {
"type": "string"
},
"transcoderVideoResolutions": {
"description": "The suggested video resolutions to the above quality bitrates"
},
"updatedAt": {
"type": "integer"
},
"updater": {
"type": "boolean"
},
"version": {
"type": "string"
},
"voiceSearch": {
"type": "boolean"
}
}
}
]
},
"mediaContainerWithSettings": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/MediaContainer"
},
{
"type": "object",
"properties": {
"Setting": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"label": {
"type": "string",
"description": "A user-friendly name for the preference"
},
"summary": {
"type": "string",
"description": "A description of the preference"
},
"type": {
"type": "string",
"enum": ["bool", "int", "text", "double"],
"description": "The type of the value of this pref"
},
"default": {
"oneOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
}
],
"description": "The default value of this pref"
},
"value": {
"oneOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
}
],
"description": "The current value of this pref"
},
"hidden": {
"type": "boolean",
"description": "Whether the pref is hidden or not"
},
"advanced": {
"type": "boolean",
"description": "Whether the pref is considered advanced and normally hidden from the user"
},
"group": {
"type": "string",
"description": "The group name of this pref to aid in display of a hierarchy."
},
"enumValues": {
"type": "string",
"description": "The possible values for this pref if restricted. The list is `|` separated with `value:name` entries."
}
}
}
}
}
}
]
}
}
},
"stream": {
"description": "`Stream` represents a particular stream from a media item, such as the video stream, audio stream, or subtitle stream. The stream may either be part of the file represented by the parent `Part` or, especially for subtitles, an external file. The stream contains more detailed information about the specific stream. For example, a video may include the `aspectRatio` at the `Media` level, but detailed information about the video stream like the color space will be included on the `Stream` for the video stream. Note that photos do not have streams (mostly as an optimization).\n",
"type": "object",
"properties": {
"audioChannelLayout": {
"example": "stereo"
},
"bitDepth": {
"type": "integer",
"example": 8
},
"bitrate": {
"type": "integer",
"example": 5466
},
"canAutoSync": {
"type": "boolean",
"description": "For subtitle streams only. If `true` then the server can attempt to automatically sync the subtitle timestamps with the video.",
"example": true
},
"chromaLocation": {
"example": "topleft"
},
"chromaSubsampling": {
"example": "4:2:0"
},
"codec": {
"description": "The codec of the stream, such as `h264` or `aac`",
"example": "h264"
},
"colorPrimaries": {
"example": "bt709"
},
"colorRange": {
"example": "tv"
},
"colorSpace": {
"example": "bt709"
},
"colorTrc": {
"example": "bt709"
},
"default": {
"type": "boolean",
"example": true
},
"displayTitle": {
"description": "A friendly name for the stream, often comprised of the language and codec information",
"example": "English (H.264 Main)"
},
"frameRate": {
"type": "number",
"example": 23.976
},
"hasScalingMatrix": {
"example": false
},
"height": {
"type": "integer",
"example": 544
},
"id": {
"type": "integer",
"example": 1
},
"index": {
"type": "integer",
"description": "If the stream is part of the `Part` and not an external resource, the index of the stream within that part",
"example": 0
},
"key": {
"description": "If the stream is independently streamable, the key from which it can be streamed",
"example": "/library/streams/1"
},
"language": {
"example": "English"
},
"languageCode": {
"description": "The three character language code for the stream contents",
"example": "eng"
},
"level": {
"type": "integer",
"example": 31
},
"profile": {
"example": "main"
},
"refFrames": {
"type": "integer",
"example": 2
},
"samplingRate": {
"type": "integer",
"example": 48000
},
"selected": {
"type": "boolean"
},
"streamIdentifier": {
"type": "integer",
"example": 1
},
"streamType": {
"type": "integer",
"description": "A number indicating the type of the stream. `1` for video, `2` for audio, `3` for subtitles, `4` for lyrics",
"example": 1
},
"width": {
"type": "integer",
"example": 1280
}
},
"additionalProperties": true
},
"part": {
"description": "`Part` represents a particular file or \"part\" of a media item. The part is the playable unit of the media hierarchy. Suppose that a movie library contains a movie that is broken up into files, reminiscent of a movie split across two BDs. The metadata item represents information about the movie, the media item represents this instance of the movie at this resolution and quality, and the part items represent the two playable files. If another media were added which contained the joining of these two parts transcoded down to a lower resolution, then this metadata would contain 2 medias, one with 2 parts and one with 1 part.\n",
"type": "object",
"properties": {
"audioProfile": {
"example": "lc"
},
"container": {
"description": "The container of the media file, such as `mp4` or `mkv`",
"example": "mov"
},
"duration": {
"type": "integer",
"description": "The duration of the media item, in milliseconds",
"example": 150192
},
"file": {
"description": "The local file path at which the part is stored on the server",
"example": "/home/schuyler/Videos/Trailers/Cloud Atlas (2012).mov"
},
"has64bitOffsets": {
"type": "boolean",
"example": false
},
"id": {
"type": "integer",
"example": 1
},
"key": {
"description": "The key from which the media can be streamed",
"example": "/library/parts/1/1531779263/file.mov"
},
"optimizedForStreaming": {
"type": "boolean",
"example": false
},
"size": {
"type": "integer",
"description": "The size of the media, in bytes",
"example": 105355654
},
"videoProfile": {
"example": "main"
},
"Stream": {
"type": "array",
"items": {
"$ref": "#/components/schemas/stream"
}
}
},
"additionalProperties": true
},
"media": {
"description": "`Media` represents an one or more media files (parts) and is a child of a metadata item. There aren't necessarily any guaranteed attributes on media elements since the attributes will vary based on the type. The possible attributes are not documented here, but they typically have self-evident names. High-level media information that can be used for badging and flagging, such as `videoResolution` and codecs, is included on the media element.\n",
"type": "object",
"properties": {
"aspectRatio": {
"type": "number",
"example": 2.35
},
"audioChannels": {
"type": "integer",
"example": 2
},
"audioCodec": {
"example": "aac"
},
"audioProfile": {
"example": "lc"
},
"bitrate": {
"type": "integer",
"example": 5612
},
"container": {
"example": "mov"
},
"duration": {
"type": "integer",
"example": 150192
},
"has64bitOffsets": {
"type": "boolean",
"example": false
},
"hasVoiceActivity": {
"type": "boolean",
"example": true
},
"height": {
"type": "integer",
"example": 544
},
"id": {
"type": "integer",
"example": 1
},
"optimizedForStreaming": {
"type": "boolean",
"example": false
},
"videoCodec": {
"example": "h264"
},
"videoFrameRate": {
"example": "24p"
},
"videoProfile": {
"example": "main"
},
"videoResolution": {
"example": "720"
},
"width": {
"type": "integer",
"example": 1280
},
"Part": {
"type": "array",
"items": {
"$ref": "#/components/schemas/part"
}
}
},
"additionalProperties": true
},
"image": {
"description": "Images such as movie posters and background artwork are represented by Image elements.\n",
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"background",
"banner",
"clearLogo",
"coverPoster",
"snapshot"
],
"description": "Describes both the purpose and intended presentation of the image."
},
"url": {
"type": "string",
"description": "The relative path or absolute url for the image."
},
"alt": {
"type": "string",
"description": "Title to use for accessibility."
}
}
},
"tag": {
"description": "A variety of extra information about a metadata item is included as tags. These tags use their own element names such as `Genre`, `Writer`, `Directory`, and `Role`. Individual tag types may introduce their own extra attributes.\n",
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"tag": {
"description": "The value of the tag (the name)",
"example": "Shaun Lawton"
},
"tagKey": {
"description": "Plex identifier for this tag which can be used to fetch additional information from plex.tv",
"example": "5d3ee12c4cde6a001c3e0b27"
},
"tagType": {
"type": "integer"
},
"filter": {
"description": "A filter parameter that can be used to query for more content that matches this tag value.",
"example": "actor=49"
},
"role": {
"description": "The role this actor played",
"example": "Secretary"
},
"thumb": {
"example": "http://image.tmdb.org/t/p/original/lcJ8qM51ClAR2UzXU1mkZGfnn3o.jpg"
},
"context": {
"type": "string"
},
"ratingKey": {
"type": "string"
},
"confidence": {
"type": "number",
"description": "Measure of the confidence of an automatic tag"
}
}
},
"directory": {
"type": "object",
"properties": {
"hubKey": {
"type": "string"
},
"key": {
"type": "string"
},
"title": {
"type": "string"
},
"thumb": {
"type": "string"
},
"art": {
"type": "string"
},
"share": {
"type": "integer"
},
"hasStoreServices": {
"type": "boolean"
},
"hasPrefs": {
"type": "boolean"
},
"identifier": {
"type": "string"
},
"titleBar": {
"type": "string"
},
"lastAccessedAt": {
"type": "integer"
},
"type": {
"type": "string"
},
"content": {
"type": "boolean"
},
"filter": {
"type": "string"
},
"Pivot": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"key": {
"type": "string"
},
"type": {
"type": "string"
},
"title": {
"type": "string"
},
"context": {
"type": "string"
},
"symbol": {
"type": "string"
}
}
}
}
},
"additionalProperties": true
},
"filter": {
"allOf": [
{
"$ref": "#/components/schemas/directory"
},
{
"type": "object",
"description": "Each `Filter` object contains a description of the filter. Note that it is not an exhaustive list of the full media query language, but an important subset useful for top-level API.\n",
"properties": {
"filter": {
"type": "string",
"description": "This represents the filter name used for the filter, which can be used to construct complex media queries with."
},
"filterType": {
"type": "string",
"description": "This is either `string`, `integer`, or `boolean`, and describes the type of values used for the filter."
},
"key": {
"type": "string",
"description": "This provides the endpoint where the possible range of values for the filter can be retrieved (e.g. for a \"Genre\" filter, it returns a list of all the genres in the library). This will include a `type` argument that matches the metadata type of the Type element."
},
"title": {
"type": "string",
"description": "The title for the filter."
}
}
}
]
},
"sort": {
"allOf": [
{
"$ref": "#/components/schemas/directory"
},
{
"type": "object",
"description": "Each `Sort` object contains a description of the sort field.\n",
"properties": {
"defaultDirection": {
"type": "string",
"enum": ["asc", "desc"],
"description": "This default diction of this sort"
},
"default": {
"type": "string",
"enum": ["asc", "desc"],
"description": "If present, this sort is the default and in this direction"
},
"key": {
"type": "string",
"description": "The key to use in the sort field to make items sort by this item"
},
"descKey": {
"type": "string",
"description": "The key for sorting this field in reverse order"
},
"title": {
"type": "string",
"description": "The title of the field."
},
"firstCharacterKey": {
"type": "string",
"description": "The key to use to get items sorted by this field and indexed by the first character"
}
}
}
]
},
"metadata": {
"description": "Items in a library are referred to as \"metadata items.\" These metadata items are distinct from \"media items\" which represent actual instances of media that can be consumed. Consider a TV library that has a single video file in it for a particular episode of a show. The library has a single media item, but it has three metadata items: one for the show, one for the season, and one for the episode. Consider a movie library that has two video files in it: the same movie, but two different resolutions. The library has a single metadata item for the movie, but that metadata item has two media items, one for each resolution. Additionally a \"media item\" will have one or more \"media parts\" where the the parts are intended to be watched together, such as a CD1 and CD2 parts of the same movie.\n\nNote that when a metadata item has multiple media items, those media items should be isomorphic. That is, a 4K version and 1080p version of a movie are different versions of the same movie. They have the same duration, same summary, same rating, etc. and they can generally be considered interchangeable. A theatrical release vs. director's cut vs. unrated version on the other hand would be separate metadata items.\n\nMetadata items can often live in a hierarchy with relationships between them. For example, the metadata item for an episodes is associated with a season metadata item which is associated with a show metadata item. A similar hierarchy exists with track, album, and artist and photos and photo album. The relationships may be expressed via relative terms and absolute terms. For example, \"leaves\" refer to metadata items which has associated media (there is no media for a season nor show). A show will have \"children\" in the form of seasons and a season will have \"children\" in the form of episodes and episodes have \"parent\" in the form of a season which has a \"parent\" in the form of a show. Similarly, a show has \"grandchildren\" in the form of episodse and an episode has a \"grandparent\" in the form of a show.\n",
"type": "object",
"properties": {
"type": {
"description": "The type of the video item, such as `movie`, `episode`, or `clip`."
},
"subtype": {
"description": "The subtype of the video item, such as `photo` when the video item is in a photo library"
},
"key": {
"description": "The key at which the item's details can be fetched. In many cases a metadata item may be passed without all the details (such as in a hub) and this key corresponds to the endpoint to fetch additional details."
},
"ratingKey": {
"description": "This is the opaque string to be passed into timeline, scrobble, and rating endpoints to identify them. While it often appears to be numeric, this is not guaranteed."
},
"title": {
"description": "The title of the item (e.g. “300” or “The Simpsons”)"
},
"titleSort": {
"description": "Whene present, this is the string used for sorting the item. It's usually the title with any leading articles removed (e.g. “Simpsons”)."
},
"originalTitle": {
"description": "When present, used to indicate an item's original title, e.g. a movie's foreign title."
},
"year": {
"type": "integer",
"description": "When present, the year associated with the item's release (e.g. release year for a movie)."
},
"index": {
"type": "integer",
"description": "When present, this represents the episode number for episodes, season number for seasons, or track number for audio tracks."
},
"absoluteIndex": {
"type": "integer",
"description": "When present, contains the disc number for a track on multi-disc albums."
},
"originallyAvailableAt": {
"description": "When present, in the format YYYY-MM-DD [HH:MM:SS] (the hours/minutes/seconds part is not always present). The air date, or a higher resolution release date for an item, depending on type. For example, episodes usually have air date like 1979-08-10 (we don't use epoch seconds because media existed prior to 1970). In some cases, recorded over-the-air content has higher resolution air date which includes a time component. Albums and movies may have day-resolution release dates as well."
},
"duration": {
"type": "integer",
"description": "When present, the duration for the item, in units of milliseconds."
},
"summary": {
"description": "When present, the extended textual information about the item (e.g. movie plot, artist biography, album review)."
},
"tagline": {
"description": "When present, a pithy one-liner about the item (usually only seen for movies)."
},
"thumb": {
"description": "When present, the URL for the poster or thumbnail for the item. When available for types like movie, it will be the poster graphic, but fall-back to the extracted media thumbnail."
},
"art": {
"description": "When present, the URL for the background artwork for the item."
},
"banner": {
"description": "When present, the URL for a banner graphic for the item."
},
"hero": {
"description": "When present, the URL for a hero image for the item."
},
"theme": {
"description": "When present, the URL for theme music for the item (usually only for TV shows)."
},
"composite": {
"description": "When present, the URL for a composite image for descendent items (e.g. photo albums or playlists)."
},
"studio": {
"description": "When present, the studio or label which produced an item (e.g. movie studio for movies, record label for albums)."
},
"contentRating": {
"description": "If known, the content rating (e.g. MPAA) for an item."
},
"rating": {
"type": "number",
"minimum": 0,
"maximum": 10,
"description": "When present, the rating for the item. The exact meaning and representation depends on where the rating was sourced from."
},
"ratingImage": {
"description": "When present, indicates an image to be shown with the rating. This is passed back as a small set of defined URI values, e.g. rottentomatoes://image.rating.rotten."
},
"audienceRating": {
"type": "number",
"minimum": 0,
"maximum": 10,
"description": "Some rating systems separate reviewer ratings from audience ratings"
},
"audienceRatingImage": {
"description": "A URI representing the image to be shown with the audience rating (e.g. rottentomatoes://image.rating.spilled)."
},
"userRating": {
"type": "number",
"minimum": 0,
"maximum": 10,
"description": "When the user has rated an item, this contains the user rating"
},
"viewOffset": {
"type": "integer",
"description": "When a user is in the process of viewing or listening to this item, this attribute contains the current offset, in units of milliseconds."
},
"viewCount": {
"type": "integer",
"description": "When a users has completed watched or listened to an item, this attribute contains the number of consumptions."
},
"lastViewedAt": {
"type": "integer",
"description": "When a user has watched or listened to an item, this contains a timestamp (epoch seconds) for that last consumption time."
},
"addedAt": {
"type": "integer",
"description": "In units of seconds since the epoch, returns the time at which the item was added to the library."
},
"updatedAt": {
"type": "integer",
"description": "In units of seconds since the epoch, returns the time at which the item was last changed (e.g. had its metadata updated)."
},
"chapterSource": {
"description": "When present, indicates the source for the chapters in the media file. Can be media (the chapters were embedded in the media itself), agent (a metadata agent computed them), or mixed (a combination of the two)."
},
"primaryExtraKey": {
"description": "Indicates that the item has a primary extra; for a movie, this is a trailer, and for a music track it is a music video. The URL points to the metadata details endpoint for the item."
},
"skipChildren": {
"type": "boolean",
"description": "When found on a show item, indicates that the children (seasons) should be skipped in favor of the grandchildren (episodes). Useful for mini-series, etc."
},
"skipParent": {
"type": "boolean",
"description": "When present on an episode or track item, indicates parent should be skipped in favor of grandparent (show)."
},
"leafCount": {
"type": "integer",
"description": "For shows and seasons, contains the number of total episodes."
},
"viewedLeafCount": {
"type": "integer",
"description": "For shows and seasons, contains the number of viewed episodes."
},
"parentKey": {
"type": "string",
"description": "The `key` of the parent"
},
"grandparentKey": {
"type": "string",
"description": "The `key` of the grandparent"
},
"parentRatingKey": {
"type": "string",
"description": "The `ratingKey` of the parent"
},
"grandparentRatingKey": {
"type": "string",
"description": "The `ratingKey` of the grandparent"
},
"parentThumb": {
"type": "string",
"description": "The `thumb` of the parent"
},
"grandparentThumb": {
"type": "string",
"description": "The `thumb` of the grandparent"
},
"grandparentArt": {
"type": "string",
"description": "The `art` of the grandparent"
},
"parentHero": {
"type": "string",
"description": "The `hero` of the parent"
},
"grandparentHero": {
"type": "string",
"description": "The `hero` of the grandparent"
},
"grandparentTheme": {
"type": "string",
"description": "The `theme` of the grandparent"
},
"parentTitle": {
"type": "string",
"description": "The `title` of the parent"
},
"grandparentTitle": {
"type": "string",
"description": "The `title` of the grandparent"
},
"parentIndex": {
"type": "integer",
"description": "The `index` of the parent"
},
"secondary": {
"type": "boolean",
"description": "Used by old clients to provide nested menus allowing for primative (but structured) navigation."
},
"prompt": {
"type": "string",
"description": "Prompt to give the user for this directory (such as `Search Movies`)"
},
"search": {
"type": "boolean",
"description": "Indicates this is a search directory"
},
"ratingCount": {
"type": "integer",
"description": "Number of ratings under this metadata"
},
"Media": {
"type": "array",
"items": {
"$ref": "#/components/schemas/media"
}
},
"Image": {
"type": "array",
"items": {
"$ref": "#/components/schemas/image"
}
},
"Genre": {
"type": "array",
"items": {
"$ref": "#/components/schemas/tag"
}
},
"Country": {
"type": "array",
"items": {
"$ref": "#/components/schemas/tag"
}
},
"Guid": {
"type": "array",
"items": {
"$ref": "#/components/schemas/tag"
}
},
"Rating": {
"type": "array",
"items": {
"$ref": "#/components/schemas/tag"
}
},
"Director": {
"type": "array",
"items": {
"$ref": "#/components/schemas/tag"
}
},
"Writer": {
"type": "array",
"items": {
"$ref": "#/components/schemas/tag"
}
},
"Role": {
"type": "array",
"items": {
"$ref": "#/components/schemas/tag"
}
},
"Autotag": {
"type": "array",
"items": {
"$ref": "#/components/schemas/tag"
}
},
"Filter": {
"type": "array",
"description": "Typically only seen in metadata at a library's top level",
"items": {
"$ref": "#/components/schemas/filter"
}
},
"Sort": {
"type": "array",
"description": "Typically only seen in metadata at a library's top level",
"items": {
"$ref": "#/components/schemas/sort"
}
}
},
"additionalProperties": true
},
"properties-MediaContainer": {
"type": "object",
"properties": {
"identifier": {
"type": "string"
},
"size": {
"type": "integer"
},
"totalSize": {
"type": "integer",
"description": "The total size of objects available. Also provided in the X-Plex-Container-Total-Size header"
},
"offset": {
"type": "integer",
"description": "The offset of where this container page starts among the total objects available. Also provided in the X-Plex-Container-Start header"
},
"Metadata": {
"type": "array",
"items": {
"$ref": "#/components/schemas/metadata"
}
}
},
"additionalProperties": true
},
"mediaContainerWithDecision": {
"description": "`MediaContainer` is commonly found as the root of a response and is a pretty generic container. Common attributes include `identifier` and things related to paging (`offset`, `size`, `totalSize`).\n\nIt is also common for a `MediaContainer` to contain attributes \"hoisted\" from its children. If every element in the container would have had the same attribute, then that attribute can be present on the container instead of being repeated on every element. For example, an album's list of tracks might include `parentTitle` on the container since all of the tracks have the same album title. A container may have a `source` attribute when all of the items came from the same source. Generally speaking, when looking for an attribute on an item, if the attribute wasn't found then the container should be checked for that attribute as well.\n",
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/properties-MediaContainer"
},
{
"type": "object",
"properties": {
"mdeDecisionCode": {
"type": "integer",
"description": "The code indicating the status of evaluation of playback when client indicates `hasMDE=1`"
},
"mdeDecisionText": {
"type": "string",
"description": "Descriptive text for the above code"
},
"availableBandwidth": {
"type": "integer",
"description": "The maximum available bitrate when the decision was rendered."
},
"generalDecisionCode": {
"type": "integer",
"description": "The overall decision. 1xxx are playback can succeed, 2xxx are a general error (such as insufficient bandwidth), 3xxx are errors in direct play, and 4xxx are errors in transcodes. Same codes are used in all."
},
"generalDecisionText": {
"type": "string"
},
"directPlayDecisionCode": {
"type": "integer"
},
"directPlayDecisionText": {
"type": "string"
},
"transcodeDecisionCode": {
"type": "integer"
},
"transcodeDecisionText": {
"type": "string"
},
"Metadata": {
"type": "array",
"items": {
"allOf": [
{
"$ref": "#/components/schemas/metadata"
},
{
"type": "object",
"properties": {
"Media": {
"type": "array",
"items": {
"allOf": [
{
"$ref": "#/components/schemas/media"
},
{
"type": "object",
"properties": {
"abr": {
"type": "boolean"
},
"resourceSession": {
"type": "string"
},
"selected": {
"type": "boolean"
},
"Part": {
"type": "array",
"items": {
"allOf": [
{
"$ref": "#/components/schemas/part"
},
{
"type": "object",
"properties": {
"decision": {
"type": "string",
"enum": [
"directplay",
"transcode",
"none"
]
},
"selected": {
"type": "boolean"
},
"Stream": {
"type": "array",
"items": {
"allOf": [
{
"$ref": "#/components/schemas/stream"
},
{
"type": "object",
"properties": {
"location": {
"type": "string",
"enum": [
"direct",
"sidecar-subs",
"segments-video",
"segments-audio",
"segments-av",
"segments-subs",
"embedded",
"sidecar"
]
},
"decision": {
"type": "string",
"enum": [
"copy",
"transcode",
"burn",
"unavailable",
"ignore",
"none"
]
}
}
}
]
}
}
}
}
]
}
}
}
}
]
}
}
}
}
]
}
}
}
}
]
}
}
},
"hub": {
"type": "object",
"properties": {
"context": {
"type": "string",
"example": "hub.home.onDeck"
},
"hubIdentifier": {
"type": "string",
"description": "A unique identifier for the hub",
"example": "home.onDeck"
},
"hubKey": {
"type": "string",
"description": "A key at which the exact content currently displayed can be fetched again. This is particularly important when a hub is marked as random and requesting the `key` may get different results. It's otherwise optional.\n"
},
"key": {
"type": "string",
"description": "The key at which all of the content for this hub can be retrieved",
"example": "/hubs/sections/home/onDeck"
},
"more": {
"type": "boolean",
"description": "\"A boolean indicating that the hub contains more than what's included in the current response.\"\n"
},
"size": {
"type": "integer",
"example": 1
},
"totalSize": {
"type": "integer",
"example": 8
},
"type": {
"type": "string",
"description": "The type of the items contained in this hub, or possibly `mixed` if there are multiple types",
"example": "track"
},
"subtype": {
"type": "string",
"description": "The subtype of the items contained in this hub, or possibly `mixed` if there are multiple types",
"example": "podcast"
},
"promoted": {
"type": "boolean",
"description": "Indicating if the hub should be promoted to the user's homescreen"
},
"random": {
"type": "boolean",
"description": "Indicating that the contents of the hub may change on each request"
},
"style": {
"type": "string",
"description": "A suggestion on how this hub's contents might be displayed by a client. Some examples include `hero`, `list`, `spotlight`, and `upsell`"
},
"title": {
"type": "string",
"description": "A title for this grouping of content"
},
"Metadata": {
"type": "array",
"items": {
"$ref": "#/components/schemas/metadata"
}
}
},
"additionalProperties": true
},
"mediaContainerWithMetadata": {
"description": "`MediaContainer` is commonly found as the root of a response and is a pretty generic container. Common attributes include `identifier` and things related to paging (`offset`, `size`, `totalSize`).\n\nIt is also common for a `MediaContainer` to contain attributes \"hoisted\" from its children. If every element in the container would have had the same attribute, then that attribute can be present on the container instead of being repeated on every element. For example, an album's list of tracks might include `parentTitle` on the container since all of the tracks have the same album title. A container may have a `source` attribute when all of the items came from the same source. Generally speaking, when looking for an attribute on an item, if the attribute wasn't found then the container should be checked for that attribute as well.\n",
"type": "object",
"properties": {
"MediaContainer": {
"type": "object",
"properties": {
"identifier": {
"type": "string"
},
"size": {
"type": "integer"
},
"totalSize": {
"type": "integer",
"description": "The total size of objects available. Also provided in the X-Plex-Container-Total-Size header"
},
"offset": {
"type": "integer",
"description": "The offset of where this container page starts among the total objects available. Also provided in the X-Plex-Container-Start header"
},
"Metadata": {
"type": "array",
"items": {
"$ref": "#/components/schemas/metadata"
}
}
},
"additionalProperties": true
}
}
},
"items": {
"type": "object",
"allOf": [
{
"$ref": "#/components/schemas/metadata"
},
{
"type": "object",
"properties": {
"MetadataItem": {
"type": "array",
"items": {
"type": "object",
"description": "Nested metadata items",
"$ref": "#/components/schemas/items"
}
}
}
}
]
},
"mediaContainerWithNestedMetadata": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/MediaContainer"
},
{
"type": "object",
"properties": {
"MetadataItem": {
"type": "array",
"items": {
"type": "object",
"allOf": [
{
"$ref": "#/components/schemas/metadata"
},
{
"type": "object",
"properties": {
"MetadataItem": {
"type": "array",
"items": {
"type": "object",
"description": "Nested metadata items",
"$ref": "#/components/schemas/items"
}
}
}
}
]
}
}
}
}
]
}
}
},
"mediaContainerWithArtwork": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/MediaContainer"
},
{
"type": "object",
"properties": {
"Metadata": {
"type": "array",
"items": {
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "The title of the item"
},
"type": {
"type": "string",
"enum": ["image"]
},
"key": {
"type": "string",
"description": "The path to the artwork"
}
},
"additionalProperties": true
}
}
}
}
]
}
}
},
"mediaContainer": {
"description": "`MediaContainer` is commonly found as the root of a response and is a pretty generic container. Common attributes include `identifier` and things related to paging (`offset`, `size`, `totalSize`).\n\nIt is also common for a `MediaContainer` to contain attributes \"hoisted\" from its children. If every element in the container would have had the same attribute, then that attribute can be present on the container instead of being repeated on every element. For example, an album's list of tracks might include `parentTitle` on the container since all of the tracks have the same album title. A container may have a `source` attribute when all of the items came from the same source. Generally speaking, when looking for an attribute on an item, if the attribute wasn't found then the container should be checked for that attribute as well.\n",
"type": "object",
"properties": {
"MediaContainer": {
"type": "object",
"properties": {
"identifier": {
"type": "string"
},
"size": {
"type": "integer"
},
"totalSize": {
"type": "integer",
"description": "The total size of objects available. Also provided in the X-Plex-Container-Total-Size header"
},
"offset": {
"type": "integer",
"description": "The offset of where this container page starts among the total objects available. Also provided in the X-Plex-Container-Start header"
}
}
}
}
},
"allowSync": {
"type": "boolean"
},
"art": {
"type": "string"
},
"thumb": {
"type": "string"
},
"key": {
"type": "string"
},
"type": {
"type": "string"
},
"title": {
"type": "string"
},
"content": {
"type": "boolean"
},
"librarySection": {
"type": "object",
"properties": {
"allowSync": {
"type": "boolean"
},
"art": {
"$ref": "#/components/schemas/art"
},
"composite": {
"type": "string"
},
"filters": {
"type": "boolean",
"description": "Indicates whether this section has filtering capabilities"
},
"refreshing": {
"type": "boolean",
"description": "Indicates whether this library section is currently scanning"
},
"thumb": {
"$ref": "#/components/schemas/thumb"
},
"key": {
"$ref": "#/components/schemas/key"
},
"type": {
"$ref": "#/components/schemas/type"
},
"title": {
"$ref": "#/components/schemas/title"
},
"agent": {
"type": "string"
},
"scanner": {
"type": "string"
},
"language": {
"type": "string"
},
"updatedAt": {
"type": "integer"
},
"createdAt": {
"type": "integer"
},
"scannedAt": {
"type": "integer"
},
"content": {
"$ref": "#/components/schemas/content"
},
"directory": {
"type": "boolean"
},
"contentChangedAt": {
"type": "integer"
},
"hidden": {
"type": "boolean"
},
"Location": {
"type": "array",
"items": {
"type": "object",
"description": "Represents a top-level location on disk where media in this library section is stored",
"properties": {
"id": {
"type": "integer"
},
"path": {
"description": "The path of where this directory exists on disk"
}
}
}
}
}
},
"mediaContainerWithStatus_properties-MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/MediaContainer"
},
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "A status indicator. If present and non-zero, indicates an error"
},
"message": {
"type": "string",
"description": "A message associated with the status. Typically an error message."
}
}
}
]
},
"Device-items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"lastSeenAt": {
"type": "integer"
},
"make": {
"type": "string"
},
"model": {
"type": "string"
},
"modelNumber": {
"type": "string"
},
"protocol": {
"type": "string"
},
"sources": {
"type": "string"
},
"state": {
"type": "string"
},
"status": {
"type": "string"
},
"tuners": {
"type": "string"
},
"uri": {
"type": "string"
},
"uuid": {
"type": "string"
},
"ChannelMapping": {
"type": "array",
"items": {
"type": "object",
"properties": {
"channelKey": {
"type": "string"
},
"deviceIdentifier": {
"type": "string"
},
"enabled": {
"type": "string"
},
"lineupIdentifier": {
"type": "string"
}
}
}
}
}
},
"channel": {
"type": "object",
"properties": {
"identifier": {
"type": "string"
},
"key": {
"type": "string"
},
"channelVcn": {
"type": "string"
},
"hd": {
"type": "boolean"
},
"thumb": {
"type": "string"
},
"title": {
"type": "string"
},
"callSign": {
"type": "string"
},
"language": {
"type": "string"
}
}
},
"mediaContainerWithLineup": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/MediaContainer"
},
{
"type": "object",
"properties": {
"uuid": {
"type": "string",
"description": "The UUID of this set lineups"
},
"Lineup": {
"type": "array",
"items": {
"type": "object",
"properties": {
"uuid": {
"type": "string",
"description": "The uuid of this lineup"
},
"type": {
"type": "string",
"description": "The type of this object (`lineup` in this case)"
},
"title": {
"type": "string"
},
"lineupType": {
"type": "integer",
"enum": [-1, 0, 1, 2, 3, 4],
"description": "- `-1`: N/A\n- `0`: Over the air\n- `1`: Cable\n- `2`: Satellite\n- `3`: IPTV\n- `4`: Virtual\n"
},
"location": {
"type": "string"
}
}
}
}
}
}
]
}
}
},
"Lineup-items": {
"type": "object",
"properties": {
"uuid": {
"type": "string",
"description": "The uuid of this lineup"
},
"type": {
"type": "string",
"description": "The type of this object (`lineup` in this case)"
},
"title": {
"type": "string"
},
"lineupType": {
"type": "integer",
"enum": [-1, 0, 1, 2, 3, 4],
"description": "- `-1`: N/A\n- `0`: Over the air\n- `1`: Cable\n- `2`: Satellite\n- `3`: IPTV\n- `4`: Virtual\n"
},
"location": {
"type": "string"
}
}
},
"mediaContainerWithDevice": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/MediaContainer"
},
{
"type": "object",
"properties": {
"Device": {
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"lastSeenAt": {
"type": "integer"
},
"make": {
"type": "string"
},
"model": {
"type": "string"
},
"modelNumber": {
"type": "string"
},
"protocol": {
"type": "string"
},
"sources": {
"type": "string"
},
"state": {
"type": "string"
},
"status": {
"type": "string"
},
"tuners": {
"type": "string"
},
"uri": {
"type": "string"
},
"uuid": {
"type": "string"
},
"ChannelMapping": {
"type": "array",
"items": {
"type": "object",
"properties": {
"channelKey": {
"type": "string"
},
"deviceIdentifier": {
"type": "string"
},
"enabled": {
"type": "string"
},
"lineupIdentifier": {
"type": "string"
}
}
}
}
}
}
}
}
}
]
}
}
},
"metadataAgentProvider": {
"description": "Describes a MetadataAgentProvider object.\n",
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "The unique identifier for the item."
},
"identifier": {
"type": "string",
"description": "The identifier for the provider."
},
"title": {
"type": "string",
"description": "The title of the provider."
},
"uri": {
"type": "string",
"description": "The URI of the provider."
},
"agentType": {
"type": "string",
"description": "The type of agent.\n- primary: A metadata provider which provides a unique identifier (guid) for each item.\n- contributor: A metadata provider which provides additional metadata for items but does not have a unique item identifier.\n",
"enum": ["primary", "contributor"]
},
"MetadataType": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "integer",
"description": "The type of supported metadata."
}
}
},
"description": "The metadata types supported by the provider."
},
"online": {
"type": "boolean",
"description": "Indicates whether the provider is online."
}
}
},
"metadataAgentProviderGroupItem": {
"description": "Sub-items of a MetadataAgentProviderGroup object. They represent specific MetadataAgentProvider objects.\n",
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "The unique identifier for the item."
},
"metadataAgentProviderGroupId": {
"type": "integer",
"description": "The unique identifier for the MetadataAgentProviderGroup."
},
"metadataAgentProviderId": {
"type": "integer",
"description": "The unique identifier for the MetadataAgentProvider."
},
"order": {
"type": "number",
"description": "The order of the item in the group."
}
}
},
"metadataAgentProviderGroup": {
"description": "An item that describes a group of MetadataAgentProviderGroupItem objects.\n",
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "The unique identifier for the item."
},
"title": {
"type": "string",
"description": "The title of the group."
},
"primaryIdentifier": {
"type": "string",
"description": "The primary identifier for the group. i.e. the identifier of the MetadataAgentProvider which will provide the item guids."
},
"MetadataAgentGroupItem": {
"type": "array",
"items": {
"$ref": "#/components/schemas/metadataAgentProviderGroupItem"
}
}
}
},
"mediaGrabOperation": {
"description": "A media grab opration represents a scheduled or active recording of media\n",
"type": "object",
"properties": {
"mediaSubscriptionID": {
"type": "integer"
},
"mediaIndex": {
"type": "integer"
},
"id": {
"type": "string"
},
"key": {
"type": "string"
},
"grabberIdentifier": {
"type": "string"
},
"grabberProtocol": {
"type": "string"
},
"percent": {
"type": "number"
},
"currentSize": {
"type": "integer"
},
"status": {
"type": "string",
"enum": [
"inactive",
"scheduled",
"inprogress",
"complete",
"cancelled",
"error",
"postprocessing",
"paused"
]
},
"provider": {
"type": "string"
},
"Metadata": {
"$ref": "#/components/schemas/metadata"
}
}
},
"mediaSubscription": {
"description": "A media subscription contains a representation of metadata desired to be recorded\n",
"type": "object",
"properties": {
"key": {
"type": "string"
},
"type": {
"type": "integer",
"description": "The metadata type of the root item of the subscription"
},
"targetLibrarySectionID": {
"type": "integer",
"description": "The library section id for where the item is to be recorded"
},
"targetSectionLocationID": {
"type": "integer",
"description": "The library section location id for where the item is to be recorded"
},
"createdAt": {
"type": "integer"
},
"title": {
"type": "string"
},
"storageTotal": {
"type": "integer",
"description": "Only included if `includeStorage` is specified"
},
"durationTotal": {
"type": "integer",
"description": "Only included if `includeStorage` is specified"
},
"airingsType": {
"type": "string",
"enum": ["New Airings Only", "New and Repeat Airings"]
},
"librarySectionTitle": {
"type": "string"
},
"locationPath": {
"type": "string"
},
"Video": {
"description": "Media Matching Hints",
"additionalProperties": true
},
"Directory": {
"description": "Media Matching Hints",
"additionalProperties": true
},
"Playlist": {
"description": "Media Matching Hints",
"additionalProperties": true
},
"Setting": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The query parameter name for this setting"
},
"label": {
"type": "string",
"description": "The user-facing name of this setting"
},
"summary": {
"type": "string",
"description": "A user-facing description of the setting"
},
"type": {
"type": "string",
"enum": ["bool", "int", "text"],
"description": "They type of the value"
},
"hidden": {
"type": "boolean",
"description": "Whether this setting is hidden from the user"
},
"default": {
"oneOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
}
],
"description": "The default value for this setting"
},
"value": {
"oneOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
}
],
"description": "The current value of this setting"
},
"advanced": {
"type": "boolean",
"description": "Whether this is considered an advanced setting"
},
"group": {
"type": "string",
"description": "The group name for this setting"
},
"enumValues": {
"type": "string",
"description": "The possible values for this setting if restricted. The list is `|` separated with `value:name` entries."
}
}
}
},
"MediaGrabOperation": {
"type": "array",
"items": {
"$ref": "#/components/schemas/mediaGrabOperation"
}
}
}
},
"mediaContainerWithSubscription": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/MediaContainer"
},
{
"type": "object",
"properties": {
"MediaSubscription": {
"type": "array",
"items": {
"$ref": "#/components/schemas/mediaSubscription"
}
}
}
}
]
}
}
},
"mediaContainerWithPlaylistMetadata": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/properties-MediaContainer"
},
{
"type": "object",
"properties": {
"Metadata": {
"type": "array",
"items": {
"allOf": [
{
"type": "object",
"properties": {
"smart": {
"type": "boolean",
"description": "Whether or not the playlist is smart."
},
"duration": {
"type": "integer",
"description": "The total duration of the playlist in ms"
},
"leafCount": {
"type": "integer",
"description": "The number of items in the playlist."
},
"composite": {
"type": "string",
"description": "A composite image for the playlist."
},
"key": {
"type": "string",
"description": "Leads to a list of items in the playlist."
},
"playlistType": {
"type": "string",
"enum": ["audio", "video", "photo"],
"description": "The type of the playlist."
},
"specialPlaylistType": {
"type": "string",
"description": "If this is a special playlist, this returns its type (e.g. favorites)."
},
"readOnly": {
"type": "boolean",
"description": "If we return this as true then this playlist cannot be altered or deleted directly by the client."
}
}
},
{
"$ref": "#/components/schemas/metadata"
}
]
}
}
}
}
]
}
}
},
"directoryType": {
"description": "These represent the types of things found in this library, and for each one, a list of `Filter` and `Sort` objects. These can be used to build rich controls around a grid of media to allow filtering and organizing. Note that these filters and sorts are optional, and without them, the client won't render any filtering controls.\n",
"type": "object",
"properties": {
"key": {
"type": "string",
"description": "This provides the root endpoint returning the actual media list for the type."
},
"type": {
"type": "string",
"description": "This is the metadata type for the type (if a standard Plex type)."
},
"title": {
"type": "string",
"description": "The title for for the content of this type (e.g. \"Movies\")."
}
}
},
"Hub": {
"$ref": "#/components/schemas/hub"
},
"Metadata": {
"$ref": "#/components/schemas/metadata"
},
"MediaContainerWithMetadata": {
"$ref": "#/components/schemas/mediaContainerWithMetadata"
},
"Media": {
"$ref": "#/components/schemas/media"
},
"Part": {
"$ref": "#/components/schemas/part"
},
"Stream": {
"$ref": "#/components/schemas/stream"
},
"Tag": {
"$ref": "#/components/schemas/tag"
},
"ServerConfiguration": {
"$ref": "#/components/schemas/serverConfiguration"
},
"Directory": {
"$ref": "#/components/schemas/directory"
},
"LibrarySection": {
"$ref": "#/components/schemas/librarySection"
},
"DirectoryType": {
"$ref": "#/components/schemas/directoryType"
},
"Filter": {
"$ref": "#/components/schemas/filter"
},
"Sort": {
"$ref": "#/components/schemas/sort"
},
"MediaSubscription": {
"$ref": "#/components/schemas/mediaSubscription"
},
"MediaGrabOperation": {
"$ref": "#/components/schemas/mediaGrabOperation"
},
"MediaContainerWithSubscription": {
"$ref": "#/components/schemas/mediaContainerWithSubscription"
},
"MediaContainerWithDevice": {
"$ref": "#/components/schemas/mediaContainerWithSubscription"
},
"MediaContainerWithLineup": {
"$ref": "#/components/schemas/mediaContainerWithLineup"
},
"MediaContainerWithPlaylistMetadata": {
"$ref": "#/components/schemas/mediaContainerWithPlaylistMetadata"
},
"MediaContainerWithArtwork": {
"$ref": "#/components/schemas/mediaContainerWithArtwork"
},
"MediaContainerWithNestedMetadata": {
"$ref": "#/components/schemas/mediaContainerWithNestedMetadata"
},
"MediaContainerWithSettings": {
"$ref": "#/components/schemas/mediaContainerWithSettings"
}
},
"parameters": {
"2": {
"in": "query",
"name": "advancedSubtitles",
"schema": {
"type": "string",
"enum": ["burn", "text", "unknown"]
},
"example": "burn",
"description": "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\n"
},
"3": {
"in": "query",
"name": "audioBoost",
"schema": {
"type": "integer",
"minimum": 1
},
"example": 50,
"description": "Percentage of original audio loudness to use when transcoding (100 is equivalent to original volume, 50 is half, 200 is double, etc)"
},
"4": {
"in": "query",
"name": "audioChannelCount",
"schema": {
"type": "integer",
"minimum": 1,
"maximum": 8
},
"example": 5,
"description": "Target video number of audio channels."
},
"5": {
"in": "query",
"name": "autoAdjustQuality",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"example": 1,
"description": "Indicates the client supports ABR."
},
"6": {
"in": "query",
"name": "autoAdjustSubtitle",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"example": 1,
"description": "Indicates if the server should adjust subtitles based on Voice Activity Data."
},
"7": {
"in": "query",
"name": "directPlay",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"example": 1,
"description": "Indicates the client supports direct playing the indicated content."
},
"8": {
"in": "query",
"name": "directStream",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"example": 1,
"description": "Indicates the client supports direct streaming the video of the indicated content."
},
"9": {
"in": "query",
"name": "directStreamAudio",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"example": 1,
"description": "Indicates the client supports direct streaming the audio of the indicated content."
},
"10": {
"in": "query",
"name": "disableResolutionRotation",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"example": 1,
"description": "Indicates if resolution should be adjusted for orientation."
},
"11": {
"in": "query",
"name": "hasMDE",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"example": 1,
"description": "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"
},
"12": {
"in": "query",
"name": "location",
"schema": {
"type": "string",
"enum": ["lan", "wan", "cellular"]
},
"example": "wan",
"description": "Network type of the client, can be used to help determine target bitrate."
},
"13": {
"in": "query",
"name": "mediaBufferSize",
"schema": {
"type": "integer"
},
"example": 102400,
"description": "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."
},
"14": {
"in": "query",
"name": "mediaIndex",
"schema": {
"type": "integer"
},
"example": 0,
"description": "Index of the media to transcode. -1 or not specified indicates let the server choose."
},
"15": {
"in": "query",
"name": "musicBitrate",
"schema": {
"type": "integer",
"minimum": 0
},
"example": 5000,
"description": "Target bitrate for audio only files (in kbps, used to transcode)."
},
"16": {
"in": "query",
"name": "offset",
"schema": {
"type": "number"
},
"example": 90.5,
"description": "Offset from the start of the media (in seconds)."
},
"17": {
"in": "query",
"name": "partIndex",
"schema": {
"type": "integer"
},
"example": 0,
"description": "Index of the part to transcode. -1 or not specified indicates the server should join parts together in a transcode"
},
"18": {
"in": "query",
"name": "path",
"schema": {
"type": "string"
},
"example": "/library/metadata/151671",
"description": "Internal PMS path of the media to transcode."
},
"19": {
"in": "query",
"name": "peakBitrate",
"schema": {
"type": "integer",
"minimum": 0
},
"example": 12000,
"description": "Maximum bitrate (in kbps) to use in ABR."
},
"20": {
"in": "query",
"name": "photoResolution",
"schema": {
"type": "string",
"pattern": "^\\d[x:]\\d$"
},
"example": "1080x1080",
"description": "Target photo resolution."
},
"21": {
"in": "query",
"name": "protocol",
"schema": {
"type": "string",
"enum": ["http", "hls", "dash"]
},
"example": "dash",
"description": "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)\n"
},
"22": {
"in": "query",
"name": "secondsPerSegment",
"schema": {
"type": "integer"
},
"example": 5,
"description": "Number of seconds to include in each transcoded segment"
},
"23": {
"in": "query",
"name": "subtitleSize",
"schema": {
"type": "integer",
"minimum": 1
},
"example": 50,
"description": "Percentage of original subtitle size to use when burning subtitles (100 is equivalent to original size, 50 is half, ect)"
},
"24": {
"in": "query",
"name": "subtitles",
"schema": {
"type": "string",
"enum": [
"auto",
"burn",
"none",
"sidecar",
"embedded",
"segmented",
"unknown"
]
},
"example": "Burn",
"description": "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\n"
},
"25": {
"in": "query",
"name": "videoBitrate",
"schema": {
"type": "integer",
"minimum": 0
},
"example": 12000,
"description": "Target video bitrate (in kbps)."
},
"26": {
"in": "query",
"name": "videoQuality",
"schema": {
"type": "integer",
"minimum": 0,
"maximum": 99
},
"example": 50,
"description": "Target photo quality."
},
"27": {
"in": "query",
"name": "videoResolution",
"schema": {
"type": "string",
"pattern": "^\\d[x:]\\d$"
},
"example": "1080x1080",
"description": "Target maximum video resolution."
},
"28": {
"in": "header",
"name": "X-Plex-Client-Identifier",
"schema": {
"type": "string"
},
"required": true,
"description": "Unique per client."
},
"29": {
"in": "header",
"name": "X-Plex-Client-Profile-Extra",
"schema": {
"type": "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%2Chevc&audioCodec=aac&protocol=dash)",
"description": "See [Profile Augmentations](#section/API-Info/Profile-Augmentations) ."
},
"30": {
"in": "header",
"name": "X-Plex-Client-Profile-Name",
"schema": {
"type": "string"
},
"example": "generic",
"description": "Which built in Client Profile to use in the decision. Generally should only be used to specify the Generic profile."
},
"31": {
"in": "header",
"name": "X-Plex-Device",
"schema": {
"type": "string"
},
"example": "Windows",
"description": "Device the client is running on"
},
"32": {
"in": "header",
"name": "X-Plex-Model",
"schema": {
"type": "string"
},
"example": "standalone",
"description": "Model of the device the client is running on"
},
"33": {
"in": "header",
"name": "X-Plex-Platform",
"schema": {
"type": "string"
},
"example": "Chrome",
"description": "Client Platform"
},
"34": {
"in": "header",
"name": "X-Plex-Platform-Version",
"schema": {
"type": "string"
},
"example": 135,
"description": "Client Platform Version"
},
"35": {
"in": "header",
"name": "X-Plex-Session-Identifier",
"schema": {
"type": "string"
},
"description": "Unique per client playback session. Used if a client can playback multiple items at a time (such as a browser with multiple tabs)"
},
"mediaQuery": {
"in": "query",
"name": "mediaQuery",
"schema": {
"type": "object"
},
"examples": {
"simplyAnd": {
"description": "Represents type = 4 AND sourceType = 2 AND title = \"24\"",
"value": {
"type": 4,
"sourceType": 2,
"title=": 24
}
},
"sorting": {
"description": "Represents type = 4 AND sourceType = 2 AND title IS \\\"24\\\" sort by duration in descending order and index (ascending)\"",
"value": {
"type": 4,
"sourceType": 2,
"title=": 24,
"sort": ["duration:desc", "index"]
}
},
"implicitOr": {
"description": "Represents (rating=1 OR rating=2 OR rating=3) AND index=5",
"value": {
"rating": [1, 2, 3],
"index": 5
}
},
"complex": {
"description": "Represents (index = 1 OR rating = 2) AND duration = 10",
"value": {
"push": 1,
"index": 1,
"or": 1,
"rating": 2,
"pop": 1,
"duration": 10
}
}
},
"description": "This is a complex query built of several parameters. See [API Info section](#section/API-Info/Media-Queries) for information on building media queries"
},
"composite": {
"in": "query",
"name": "composite",
"schema": {
"type": "object",
"properties": {
"rows": {
"type": "integer",
"description": "Number of rows to construct in the composite image"
},
"cols": {
"type": "integer",
"description": "Number of columns to construct in the composite image"
},
"width": {
"type": "integer",
"description": "The width of the image"
},
"height": {
"type": "integer",
"description": "The height of the image"
},
"border": {
"type": "integer",
"description": "The width of the intra-image border"
},
"type": {
"type": "integer",
"description": "Limit composite to specified metadata types"
},
"format": {
"type": "string",
"enum": ["jpg", "png"],
"description": "The image type"
},
"crop": {
"type": "string",
"enum": ["center", "top"],
"description": "Where to crop source images to fit into composite image proportions"
},
"repeat": {
"type": "boolean",
"description": "Allow repetion of images if there are not enough source images to fill grid"
},
"media": {
"type": "string",
"enum": ["thumb", "art", "banner"],
"description": "The default image type to use as the sources"
},
"backgroundColor": {
"type": "string",
"description": "6 character hex RGB value for background color for image"
}
}
},
"examples": {
"default": {
"description": "The default parameters if none are provided",
"value": {
"rows": 2,
"cols": 2,
"width": 512,
"height": 512,
"border": 0,
"type": -1,
"format": "jpg",
"crop": "center",
"repeat": true,
"media": "thumb",
"backgroundColor": 0
}
},
"smallerImage": {
"description": "Get a composite image in a smaller size",
"value": {
"height": 256,
"width": 256
}
}
}
},
"transcodeType": {
"in": "path",
"name": "transcodeType",
"description": "Type of transcode media",
"required": true,
"schema": {
"type": "string",
"enum": ["video", "music", "audio", "subtitles"]
}
},
"transcodeSessionId": {
"in": "query",
"name": "transcodeSessionId",
"description": "Transcode session UUID",
"schema": {
"type": "string"
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"text/html": {
"examples": {
"ok": {
"summary": "OK",
"value": ""
}
}
}
}
},
"204": {
"description": "No Content",
"content": {
"text/html": {
"examples": {
"noContent": {
"summary": "No Content",
"value": ""
}
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"text/html": {
"examples": {
"badRequest": {
"summary": "A parameter has a bad value or required parameter is missing",
"value": "<html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>"
}
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"text/html": {
"examples": {
"forbidden": {
"summary": "Forbidden",
"value": "<html><head><title>Forbidden</title></head><body><h1>403 Forbidden</h1></body></html>"
}
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
},
"409": {
"description": "Conflict",
"content": {
"text/html": {
"examples": {
"conflict": {
"summary": "Conflict",
"value": "<html><head><title>Conflict</title></head><body><h1>409 Conflict</h1></body></html>"
}
}
}
}
},
"responses-200": {
"description": "OK",
"headers": {
"X-Plex-Container-Total-Size": {
"description": "Provided on all MediaContainer objects indicating the total size of objects available",
"schema": {
"type": "integer"
}
},
"X-Plex-Container-Start": {
"description": "Provided on all MediaContainer objects indicating the offset of where this container page starts",
"schema": {
"type": "integer"
}
}
},
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/MediaContainer"
},
{
"type": "object",
"properties": {
"Hub": {
"type": "array",
"items": {
"$ref": "#/components/schemas/hub"
}
}
}
}
]
}
}
},
"examples": {
"someHubs": {
"summary": "An example of global hubs",
"value": {
"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-responses-200": {
"description": "OK",
"headers": {
"X-Plex-Container-Total-Size": {
"description": "Provided on all MediaContainer objects indicating the total size of objects available",
"schema": {
"type": "integer"
}
},
"X-Plex-Container-Start": {
"description": "Provided on all MediaContainer objects indicating the offset of where this container page starts",
"schema": {
"type": "integer"
}
}
},
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/MediaContainer"
},
{
"type": "object",
"properties": {
"Hub": {
"type": "array",
"items": {
"type": "object",
"properties": {
"identifier": {
"type": "string",
"description": "The identifier for this hub"
},
"title": {
"type": "string",
"description": "The title of this hub"
},
"recommendationsVisibility": {
"type": "string",
"enum": ["all", "none", "admin", "shared"],
"description": "The visibility of this hub in recommendations:\n - all: Visible to all users\n - none: Visible to no users\n - admin: Visible to only admin users\n - shared: Visible to shared users\n"
},
"homeVisibility": {
"type": "string",
"enum": ["all", "none", "admin", "shared"],
"description": "Whether this hub is visible on the home screen\n - all: Visible to all users\n - none: Visible to no users\n - admin: Visible to only admin users\n - shared: Visible to shared users\n"
},
"promotedToRecommended": {
"type": "boolean",
"description": "Whether this hub is promoted to all for recommendations"
},
"promotedToOwnHome": {
"type": "boolean",
"description": "Whether this hub is visible to admin user home"
},
"promotedToSharedHome": {
"type": "boolean",
"description": "Whether this hub is visible to shared user's home"
}
}
}
}
}
}
]
}
}
},
"examples": {
"someHubs": {
"summary": "An example of movie managed hubs",
"value": {
"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
}
]
}
}
}
}
}
}
},
"post-responses-200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/MediaContainer"
},
{
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"type": {
"type": "string",
"enum": [
"intro",
"commercial",
"bookmark",
"resume",
"credit"
]
},
"startTimeOffset": {
"type": "integer"
},
"endTimeOffset": {
"type": "integer"
},
"title": {
"type": "string"
},
"color": {
"type": "string"
}
},
"additionalProperties": true
}
]
}
}
},
"examples": {
"creditMarker": {
"value": {
"MediaContainer": {
"size": 1,
"Marker": [
{
"final": true,
"id": 1025,
"type": "credits",
"startTimeOffset": 8249805,
"endTimeOffset": 8715339
}
]
}
}
}
}
}
}
},
"responses-400": {
"description": "Request parameters are bad, such as an `endTimeOffset` prior to the `startTimeOffset`",
"content": {
"text/html": {
"examples": {
"badRequest": {
"summary": "A parameter has a bad value or required parameter is missing",
"value": "<html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>"
}
}
}
}
},
"slash-get-responses-200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"properties": {
"MediaContainer": {
"type": "object",
"properties": {
"allowSync": {
"type": "boolean"
},
"art": {
"type": "string"
},
"content": {
"type": "string",
"description": "The flavors of directory found here:\n - Primary: (e.g. all, On Deck) These are still used in some clients to provide \"shortcuts\" to subsets of media. However, with the exception of On Deck, all of them can be created by media queries, and the desire is to allow these to be customized by users.\n - Secondary: These are marked with `\"secondary\": true` and were used by old clients to provide nested menus allowing for primative (but structured) navigation.\n - Special: There is a By Folder entry which allows browsing the media by the underlying filesystem structure, and there's a completely obsolete entry marked `\"search\": true` which used to be used to allow clients to build search dialogs on the fly."
},
"identifier": {
"type": "string"
},
"librarySectionID": {
"type": "integer"
},
"mediaTagPrefix": {
"type": "string"
},
"mediaTagVersion": {
"type": "integer"
},
"size": {
"type": "integer"
},
"sortAsc": {
"type": "boolean"
},
"thumb": {
"type": "string"
},
"title1": {
"type": "string"
},
"viewGroup": {
"type": "string"
},
"viewMode": {
"type": "integer"
},
"Directory": {
"type": "array",
"items": {
"$ref": "#/components/schemas/metadata"
}
}
}
}
}
},
"examples": {
"movie": {
"value": {
"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"
}
]
}
]
}
}
}
}
}
}
},
"requestHandler_slash-get-responses-200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/serverConfiguration"
},
{
"type": "object",
"properties": {
"Directory": {
"type": "array",
"items": {
"type": "object",
"properties": {
"count": {
"type": "integer"
},
"key": {
"type": "string",
"description": "The key where this directory is found"
},
"title": {
"type": "string"
}
}
}
}
}
}
]
}
}
},
"examples": {
"info": {
"value": {
"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,
"myPlexUsername": "me@somewhere.else",
"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"
}
]
}
}
}
}
}
}
},
"responses-403": {
"description": "The media is not accessible to the user",
"content": {
"text/html": {
"examples": {
"forbidden": {
"summary": "Forbidden",
"value": "<html><head><title>Forbidden</title></head><body><h1>403 Forbidden</h1></body></html>"
}
}
}
}
},
"responses-404": {
"description": "The stream doesn't exist, or the loudness feature is not available on this PMS",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
},
"dvrRequestHandler_slash-get-responses-200": {
"description": "OK",
"headers": {
"X-Plex-Container-Total-Size": {
"description": "Provided on all MediaContainer objects indicating the total size of objects available",
"schema": {
"type": "integer"
}
},
"X-Plex-Container-Start": {
"description": "Provided on all MediaContainer objects indicating the offset of where this container page starts",
"schema": {
"type": "integer"
}
}
},
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/mediaContainerWithStatus_properties-MediaContainer"
},
{
"type": "object",
"properties": {
"DVR": {
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"language": {
"type": "string"
},
"lineup": {
"type": "string"
},
"uuid": {
"type": "string"
},
"Device": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Device-items"
}
}
}
}
}
}
}
]
}
}
},
"examples": {
"simple": {
"value": {
"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",
"uri": "http://10.0.0.42",
"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"
}
]
}
}
}
}
}
}
},
"metadataAgentProviderManager_slash-get-responses-200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/MediaContainer"
},
{
"type": "object",
"properties": {
"MetadataAgentProvider": {
"type": "array",
"items": {
"$ref": "#/components/schemas/metadataAgentProvider"
}
}
}
}
]
}
}
},
"examples": {
"Themoviedb Metadata Provider": {
"value": {
"MediaContainer": {
"size": 1,
"MetadataAgentProvider": [
{
"id": "1",
"identifier": "tv.plex.agents.custom.themoviedb",
"title": "The Movie Database",
"uri": "http://localhost/themoviedb/api",
"agentType": "primary",
"MetadataType": [
{
"type": 1
},
{
"type": 2
},
{
"type": 3
},
{
"type": 4
}
],
"online": true
}
]
}
}
}
}
}
}
},
"slash-post-responses-200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/mediaContainerWithPlaylistMetadata"
},
"examples": {
"playlist": {
"description": "A created playlist",
"value": {
"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
}
]
}
}
}
}
}
}
},
"historyAll-get-responses-200": {
"description": "OK",
"headers": {
"X-Plex-Container-Total-Size": {
"description": "Provided on all MediaContainer objects indicating the total size of objects available",
"schema": {
"type": "integer"
}
},
"X-Plex-Container-Start": {
"description": "Provided on all MediaContainer objects indicating the offset of where this container page starts",
"schema": {
"type": "integer"
}
}
},
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/properties-MediaContainer"
},
{
"type": "object",
"properties": {
"Metadata": {
"type": "array",
"items": {
"type": "object",
"properties": {
"historyKey": {
"type": "string",
"description": "The key for this individual history item"
},
"key": {
"type": "string",
"description": "The metadata key for the item played"
},
"ratingKey": {
"type": "string",
"description": "The rating key for the item played"
},
"librarySectionID": {
"type": "string",
"description": "The library section id containing the item played"
},
"title": {
"type": "string",
"description": "The title of the item played"
},
"type": {
"type": "string",
"description": "The metadata type of the item played"
},
"thumb": {
"type": "string",
"description": "The thumb of the item played"
},
"originallyAvailableAt": {
"type": "string",
"description": "The originally available at of the item played"
},
"viewedAt": {
"type": "integer",
"description": "The time when the item was played"
},
"accountID": {
"type": "integer",
"description": "The account id of this playback"
},
"deviceID": {
"type": "integer",
"description": "The device id which played the item"
}
}
}
}
}
}
]
}
}
},
"examples": {
"aHistory": {
"description": "OK",
"value": {
"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
}
]
}
}
}
}
}
}
}
}
},
"tags": [
{
"name": "General",
"description": "General endpoints for basic PMS operation not specific to any media provider"
},
{
"name": "Provider",
"description": "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](#section/API-Info/Media-Providers) for more information on how to use media providers."
},
{
"name": "Hubs",
"description": "The hubs within a media provider"
},
{
"name": "Search",
"description": "The search feature within a media provider"
},
{
"name": "Rate",
"description": "The rate feature within a media provider"
},
{
"name": "Playlist",
"description": "The playlist feature within a media provider\nPlaylists 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.\nRetrieving a playlist, or its items, will trigger a refresh of its metadata. This may cause the duration and number of items to change."
},
{
"name": "Content",
"description": "The actual content of the media provider"
},
{
"name": "Play Queue",
"description": "The playqueue feature within a media provider\nA 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.\nPlay 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. \nYou 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.\nAll 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.\nThe 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."
},
{
"name": "Timeline",
"description": "The actions feature within a media provider"
},
{
"name": "Library",
"description": "Library endpoints which are outside of the Media Provider API. Typically this is manipulation of the library (adding/removing sections, modifying preferences, etc)."
},
{
"name": "Library Playlists",
"description": "Endpoints for manipulating playlists.",
"x-displayName": "Library: Playlists"
},
{
"name": "Library Collections",
"description": "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.",
"x-displayName": "Library: Collections"
},
{
"name": "Status",
"description": "The status endpoints give you information about current playbacks, play history, and even terminating sessions."
},
{
"name": "Activities",
"description": "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.\n\nActivities are associated with HTTP replies via a special `X-Plex-Activity` header which contains the UUID of the activity.\n\nActivities are optional cancellable. If cancellable, they may be cancelled via the `DELETE` endpoint.\n"
},
{
"name": "Updater",
"description": "This describes the API for searching and applying updates to the Plex Media Server.\nUpdates to the status can be observed via the Event API.\n"
},
{
"name": "Butler",
"description": "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."
},
{
"name": "Events",
"description": "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.\n\nTwo protocols for receiving the events are available: EventSource (also known as SSE), and WebSocket.\n"
},
{
"name": "DVRs",
"description": "The DVR provides means to watch and record live TV. This section of endpoints describes how to setup the DVR itself\n"
},
{
"name": "Devices",
"description": "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\n\nNetwork 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.\n\nExample SSDP output\n```\n<root xmlns=\"urn:schemas-upnp-org:device-1-0\">\n <specVersion>\n <major>1</major>\n <minor>0</minor>\n </specVersion>\n <device>\n <deviceType>urn:plex-tv:device:Media:1</deviceType>\n <friendlyName>Turing Hopper 3000</friendlyName>\n <manufacturer>Plex, Inc.</manufacturer>\n <manufacturerURL>https://plex.tv/</manufacturerURL>\n <modelDescription>Turing Hopper 3000 Media Grabber</modelDescription>\n <modelName>Plex Media Grabber</modelName>\n <modelNumber>1</modelNumber>\n <modelURL>https://plex.tv</modelURL>\n <UDN>uuid:42fde8e4-93b6-41e5-8a63-12d848655811</UDN>\n <serviceList>\n <service>\n <URLBase>http://10.0.0.5:8088</URLBase>\n <serviceType>urn:plex-tv:service:MediaGrabber:1</serviceType>\n <serviceId>urn:plex-tv:serviceId:MediaGrabber</serviceId>\n </service>\n </serviceList>\n </device>\n</root>\n```\n\n - UDN: (string) A UUID for the device. This should be unique across models of a device at minimum.\n - URLBase: (string) The base HTTP URL for the device from which all of the other endpoints are hosted.\n"
},
{
"name": "EPG",
"description": "The EPG (Electronic Program Guide) is responsible for obtaining metadata for what is airing on each channel and when\n"
},
{
"name": "Subscriptions",
"description": "Subscriptions determine which media will be recorded and the criteria for selecting an airing when multiple are available\n"
},
{
"name": "Live TV",
"description": "LiveTV contains the playback sessions of a channel from a DVR device\n"
},
{
"name": "Log",
"description": "Logging mechanism to allow clients to log to the server"
},
{
"name": "UltraBlur",
"description": "Service provided to compute UltraBlur colors and images."
}
],
"x-tagGroups": [
{
"name": "General",
"tags": [
"General",
"Library",
"Library Playlists",
"Library Collections",
"Status",
"Activities",
"Updater",
"Butler",
"Events",
"Log",
"Preferences",
"Download Queue",
"UltraBlur",
"Transcoder"
]
},
{
"name": "Media Provider",
"tags": [
"Provider",
"Metadata Agents",
"Content",
"Hubs",
"Search",
"Rate",
"Playlist",
"Play Queue",
"Timeline"
]
},
{
"name": "DVR",
"tags": ["DVRs", "Devices", "EPG", "Subscriptions", "Live TV"]
}
],
"paths": {
"/": {
"get": {
"tags": ["General"],
"summary": "Get PMS info",
"description": "Information about this PMS setup and configuration",
"operationId": "getSlash",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/serverConfiguration"
},
{
"type": "object",
"properties": {
"Directory": {
"type": "array",
"items": {
"type": "object",
"properties": {
"count": {
"type": "integer"
},
"key": {
"type": "string",
"description": "The key where this directory is found"
},
"title": {
"type": "string"
}
}
}
}
}
}
]
}
}
},
"examples": {
"info": {
"value": {
"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,
"myPlexUsername": "me@somewhere.else",
"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"
}
]
}
}
}
}
}
}
}
}
}
},
"/:/eventsource/notifications": {
"get": {
"tags": ["Events"],
"summary": "Connect to Eventsource",
"description": "Connect to the event source to get a stream of events",
"operationId": "eventsourceGetSlash",
"parameters": [
{
"in": "query",
"name": "filter",
"schema": {
"type": "array",
"items": {
"type": "string"
}
},
"description": "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 `filters` parameter. For example:\n\n- `filters=-log`: All event types except logs (the default).\n- `filters=foo,bar`: Only the foo and bar event types.\n- `filters=`: All events types.\n- `filters=-foo,bar`: All event types except foo and bar.\n"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/octet-stream": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
}
}
}
},
"/:/prefs": {
"get": {
"tags": ["Preferences"],
"summary": "Get all preferences",
"description": "Get the list of all preferences",
"operationId": "preferencesGetSlash",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/mediaContainerWithSettings"
},
"examples": {
"somePrefs": {
"value": {
"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"
}
]
}
}
}
}
}
}
}
}
},
"put": {
"tags": ["Preferences"],
"summary": "Set preferences",
"description": "Set a set of preferences in query parameters",
"operationId": "preferencesPutSlash",
"parameters": [
{
"in": "query",
"name": "prefs",
"schema": {
"type": "object"
},
"required": true,
"example": {
"FriendlyName": "My Server",
"sendCrashReports": 1,
"ScheduledLibraryUpdateInterval": 3600
}
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
},
"400": {
"description": "Attempt to set a preferences that doesn't exist",
"content": {
"text/html": {
"examples": {
"badRequest": {
"summary": "A parameter has a bad value or required parameter is missing",
"value": "cannot set preference value for unknown preference foo"
}
}
}
}
},
"403": {
"description": "Attempt to set a preferences that doesn't exist",
"content": {
"text/html": {
"examples": {
"forbidden": {
"summary": "Forbidden",
"value": "<html><head><title>Forbidden</title></head><body><h1>403 Forbidden</h1></body></html>"
}
}
}
}
}
}
}
},
"/:/prefs/get": {
"get": {
"tags": ["Preferences"],
"summary": "Get a preferences",
"description": "Get a single preference and value",
"operationId": "preferencesGetGet",
"parameters": [
{
"in": "query",
"name": "id",
"schema": {
"type": "string"
},
"description": "The preference to fetch"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/mediaContainerWithSettings"
},
"examples": {
"friendlyName": {
"value": {
"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"
}
]
}
}
},
"sendCrashReports": {
"value": {
"MediaContainer": {
"size": 1,
"Setting": [
{
"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"
}
]
}
}
},
"scheduledLibraryUpdateInterval": {
"value": {
"MediaContainer": {
"size": 1,
"Setting": [
{
"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"
}
]
}
}
},
"onDeckWindow": {
"value": {
"MediaContainer": {
"size": 1,
"Setting": [
{
"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"
}
]
}
}
},
"libraryVideoPlayedAtBehaviour": {
"value": {
"MediaContainer": {
"size": 1,
"Setting": [
{
"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"
}
]
}
}
},
"transcoderH264MinimumCRF": {
"value": {
"MediaContainer": {
"size": 1,
"Setting": [
{
"id": "TranscoderH264MinimumCRF",
"label": "",
"summary": "",
"type": "double",
"default": 16,
"value": 16,
"hidden": true,
"advanced": false,
"group": "transcoder"
}
]
}
}
}
}
}
}
},
"404": {
"description": "No preference with the provided name found.",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
}
}
}
},
"/:/rate": {
"put": {
"tags": ["Rate"],
"operationId": "putRate",
"summary": "Rate an item",
"description": "Set the rating on an item.\nThis API does respond to the GET verb but applications should use PUT",
"parameters": [
{
"in": "query",
"name": "identifier",
"required": true,
"schema": {
"type": "string"
},
"description": "The identifier of the media provider containing the media to rate. Typically `com.plexapp.plugins.library`"
},
{
"in": "query",
"name": "key",
"required": true,
"schema": {
"type": "string"
},
"description": "The key of the item to rate. This is the `ratingKey` found in metadata items"
},
{
"in": "query",
"name": "rating",
"required": true,
"schema": {
"type": "number",
"minimum": 0,
"maximum": 10
},
"description": "The rating to give the item."
},
{
"in": "query",
"name": "ratedAt",
"required": false,
"schema": {
"type": "integer"
},
"description": "The time when the rating occurred. If not present, interpreted as now."
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
},
"400": {
"description": "Bad Request. Can occur when parameters are of the wrong type, missing, or if the `ratedAt` is in the future",
"content": {
"text/html": {
"examples": {
"badRequest": {
"summary": "A parameter has a bad value or required parameter is missing",
"value": "<html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>"
}
}
}
}
},
"404": {
"description": "Indicates that no library with the provide identifier can be found or no item can be found with the rating key",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
}
}
}
},
"/:/scrobble": {
"put": {
"tags": ["Timeline"],
"operationId": "putScrobble",
"summary": "Mark an item as played",
"description": "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\nThis API does respond to the GET verb but applications should use PUT",
"parameters": [
{
"in": "query",
"name": "identifier",
"required": true,
"schema": {
"type": "string"
},
"description": "The identifier of the media provider containing the media to rate. Typically `com.plexapp.plugins.library`"
},
{
"in": "query",
"name": "key",
"required": false,
"schema": {
"type": "string"
},
"description": "The key of the item to rate. This is the `ratingKey` found in metadata items"
},
{
"in": "query",
"name": "uri",
"required": false,
"schema": {
"type": "string"
},
"description": "The URI of the item to mark as played. See intro for description of the URIs"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
},
"400": {
"description": "Bad Request. Can occur when parameters are of the wrong type, or missing",
"content": {
"text/html": {
"examples": {
"badRequest": {
"summary": "A parameter has a bad value or required parameter is missing",
"value": "<html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>"
}
}
}
}
},
"404": {
"description": "Indicates that no library with the provide identifier can be found or no item can be found with the rating key",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
}
}
}
},
"/:/timeline": {
"post": {
"tags": ["Timeline"],
"summary": "Report media timeline",
"description": "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).\n",
"operationId": "timelinePostSlash",
"parameters": [
{
"in": "query",
"name": "key",
"schema": {
"type": "string"
},
"example": "/foo",
"description": "The details key for the item."
},
{
"in": "query",
"name": "ratingKey",
"schema": {
"type": "string"
},
"example": "xyz",
"description": "The rating key attribute for the item."
},
{
"in": "query",
"name": "state",
"schema": {
"type": "string",
"enum": ["stopped", "buffering", "playing", "paused"]
},
"example": "playing",
"description": "The current state of the media."
},
{
"in": "query",
"name": "playQueueItemID",
"schema": {
"type": "string"
},
"example": 123,
"description": "If playing media from a play queue, the play queue's ID."
},
{
"in": "query",
"name": "time",
"schema": {
"type": "integer"
},
"example": 0,
"description": "The current time offset of playback in ms."
},
{
"in": "query",
"name": "duration",
"schema": {
"type": "integer"
},
"example": 10000,
"description": "The total duration of the item in ms."
},
{
"in": "query",
"name": "continuing",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"example": 1,
"description": "When state is `stopped`, a flag indicating whether or not the client is going to continue playing anothe item."
},
{
"in": "query",
"name": "updated",
"schema": {
"type": "integer"
},
"example": 14200000,
"description": "Used when a sync client comes online and is syncing media timelines, holds the time at which the playback state was last updated."
},
{
"in": "query",
"name": "offline",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"example": 1,
"description": "Also used by sync clients, used to indicate that a timeline is being synced from being offline, as opposed to being \"live\"."
},
{
"in": "query",
"name": "timeToFirstFrame",
"schema": {
"type": "integer"
},
"example": 1000,
"description": "Time in seconds till first frame is displayed. Sent only on the first playing timeline request."
},
{
"in": "query",
"name": "timeStalled",
"schema": {
"type": "integer"
},
"example": 1000,
"description": "Time in seconds spent buffering since last request."
},
{
"in": "query",
"name": "bandwidth",
"schema": {
"type": "integer"
},
"example": 100,
"description": "Bandwidth in kbps as estimated by the client."
},
{
"in": "query",
"name": "bufferedTime",
"schema": {
"type": "integer"
},
"example": 100,
"description": "Amount of time in seconds buffered by client. Omit if computed by `bufferedSize` below."
},
{
"in": "query",
"name": "bufferedSize",
"schema": {
"type": "integer"
},
"example": 1024,
"description": "Size in kilobytes of data buffered by client. Omit if computed by `bufferedTime` above"
},
{
"in": "header",
"name": "X-Plex-Client-Identifier",
"schema": {
"type": "string"
},
"required": true,
"description": "Unique per client."
},
{
"in": "header",
"name": "X-Plex-Session-Identifier",
"schema": {
"type": "string"
},
"description": "Unique per client playback session. Used if a client can playback multiple items at a time (such as a browser with multiple tabs)"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/serverConfiguration"
},
{
"type": "object",
"properties": {
"terminationCode": {
"type": "integer",
"description": "A code describing why the session was terminated by the server."
},
"terminationText": {
"type": "string",
"description": "A user friendly and localized text describing why the session was terminated by the server."
},
"Bandwidths": {
"type": "object",
"description": "A list of media times and bandwidths when trascoding is using with auto adjustment of bandwidth",
"properties": {
"Bandwidth": {
"type": "array",
"items": {
"type": "object",
"properties": {
"time": {
"type": "integer",
"description": "Media playback time where this bandwidth started"
},
"bandwidth": {
"type": "integer",
"description": "The bandwidth at this time in kbps"
},
"resolution": {
"type": "string",
"description": "The user-friendly resolution at this time"
}
}
}
}
}
}
}
}
]
}
}
},
"examples": {
"normal": {
"description": "Normal response",
"value": {
"MediaContainer": {
"size": 0
}
}
},
"adminTerminatedSession": {
"description": "Admin Terminated the session",
"value": {
"MediaContainer": {
"size": 0,
"terminationCode": 2006,
"terminationText": "Admin terminated playback with reason: Go Away"
}
}
},
"bandwidthChanges": {
"description": "Bandwidth changes included",
"value": {
"MediaContainer": {
"size": 1,
"Bandwidths": {
"Bandwidth": [
{
"time": 0,
"bandwidth": 15000,
"resolution": "1080p"
},
{
"time": 1050008,
"bandwidth": 12000,
"resolution": "1080p"
},
{
"time": 1053011,
"bandwidth": 8000,
"resolution": "1080p"
},
{
"time": 1098014,
"bandwidth": 4000,
"resolution": "720p"
},
{
"time": 1101017,
"bandwidth": 2000,
"resolution": "SD"
},
{
"time": 1104020,
"bandwidth": 1000,
"resolution": "SD"
},
{
"time": 1107023,
"bandwidth": 750,
"resolution": "SD"
},
{
"time": 1110026,
"bandwidth": 350,
"resolution": "SD"
},
{
"time": 1113029,
"bandwidth": 750,
"resolution": "SD"
},
{
"time": 1116032,
"bandwidth": 1000,
"resolution": "SD"
},
{
"time": 1119035,
"bandwidth": 4000,
"resolution": "720p"
},
{
"time": 1122038,
"bandwidth": 10000,
"resolution": "1080p"
}
]
}
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/400"
}
}
}
},
"/:/unscrobble": {
"put": {
"tags": ["Timeline"],
"operationId": "putUnscrobble",
"summary": "Mark an item as unplayed",
"description": "Mark an item as unplayed. The client must provide either the `key` or `uri` query parameter\nThis API does respond to the GET verb but applications should use PUT",
"parameters": [
{
"in": "query",
"name": "identifier",
"required": true,
"schema": {
"type": "string"
},
"description": "The identifier of the media provider containing the media to rate. Typically `com.plexapp.plugins.library`"
},
{
"in": "query",
"name": "key",
"required": false,
"schema": {
"type": "string"
},
"description": "The key of the item to rate. This is the `ratingKey` found in metadata items"
},
{
"in": "query",
"name": "uri",
"required": false,
"schema": {
"type": "string"
},
"description": "The URI of the item to mark as played. See intro for description of the URIs"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
},
"400": {
"description": "Bad Request. Can occur when parameters are of the wrong type, or missing",
"content": {
"text/html": {
"examples": {
"badRequest": {
"summary": "A parameter has a bad value or required parameter is missing",
"value": "<html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>"
}
}
}
}
},
"404": {
"description": "Indicates that no library with the provide identifier can be found or no item can be found with the rating key",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
}
}
}
},
"/:/websocket/notifications": {
"get": {
"tags": ["Events"],
"summary": "Connect to WebSocket",
"description": "Connect to the web socket to get a stream of events",
"operationId": "websocketGetSlash",
"parameters": [
{
"in": "query",
"name": "filter",
"schema": {
"type": "array",
"items": {
"type": "string"
}
},
"description": "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 `filters` parameter. For example:\n\n- `filters=-log`: All event types except logs (the default).\n- `filters=foo,bar`: Only the foo and bar event types.\n- `filters=`: All events types.\n- `filters=-foo,bar`: All event types except foo and bar.\n"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/octet-stream": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
}
}
}
},
"/activities": {
"get": {
"tags": ["Activities"],
"summary": "Get all activities",
"description": "List all activities on the server. Admins can see all activities but other users can only see their own",
"operationId": "activitiesGetSlash",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"type": "object",
"properties": {
"Activity": {
"type": "array",
"items": {
"type": "object",
"properties": {
"uuid": {
"type": "string",
"description": "The ID of the activity"
},
"type": {
"type": "string",
"description": "The type of activity"
},
"cancellable": {
"type": "boolean",
"description": "Indicates whether this activity can be cancelled"
},
"userID": {
"type": "integer",
"description": "The user this activity belongs to"
},
"title": {
"type": "string",
"description": "A user-friendly title for this activity"
},
"subtitle": {
"type": "string",
"description": "A user-friendly sub-title for this activity"
},
"progress": {
"type": "number",
"maximum": 100,
"minimum": -1,
"description": "A progress percentage. A value of -1 means the progress is indeterminate"
},
"Context": {
"type": "object",
"additionalProperties": true,
"description": "An object with additional values"
},
"Response": {
"type": "object",
"additionalProperties": true,
"description": "An object with the response to the async opperation"
}
}
}
}
}
}
]
}
}
},
"examples": {
"activity": {
"description": "Activity of updating EPG and detecting credits",
"value": {
"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
}
]
}
}
}
}
}
}
}
}
}
},
"/activities/{activityId}": {
"delete": {
"tags": ["Activities"],
"security": [
{
"user_token": ["admin"]
}
],
"summary": "Cancel a running activity",
"description": "Cancel a running activity. Admins can cancel all activities but other users can only cancel their own",
"operationId": "activitiesDeleteActivity",
"parameters": [
{
"in": "path",
"name": "activityId",
"schema": {
"type": "string"
},
"example": "d6199ba1-fb5e-4cae-bf17-1a5369c1cf1e",
"description": "The UUID of the activity to cancel.",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
},
"400": {
"description": "Activity is not cancellable",
"content": {
"text/html": {
"examples": {
"badRequest": {
"summary": "A parameter has a bad value or required parameter is missing",
"value": "<html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>"
}
}
}
}
},
"404": {
"description": "No activity with the provided id is found",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
}
}
}
},
"/butler": {
"get": {
"tags": ["Butler"],
"security": [
{
"user_token": ["admin"]
}
],
"summary": "Get all Butler tasks",
"description": "Get the list of butler tasks and their scheduling\n",
"operationId": "butlerGetSlash",
"responses": {
"200": {
"description": "Butler tasks",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"ButlerTasks": {
"type": "object",
"properties": {
"ButlerTask": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the task"
},
"interval": {
"type": "integer",
"description": "The interval (in days) of when this task is run. A value of 1 is run every day, 7 is every week, etc."
},
"scheduleRandomized": {
"type": "boolean",
"description": "Indicates whether the timing of the task is randomized within the butler interval"
},
"enabled": {
"type": "boolean",
"description": "Whether this task is enabled or not"
},
"title": {
"type": "string",
"description": "A user-friendly title of the task"
},
"description": {
"type": "string",
"description": "A user-friendly description of the task"
}
}
}
}
}
}
}
},
"examples": {
"tasks": {
"description": "Example tasks",
"value": {
"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
}
]
}
}
}
}
}
}
}
}
},
"post": {
"tags": ["Butler"],
"security": [
{
"user_token": ["admin"]
}
],
"summary": "Start all Butler tasks",
"description": "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:\n\n 1. Any tasks not scheduled to run on the current day will be skipped.\n 2. If a task is configured to run at a random time during the configured window and we are outside that window, the task will start immediately.\n 3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window.\n 4. If we are outside the configured window, the task will start immediately.\n",
"operationId": "butlerPostSlash",
"responses": {
"200": {
"$ref": "#/components/responses/200"
}
}
},
"delete": {
"tags": ["Butler"],
"security": [
{
"user_token": ["admin"]
}
],
"summary": "Stop all Butler tasks",
"description": "This endpoint will stop all currently running tasks and remove any scheduled tasks from the queue.",
"operationId": "butlerDeleteSlash",
"responses": {
"200": {
"$ref": "#/components/responses/200"
}
}
}
},
"/butler/{task}": {
"post": {
"tags": ["Butler"],
"security": [
{
"user_token": ["admin"]
}
],
"summary": "Start a single Butler task",
"description": "This endpoint will attempt to start a specific Butler task by name.\n",
"operationId": "butlerPostTask",
"parameters": [
{
"in": "path",
"name": "task",
"schema": {
"type": "string",
"enum": [
"AutomaticUpdates",
"BackupDatabase",
"ButlerTaskGenerateAdMarkers",
"ButlerTaskGenerateCreditsMarkers",
"ButlerTaskGenerateIntroMarkers",
"ButlerTaskGenerateVoiceActivity",
"CleanOldBundles",
"CleanOldCacheFiles",
"DeepMediaAnalysis",
"GarbageCollectBlobs",
"GarbageCollectLibraryMedia",
"GenerateBlurHashes",
"GenerateChapterThumbs",
"GenerateMediaIndexFiles",
"LoudnessAnalysis",
"MusicAnalysis",
"OptimizeDatabase",
"RefreshEpgGuides",
"RefreshLibraries",
"RefreshLocalMedia",
"RefreshPeriodicMetadata",
"UpgradeMediaAnalysis"
]
},
"description": "The task name",
"required": true
}
],
"responses": {
"200": {
"description": "Task started",
"content": {
"text/html": {
"examples": {
"ok": {
"summary": "OK",
"value": ""
}
}
}
}
},
"202": {
"description": "Task is already running",
"content": {
"text/html": {
"examples": {
"ok": {
"summary": "OK",
"value": ""
}
}
}
}
},
"404": {
"description": "No task with this name was found",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
}
}
},
"delete": {
"tags": ["Butler"],
"security": [
{
"user_token": ["admin"]
}
],
"summary": "Stop a single Butler task",
"description": "This endpoint will stop a currently running task by name, or remove it from the list of scheduled tasks if it exists\n",
"operationId": "butlerDeleteTask",
"parameters": [
{
"in": "path",
"name": "task",
"schema": {
"type": "string",
"enum": [
"AutomaticUpdates",
"BackupDatabase",
"ButlerTaskGenerateAdMarkers",
"ButlerTaskGenerateCreditsMarkers",
"ButlerTaskGenerateIntroMarkers",
"ButlerTaskGenerateVoiceActivity",
"CleanOldBundles",
"CleanOldCacheFiles",
"DeepMediaAnalysis",
"GarbageCollectBlobs",
"GarbageCollectLibraryMedia",
"GenerateBlurHashes",
"GenerateChapterThumbs",
"GenerateMediaIndexFiles",
"LoudnessAnalysis",
"MusicAnalysis",
"OptimizeDatabase",
"RefreshEpgGuides",
"RefreshLibraries",
"RefreshLocalMedia",
"RefreshPeriodicMetadata",
"UpgradeMediaAnalysis"
]
},
"description": "The task name",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
},
"404": {
"description": "No task with this name was found or no task with this name was running",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
}
}
}
},
"/downloadQueue": {
"post": {
"tags": ["Download Queue"],
"operationId": "downloadQueuePost",
"summary": "Get or create a download queue",
"description": "Available: 0.2.0\n\nGet or create a download queue for this client by its client id and for this user as identified by the token\n",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/MediaContainer"
},
{
"type": "object",
"properties": {
"DownloadQueue": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"status": {
"type": "string",
"enum": [
"deciding",
"waiting",
"processing",
"done",
"error"
],
"description": "The state of this queue\n - deciding: At least one item is still being decided\n - waiting: At least one item is waiting for transcode and none are currently transcoding\n - processing: At least one item is being transcoded\n - done: All items are available (or potentially expired)\n - error: At least one item has encountered an error\n"
},
"itemCount": {
"type": "integer"
}
}
}
}
}
}
]
}
}
},
"examples": {
"empty": {
"value": {
"MediaContainer": {
"size": 1,
"DownloadQueue": [
{
"id": 1,
"status": "done",
"itemCount": 0
}
]
}
}
},
"processing": {
"value": {
"MediaContainer": {
"size": 1,
"DownloadQueue": [
{
"id": 1,
"status": "processing",
"itemCount": 32
}
]
}
}
}
}
}
}
}
}
}
},
"/downloadQueue/{queueId}": {
"get": {
"tags": ["Download Queue"],
"operationId": "downloadQueueGetQueue",
"summary": "Get a download queue",
"description": "Available: 0.2.0\n\nGet a download queue by its id\n",
"parameters": [
{
"in": "path",
"name": "queueId",
"schema": {
"type": "integer"
},
"required": true,
"description": "The queue id"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/MediaContainer"
},
{
"type": "object",
"properties": {
"DownloadQueue": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"status": {
"type": "string",
"enum": [
"deciding",
"waiting",
"processing",
"done",
"error"
],
"description": "The state of this queue\n - deciding: At least one item is still being decided\n - waiting: At least one item is waiting for transcode and none are currently transcoding\n - processing: At least one item is being transcoded\n - done: All items are available (or potentially expired)\n - error: At least one item has encountered an error\n"
},
"itemCount": {
"type": "integer"
}
}
}
}
}
}
]
}
}
},
"examples": {
"empty": {
"value": {
"MediaContainer": {
"size": 1,
"DownloadQueue": [
{
"id": 1,
"status": "done",
"itemCount": 0
}
]
}
}
},
"processing": {
"value": {
"MediaContainer": {
"size": 1,
"DownloadQueue": [
{
"id": 1,
"status": "processing",
"itemCount": 32
}
]
}
}
}
}
}
}
}
}
}
},
"/downloadQueue/{queueId}/add": {
"post": {
"tags": ["Download Queue"],
"operationId": "downloadQueuePostQueueAdd",
"summary": "Add to download queue",
"description": "Available: 0.2.0\n\nAdd items to the download queue\n",
"parameters": [
{
"in": "path",
"name": "queueId",
"schema": {
"type": "integer"
},
"required": true,
"description": "The queue id"
},
{
"in": "query",
"name": "keys",
"schema": {
"type": "array",
"items": {
"type": "string"
}
},
"explode": false,
"required": true,
"description": "Keys to add",
"example": ["/library/metadata/3", "/library/metadata/6"]
},
{
"$ref": "#/components/parameters/2"
},
{
"$ref": "#/components/parameters/3"
},
{
"$ref": "#/components/parameters/4"
},
{
"$ref": "#/components/parameters/5"
},
{
"$ref": "#/components/parameters/6"
},
{
"$ref": "#/components/parameters/7"
},
{
"$ref": "#/components/parameters/8"
},
{
"$ref": "#/components/parameters/9"
},
{
"$ref": "#/components/parameters/10"
},
{
"$ref": "#/components/parameters/11"
},
{
"$ref": "#/components/parameters/12"
},
{
"$ref": "#/components/parameters/13"
},
{
"$ref": "#/components/parameters/14"
},
{
"$ref": "#/components/parameters/15"
},
{
"$ref": "#/components/parameters/16"
},
{
"$ref": "#/components/parameters/17"
},
{
"$ref": "#/components/parameters/18"
},
{
"$ref": "#/components/parameters/19"
},
{
"$ref": "#/components/parameters/20"
},
{
"$ref": "#/components/parameters/21"
},
{
"$ref": "#/components/parameters/22"
},
{
"$ref": "#/components/parameters/23"
},
{
"$ref": "#/components/parameters/24"
},
{
"$ref": "#/components/parameters/25"
},
{
"$ref": "#/components/parameters/26"
},
{
"$ref": "#/components/parameters/27"
},
{
"$ref": "#/components/parameters/28"
},
{
"$ref": "#/components/parameters/29"
},
{
"$ref": "#/components/parameters/30"
},
{
"$ref": "#/components/parameters/31"
},
{
"$ref": "#/components/parameters/32"
},
{
"$ref": "#/components/parameters/33"
},
{
"$ref": "#/components/parameters/34"
},
{
"$ref": "#/components/parameters/35"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/MediaContainer"
},
{
"type": "object",
"properties": {
"AddedQueueItems": {
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string",
"description": "The key added to the queue"
},
"id": {
"type": "integer",
"description": "The queue item id that was added or the existing one if an item already exists in this queue with the same parameters"
}
}
}
}
}
}
]
}
}
},
"examples": {
"addingOneItem": {
"value": {
"MediaContainer": {
"size": 1,
"AddedQueueItems": [
{
"key": "/library/metadata/146",
"id": 23
},
{
"key": "/library/metadata/147",
"id": 24
}
]
}
}
}
}
}
}
}
}
}
},
"/downloadQueue/{queueId}/item/{itemId}/media": {
"get": {
"tags": ["Download Queue"],
"operationId": "downloadQueueGetQueueItemItemMedia",
"summary": "Grab download queue media",
"description": "Available: 0.2.0\n\nGrab the media for a download queue item\n",
"parameters": [
{
"in": "path",
"name": "queueId",
"schema": {
"type": "integer"
},
"required": true,
"description": "The queue id"
},
{
"in": "path",
"name": "itemId",
"schema": {
"type": "integer"
},
"example": 32,
"required": true,
"description": "The item ids"
}
],
"responses": {
"200": {
"description": "The raw media file"
},
"503": {
"description": "![503](https://http.cat/503.jpg)\n\nThe queue item is not yet complete and is currently transcoding or waiting to transcode\n",
"headers": {
"Retry-After": {
"schema": {
"type": "integer"
},
"description": "The estimated time before completion or -1 if unknown"
}
}
}
}
}
},
"/downloadQueue/{queueId}/item/{itemId}/decision": {
"get": {
"tags": ["Download Queue"],
"operationId": "downloadQueueGetQueueItemItemDecision",
"summary": "Grab download queue item decision",
"description": "Available: 0.2.0\n\nGrab the decision for a download queue item\n",
"parameters": [
{
"in": "path",
"name": "queueId",
"schema": {
"type": "integer"
},
"required": true,
"description": "The queue id"
},
{
"in": "path",
"name": "itemId",
"schema": {
"type": "integer"
},
"example": 32,
"required": true,
"description": "The item ids"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/mediaContainerWithDecision"
},
"examples": {
"Big-buck-bunny Decision": {
"value": {
"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."
}
}
}
}
}
}
},
"400": {
"description": "The item is not in a state where a decision is available",
"content": {
"text/html": {
"examples": {
"badRequest": {
"summary": "A parameter has a bad value or required parameter is missing",
"value": "<html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>"
}
}
}
}
}
}
}
},
"/downloadQueue/{queueId}/items": {
"get": {
"tags": ["Download Queue"],
"operationId": "downloadQueueGetQueueItems",
"summary": "Get download queue items",
"description": "Available: 0.2.0\n\nGet items from a download queue\n",
"parameters": [
{
"in": "path",
"name": "queueId",
"schema": {
"type": "integer"
},
"required": true,
"description": "The queue id"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/MediaContainer"
},
{
"type": "object",
"properties": {
"DownloadQueueItem": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"queueId": {
"type": "integer"
},
"key": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"deciding",
"waiting",
"processing",
"available",
"error",
"expired"
],
"description": "The state of the item:\n - deciding: The item decision is pending\n - waiting: The item is waiting for transcode\n - processing: The item is being transcoded\n - available: The item is available for download\n - error: The item encountered an error in the decision or transcode\n - expired: The transcoded item has timed out and is no longer available\n"
},
"transcode": {
"type": "object",
"description": "The transcode session object which is not yet documented otherwise it'd be a $ref here."
},
"error": {
"type": "string",
"description": "The error encountered in transcoding or decision"
},
"DecisionResult": {
"type": "object",
"properties": {
"mdeDecisionCode": {
"type": "integer",
"description": "The code indicating the status of evaluation of playback when client indicates `hasMDE=1`"
},
"mdeDecisionText": {
"type": "string",
"description": "Descriptive text for the above code"
},
"availableBandwidth": {
"type": "integer",
"description": "The maximum bitrate set when item was added"
},
"generalDecisionCode": {
"type": "integer"
},
"generalDecisionText": {
"type": "string"
},
"directPlayDecisionCode": {
"type": "integer"
},
"directPlayDecisionText": {
"type": "string"
},
"transcodeDecisionCode": {
"type": "integer"
},
"transcodeDecisionText": {
"type": "string"
}
}
},
"TranscodeSession": {
"type": "object",
"description": "The transcode session if item is currently being transcoded.",
"properties": {
"key": {
"type": "string"
},
"throttled": {
"type": "boolean"
},
"complete": {
"type": "boolean"
},
"progress": {
"type": "number",
"minimum": 0,
"maximum": 100
},
"size": {
"type": "integer"
},
"speed": {
"type": "number"
},
"error": {
"type": "boolean"
},
"duration": {
"type": "integer"
},
"context": {
"type": "string"
},
"sourceVideoCodec": {
"type": "string"
},
"sourceAudioCodec": {
"type": "string"
},
"protocol": {
"type": "string"
},
"transcodeHwRequested": {
"type": "boolean"
},
"transcodeHwFullPipeline": {
"type": "boolean"
}
}
}
}
}
}
}
}
]
}
}
},
"examples": {
"oneItem": {
"value": {
"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."
}
}
]
}
}
},
"processing": {
"value": {
"MediaContainer": {
"size": 1,
"DownloadQueueItem": [
{
"id": 1,
"queueId": 1,
"key": "/library/metadata/3",
"status": "processing",
"DecisionResult": {
"generalDecisionCode": 1001,
"generalDecisionText": "Direct play not available; Conversion OK.",
"directPlayDecisionCode": 3001,
"directPlayDecisionText": "Not enough bandwidth for direct play of this item.",
"transcodeDecisionCode": 1001,
"transcodeDecisionText": "Direct play not available; Conversion OK."
},
"TranscodeSession": {
"key": "/transcode/sessions/e1a515e6-59c3-4c6a-a98c-0c7f727b7ee8",
"throttled": false,
"complete": false,
"progress": 0,
"size": 0,
"speed": 11.24183464050293,
"error": false,
"duration": 300000000,
"context": "streaming",
"sourceVideoCodec": "h264",
"sourceAudioCodec": "aac",
"protocol": "http",
"transcodeHwRequested": false,
"transcodeHwFullPipeline": false
}
}
]
}
}
}
}
}
}
}
}
}
},
"/downloadQueue/{queueId}/items/{itemId}": {
"get": {
"tags": ["Download Queue"],
"operationId": "downloadQueueGetQueueItemsItem",
"summary": "Get download queue items",
"description": "Available: 0.2.0\n\nGet items from a download queue\n",
"parameters": [
{
"in": "path",
"name": "queueId",
"schema": {
"type": "integer"
},
"required": true,
"description": "The queue id"
},
{
"in": "path",
"name": "itemId",
"schema": {
"type": "array",
"items": {
"type": "integer"
}
},
"explode": false,
"example": [32, 345, 23],
"required": true,
"description": "The item ids"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/MediaContainer"
},
{
"type": "object",
"properties": {
"DownloadQueueItem": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"queueId": {
"type": "integer"
},
"key": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"deciding",
"waiting",
"processing",
"available",
"error",
"expired"
],
"description": "The state of the item:\n - deciding: The item decision is pending\n - waiting: The item is waiting for transcode\n - processing: The item is being transcoded\n - available: The item is available for download\n - error: The item encountered an error in the decision or transcode\n - expired: The transcoded item has timed out and is no longer available\n"
},
"transcode": {
"type": "object",
"description": "The transcode session object which is not yet documented otherwise it'd be a $ref here."
},
"error": {
"type": "string",
"description": "The error encountered in transcoding or decision"
},
"DecisionResult": {
"type": "object",
"properties": {
"mdeDecisionCode": {
"type": "integer",
"description": "The code indicating the status of evaluation of playback when client indicates `hasMDE=1`"
},
"mdeDecisionText": {
"type": "string",
"description": "Descriptive text for the above code"
},
"availableBandwidth": {
"type": "integer",
"description": "The maximum bitrate set when item was added"
},
"generalDecisionCode": {
"type": "integer"
},
"generalDecisionText": {
"type": "string"
},
"directPlayDecisionCode": {
"type": "integer"
},
"directPlayDecisionText": {
"type": "string"
},
"transcodeDecisionCode": {
"type": "integer"
},
"transcodeDecisionText": {
"type": "string"
}
}
},
"TranscodeSession": {
"type": "object",
"description": "The transcode session if item is currently being transcoded.",
"properties": {
"key": {
"type": "string"
},
"throttled": {
"type": "boolean"
},
"complete": {
"type": "boolean"
},
"progress": {
"type": "number",
"minimum": 0,
"maximum": 100
},
"size": {
"type": "integer"
},
"speed": {
"type": "number"
},
"error": {
"type": "boolean"
},
"duration": {
"type": "integer"
},
"context": {
"type": "string"
},
"sourceVideoCodec": {
"type": "string"
},
"sourceAudioCodec": {
"type": "string"
},
"protocol": {
"type": "string"
},
"transcodeHwRequested": {
"type": "boolean"
},
"transcodeHwFullPipeline": {
"type": "boolean"
}
}
}
}
}
}
}
}
]
}
}
},
"examples": {
"oneItem": {
"value": {
"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."
}
}
]
}
}
},
"processing": {
"value": {
"MediaContainer": {
"size": 1,
"DownloadQueueItem": [
{
"id": 1,
"queueId": 1,
"key": "/library/metadata/3",
"status": "processing",
"DecisionResult": {
"generalDecisionCode": 1001,
"generalDecisionText": "Direct play not available; Conversion OK.",
"directPlayDecisionCode": 3001,
"directPlayDecisionText": "Not enough bandwidth for direct play of this item.",
"transcodeDecisionCode": 1001,
"transcodeDecisionText": "Direct play not available; Conversion OK."
},
"TranscodeSession": {
"key": "/transcode/sessions/e1a515e6-59c3-4c6a-a98c-0c7f727b7ee8",
"throttled": false,
"complete": false,
"progress": 0,
"size": 0,
"speed": 11.24183464050293,
"error": false,
"duration": 300000000,
"context": "streaming",
"sourceVideoCodec": "h264",
"sourceAudioCodec": "aac",
"protocol": "http",
"transcodeHwRequested": false,
"transcodeHwFullPipeline": false
}
}
]
}
}
}
}
}
}
}
}
},
"delete": {
"tags": ["Download Queue"],
"operationId": "downloadQueueDeleteQueueItemsItem",
"summary": "Delete download queue items",
"description": "delete items from a download queue",
"parameters": [
{
"in": "path",
"name": "queueId",
"schema": {
"type": "integer"
},
"required": true,
"description": "The queue id"
},
{
"in": "path",
"name": "itemId",
"schema": {
"type": "array",
"items": {
"type": "integer"
}
},
"explode": false,
"example": [32, 345, 23],
"required": true,
"description": "The item id"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
}
}
}
},
"/downloadQueue/{queueId}/items/{itemId}/restart": {
"post": {
"tags": ["Download Queue"],
"operationId": "downloadQueuePostQueueItemsItemRestart",
"summary": "Restart processing of items from the decision",
"description": "Available: 0.2.0\n\nReprocess download queue items with previous decision parameters\n",
"parameters": [
{
"in": "path",
"name": "queueId",
"schema": {
"type": "integer"
},
"required": true,
"description": "The queue id"
},
{
"in": "path",
"name": "itemId",
"schema": {
"type": "array",
"items": {
"type": "integer"
}
},
"explode": false,
"example": [32, 345, 23],
"required": true,
"description": "The item ids"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
}
}
}
},
"/identity": {
"get": {
"tags": ["General"],
"summary": "Get PMS identity",
"description": "Get details about this PMS's identity",
"operationId": "getIdentity",
"security": [{}],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"type": "object",
"properties": {
"size": {
"type": "integer"
},
"claimed": {
"type": "boolean",
"description": "Indicates whether this server has been claimed by a user"
},
"machineIdentifier": {
"type": "string",
"description": "A unique identifier of the computer"
},
"version": {
"type": "string",
"description": "The full version string of the PMS"
}
}
}
}
},
"examples": {
"identity": {
"value": {
"MediaContainer": {
"size": 1,
"claimed": true,
"machineIdentifier": "0123456789abcdef0123456789abcdef",
"version": "1.40.2.8395-c67dce28e"
}
}
}
}
}
}
}
}
}
},
"/hubs": {
"get": {
"tags": ["Hubs"],
"summary": "Get global hubs",
"description": "Get the global hubs in this PMS",
"operationId": "hubsGetSlash",
"parameters": [
{
"in": "query",
"name": "count",
"schema": {
"type": "integer"
},
"description": "Limit hub entries to count items"
},
{
"in": "query",
"name": "onlyTransient",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"description": "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)"
},
{
"in": "query",
"name": "identifier",
"schema": {
"type": "array",
"items": {
"type": "string"
}
},
"description": "If provided, limit to only specified hubs"
}
],
"responses": {
"200": {
"description": "OK",
"headers": {
"X-Plex-Container-Total-Size": {
"description": "Provided on all MediaContainer objects indicating the total size of objects available",
"schema": {
"type": "integer"
}
},
"X-Plex-Container-Start": {
"description": "Provided on all MediaContainer objects indicating the offset of where this container page starts",
"schema": {
"type": "integer"
}
}
},
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/MediaContainer"
},
{
"type": "object",
"properties": {
"Hub": {
"type": "array",
"items": {
"$ref": "#/components/schemas/hub"
}
}
}
}
]
}
}
},
"examples": {
"someHubs": {
"summary": "An example of global hubs",
"value": {
"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": []
}
]
}
}
}
}
}
}
}
}
}
},
"/hubs/items": {
"get": {
"tags": ["Hubs"],
"summary": "Get a hub's items",
"description": "Get the items within a single hub specified by identifier",
"operationId": "hubsGetItems",
"parameters": [
{
"in": "query",
"name": "count",
"schema": {
"type": "integer"
},
"description": "Limit hub entry to count items"
},
{
"in": "query",
"name": "identifier",
"schema": {
"type": "array",
"items": {
"type": "string"
}
},
"required": true,
"description": "If provided, limit to only specified hubs"
}
],
"responses": {
"200": {
"description": "OK",
"headers": {
"X-Plex-Container-Total-Size": {
"description": "Provided on all MediaContainer objects indicating the total size of objects available",
"schema": {
"type": "integer"
}
},
"X-Plex-Container-Start": {
"description": "Provided on all MediaContainer objects indicating the offset of where this container page starts",
"schema": {
"type": "integer"
}
}
},
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"$ref": "#/components/schemas/properties-MediaContainer"
}
}
}
}
}
},
"404": {
"description": "The specified hub could not be found",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
}
}
}
},
"/hubs/continueWatching": {
"get": {
"tags": ["Hubs"],
"summary": "Get the continue watching hub",
"description": "Get the global continue watching hub",
"operationId": "hubsGetContinueWatching",
"parameters": [
{
"in": "query",
"name": "count",
"schema": {
"type": "integer"
},
"description": "Limit hub entry to count items"
}
],
"responses": {
"200": {
"description": "OK",
"headers": {
"X-Plex-Container-Total-Size": {
"description": "Provided on all MediaContainer objects indicating the total size of objects available",
"schema": {
"type": "integer"
}
},
"X-Plex-Container-Start": {
"description": "Provided on all MediaContainer objects indicating the offset of where this container page starts",
"schema": {
"type": "integer"
}
}
},
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/MediaContainer"
},
{
"type": "object",
"properties": {
"Hub": {
"type": "array",
"items": {
"$ref": "#/components/schemas/hub"
}
}
}
}
]
}
}
},
"examples": {
"someHubs": {
"summary": "An example of global hubs",
"value": {
"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": []
}
]
}
}
}
}
}
}
}
}
}
},
"/hubs/promoted": {
"get": {
"tags": ["Hubs"],
"summary": "Get the hubs which are promoted",
"description": "Get the global hubs which are promoted (should be displayed on the home screen)",
"operationId": "hubsGetPromoted",
"parameters": [
{
"in": "query",
"name": "count",
"schema": {
"type": "integer"
},
"description": "Limit hub entry to count items"
}
],
"responses": {
"200": {
"description": "OK",
"headers": {
"X-Plex-Container-Total-Size": {
"description": "Provided on all MediaContainer objects indicating the total size of objects available",
"schema": {
"type": "integer"
}
},
"X-Plex-Container-Start": {
"description": "Provided on all MediaContainer objects indicating the offset of where this container page starts",
"schema": {
"type": "integer"
}
}
},
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/MediaContainer"
},
{
"type": "object",
"properties": {
"Hub": {
"type": "array",
"items": {
"$ref": "#/components/schemas/hub"
}
}
}
}
]
}
}
},
"examples": {
"someHubs": {
"summary": "An example of global hubs",
"value": {
"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": []
}
]
}
}
}
}
}
}
}
}
}
},
"/hubs/metadata/{metadataId}": {
"get": {
"tags": ["Hubs"],
"summary": "Get hubs for a section by metadata item",
"description": "Get the hubs for a section by metadata item. Currently only for music sections",
"operationId": "hubsGetMetadataMetadata",
"parameters": [
{
"in": "path",
"name": "metadataId",
"schema": {
"type": "integer"
},
"description": "The metadata ID for the hubs to fetch",
"required": true
},
{
"in": "query",
"name": "count",
"schema": {
"type": "integer"
},
"description": "Limit hub entries to count items"
},
{
"in": "query",
"name": "onlyTransient",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"description": "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)"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/responses-200"
},
"400": {
"description": "No metadata with that id or permission is denied",
"content": {
"text/html": {
"examples": {
"badRequest": {
"summary": "A parameter has a bad value or required parameter is missing",
"value": "<html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>"
}
}
}
}
}
}
}
},
"/hubs/metadata/{metadataId}/related": {
"get": {
"tags": ["Hubs"],
"summary": "Get related hubs",
"description": "Get the hubs for a metadata related to the provided metadata item",
"operationId": "hubsGetMetadataMetadataRelated",
"parameters": [
{
"in": "path",
"name": "metadataId",
"schema": {
"type": "integer"
},
"description": "The metadata ID for the hubs to fetch",
"required": true
},
{
"in": "query",
"name": "count",
"schema": {
"type": "integer"
},
"description": "Limit hub entries to count items"
},
{
"in": "query",
"name": "onlyTransient",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"description": "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)"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/responses-200"
},
"400": {
"description": "No metadata with that id or permission is denied",
"content": {
"text/html": {
"examples": {
"badRequest": {
"summary": "A parameter has a bad value or required parameter is missing",
"value": "<html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>"
}
}
}
}
}
}
}
},
"/hubs/metadata/{metadataId}/postplay": {
"get": {
"tags": ["Hubs"],
"summary": "Get postplay hubs",
"description": "Get the hubs for a metadata to be displayed in post play",
"operationId": "hubsGetMetadataMetadataPostplay",
"parameters": [
{
"in": "path",
"name": "metadataId",
"schema": {
"type": "integer"
},
"description": "The metadata ID for the hubs to fetch",
"required": true
},
{
"in": "query",
"name": "count",
"schema": {
"type": "integer"
},
"description": "Limit hub entries to count items"
},
{
"in": "query",
"name": "onlyTransient",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"description": "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)"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/responses-200"
},
"400": {
"description": "No metadata with that id or permission is denied",
"content": {
"text/html": {
"examples": {
"badRequest": {
"summary": "A parameter has a bad value or required parameter is missing",
"value": "<html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>"
}
}
}
}
}
}
}
},
"/hubs/search": {
"get": {
"tags": ["Search"],
"summary": "Search Hub",
"description": "Perform a search and get the result as hubs\n\nThis 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).\n\nIn the response's items, the following extra attributes are returned to further describe or disambiguate the result:\n\n- `reason`: The reason for the result, if not because of a direct search term match; can be either:\n - `section`: There are multiple identical results from different sections.\n - `originalTitle`: There was a search term match from the original title field (sometimes those can be very different or in a foreign language).\n - `<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 `actor`\n- `reasonTitle`: 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\").\n- `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.\n\nThis request is intended to be very fast, and called as the user types.\n",
"operationId": "hubsGetSearch",
"parameters": [
{
"in": "query",
"name": "query",
"schema": {
"type": "string"
},
"required": true,
"description": "The query term"
},
{
"in": "query",
"name": "sectionId",
"schema": {
"type": "integer"
},
"example": 1,
"description": "This gives context to the search, and can result in re-ordering of search result hubs."
},
{
"in": "query",
"name": "limit",
"schema": {
"type": "integer"
},
"description": "The number of items to return per hub. 3 if not specified"
}
],
"responses": {
"200": {
"description": "OK",
"headers": {
"X-Plex-Container-Total-Size": {
"description": "Provided on all MediaContainer objects indicating the total size of objects available",
"schema": {
"type": "integer"
}
},
"X-Plex-Container-Start": {
"description": "Provided on all MediaContainer objects indicating the offset of where this container page starts",
"schema": {
"type": "integer"
}
}
},
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/MediaContainer"
},
{
"type": "object",
"properties": {
"Hub": {
"type": "array",
"items": {
"$ref": "#/components/schemas/hub"
}
}
}
}
]
}
}
},
"examples": {
"simpson": {
"summary": "An example of search for `simpsons`",
"value": {
"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"
}
]
}
]
}
}
}
}
}
}
},
"400": {
"description": "A required parameter was not given, the wrong type, or wrong value",
"content": {
"text/html": {
"examples": {
"badRequest": {
"summary": "A parameter has a bad value or required parameter is missing",
"value": "<html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>"
}
}
}
}
},
"404": {
"description": "Search restrictions result in no possible items found (such as searching no sections)",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
}
}
}
},
"/hubs/search/voice": {
"get": {
"tags": ["Search"],
"summary": "Voice Search Hub",
"description": "Perform a search tailored to voice input and get the result as hubs\n\nThis 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](https://en.wikipedia.org/wiki/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.\n\nResults, as well as their containing per-type hubs, contain a `distance` attribute which can be used to judge result quality.\n",
"operationId": "hubsSearchGetVoice",
"parameters": [
{
"in": "query",
"name": "query",
"schema": {
"type": "string"
},
"required": true,
"description": "The query term"
},
{
"in": "query",
"name": "type",
"schema": {
"type": "integer"
},
"example": 8,
"description": "The type of thing to limit the search to."
},
{
"in": "query",
"name": "limit",
"schema": {
"type": "integer"
},
"description": "The number of items to return per hub. 3 if not specified"
}
],
"responses": {
"200": {
"description": "OK",
"headers": {
"X-Plex-Container-Total-Size": {
"description": "Provided on all MediaContainer objects indicating the total size of objects available",
"schema": {
"type": "integer"
}
},
"X-Plex-Container-Start": {
"description": "Provided on all MediaContainer objects indicating the offset of where this container page starts",
"schema": {
"type": "integer"
}
}
},
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/MediaContainer"
},
{
"type": "object",
"properties": {
"Hub": {
"type": "array",
"items": {
"$ref": "#/components/schemas/hub"
}
}
}
}
]
}
}
},
"examples": {
"simpson": {
"summary": "An example of search for `simpsons`",
"value": {
"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"
}
]
}
]
}
}
}
}
}
}
},
"400": {
"description": "A required parameter was not given, the wrong type, or wrong value",
"content": {
"text/html": {
"examples": {
"badRequest": {
"summary": "A parameter has a bad value or required parameter is missing",
"value": "<html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>"
}
}
}
}
}
}
}
},
"/hubs/sections/{sectionId}": {
"get": {
"tags": ["Hubs"],
"summary": "Get section hubs",
"description": "Get the hubs for a single section",
"operationId": "hubsGetSection",
"parameters": [
{
"in": "path",
"name": "sectionId",
"schema": {
"type": "integer"
},
"description": "The section ID for the hubs to fetch",
"required": true
},
{
"in": "query",
"name": "count",
"schema": {
"type": "integer"
},
"description": "Limit hub entries to count items"
},
{
"in": "query",
"name": "onlyTransient",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"description": "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)"
}
],
"responses": {
"200": {
"description": "OK",
"headers": {
"X-Plex-Container-Total-Size": {
"description": "Provided on all MediaContainer objects indicating the total size of objects available",
"schema": {
"type": "integer"
}
},
"X-Plex-Container-Start": {
"description": "Provided on all MediaContainer objects indicating the offset of where this container page starts",
"schema": {
"type": "integer"
}
}
},
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/MediaContainer"
},
{
"type": "object",
"properties": {
"Hub": {
"type": "array",
"items": {
"$ref": "#/components/schemas/hub"
}
}
}
}
]
}
}
},
"examples": {
"someHubs": {
"summary": "An example of a movie section hubs",
"value": {
"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": []
}
]
}
}
}
}
}
}
},
"400": {
"description": "No section with that id or permission is denied",
"content": {
"text/html": {
"examples": {
"badRequest": {
"summary": "A parameter has a bad value or required parameter is missing",
"value": "<html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>"
}
}
}
}
}
}
}
},
"/hubs/sections/{sectionId}/manage": {
"get": {
"tags": ["Hubs"],
"security": [
{
"user_token": ["admin"]
}
],
"summary": "Get hubs",
"description": "Get the list of hubs including both built-in and custom",
"operationId": "hubsSectionsSectionManageGetSlash",
"parameters": [
{
"in": "path",
"name": "sectionId",
"schema": {
"type": "integer"
},
"description": "The section ID for the hubs to reorder",
"required": true
},
{
"in": "query",
"name": "metadataItemId",
"schema": {
"type": "integer"
},
"description": "Restrict hubs to ones relevant to the provided metadata item"
}
],
"responses": {
"200": {
"description": "OK",
"headers": {
"X-Plex-Container-Total-Size": {
"description": "Provided on all MediaContainer objects indicating the total size of objects available",
"schema": {
"type": "integer"
}
},
"X-Plex-Container-Start": {
"description": "Provided on all MediaContainer objects indicating the offset of where this container page starts",
"schema": {
"type": "integer"
}
}
},
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/MediaContainer"
},
{
"type": "object",
"properties": {
"Hub": {
"type": "array",
"items": {
"type": "object",
"properties": {
"identifier": {
"type": "string",
"description": "The identifier for this hub"
},
"title": {
"type": "string",
"description": "The title of this hub"
},
"recommendationsVisibility": {
"type": "string",
"enum": ["all", "none", "admin", "shared"],
"description": "The visibility of this hub in recommendations:\n - all: Visible to all users\n - none: Visible to no users\n - admin: Visible to only admin users\n - shared: Visible to shared users\n"
},
"homeVisibility": {
"type": "string",
"enum": ["all", "none", "admin", "shared"],
"description": "Whether this hub is visible on the home screen\n - all: Visible to all users\n - none: Visible to no users\n - admin: Visible to only admin users\n - shared: Visible to shared users\n"
},
"promotedToRecommended": {
"type": "boolean",
"description": "Whether this hub is promoted to all for recommendations"
},
"promotedToOwnHome": {
"type": "boolean",
"description": "Whether this hub is visible to admin user home"
},
"promotedToSharedHome": {
"type": "boolean",
"description": "Whether this hub is visible to shared user's home"
}
}
}
}
}
}
]
}
}
},
"examples": {
"someHubs": {
"summary": "An example of movie managed hubs",
"value": {
"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
}
]
}
}
}
}
}
}
},
"403": {
"$ref": "#/components/responses/403"
},
"404": {
"description": "Section id was not found",
"content": {
"text/html": {
"examples": {
"forbidden": {
"summary": "Forbidden",
"value": "<html><head><title>Forbidden</title></head><body><h1>403 Forbidden</h1></body></html>"
}
}
}
}
}
}
},
"delete": {
"tags": ["Hubs"],
"security": [
{
"user_token": ["admin"]
}
],
"summary": "Reset hubs to defaults",
"description": "Reset hubs for this section to defaults and delete custom hubs",
"operationId": "hubsSectionsSectionManageDeleteSlash",
"parameters": [
{
"in": "path",
"name": "sectionId",
"schema": {
"type": "integer"
},
"description": "The section ID for the hubs to reorder",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
},
"403": {
"$ref": "#/components/responses/403"
},
"404": {
"description": "Section id was not found",
"content": {
"text/html": {
"examples": {
"forbidden": {
"summary": "Forbidden",
"value": "<html><head><title>Forbidden</title></head><body><h1>403 Forbidden</h1></body></html>"
}
}
}
}
}
}
},
"post": {
"tags": ["Hubs"],
"security": [
{
"user_token": ["admin"]
}
],
"summary": "Create a custom hub",
"description": "Create a custom hub based on a metadata item",
"operationId": "hubsSectionsSectionManagePostSlash",
"parameters": [
{
"in": "path",
"name": "sectionId",
"schema": {
"type": "integer"
},
"description": "The section ID for the hubs to reorder",
"required": true
},
{
"in": "query",
"name": "metadataItemId",
"schema": {
"type": "integer"
},
"required": true,
"description": "The metadata item on which to base this hub. This must currently be a collection"
},
{
"in": "query",
"name": "promotedToRecommended",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"description": "Whether this hub should be displayed in recommended"
},
{
"in": "query",
"name": "promotedToOwnHome",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"description": "Whether this hub should be displayed in admin's home"
},
{
"in": "query",
"name": "promotedToSharedHome",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"description": "Whether this hub should be displayed in shared user's home"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
},
"400": {
"description": "A hub could not be created with this metadata item",
"content": {
"text/html": {
"examples": {
"badRequest": {
"summary": "A parameter has a bad value or required parameter is missing",
"value": "<html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>"
}
}
}
}
},
"403": {
"$ref": "#/components/responses/403"
},
"404": {
"description": "Section id or metadata item was not found",
"content": {
"text/html": {
"examples": {
"forbidden": {
"summary": "Forbidden",
"value": "<html><head><title>Forbidden</title></head><body><h1>403 Forbidden</h1></body></html>"
}
}
}
}
}
}
}
},
"/hubs/sections/{sectionId}/manage/move": {
"put": {
"tags": ["Hubs"],
"security": [
{
"user_token": ["admin"]
}
],
"summary": "Move Hub",
"description": "Changed the ordering of a hub among others hubs",
"operationId": "hubsSectionsSectionManagePutMove",
"parameters": [
{
"in": "path",
"name": "sectionId",
"schema": {
"type": "integer"
},
"description": "The section ID for the hubs to reorder",
"required": true
},
{
"in": "query",
"name": "identifier",
"schema": {
"type": "string"
},
"required": true,
"description": "The identifier of the hub to move"
},
{
"in": "query",
"name": "after",
"schema": {
"type": "string"
},
"description": "The identifier of the hub to order this hub after (or empty/missing to put this hub first)"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/get-responses-200"
},
"403": {
"$ref": "#/components/responses/403"
},
"404": {
"description": "Section id was not found",
"content": {
"text/html": {
"examples": {
"forbidden": {
"summary": "Forbidden",
"value": "<html><head><title>Forbidden</title></head><body><h1>403 Forbidden</h1></body></html>"
}
}
}
}
}
}
}
},
"/hubs/sections/{sectionId}/manage/{identifier}": {
"put": {
"tags": ["Hubs"],
"security": [
{
"user_token": ["admin"]
}
],
"summary": "Change hub visibility",
"description": "Changed the visibility of a hub for both the admin and shared users",
"operationId": "hubsSectionsSectionManagePutIdentifier",
"parameters": [
{
"in": "path",
"name": "sectionId",
"schema": {
"type": "integer"
},
"description": "The section ID for the hubs to change",
"required": true
},
{
"in": "path",
"name": "identifier",
"schema": {
"type": "string"
},
"required": true,
"description": "The identifier of the hub to change"
},
{
"in": "query",
"name": "promotedToRecommended",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"description": "Whether this hub should be displayed in recommended"
},
{
"in": "query",
"name": "promotedToOwnHome",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"description": "Whether this hub should be displayed in admin's home"
},
{
"in": "query",
"name": "promotedToSharedHome",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"description": "Whether this hub should be displayed in shared user's home"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
},
"403": {
"$ref": "#/components/responses/403"
},
"404": {
"description": "Section id was not found",
"content": {
"text/html": {
"examples": {
"forbidden": {
"summary": "Forbidden",
"value": "<html><head><title>Forbidden</title></head><body><h1>403 Forbidden</h1></body></html>"
}
}
}
}
}
}
},
"delete": {
"tags": ["Hubs"],
"security": [
{
"user_token": ["admin"]
}
],
"summary": "Delete a custom hub",
"description": "Delete a custom hub from the server",
"operationId": "hubsSectionsSectionManageDeleteIdentifier",
"parameters": [
{
"in": "path",
"name": "sectionId",
"schema": {
"type": "integer"
},
"description": "The section ID for the hubs to change",
"required": true
},
{
"in": "path",
"name": "identifier",
"schema": {
"type": "string"
},
"required": true,
"description": "The identifier of the hub to change"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
},
"400": {
"description": "The hub is not a custom hub",
"content": {
"text/html": {
"examples": {
"badRequest": {
"summary": "A parameter has a bad value or required parameter is missing",
"value": "<html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>"
}
}
}
}
},
"403": {
"$ref": "#/components/responses/403"
},
"404": {
"description": "The section or hub was not found",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
}
}
}
},
"/library/all": {
"get": {
"tags": ["Library"],
"operationId": "libraryGetAll",
"summary": "Get all items in library",
"description": "Request all metadata items according to a query.",
"parameters": [
{
"$ref": "#/components/parameters/mediaQuery"
}
],
"responses": {
"200": {
"description": "OK",
"headers": {
"X-Plex-Container-Total-Size": {
"description": "Provided on all MediaContainer objects indicating the total size of objects available",
"schema": {
"type": "integer"
}
},
"X-Plex-Container-Start": {
"description": "Provided on all MediaContainer objects indicating the offset of where this container page starts",
"schema": {
"type": "integer"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/mediaContainerWithMetadata"
},
"examples": {
"Zoolander Metadata": {
"value": {
"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"
}
]
}
]
}
}
}
}
}
}
}
}
}
},
"/library/caches": {
"delete": {
"tags": ["Library"],
"security": [
{
"user_token": ["admin"]
}
],
"operationId": "libraryDeleteCaches",
"summary": "Delete library caches",
"description": "Delete the hub caches so they are recomputed on next request",
"responses": {
"200": {
"$ref": "#/components/responses/200"
}
}
}
},
"/library/clean/bundles": {
"put": {
"tags": ["Library"],
"security": [
{
"user_token": ["admin"]
}
],
"operationId": "libraryPutCleanBundles",
"summary": "Clean bundles",
"description": "Clean out any now unused bundles. Bundles can become unused when media is deleted",
"responses": {
"200": {
"$ref": "#/components/responses/200"
}
}
}
},
"/library/collections": {
"post": {
"tags": ["Collections"],
"operationId": "libraryCollectionPostSlash",
"summary": "Create a collection",
"description": "Create a collection in the library",
"parameters": [
{
"in": "query",
"name": "sectionId",
"schema": {
"type": "string"
},
"required": true,
"description": "The section where this collection will be created"
},
{
"in": "query",
"name": "title",
"schema": {
"type": "string"
},
"required": true,
"description": "The title of this collection"
},
{
"in": "query",
"name": "smart",
"schema": {
"type": "boolean"
},
"description": "Whether this is a smart collection. Defaults to false"
},
{
"in": "query",
"name": "uri",
"schema": {
"type": "string"
},
"description": "The URI for processing the smart collection. Required for a smart collection"
},
{
"in": "query",
"name": "type",
"schema": {
"type": "integer"
},
"description": "The type of metadata this collection will hold"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/mediaContainerWithMetadata"
},
"examples": {
"Zoolander Metadata": {
"value": {
"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"
}
]
}
]
}
}
}
}
}
}
},
"400": {
"description": "The uri is missing for a smart collection or the section could not be found",
"content": {
"text/html": {
"examples": {
"badRequest": {
"summary": "A parameter has a bad value or required parameter is missing",
"value": "<html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>"
}
}
}
}
}
}
}
},
"/library/collections/{collectionId}/composite/{updatedAt}": {
"get": {
"tags": ["Content"],
"operationId": "libraryCollectionCollectionGetComposite",
"summary": "Get a collection's image",
"description": "Get an image for the collection based on the items within",
"parameters": [
{
"in": "path",
"name": "collectionId",
"schema": {
"type": "integer"
},
"description": "The collection id",
"required": true
},
{
"in": "path",
"name": "updatedAt",
"schema": {
"type": "integer"
},
"description": "The update time of the image. Used for busting cache.",
"required": true
},
{
"$ref": "#/components/parameters/composite"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"image/jpeg": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
},
"404": {
"description": "Collection not found",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
}
}
}
},
"/library/collections/{collectionId}/items": {
"get": {
"tags": ["Content"],
"operationId": "libraryCollectionCollectionGetItems",
"summary": "Get items in a collection",
"description": "Get items in a collection. Note if this collection contains more than 100 items, paging must be used.",
"parameters": [
{
"in": "path",
"name": "collectionId",
"schema": {
"type": "integer"
},
"description": "The collection id",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/mediaContainerWithMetadata"
},
"examples": {
"Zoolander Metadata": {
"value": {
"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"
}
]
}
]
}
}
}
}
}
}
},
"404": {
"description": "Collection not found",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
}
}
},
"put": {
"tags": ["Library Collections"],
"security": [
{
"user_token": ["admin"]
}
],
"operationId": "libraryCollectionCollectionPutItems",
"summary": "Add items to a collection",
"description": "Add items to a collection by uri",
"parameters": [
{
"in": "path",
"name": "collectionId",
"schema": {
"type": "integer"
},
"required": true,
"description": "The collection id"
},
{
"in": "query",
"name": "uri",
"schema": {
"type": "string"
},
"required": true,
"description": "The URI describing the items to add to this collection"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/mediaContainerWithMetadata"
},
"examples": {
"Zoolander Metadata": {
"value": {
"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"
}
]
}
]
}
}
}
}
}
}
},
"404": {
"description": "Collection not found",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
}
}
}
},
"/library/collections/{collectionId}/items/{itemId}": {
"put": {
"tags": ["Library Collections"],
"security": [
{
"user_token": ["admin"]
}
],
"operationId": "libraryCollectionCollectionPutItemsItem",
"summary": "Delete an item from a collection",
"description": "Delete an item from a collection",
"parameters": [
{
"in": "path",
"name": "collectionId",
"schema": {
"type": "integer"
},
"required": true,
"description": "The collection id"
},
{
"in": "path",
"name": "itemId",
"schema": {
"type": "integer"
},
"required": true,
"description": "The item to delete"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/mediaContainerWithMetadata"
},
"examples": {
"Zoolander Metadata": {
"value": {
"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"
}
]
}
]
}
}
}
}
}
}
},
"400": {
"description": "Item not found",
"content": {
"text/html": {
"examples": {
"badRequest": {
"summary": "A parameter has a bad value or required parameter is missing",
"value": "<html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>"
}
}
}
}
},
"404": {
"description": "Collection not found",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
}
}
}
},
"/library/collections/{collectionId}/items/{itemId}/move": {
"put": {
"tags": ["Library Collections"],
"security": [
{
"user_token": ["admin"]
}
],
"operationId": "libraryCollectionCollectionPutItemsItemMove",
"summary": "Reorder an item in the collection",
"description": "Reorder items in a collection with one item after another",
"parameters": [
{
"in": "path",
"name": "collectionId",
"schema": {
"type": "integer"
},
"required": true,
"description": "The collection id"
},
{
"in": "path",
"name": "itemId",
"schema": {
"type": "integer"
},
"required": true,
"description": "The item to move"
},
{
"in": "query",
"name": "after",
"schema": {
"type": "integer"
},
"description": "The item to move this item after. If not provided, this item will be moved to the beginning"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/mediaContainerWithMetadata"
},
"examples": {
"Zoolander Metadata": {
"value": {
"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"
}
]
}
]
}
}
}
}
}
}
},
"400": {
"description": "Item not found",
"content": {
"text/html": {
"examples": {
"badRequest": {
"summary": "A parameter has a bad value or required parameter is missing",
"value": "<html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>"
}
}
}
}
},
"404": {
"description": "Collection not found",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
}
}
}
},
"/library/file": {
"post": {
"tags": ["Library"],
"operationId": "libraryPostFile",
"summary": "Ingest a transient item",
"description": "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.\nNote that any of the parameters passed to the metadata details endpoint (e.g. `includeExtras=1`) work here.",
"parameters": [
{
"in": "query",
"name": "url",
"schema": {
"type": "string",
"format": "url"
},
"example": "file:///storage%2Femulated%2F0%2FArcher-S01E01.mkv",
"description": "The file of the file to ingest."
},
{
"in": "query",
"name": "virtualFilePath",
"schema": {
"type": "string"
},
"example": "/Avatar.mkv",
"description": "A virtual path to use when the url is opaque."
},
{
"in": "query",
"name": "computeHashes",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"example": 1,
"description": "Whether or not to compute Plex and OpenSubtitle hashes for the file. Defaults to 0."
},
{
"in": "query",
"name": "ingestNonMatches",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"example": 1,
"description": "Whether or not non matching media should be stored. Defaults to 0."
}
],
"responses": {
"200": {
"description": "OK",
"headers": {
"X-Plex-Container-Total-Size": {
"description": "Provided on all MediaContainer objects indicating the total size of objects available",
"schema": {
"type": "integer"
}
},
"X-Plex-Container-Start": {
"description": "Provided on all MediaContainer objects indicating the offset of where this container page starts",
"schema": {
"type": "integer"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/mediaContainerWithMetadata"
},
"examples": {
"result": {
"value": {
"MediaContainer": {
"size": 1,
"Metadata": []
}
}
}
}
}
}
}
}
}
},
"/library/matches": {
"get": {
"tags": ["Library"],
"operationId": "libraryGetMatches",
"summary": "Get library matches",
"description": "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.\nThis 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.\nThe 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).\nThe `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).\nEpisodes require either a season/episode pair, or an air date (or both). Either the path must be sent, or the show title",
"parameters": [
{
"in": "query",
"name": "type",
"schema": {
"type": "integer"
},
"required": true,
"description": "The metadata type to match against"
},
{
"in": "query",
"name": "includeFullMetadata",
"schema": {
"type": "integer",
"enum": [0, 1],
"description": "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."
}
},
{
"in": "query",
"name": "includeAncestorMetadata",
"schema": {
"type": "integer",
"enum": [0, 1],
"description": "Whether or not to include metadata for the item's ancestor (e.g. show and season data for an episode)."
}
},
{
"in": "query",
"name": "includeAlternateMetadataSources",
"schema": {
"type": "integer",
"enum": [0, 1],
"description": "Whether or not to return all sources for each metadata field, which results in a different structure being passed back."
}
},
{
"in": "query",
"name": "guid",
"schema": {
"type": "string"
},
"description": "Used for movies, shows, artists, albums, and tracks. Allowed for various URI schemes, to be defined."
},
{
"in": "query",
"name": "title",
"schema": {
"type": "string"
},
"description": "Used for movies, shows, artists, and albums. Required if `path` is not specified."
},
{
"in": "query",
"name": "year",
"schema": {
"type": "integer"
},
"description": "Used for movies shows, and albums. Optional."
},
{
"in": "query",
"name": "path",
"schema": {
"type": "string"
},
"description": "Used for movies, episodes, and tracks. The full path to the media file, used for \"cloud-scanning\" an item."
},
{
"in": "query",
"name": "grandparentTitle",
"schema": {
"type": "string"
},
"description": "Used for episodes and tracks. The title of the show/artist. Required if `path` isn't passed."
},
{
"in": "query",
"name": "grandparentYear",
"schema": {
"type": "integer"
},
"description": "Used for episodes. The year of the show."
},
{
"in": "query",
"name": "parentIndex",
"schema": {
"type": "integer"
},
"description": "Used for episodes and tracks. The season/album number."
},
{
"in": "query",
"name": "index",
"schema": {
"type": "integer"
},
"description": "Used for episodes and tracks. The episode/tracks number in the season/album."
},
{
"in": "query",
"name": "originallyAvailableAt",
"schema": {
"type": "string"
},
"description": "Used for episodes. In the format `YYYY-MM-DD`."
},
{
"in": "query",
"name": "parentTitle",
"schema": {
"type": "string"
},
"description": "Used for albums and tracks. The artist name for albums or the album name for tracks."
}
],
"responses": {
"200": {
"description": "OK",
"headers": {
"X-Plex-Container-Total-Size": {
"description": "Provided on all MediaContainer objects indicating the total size of objects available",
"schema": {
"type": "integer"
}
},
"X-Plex-Container-Start": {
"description": "Provided on all MediaContainer objects indicating the offset of where this container page starts",
"schema": {
"type": "integer"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/mediaContainerWithMetadata"
},
"examples": {
"psychoMatch": {
"value": {
"MediaContainer": {
"size": 1,
"Metadata": [
{
"score": 100,
"ratingKey": "667573",
"key": "/library/metadata/667573",
"studio": "Shamley Productions",
"type": "movie",
"title": "Psycho"
}
]
}
}
}
}
}
}
}
}
}
},
"/library/media/{mediaId}/chapterImages/{chapter}": {
"get": {
"tags": ["Library"],
"operationId": "libraryGetMediaMediaChapterImagesChapter",
"summary": "Get a chapter image",
"description": "Get a single chapter image for a piece of media",
"parameters": [
{
"in": "path",
"name": "mediaId",
"schema": {
"type": "integer"
},
"required": true,
"description": "The id of the media item"
},
{
"in": "path",
"name": "chapter",
"schema": {
"type": "integer"
},
"required": true,
"description": "The index of the chapter"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"image/jpeg": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
},
"404": {
"description": "Either the media item or the chapter image was not found",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
}
}
}
},
"/library/metadata/{ids}": {
"get": {
"tags": ["Content"],
"operationId": "libraryMetadataGetSlash",
"summary": "Get a metadata item",
"description": "Get one or more metadata items.",
"parameters": [
{
"in": "path",
"name": "ids",
"schema": {
"type": "array",
"items": {
"type": "string"
}
},
"required": true
},
{
"in": "query",
"name": "asyncCheckFiles",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"description": "Determines if file check should be performed asynchronously. An activity is created to indicate progress. Default is false."
},
{
"in": "query",
"name": "asyncRefreshLocalMediaAgent",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"description": "Determines if local media agent refresh should be performed asynchronously. An activity is created to indicate progress. Default is false."
},
{
"in": "query",
"name": "asyncRefreshAnalysis",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"description": "Determines if analysis refresh should be performed asynchronously. An activity is created to indicate progress. Default is false."
},
{
"in": "query",
"name": "checkFiles",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"description": "Determines if file check should be performed synchronously. Specifying `asyncCheckFiles` will cause this option to be ignored. Default is false."
},
{
"in": "query",
"name": "skipRefresh",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"description": "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."
},
{
"in": "query",
"name": "checkFileAvailability",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"description": "Determines if file existence check should be performed synchronously. Specifying `checkFiles` will imply this option. Default is false."
},
{
"in": "query",
"name": "asyncAugmentMetadata",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"description": "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."
},
{
"in": "query",
"name": "augmentCount",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"description": "Number of augmentations to add. Requires `asyncAugmentMetadata` to be specified."
}
],
"responses": {
"200": {
"description": "OK",
"headers": {
"X-Plex-Container-Total-Size": {
"description": "Provided on all MediaContainer objects indicating the total size of objects available",
"schema": {
"type": "integer"
}
},
"X-Plex-Container-Start": {
"description": "Provided on all MediaContainer objects indicating the offset of where this container page starts",
"schema": {
"type": "integer"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/mediaContainerWithMetadata"
},
"examples": {
"Zoolander Metadata": {
"value": {
"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"
}
]
}
]
}
}
}
}
}
}
}
}
},
"put": {
"tags": ["Library"],
"security": [
{
"user_token": ["admin"]
}
],
"operationId": "libraryMetadataPutSlash",
"summary": "Edit a metadata item",
"description": "Edit metadata items setting fields",
"parameters": [
{
"in": "path",
"name": "ids",
"schema": {
"type": "array",
"items": {
"type": "string"
}
},
"required": true
},
{
"in": "query",
"name": "args",
"schema": {
"type": "object"
},
"examples": {
"titles": {
"value": {
"title": "A New Title",
"sortTitle": "New Title"
}
}
},
"description": "The new values for the metadata item"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
},
"400": {
"description": "Media items could not be deleted",
"content": {
"text/html": {
"examples": {
"badRequest": {
"summary": "A parameter has a bad value or required parameter is missing",
"value": "<html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>"
}
}
}
}
}
}
},
"delete": {
"tags": ["Library"],
"security": [
{
"user_token": ["admin"]
}
],
"operationId": "libraryMetadataDeleteSlash",
"summary": "Delete a metadata item",
"description": "Delete a single metadata item from the library, deleting media as well",
"parameters": [
{
"in": "path",
"name": "ids",
"schema": {
"type": "string"
},
"required": true
},
{
"in": "query",
"name": "proxy",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"description": "Whether proxy items, such as media optimized versions, should also be deleted. Defaults to false."
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
},
"400": {
"description": "Media items could not be deleted",
"content": {
"text/html": {
"examples": {
"badRequest": {
"summary": "A parameter has a bad value or required parameter is missing",
"value": "<html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>"
}
}
}
}
}
}
}
},
"/library/metadata/{ids}/addetect": {
"put": {
"security": [
{
"user_token": ["admin"]
}
],
"tags": ["Library"],
"operationId": "libraryMetadataPutAddetect",
"summary": "Ad-detect an item",
"description": "Start the detection of ads in a metadata item",
"parameters": [
{
"in": "path",
"name": "ids",
"schema": {
"type": "string"
},
"required": true
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
}
}
}
},
"/library/metadata/{ids}/allLeaves": {
"get": {
"tags": ["Library"],
"operationId": "libraryMetadataGetAllLeaves",
"summary": "Get the leaves of an item",
"description": "Get the leaves for a metadata item such as the episodes in a show",
"parameters": [
{
"in": "path",
"name": "ids",
"schema": {
"type": "string"
},
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"headers": {
"X-Plex-Container-Total-Size": {
"description": "Provided on all MediaContainer objects indicating the total size of objects available",
"schema": {
"type": "integer"
}
},
"X-Plex-Container-Start": {
"description": "Provided on all MediaContainer objects indicating the offset of where this container page starts",
"schema": {
"type": "integer"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/mediaContainerWithMetadata"
},
"examples": {
"Zoolander Metadata": {
"value": {
"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"
}
]
}
]
}
}
}
}
}
}
}
}
}
},
"/library/metadata/{ids}/analyze": {
"put": {
"security": [
{
"user_token": ["admin"]
}
],
"tags": ["Library"],
"operationId": "libraryMetadataPutAnalyze",
"summary": "Analyze an item",
"description": "Start the analysis of a metadata item",
"parameters": [
{
"in": "path",
"name": "ids",
"schema": {
"type": "string"
},
"required": true
},
{
"in": "query",
"name": "thumbOffset",
"schema": {
"type": "number"
},
"required": false,
"description": "Set the offset to be used for thumbnails"
},
{
"in": "query",
"name": "artOffset",
"schema": {
"type": "number"
},
"required": false,
"description": "Set the offset to be used for artwork"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
}
}
}
},
"/library/metadata/{ids}/chapterThumbs": {
"put": {
"security": [
{
"user_token": ["admin"]
}
],
"tags": ["Library"],
"operationId": "libraryMetadataPutChapterThumbs",
"summary": "Generate thumbs of chapters for an item",
"description": "Start the chapter thumb generation for an item",
"parameters": [
{
"in": "path",
"name": "ids",
"schema": {
"type": "string"
},
"required": true
},
{
"in": "query",
"name": "force",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"required": false
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
}
}
}
},
"/library/metadata/{ids}/credits": {
"put": {
"tags": ["Library"],
"security": [
{
"user_token": ["admin"]
}
],
"operationId": "libraryMetadataPutCredits",
"summary": "Credit detect a metadata item",
"description": "Start credit detection on a metadata item",
"parameters": [
{
"in": "path",
"name": "ids",
"schema": {
"type": "string"
},
"required": true
},
{
"in": "query",
"name": "force",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"required": false
},
{
"in": "query",
"name": "manual",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"required": false
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
}
}
}
},
"/library/metadata/{ids}/extras": {
"get": {
"tags": ["Library"],
"operationId": "libraryMetadataGetExtras",
"summary": "Get an item's extras",
"description": "Get the extras for a metadata item",
"parameters": [
{
"in": "path",
"name": "ids",
"schema": {
"type": "string"
},
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"headers": {
"X-Plex-Container-Total-Size": {
"description": "Provided on all MediaContainer objects indicating the total size of objects available",
"schema": {
"type": "integer"
}
},
"X-Plex-Container-Start": {
"description": "Provided on all MediaContainer objects indicating the offset of where this container page starts",
"schema": {
"type": "integer"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/mediaContainerWithMetadata"
},
"examples": {
"Zoolander Metadata": {
"value": {
"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"
}
]
}
]
}
}
}
}
}
}
}
}
},
"post": {
"tags": ["Library"],
"operationId": "libraryMetadataPostExtras",
"summary": "Add to an item's extras",
"description": "Add an extra to a metadata item",
"parameters": [
{
"in": "path",
"name": "ids",
"schema": {
"type": "string"
},
"required": true
},
{
"in": "query",
"name": "extraType",
"schema": {
"type": "integer"
},
"description": "The metadata type of the extra"
},
{
"in": "query",
"name": "url",
"schema": {
"type": "string"
},
"description": "The URL of the extra",
"required": true
},
{
"in": "query",
"name": "title",
"schema": {
"type": "string"
},
"description": "The title of the extra",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
},
"404": {
"description": "Either the metadata item is not present or the extra could not be added",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
}
}
}
},
"/library/metadata/{ids}/file": {
"get": {
"tags": ["Library"],
"operationId": "libraryMetadataGetFile",
"summary": "Get a file from a metadata or media bundle",
"description": "Get a bundle file for a metadata or media item. This is either an image or a mp3 (for a show's theme)",
"parameters": [
{
"in": "path",
"name": "ids",
"schema": {
"type": "string"
},
"required": true
},
{
"in": "query",
"name": "url",
"schema": {
"type": "string"
},
"description": "The bundle url, typically starting with `metadata://` or `media://`"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"audio/mpeg3": {
"schema": {
"type": "string",
"format": "binary"
}
},
"image/jpeg": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
}
}
}
},
"/library/metadata/{ids}/index": {
"put": {
"security": [
{
"user_token": ["admin"]
}
],
"tags": ["Library"],
"operationId": "libraryMetadataPutIndex",
"summary": "Start BIF generation of an item",
"description": "Start the indexing (BIF generation) of an item",
"parameters": [
{
"in": "path",
"name": "ids",
"schema": {
"type": "string"
},
"required": true
},
{
"in": "query",
"name": "force",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"required": false
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
}
}
}
},
"/library/metadata/{ids}/intro": {
"put": {
"security": [
{
"user_token": ["admin"]
}
],
"tags": ["Library"],
"operationId": "libraryMetadataPutIntro",
"summary": "Intro detect an item",
"description": "Start the detection of intros in a metadata item",
"parameters": [
{
"in": "path",
"name": "ids",
"schema": {
"type": "string"
},
"required": true
},
{
"in": "query",
"name": "force",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"required": false,
"description": "Indicate whether detection should be re-run"
},
{
"in": "query",
"name": "threshold",
"schema": {
"type": "number"
},
"required": false,
"description": "The threshold for determining if content is an intro or not"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
}
}
}
},
"/library/metadata/{ids}/marker": {
"post": {
"tags": ["Library"],
"operationId": "libraryMetadataPostMarker",
"summary": "Create a marker",
"description": "Create a marker for this user on the metadata item",
"parameters": [
{
"in": "path",
"name": "ids",
"schema": {
"type": "string"
},
"required": true
},
{
"in": "query",
"name": "type",
"schema": {
"type": "integer"
},
"required": true,
"description": "The type of marker to edit/create"
},
{
"in": "query",
"name": "startTimeOffset",
"schema": {
"type": "integer"
},
"required": true,
"description": "The start time of the marker"
},
{
"in": "query",
"name": "endTimeOffset",
"schema": {
"type": "integer"
},
"description": "The end time of the marker"
},
{
"in": "query",
"name": "attributes",
"schema": {
"type": "object"
},
"style": "deepObject",
"example": {
"title": "My favorite spot"
},
"description": "The attributes to assign to this marker"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/MediaContainer"
},
{
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"type": {
"type": "string",
"enum": [
"intro",
"commercial",
"bookmark",
"resume",
"credit"
]
},
"startTimeOffset": {
"type": "integer"
},
"endTimeOffset": {
"type": "integer"
},
"title": {
"type": "string"
},
"color": {
"type": "string"
}
},
"additionalProperties": true
}
]
}
}
},
"examples": {
"creditMarker": {
"value": {
"MediaContainer": {
"size": 1,
"Marker": [
{
"final": true,
"id": 1025,
"type": "credits",
"startTimeOffset": 8249805,
"endTimeOffset": 8715339
}
]
}
}
}
}
}
}
},
"400": {
"description": "Request parameters are bad, such as an `endTimeOffset` prior to the `startTimeOffset`",
"content": {
"text/html": {
"examples": {
"badRequest": {
"summary": "A parameter has a bad value or required parameter is missing",
"value": "<html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>"
}
}
}
}
}
}
}
},
"/library/metadata/{ids}/marker/{marker}": {
"delete": {
"tags": ["Library"],
"operationId": "libraryMetadataDeleteMarkerMarker",
"summary": "Delete a marker",
"description": "Delete a marker for this user on the metadata item",
"parameters": [
{
"in": "path",
"name": "ids",
"schema": {
"type": "string"
},
"required": true
},
{
"in": "path",
"name": "marker",
"schema": {
"type": "string"
},
"required": true
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
},
"400": {
"description": "Marker is not a bookmark",
"content": {
"text/html": {
"examples": {
"badRequest": {
"summary": "A parameter has a bad value or required parameter is missing",
"value": "<html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>"
}
}
}
}
},
"404": {
"description": "Marker could not be found",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
}
}
},
"put": {
"tags": ["Library"],
"operationId": "libraryMetadataPutMarkerMarker",
"summary": "Edit a marker",
"description": "Edit a marker for this user on the metadata item",
"parameters": [
{
"in": "path",
"name": "ids",
"schema": {
"type": "string"
},
"required": true
},
{
"in": "path",
"name": "marker",
"schema": {
"type": "string"
},
"description": "The id of the marker to edit",
"required": true
},
{
"in": "query",
"name": "type",
"schema": {
"type": "integer"
},
"required": true,
"description": "The type of marker to edit/create"
},
{
"in": "query",
"name": "startTimeOffset",
"schema": {
"type": "integer"
},
"required": true,
"description": "The start time of the marker"
},
{
"in": "query",
"name": "endTimeOffset",
"schema": {
"type": "integer"
},
"description": "The end time of the marker"
},
{
"in": "query",
"name": "attributes",
"schema": {
"type": "object"
},
"style": "deepObject",
"example": {
"title": "My favorite spot"
},
"description": "The attributes to assign to this marker"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/post-responses-200"
},
"400": {
"$ref": "#/components/responses/responses-400"
},
"404": {
"description": "The marker could not be found",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
}
}
}
},
"/library/metadata/{ids}/match": {
"put": {
"tags": ["Library"],
"security": [
{
"user_token": ["admin"]
}
],
"operationId": "libraryMetadataPutMatch",
"summary": "Match a metadata item",
"description": "Match a metadata item to a guid",
"parameters": [
{
"in": "path",
"name": "ids",
"schema": {
"type": "string"
},
"required": true
},
{
"in": "query",
"name": "guid",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "name",
"schema": {
"type": "string"
},
"required": false
},
{
"in": "query",
"name": "year",
"schema": {
"type": "integer"
},
"required": false
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
}
}
}
},
"/library/metadata/{ids}/matches": {
"put": {
"tags": ["Library"],
"security": [
{
"user_token": ["admin"]
}
],
"operationId": "libraryMetadataGetMatches",
"summary": "Get metadata matches for an item",
"description": "Get the list of metadata matches for a metadata item",
"parameters": [
{
"in": "path",
"name": "ids",
"schema": {
"type": "string"
},
"required": true
},
{
"in": "query",
"name": "title",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "parentTitle",
"schema": {
"type": "string"
},
"required": false
},
{
"in": "query",
"name": "agent",
"schema": {
"type": "string"
},
"required": false
},
{
"in": "query",
"name": "language",
"schema": {
"type": "string"
},
"required": false
},
{
"in": "query",
"name": "year",
"schema": {
"type": "integer"
},
"required": false
},
{
"in": "query",
"name": "manual",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"required": false
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/mediaContainerWithMetadata"
},
"examples": {
"Zoolander Metadata": {
"value": {
"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"
}
]
}
]
}
}
}
}
}
}
}
}
}
},
"/library/metadata/{ids}/media/{mediaItem}": {
"delete": {
"tags": ["Library"],
"security": [
{
"user_token": ["admin"]
}
],
"operationId": "libraryMetadataDeleteMediaMediaItem",
"summary": "Delete a media item",
"description": "Delete a single media from a metadata item in the library",
"parameters": [
{
"in": "path",
"name": "ids",
"schema": {
"type": "string"
},
"required": true
},
{
"in": "path",
"name": "mediaItem",
"schema": {
"type": "string"
},
"required": true
},
{
"in": "query",
"name": "proxy",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"description": "Whether proxy items, such as media optimized versions, should also be deleted. Defaults to false."
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
},
"400": {
"description": "Media item could not be deleted",
"content": {
"text/html": {
"examples": {
"badRequest": {
"summary": "A parameter has a bad value or required parameter is missing",
"value": "<html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>"
}
}
}
}
},
"404": {
"description": "Media item could not be found",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
}
}
}
},
"/library/metadata/{ids}/merge": {
"put": {
"tags": ["Library"],
"security": [
{
"user_token": ["admin"]
}
],
"operationId": "libraryMetadataPutMerge",
"summary": "Merge a metadata item",
"description": "Merge a metadata item with other items",
"parameters": [
{
"in": "path",
"name": "ids",
"schema": {
"type": "string"
},
"required": true
},
{
"in": "query",
"name": "ids",
"schema": {
"type": "array",
"items": {
"type": "string"
}
},
"explode": false,
"examples": {
"twoIds": {
"value": [5, 6]
}
}
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
}
}
}
},
"/library/metadata/{ids}/nearest": {
"get": {
"tags": ["Library"],
"operationId": "libraryMetadataGetNearest",
"summary": "Get nearest tracks to metadata item",
"description": "Get the nearest tracks, sonically, to the provided track",
"parameters": [
{
"in": "path",
"name": "ids",
"schema": {
"type": "string"
},
"required": true
},
{
"in": "query",
"name": "excludeParentID",
"schema": {
"type": "integer"
},
"required": false
},
{
"in": "query",
"name": "excludeGrandparentID",
"schema": {
"type": "integer"
},
"required": false
},
{
"in": "query",
"name": "limit",
"schema": {
"type": "integer"
},
"required": false
},
{
"in": "query",
"name": "maxDistance",
"schema": {
"type": "number"
},
"required": false
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/mediaContainerWithMetadata"
},
"examples": {
"Zoolander Metadata": {
"value": {
"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"
}
]
}
]
}
}
}
}
}
}
}
}
}
},
"/library/metadata/{ids}/prefs": {
"put": {
"tags": ["Library"],
"security": [
{
"user_token": ["admin"]
}
],
"operationId": "libraryMetadataPutPrefs",
"summary": "Set metadata preferences",
"description": "Set the preferences on a metadata item",
"parameters": [
{
"in": "path",
"name": "ids",
"schema": {
"type": "string"
},
"required": true
},
{
"in": "query",
"name": "args",
"schema": {
"type": "object"
},
"examples": {
"titles": {
"value": {
"pref1": "value1",
"pref2": "value2"
}
}
}
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
}
}
}
},
"/library/metadata/{ids}/refresh": {
"put": {
"tags": ["Library"],
"security": [
{
"user_token": ["admin"]
}
],
"operationId": "libraryMetadataPutRefresh",
"summary": "Refresh a metadata item",
"description": "Refresh a metadata item from the agent",
"parameters": [
{
"in": "path",
"name": "ids",
"schema": {
"type": "string"
},
"required": true
},
{
"in": "query",
"name": "agent",
"schema": {
"type": "string"
},
"required": false
},
{
"in": "query",
"name": "markUpdated",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"required": false
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
}
}
}
},
"/library/metadata/{ids}/related": {
"get": {
"tags": ["Library"],
"operationId": "libraryMetadataGetRelated",
"summary": "Get related items",
"description": "Get a hub of related items to a metadata item",
"parameters": [
{
"in": "path",
"name": "ids",
"schema": {
"type": "string"
},
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/MediaContainer"
},
{
"type": "object",
"properties": {
"Hub": {
"type": "array",
"items": {
"$ref": "#/components/schemas/hub"
}
}
}
}
]
}
}
},
"examples": {
"onDeck": {
"summary": "An example of search for `simpsons`",
"value": {
"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"
}
]
}
}
}
}
}
}
}
}
}
},
"/library/metadata/{ids}/similar": {
"get": {
"tags": ["Library"],
"operationId": "libraryMetadataGetSimilar",
"summary": "Get similar items",
"description": "Get a list of similar items to a metadata item",
"parameters": [
{
"in": "path",
"name": "ids",
"schema": {
"type": "string"
},
"required": true
},
{
"in": "query",
"name": "count",
"schema": {
"type": "integer"
},
"description": "The maximum number of similar items; defaults to 200"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/mediaContainerWithMetadata"
},
"examples": {
"Zoolander Metadata": {
"value": {
"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"
}
]
}
]
}
}
}
}
}
}
}
}
}
},
"/library/metadata/{ids}/split": {
"put": {
"tags": ["Library"],
"security": [
{
"user_token": ["admin"]
}
],
"operationId": "libraryMetadataPutSplit",
"summary": "Split a metadata item",
"description": "Split a metadata item into multiple items",
"parameters": [
{
"in": "path",
"name": "ids",
"schema": {
"type": "string"
},
"required": true
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
}
}
}
},
"/library/metadata/{ids}/subtitles": {
"get": {
"security": [
{
"user_token": ["admin"]
}
],
"tags": ["Library"],
"operationId": "libraryMetadataPostSubtitles",
"summary": "Add subtitles",
"description": "Add a subtitle to a metadata item",
"parameters": [
{
"in": "path",
"name": "ids",
"schema": {
"type": "string"
},
"required": true
},
{
"in": "query",
"name": "title",
"schema": {
"type": "string"
},
"required": false
},
{
"in": "query",
"name": "language",
"schema": {
"type": "string"
},
"required": false
},
{
"in": "query",
"name": "mediaItemID",
"schema": {
"type": "integer"
},
"required": false
},
{
"in": "query",
"name": "url",
"schema": {
"type": "string"
},
"description": "The URL of the subtitle. If not provided, the contents of the subtitle must be in the post body",
"required": false
},
{
"in": "query",
"name": "format",
"schema": {
"type": "string"
},
"required": false
},
{
"in": "query",
"name": "forced",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"required": false
},
{
"in": "query",
"name": "hearingImpaired",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"required": false
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
}
}
}
},
"/library/metadata/{ids}/tree": {
"get": {
"tags": ["Library"],
"operationId": "libraryMetadataGetTree",
"summary": "Get metadata items as a tree",
"description": "Get a tree of metadata items, such as the seasons/episodes of a show",
"parameters": [
{
"in": "path",
"name": "ids",
"schema": {
"type": "string"
},
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/mediaContainerWithNestedMetadata"
},
"examples": {
"show": {
"value": {
"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"
}
]
}
}
}
}
}
}
}
}
}
},
"/library/metadata/{ids}/unmatch": {
"put": {
"tags": ["Library"],
"security": [
{
"user_token": ["admin"]
}
],
"operationId": "libraryMetadataPutUnmatch",
"summary": "Unmatch a metadata item",
"description": "Unmatch a metadata item to info fetched from the agent",
"parameters": [
{
"in": "path",
"name": "ids",
"schema": {
"type": "string"
},
"required": true
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
}
}
}
},
"/library/metadata/{ids}/users/top": {
"get": {
"tags": ["Library"],
"security": [
{
"user_token": ["admin"]
}
],
"operationId": "libraryMetadataGetUsersTop",
"summary": "Get metadata top users",
"description": "Get the list of users which have played this item starting with the most",
"parameters": [
{
"in": "path",
"name": "ids",
"schema": {
"type": "string"
},
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/MediaContainer"
},
{
"type": "object",
"properties": {
"Account": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"globalViewCount": {
"type": "integer"
}
}
}
}
}
}
]
}
}
},
"examples": {
"users": {
"value": {
"MediaContainer": {
"size": 2,
"Account": [
{
"id": 1,
"globalViewCount": 3
},
{
"id": 12345,
"globalViewCount": 2
}
]
}
}
}
}
}
}
}
}
}
},
"/library/metadata/{ids}/voiceActivity": {
"put": {
"security": [
{
"user_token": ["admin"]
}
],
"tags": ["Library"],
"operationId": "libraryMetadataPutVoiceActivity",
"summary": "Detect voice activity",
"description": "Start the detection of voice in a metadata item",
"parameters": [
{
"in": "path",
"name": "ids",
"schema": {
"type": "string"
},
"required": true
},
{
"in": "query",
"name": "force",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"required": false,
"description": "Indicate whether detection should be re-run"
},
{
"in": "query",
"name": "manual",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"required": false,
"description": "Indicate whether detection is manually run"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
}
}
}
},
"/library/metadata/{ids}/{element}": {
"post": {
"tags": ["Library"],
"operationId": "libraryMetadataPostElement",
"summary": "Set an item's artwork, theme, etc",
"description": "Set the artwork, thumb, element for a metadata item\nGenerally only the admin can perform this action. The exception is if the metadata is a playlist created by the user",
"parameters": [
{
"in": "path",
"name": "ids",
"schema": {
"type": "string"
},
"required": true
},
{
"in": "path",
"name": "element",
"schema": {
"type": "string",
"enum": [
"thumb",
"art",
"clearLogo",
"squareArt",
"banner",
"poster",
"theme"
]
},
"required": true
},
{
"in": "query",
"name": "url",
"schema": {
"type": "string"
},
"description": "The url of the new asset. If not provided, the binary of the asset must be provided in the post body."
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
}
}
},
"put": {
"tags": ["Library"],
"operationId": "libraryMetadataPutElement",
"summary": "Set an item's artwork, theme, etc",
"description": "Set the artwork, thumb, element for a metadata item\nGenerally only the admin can perform this action. The exception is if the metadata is a playlist created by the user",
"parameters": [
{
"in": "path",
"name": "ids",
"schema": {
"type": "string"
},
"required": true
},
{
"in": "path",
"name": "element",
"schema": {
"type": "string",
"enum": [
"thumb",
"art",
"clearLogo",
"squareArt",
"banner",
"poster",
"theme"
]
},
"required": true
},
{
"in": "query",
"name": "url",
"schema": {
"type": "string"
},
"description": "The url of the new asset."
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
}
}
},
"delete": {
"tags": ["Library"],
"operationId": "libraryMetadataDeleteElement",
"summary": "Delete an item's artwork, theme, etc",
"description": "Delete the artwork, thumb, element for a metadata item\nThis operation will also lock the field. 'thumb' images for video items will be reset to a screengrab of the video after a refresh.\nGenerally only the admin can perform this action. The exception is if the metadata is a playlist created by the user",
"parameters": [
{
"in": "path",
"name": "ids",
"schema": {
"type": "string"
},
"required": true
},
{
"in": "path",
"name": "element",
"schema": {
"type": "string",
"enum": [
"thumb",
"art",
"clearLogo",
"squareArt",
"banner",
"poster",
"theme"
]
},
"required": true
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
},
"404": {
"$ref": "#/components/responses/404"
}
}
}
},
"/library/metadata/{ids}/{element}/{timestamp}": {
"get": {
"tags": ["Library"],
"operationId": "libraryMetadataGetElement",
"summary": "Get an item's artwork, theme, etc",
"description": "Get the artwork, thumb, element for a metadata item",
"parameters": [
{
"in": "path",
"name": "ids",
"schema": {
"type": "string"
},
"required": true
},
{
"in": "path",
"name": "element",
"schema": {
"type": "string",
"enum": [
"thumb",
"art",
"clearLogo",
"squareArt",
"banner",
"poster",
"theme"
]
},
"required": true
},
{
"in": "path",
"name": "timestamp",
"schema": {
"type": "integer"
},
"description": "A timestamp on the element used for cache management in the client",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"audio/mpeg3": {
"schema": {
"type": "string",
"format": "binary"
}
},
"image/jpeg": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
}
}
}
},
"/library/metadata/augmentations/{augmentationId}": {
"get": {
"tags": ["Library"],
"operationId": "libraryGetMetadataAugmentationsAugmentation",
"summary": "Get augmentation status",
"description": "Get augmentation status and potentially wait for completion",
"parameters": [
{
"in": "path",
"name": "augmentationId",
"schema": {
"type": "string"
},
"description": "The id of the augmentation",
"required": true
},
{
"in": "query",
"name": "wait",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"description": "Wait for augmentation completion before returning"
}
],
"responses": {
"204": {
"$ref": "#/components/responses/204"
},
"401": {
"description": "This augmentation is not owned by the requesting user",
"content": {
"text/html": {
"examples": {
"unauthorized": {
"summary": "Unauthorized",
"value": "<html><head><title>Unauthorized</title></head><body><h1>401 Unauthorized</h1></body></html>"
}
}
}
}
},
"404": {
"description": "No augmentation found",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
}
}
}
},
"/library/optimize": {
"put": {
"tags": ["Library"],
"security": [
{
"user_token": ["admin"]
}
],
"operationId": "libraryPutOptimize",
"summary": "Optimize the Database",
"description": "Initiate optimize on the database.",
"parameters": [
{
"in": "query",
"name": "async",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"description": "If set, don't wait for completion but return an activity"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
}
}
}
},
"/library/parts/{partId}": {
"put": {
"tags": ["Library"],
"operationId": "libraryPutPartsPart",
"summary": "Set stream selection",
"description": "Set which streams (audio/subtitle) are selected by this user",
"parameters": [
{
"in": "path",
"name": "partId",
"schema": {
"type": "integer"
},
"description": "The id of the part to select streams on",
"required": true
},
{
"in": "query",
"name": "audioStreamID",
"schema": {
"type": "integer"
},
"description": "The id of the audio stream to select in this part"
},
{
"in": "query",
"name": "subtitleStreamID",
"schema": {
"type": "integer"
},
"description": "The id of the subtitle stream to select in this part. Specify 0 to select no subtitle"
},
{
"in": "query",
"name": "allParts",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"description": "Perform the same for all parts of this media selecting similar streams in each"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
},
"400": {
"description": "One of the audio or subtitle streams does not belong to this part",
"content": {
"text/html": {
"examples": {
"badRequest": {
"summary": "A parameter has a bad value or required parameter is missing",
"value": "<html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>"
}
}
}
}
}
}
}
},
"/library/parts/{partId}/indexes/{index}": {
"get": {
"tags": ["Library"],
"operationId": "libraryGetPartsPartIndexesIndex",
"summary": "Get BIF index for a part",
"description": "Get BIF index for a part by index type",
"parameters": [
{
"in": "path",
"name": "partId",
"schema": {
"type": "integer"
},
"required": true,
"description": "The part id who's index is to be fetched"
},
{
"in": "path",
"name": "index",
"schema": {
"type": "string",
"enum": ["sd"]
},
"required": true,
"description": "The type of index to grab."
},
{
"in": "query",
"name": "interval",
"schema": {
"type": "integer"
},
"description": "The interval between images to return in ms."
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/octet-stream": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
},
"404": {
"description": "The part or the index doesn't exist or the interval is too small",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
}
}
}
},
"/library/parts/{partId}/indexes/{index}/{offset}": {
"get": {
"tags": ["Library"],
"operationId": "libraryGetPartsPartIndexesIndexOffset",
"summary": "Get an image from part BIF",
"description": "Extract an image from the BIF for a part at a particular offset",
"parameters": [
{
"in": "path",
"name": "partId",
"schema": {
"type": "integer"
},
"required": true,
"description": "The part id who's index is to be fetched"
},
{
"in": "path",
"name": "index",
"schema": {
"type": "string",
"enum": ["sd"]
},
"required": true,
"description": "The type of index to grab."
},
{
"in": "path",
"name": "offset",
"schema": {
"type": "integer"
},
"description": "The offset to seek in ms.",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"image/jpeg": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
},
"404": {
"description": "The part or the index doesn't exist",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
}
}
}
},
"/library/parts/{partId}/{changestamp}/{filename}": {
"get": {
"tags": ["Library"],
"operationId": "libraryGetPartsPartChangestampFilename",
"summary": "Get a media part",
"description": "Get a media part for streaming or download.\n - streaming: This is the default scenario. Bandwidth usage on this endpoint will be guaranteed (on the server's end) to be at least the bandwidth reservation given in the decision. If no decision exists, an ad-hoc decision will be created if sufficient bandwidth exists. Clients should not rely on ad-hoc decisions being made as this may be removed in the future.\n - download: Indicated if the query parameter indicates this is a download. Bandwidth will be prioritized behind playbacks and will get a fair share of what remains.\n",
"parameters": [
{
"in": "path",
"name": "partId",
"schema": {
"type": "integer"
},
"required": true,
"description": "The part id who's index is to be fetched"
},
{
"in": "path",
"name": "changestamp",
"schema": {
"type": "integer"
},
"required": true,
"description": "The changestamp of the part; used for busting potential caches. Provided in the `key` for the part"
},
{
"in": "path",
"name": "filename",
"schema": {
"type": "string"
},
"required": true,
"description": "A generic filename used for a client media stack which relies on the extension in the request. Provided in the `key` for the part"
},
{
"in": "query",
"name": "download",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"description": "Whether this is a file download"
}
],
"responses": {
"200": {
"description": "OK",
"headers": {
"Content-Disposition": {
"schema": {
"type": "string"
},
"description": "Note: This header is only included in download requests"
}
}
},
"403": {
"description": "Client requested download and server owner has forbidden download of media",
"content": {
"text/html": {
"examples": {
"forbidden": {
"summary": "Forbidden",
"value": "<html><head><title>Forbidden</title></head><body><h1>403 Forbidden</h1></body></html>"
}
}
}
}
},
"404": {
"description": "The part doesn't exist",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
},
"503": {
"description": "Client requested the part without a decision and no decision could be made or decision is for a transcode",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Service Unavailable",
"value": "<html><head><title>Service Unavailable</title></head><body><h1>503 Service Unavailable</h1></body></html>"
}
}
}
}
},
"509": {
"description": "Client requested the part without a decision and no decision could be made because there is insufficient bandwidth for client to direct play this part",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Bandwidth Limit Exceeded",
"value": "<html><head><title>Bandwidth Limit Exceeded</title></head><body><h1>509 Bandwidth Limit Exceeded</h1></body></html>"
}
}
}
}
}
}
}
},
"/library/people/{personId}": {
"get": {
"tags": ["Library"],
"operationId": "libraryGetPeoplePerson",
"summary": "Get person details",
"description": "Get details for a single actor.",
"parameters": [
{
"in": "path",
"name": "personId",
"schema": {
"oneOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
},
"required": true,
"description": "Either the PMS tag `id` of the person or `tagKey` of the actor. Note the `tagKey` is the hex portion of the plex guid for the actor"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/MediaContainer"
},
{
"type": "object",
"properties": {
"Directory": {
"type": "array",
"items": {
"$ref": "#/components/schemas/tag"
}
}
}
}
]
}
}
},
"examples": {
"somePerson": {
"value": {
"MediaContainer": {
"size": 1,
"Directory": [
{
"id": 53374,
"filter": "actor=53374",
"tag": "Jay Chandrasekhar",
"tagType": 6,
"tagKey": "5d7768316f4521001ea9b4bc",
"thumb": "https://metadata-static.plex.tv/f/people/f5762921b6efdcc7854bfd7553da937f.jpg"
}
]
}
}
}
}
}
}
},
"404": {
"$ref": "#/components/responses/404"
}
}
}
},
"/library/people/{personId}/media": {
"get": {
"tags": ["Library"],
"operationId": "libraryGetPeoplePersonMedia",
"summary": "Get media for a person",
"description": "Get all the media for a single actor.",
"parameters": [
{
"in": "path",
"name": "personId",
"schema": {
"oneOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
},
"required": true,
"description": "Either the PMS tag `id` of the person or `tagKey` of the actor. Note the `tagKey` is the hex portion of the plex guid for the actor"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/mediaContainerWithMetadata"
},
"examples": {
"Zoolander Metadata": {
"value": {
"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"
}
]
}
]
}
}
}
}
}
}
},
"404": {
"$ref": "#/components/responses/404"
}
}
}
},
"/library/randomArtwork": {
"get": {
"tags": ["Library"],
"operationId": "libraryGetRandomArtwork",
"summary": "Get random artwork",
"description": "Get random artwork across sections. This is commonly used for a screensaver.\n\nThis 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.\n",
"parameters": [
{
"in": "query",
"name": "sections",
"schema": {
"type": "array",
"items": {
"type": "integer"
}
},
"explode": false,
"example": [5, 6],
"description": "The sections for which to fetch artwork."
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/mediaContainerWithArtwork"
},
"examples": {
"someImages": {
"value": {
"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"
}
]
}
}
}
}
}
}
}
}
}
},
"/library/sections/all": {
"get": {
"tags": ["Library"],
"operationId": "libraryGetSections",
"summary": "Get library sections (main Media Provider Only)",
"description": "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.\nLibraries 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).",
"responses": {
"200": {
"description": "OK",
"headers": {
"X-Plex-Container-Total-Size": {
"description": "Provided on all MediaContainer objects indicating the total size of objects available",
"schema": {
"type": "integer"
}
},
"X-Plex-Container-Start": {
"description": "Provided on all MediaContainer objects indicating the offset of where this container page starts",
"schema": {
"type": "integer"
}
}
},
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/mediaContainer"
},
{
"type": "object",
"properties": {
"allowSync": {
"$ref": "#/components/schemas/allowSync"
},
"title1": {
"type": "string",
"description": "Typically just \"Plex Library\""
},
"Directory": {
"type": "array",
"items": {
"$ref": "#/components/schemas/librarySection"
}
}
}
}
]
}
}
},
"examples": {
"basic": {
"summary": "Basic response for library sections",
"value": {
"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"
}
]
}
]
}
}
}
}
}
}
}
}
},
"post": {
"tags": ["Library"],
"security": [
{
"user_token": ["admin"]
}
],
"summary": "Add a library section",
"description": "Add a new library section to the server",
"operationId": "libraryPostSection",
"parameters": [
{
"in": "query",
"name": "name",
"schema": {
"type": "string"
},
"required": true,
"description": "The name of the new section"
},
{
"in": "query",
"name": "type",
"schema": {
"type": "integer"
},
"required": true,
"description": "The type of library section"
},
{
"in": "query",
"name": "scanner",
"schema": {
"type": "string"
},
"description": "The scanner this section should use"
},
{
"in": "query",
"name": "agent",
"schema": {
"type": "string"
},
"required": true,
"description": "The agent this section should use for metadata"
},
{
"in": "query",
"name": "metadataAgentProviderGroupId",
"schema": {
"type": "string"
},
"description": "The agent group id for this section"
},
{
"in": "query",
"name": "language",
"schema": {
"type": "string"
},
"required": true,
"description": "The language of this section"
},
{
"in": "query",
"name": "locations",
"schema": {
"type": "array",
"items": {
"type": "string"
}
},
"example": [
"O:\\fatboy\\Media\\Ripped\\Music",
"O:\\fatboy\\Media\\My Music"
],
"description": "The locations on disk to add to this section"
},
{
"in": "query",
"name": "prefs",
"schema": {
"type": "object"
},
"style": "deepObject",
"example": {
"hidden": 0,
"collectionMode": 2
},
"description": "The preferences for this section"
},
{
"in": "query",
"name": "relative",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"description": "If set, paths are relative to `Media Upload` path"
},
{
"in": "query",
"name": "importFromiTunes",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"description": "If set, import media from iTunes."
}
],
"responses": {
"200": {
"$ref": "#/components/responses/slash-get-responses-200"
},
"400": {
"description": "Section cannot be created due to bad parameters in request",
"content": {
"text/html": {
"examples": {
"badRequest": {
"summary": "A parameter has a bad value or required parameter is missing",
"value": "<html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>"
}
}
}
}
}
}
}
},
"/library/sections/all/refresh": {
"delete": {
"tags": ["Library"],
"security": [
{
"user_token": ["admin"]
}
],
"operationId": "libraryDeleteSectionsAllRefresh",
"summary": "Stop refresh",
"description": "Stop all refreshes across all sections",
"responses": {
"200": {
"$ref": "#/components/responses/requestHandler_slash-get-responses-200"
}
}
}
},
"/library/sections/prefs": {
"get": {
"tags": ["Library"],
"security": [
{
"user_token": ["admin"]
}
],
"operationId": "libraryGetSectionsPrefs",
"summary": "Get section prefs",
"description": "Get a section's preferences for a metadata type",
"parameters": [
{
"in": "query",
"name": "type",
"schema": {
"type": "integer"
},
"required": true,
"description": "The metadata type"
},
{
"in": "query",
"name": "agent",
"schema": {
"type": "string"
},
"description": "The metadata agent in use"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/requestHandler_slash-get-responses-200"
},
"400": {
"description": "type not provided or not an integer",
"content": {
"text/html": {
"examples": {
"badRequest": {
"summary": "A parameter has a bad value or required parameter is missing",
"value": "<html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>"
}
}
}
}
}
}
}
},
"/library/sections/refresh": {
"post": {
"tags": ["Library"],
"security": [
{
"user_token": ["admin"]
}
],
"operationId": "libraryPostSectionsRefresh",
"summary": "Refresh all sections",
"description": "Tell PMS to refresh all section metadata",
"parameters": [
{
"in": "query",
"name": "force",
"schema": {
"type": "boolean"
},
"description": "Force refresh of metadata"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
},
"503": {
"description": "Server cannot refresh a music library when not signed in",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Service Unavailable",
"value": "<html><head><title>Service Unavailable</title></head><body><h1>503 Service Unavailable</h1></body></html>"
}
}
}
}
}
}
}
},
"/library/sections/{sectionId}": {
"get": {
"tags": ["Library"],
"operationId": "librarySectionGetSection",
"summary": "Get a library section by id",
"description": "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.",
"parameters": [
{
"in": "path",
"name": "sectionId",
"required": true,
"schema": {
"type": "string"
},
"description": "The section identifier"
},
{
"in": "query",
"name": "includeDetails",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"description": "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."
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"properties": {
"MediaContainer": {
"type": "object",
"properties": {
"allowSync": {
"type": "boolean"
},
"art": {
"type": "string"
},
"content": {
"type": "string",
"description": "The flavors of directory found here:\n - Primary: (e.g. all, On Deck) These are still used in some clients to provide \"shortcuts\" to subsets of media. However, with the exception of On Deck, all of them can be created by media queries, and the desire is to allow these to be customized by users.\n - Secondary: These are marked with `\"secondary\": true` and were used by old clients to provide nested menus allowing for primative (but structured) navigation.\n - Special: There is a By Folder entry which allows browsing the media by the underlying filesystem structure, and there's a completely obsolete entry marked `\"search\": true` which used to be used to allow clients to build search dialogs on the fly."
},
"identifier": {
"type": "string"
},
"librarySectionID": {
"type": "integer"
},
"mediaTagPrefix": {
"type": "string"
},
"mediaTagVersion": {
"type": "integer"
},
"size": {
"type": "integer"
},
"sortAsc": {
"type": "boolean"
},
"thumb": {
"type": "string"
},
"title1": {
"type": "string"
},
"viewGroup": {
"type": "string"
},
"viewMode": {
"type": "integer"
},
"Directory": {
"type": "array",
"items": {
"$ref": "#/components/schemas/metadata"
}
}
}
}
}
},
"examples": {
"movie": {
"value": {
"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": {
"tags": ["Library"],
"security": [
{
"user_token": ["admin"]
}
],
"summary": "Delete a library section",
"description": "Delete a library section by id",
"operationId": "libraryDeleteSection",
"parameters": [
{
"in": "path",
"name": "sectionId",
"required": true,
"schema": {
"type": "string"
},
"description": "The section identifier"
},
{
"in": "query",
"name": "async",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"description": "If set, response will return an activity with the actual deletion process. Otherwise request will return when deletion is complete"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
}
}
},
"put": {
"tags": ["Library"],
"security": [
{
"user_token": ["admin"]
}
],
"summary": "Edit a library section",
"description": "Edit a library section by id setting parameters",
"operationId": "librarySectionPutSection",
"parameters": [
{
"in": "path",
"name": "sectionId",
"required": true,
"schema": {
"type": "string"
},
"description": "The section identifier"
},
{
"in": "query",
"name": "name",
"schema": {
"type": "string"
},
"description": "The name of the new section"
},
{
"in": "query",
"name": "scanner",
"schema": {
"type": "string"
},
"description": "The scanner this section should use"
},
{
"in": "query",
"name": "agent",
"schema": {
"type": "string"
},
"required": true,
"description": "The agent this section should use for metadata"
},
{
"in": "query",
"name": "metadataAgentProviderGroupId",
"schema": {
"type": "string"
},
"description": "The agent group id for this section"
},
{
"in": "query",
"name": "language",
"schema": {
"type": "string"
},
"description": "The language of this section"
},
{
"in": "query",
"name": "locations",
"schema": {
"type": "array",
"items": {
"type": "string"
}
},
"example": [
"O:\\fatboy\\Media\\Ripped\\Music",
"O:\\fatboy\\Media\\My Music"
],
"description": "The locations on disk to add to this section"
},
{
"in": "query",
"name": "prefs",
"schema": {
"type": "object"
},
"style": "deepObject",
"example": {
"hidden": 0,
"collectionMode": 2
},
"description": "The preferences for this section"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
},
"400": {
"description": "Section cannot be created due to bad parameters in request",
"content": {
"text/html": {
"examples": {
"badRequest": {
"summary": "A parameter has a bad value or required parameter is missing",
"value": "<html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>"
}
}
}
}
}
}
}
},
"/library/sections/{sectionId}/all": {
"get": {
"tags": ["Content"],
"operationId": "librarySectionGetAll",
"summary": "Get items in the section",
"description": "Get the items in a section, potentially filtering them",
"parameters": [
{
"$ref": "#/components/parameters/mediaQuery"
},
{
"in": "path",
"name": "sectionId",
"required": true,
"schema": {
"type": "string"
},
"description": "The id of the section"
}
],
"responses": {
"200": {
"description": "OK",
"headers": {
"X-Plex-Container-Total-Size": {
"description": "Provided on all MediaContainer objects indicating the total size of objects available",
"schema": {
"type": "integer"
}
},
"X-Plex-Container-Start": {
"description": "Provided on all MediaContainer objects indicating the offset of where this container page starts",
"schema": {
"type": "integer"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/mediaContainerWithMetadata"
},
"examples": {
"aMeta": {
"value": {
"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"
}
]
}
]
}
}
}
}
}
}
}
}
},
"put": {
"tags": ["Library"],
"operationId": "librarySectionPutAll",
"summary": "Set the fields of the filtered items",
"description": "This endpoint takes an large possible set of values. Here are some examples.\n- **Parameters, extra documentation**\n - artist.title.value\n - When used with track, both artist.title.value and album.title.value need to be specified\n - title.value usage\n - Summary\n - Tracks always rename and never merge\n - Albums and Artists\n - if single item and item without title does not exist, it is renamed.\n - if single item and item with title does exist they are merged.\n - if multiple they are always merged.\n - Tracks\n - Works as expected will update the track's title\n - Single track: `/library/sections/{id}/all?type=10&id=42&title.value=NewName`\n - Multiple tracks: `/library/sections/{id}/all?type=10&id=42,43,44&title.value=NewName`\n - All tracks: `/library/sections/{id}/all?type=10&title.value=NewName`\n - Albums\n - Functionality changes depending on the existence of an album with the same title\n - Album exists\n - Single album: `/library/sections/{id}/all?type=9&id=42&title.value=Album 2`\n - Album with id 42 is merged into album titled \"Album 2\"\n - Multiple/All albums: `/library/sections/{id}/all?type=9&title.value=Moo Album`\n - All albums are merged into the existing album titled \"Moo Album\"\n - Album does not exist\n - Single album: `/library/sections/{id}/all?type=9&id=42&title.value=NewAlbumTitle`\n - Album with id 42 has title modified to \"NewAlbumTitle\"\n - Multiple/All albums: `/library/sections/{id}/all?type=9&title.value=NewAlbumTitle`\n - All albums are merged into a new album with title=\"NewAlbumTitle\"\n - Artists\n - Functionaly changes depending on the existence of an artist with the same title.\n - Artist exists\n - Single artist: `/library/sections/{id}/all?type=8&id=42&title.value=Artist 2`\n - Artist with id 42 is merged into existing artist titled \"Artist 2\"\n - Multiple/All artists: `/library/sections/{id}/all?type=8&title.value=Artist 3`\n - All artists are merged into the existing artist titled \"Artist 3\"\n - Artist does not exist\n - Single artist: `/library/sections/{id}/all?type=8&id=42&title.value=NewArtistTitle`\n - Artist with id 42 has title modified to \"NewArtistTitle\"\n - Multiple/All artists: `/library/sections/{id}/all?type=8&title.value=NewArtistTitle`\n - All artists are merged into a new artist with title=\"NewArtistTitle\"\n\n- **Notes**\n - Technically square brackets are not allowed in an URI except the Internet Protocol Literal Address\n - RFC3513: A host identified by an Internet Protocol literal address, version 6 [RFC3513] or later, is distinguished by enclosing the IP literal within square brackets (\"[\" and \"]\"). This is the only place where square bracket characters are allowed in the URI syntax.\n - Escaped square brackets are allowed, but don't render well",
"parameters": [
{
"in": "path",
"name": "sectionId",
"required": true,
"schema": {
"type": "string"
},
"description": "The id of the section"
},
{
"in": "query",
"name": "type",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "filters",
"schema": {
"type": "string"
},
"description": "The filters to apply to determine which items should be modified"
},
{
"in": "query",
"name": "field.value",
"schema": {
"type": "string"
},
"description": "Set the specified field to a new value"
},
{
"in": "query",
"name": "field.locked",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"description": "Set the specified field to locked (or unlocked if set to 0)"
},
{
"in": "query",
"name": "title.value",
"schema": {
"type": "string"
},
"description": "This field is treated specially by albums or artists and may be used for implicit reparenting."
},
{
"in": "query",
"name": "artist.title.value",
"schema": {
"type": "string"
},
"description": "Reparents set of Tracks or Albums - used with album.title.* in the case of tracks"
},
{
"in": "query",
"name": "artist.title.id",
"schema": {
"type": "string"
},
"description": "Reparents set of Tracks or Albums - used with album.title.* in the case of tracks"
},
{
"in": "query",
"name": "album.title.value",
"schema": {
"type": "string"
},
"description": "Reparents set of Tracks - Must be used in conjunction with artist.title.value or id"
},
{
"in": "query",
"name": "album.title.id",
"schema": {
"type": "string"
},
"description": "Reparents set of Tracks - Must be used in conjunction with artist.title.value or id"
},
{
"in": "query",
"name": "tagtype[idx].tag.tag",
"schema": {
"type": "string"
},
"description": "Creates tag and associates it with each item in the set. - [idx] links this and the next parameters together"
},
{
"in": "query",
"name": "tagtype[idx].tagging.object",
"schema": {
"type": "string"
},
"description": "Here `object` may be text/thumb/art/theme - Optionally used in conjunction with tag.tag, to update association info across the set."
},
{
"in": "query",
"name": "tagtype[].tag.tag-",
"schema": {
"type": "string"
},
"description": "Remove comma separated tags from the set of items"
},
{
"in": "query",
"name": "tagtype[].tag",
"schema": {
"type": "string"
},
"description": "Remove associations of this type (e.g. genre) from the set of items"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
},
"400": {
"description": "The set of parameters are inconsistent or invalid values",
"content": {
"text/html": {
"examples": {
"badRequest": {
"summary": "A parameter has a bad value or required parameter is missing",
"value": "<html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>"
}
}
}
}
},
"404": {
"description": "A required item could not be found",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
},
"409": {
"description": "Rename of a collection to a name that's already taken",
"content": {
"text/html": {
"examples": {
"conflict": {
"summary": "Conflict",
"value": "<html><head><title>Conflict</title></head><body><h1>409 Conflict</h1></body></html>"
}
}
}
}
}
}
}
},
"/library/sections/{sectionId}/allLeaves": {
"get": {
"tags": ["Content"],
"operationId": "librarySectionGetAllLeaves",
"summary": "Set section leaves",
"description": "Get all leaves in a section (such as episodes in a show section)",
"parameters": [
{
"in": "path",
"name": "sectionId",
"schema": {
"type": "integer"
},
"description": "Section identifier",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/mediaContainerWithMetadata"
},
"example": {
"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"
}
]
}
]
}
}
}
}
}
}
}
},
"/library/sections/{sectionId}/arts": {
"get": {
"tags": ["Content"],
"operationId": "librarySectionGetArts",
"summary": "Set section artwork",
"description": "Get artwork for a library section",
"parameters": [
{
"in": "path",
"name": "sectionId",
"schema": {
"type": "integer"
},
"description": "Section identifier",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/mediaContainerWithArtwork"
},
"examples": {
"someImages": {
"value": {
"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"
}
]
}
}
}
}
}
}
}
}
}
},
"/library/sections/{sectionId}/albums": {
"get": {
"tags": ["Content"],
"operationId": "librarySectionGetAlbums",
"summary": "Set section albums",
"description": "Get all albums in a music section",
"parameters": [
{
"in": "path",
"name": "sectionId",
"schema": {
"type": "integer"
},
"description": "Section identifier",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/mediaContainerWithMetadata"
},
"example": {
"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"
}
]
}
]
}
}
}
}
}
}
}
},
"/library/sections/{sectionId}/analyze": {
"put": {
"tags": ["Library"],
"security": [
{
"user_token": ["admin"]
}
],
"operationId": "librarySectionPutAnalyze",
"summary": "Analyze a section",
"description": "Start analysis of all items in a section. If BIF generation is enabled, this will also be started on this section",
"parameters": [
{
"in": "path",
"name": "sectionId",
"schema": {
"type": "integer"
},
"description": "Section identifier",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
}
}
}
},
"/library/sections/{sectionId}/autocomplete": {
"get": {
"tags": ["Library"],
"operationId": "librarySectionGetAutocomplete",
"summary": "Get autocompletions for search",
"description": "The field to autocomplete on is specified by the {field}.query parameter. For example `genre.query` or `title.query`.\nReturns 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",
"parameters": [
{
"in": "path",
"name": "sectionId",
"schema": {
"type": "integer"
},
"description": "Section identifier",
"required": true
},
{
"in": "query",
"name": "type",
"schema": {
"type": "integer"
},
"description": "Item type"
},
{
"in": "query",
"name": "field.query",
"schema": {
"type": "string"
},
"description": "The \"field\" stands in for any field, the value is a partial string for matching"
},
{
"$ref": "#/components/parameters/mediaQuery"
}
],
"responses": {
"200": {
"description": "OK",
"headers": {
"X-Plex-Container-Total-Size": {
"description": "Provided on all MediaContainer objects indicating the total size of objects available",
"schema": {
"type": "integer"
}
},
"X-Plex-Container-Start": {
"description": "Provided on all MediaContainer objects indicating the offset of where this container page starts",
"schema": {
"type": "integer"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/mediaContainerWithMetadata"
},
"examples": {
"title": {
"summary": "Request with `title.query=a`",
"value": {
"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?"
}
]
}
]
}
}
},
"genre": {
"summary": "Request with `genre.query=a`",
"value": {
"MediaContainer": {
"allowSync": false,
"art": "/:/resources/movie-fanart.jpg",
"content": "secondary",
"identifier": "com.plexapp.plugins.library",
"mediaTagPrefix": "/system/bundle/media/flags/",
"mediaTagVersion": 1436742334,
"size": 3,
"thumb": "/:/resources/movie.png",
"title1": "Movies",
"viewGroup": "secondary",
"viewMode": 65592,
"Directory": [
{
"id": 190,
"filter": "genre=190",
"tag": "Action",
"tagType": 1
},
{
"id": 98,
"filter": "genre=98",
"tag": "Adventure",
"tagType": 1
},
{
"id": 135,
"filter": "genre=135",
"tag": "Animation",
"tagType": 1
}
]
}
}
}
}
}
}
},
"400": {
"description": "A paramater is either invalid or missing",
"content": {
"text/html": {
"examples": {
"badRequest": {
"summary": "A parameter has a bad value or required parameter is missing",
"value": "<html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>"
}
}
}
}
}
}
}
},
"/library/sections/{sectionId}/categories": {
"get": {
"tags": ["Content"],
"operationId": "librarySectionGetCategories",
"summary": "Set section categories",
"description": "Get categories in a library section",
"parameters": [
{
"in": "path",
"name": "sectionId",
"schema": {
"type": "integer"
},
"description": "Section identifier",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/mediaContainerWithArtwork"
},
"examples": {
"someCategories": {
"value": {
"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"
}
]
}
}
}
}
}
}
}
}
}
},
"/library/sections/{sectionId}/cluster": {
"get": {
"tags": ["Content"],
"operationId": "librarySectionGetCluster",
"summary": "Set section clusters",
"description": "Get clusters in a library section (typically for photos)",
"parameters": [
{
"in": "path",
"name": "sectionId",
"schema": {
"type": "integer"
},
"description": "Section identifier",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/mediaContainerWithArtwork"
},
"examples": {
"someClusters": {
"value": {
"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"
}
]
}
}
}
}
}
}
}
}
}
},
"/library/sections/{sectionId}/collections": {
"get": {
"tags": ["Library"],
"operationId": "librarySectionGetCollections",
"summary": "Get collections in a section",
"description": "Get all collections in a section",
"parameters": [
{
"in": "path",
"name": "sectionId",
"schema": {
"type": "integer"
},
"description": "Section identifier",
"required": true
},
{
"$ref": "#/components/parameters/mediaQuery"
}
],
"responses": {
"200": {
"description": "OK",
"headers": {
"X-Plex-Container-Total-Size": {
"description": "Provided on all MediaContainer objects indicating the total size of objects available",
"schema": {
"type": "integer"
}
},
"X-Plex-Container-Start": {
"description": "Provided on all MediaContainer objects indicating the offset of where this container page starts",
"schema": {
"type": "integer"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/mediaContainerWithMetadata"
},
"examples": {
"aMeta": {
"value": {
"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"
}
]
}
]
}
}
}
}
}
}
}
}
}
},
"/library/sections/{sectionId}/collection/{collectionId}": {
"delete": {
"tags": ["Library"],
"security": [
{
"user_token": ["admin"]
}
],
"operationId": "librarySectionDeleteCollectionCollection",
"summary": "Delete a collection",
"description": "Delete a library collection from the PMS",
"parameters": [
{
"in": "path",
"name": "sectionId",
"schema": {
"type": "integer"
},
"description": "Section identifier",
"required": true
},
{
"in": "path",
"name": "collectionId",
"schema": {
"type": "integer"
},
"description": "Collection Id",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
},
"404": {
"description": "Collection not found",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
}
}
}
},
"/library/sections/{sectionId}/common": {
"get": {
"tags": ["Library"],
"operationId": "librarySectionGetCommon",
"summary": "Get common fields for items",
"description": "Represents a \"Common\" item. It contains only the common attributes of the items selected by the provided filter\nFields which are not common will be expressed in the `mixedFields` field",
"parameters": [
{
"in": "path",
"name": "sectionId",
"schema": {
"type": "integer"
},
"description": "Section identifier",
"required": true
},
{
"in": "query",
"name": "type",
"schema": {
"type": "integer"
},
"description": "Item type"
},
{
"$ref": "#/components/parameters/mediaQuery"
}
],
"responses": {
"200": {
"description": "OK",
"headers": {
"X-Plex-Container-Total-Size": {
"description": "Provided on all MediaContainer objects indicating the total size of objects available",
"schema": {
"type": "integer"
}
},
"X-Plex-Container-Start": {
"description": "Provided on all MediaContainer objects indicating the offset of where this container page starts",
"schema": {
"type": "integer"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/mediaContainerWithMetadata"
},
"examples": {
"none": {
"summary": "No common items in filter set",
"value": {
"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"
}
]
}
}
},
"all": {
"summary": "All filtered items are common",
"value": {
"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,
"key": "/library/metadata/1025/children",
"originalTitle": "Neco z Alenky",
"originallyAvailableAt": "1988-08-03",
"rating": 6.9,
"ratingCount": 0,
"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?",
"title": "Alice",
"titleSort": "Alice",
"type": "common",
"year": 1988,
"Genre": [
{
"id": 135,
"tag": "Animation"
},
{
"id": 136,
"tag": "Fantasy"
},
{
"id": 42,
"tag": "Science Fiction"
}
],
"Writer": [
{
"id": 133,
"tag": "Jan ?vankmajer"
}
],
"Director": [
{
"id": 132,
"tag": "Jan ?vankmajer"
}
],
"Country": [
{
"id": 137,
"tag": "Switzerland"
},
{
"id": 138,
"tag": "Czech Republic"
},
{
"id": 130,
"tag": "Germany"
},
{
"id": 139,
"tag": "United Kingdom"
}
],
"Role": [
{
"id": 134,
"role": "Alice",
"tag": "Krist?na Kohoutov?"
}
]
}
]
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/400"
},
"404": {
"$ref": "#/components/responses/404"
}
}
}
},
"/library/sections/{sectionId}/composite/{updatedAt}": {
"get": {
"tags": ["Library"],
"security": [
{
"user_token": ["admin"]
}
],
"operationId": "librarySectionGetComposite",
"summary": "Get a section composite image",
"description": "Get a composite image of images in this section",
"parameters": [
{
"in": "path",
"name": "sectionId",
"schema": {
"type": "integer"
},
"description": "Section identifier",
"required": true
},
{
"in": "path",
"name": "updatedAt",
"schema": {
"type": "integer"
},
"description": "The update time of the image. Used for busting cache.",
"required": true
},
{
"$ref": "#/components/parameters/mediaQuery"
},
{
"$ref": "#/components/parameters/composite"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
}
}
}
},
"/library/sections/{sectionId}/computePath": {
"get": {
"tags": ["Content"],
"operationId": "librarySectionGetComputePath",
"summary": "Similar tracks to transition from one to another",
"description": "Get a list of audio tracks starting at one and ending at another which are similar across the path",
"parameters": [
{
"in": "path",
"name": "sectionId",
"schema": {
"type": "integer"
},
"description": "Section identifier",
"required": true
},
{
"in": "query",
"name": "startID",
"schema": {
"type": "integer"
},
"required": true,
"description": "The starting metadata item id"
},
{
"in": "query",
"name": "endID",
"schema": {
"type": "integer"
},
"required": true,
"description": "The ending metadata item id"
},
{
"in": "query",
"name": "count",
"schema": {
"type": "integer"
},
"description": "The number of items along the path; defaults to 50"
},
{
"in": "query",
"name": "maxDistance",
"schema": {
"type": "number"
},
"description": "The maximum distance allowed along the path; defaults to 0.25"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/mediaContainerWithMetadata"
},
"examples": {
"Zoolander Metadata": {
"value": {
"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"
}
]
}
]
}
}
}
}
}
}
}
}
}
},
"/library/sections/{sectionId}/emptyTrash": {
"put": {
"tags": ["Library"],
"security": [
{
"user_token": ["admin"]
}
],
"operationId": "librarySectionPutEmptyTrash",
"summary": "Empty section trash",
"description": "Empty trash in the section, permanently deleting media/metadata for missing media",
"parameters": [
{
"in": "path",
"name": "sectionId",
"schema": {
"type": "integer"
},
"description": "Section identifier",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
}
}
}
},
"/library/sections/{sectionId}/filters": {
"get": {
"tags": ["Library"],
"security": [
{
"user_token": ["admin"]
}
],
"operationId": "librarySectionGetFilters",
"summary": "Get section filters",
"description": "Get common filters on a section",
"parameters": [
{
"in": "path",
"name": "sectionId",
"schema": {
"type": "integer"
},
"description": "Section identifier",
"required": true
}
],
"responses": {
"200": {
"description": "The filters on the section",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/MediaContainer"
},
{
"type": "object",
"properties": {
"Directory": {
"type": "array",
"items": {
"$ref": "#/components/schemas/directory"
}
}
}
}
]
}
}
},
"examples": {
"movieSection": {
"summary": "A movie section filters",
"value": {
"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"
}
]
}
}
}
}
}
}
}
}
}
},
"/library/sections/{sectionId}/firstCharacters": {
"get": {
"tags": ["Library"],
"operationId": "librarySectionGetFirstCharaters",
"summary": "Get list of first characters",
"description": "Get list of first characters in this section",
"parameters": [
{
"in": "path",
"name": "sectionId",
"schema": {
"type": "integer"
},
"description": "Section identifier",
"required": true
},
{
"in": "query",
"name": "type",
"schema": {
"type": "integer"
},
"description": "The metadata type to filter on"
},
{
"in": "query",
"name": "sort",
"schema": {
"type": "integer"
},
"description": "The metadata type to filter on"
},
{
"$ref": "#/components/parameters/mediaQuery"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/MediaContainer"
},
{
"type": "object",
"properties": {
"Directory": {
"type": "array",
"items": {
"type": "object",
"properties": {
"size": {
"type": "integer",
"description": "The number of items starting with this character"
},
"key": {
"type": "string"
},
"title": {
"type": "string"
}
}
}
}
}
}
]
}
}
},
"examples": {
"someMovies": {
"description": "A small movie section",
"value": {
"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"
}
]
}
}
}
}
}
}
}
}
}
},
"/library/sections/{sectionId}/indexes": {
"delete": {
"tags": ["Library"],
"security": [
{
"user_token": ["admin"]
}
],
"operationId": "librarySectionDeleteIndexes",
"summary": "Delete section indexes",
"description": "Delete all the indexes in a section",
"parameters": [
{
"in": "path",
"name": "sectionId",
"schema": {
"type": "integer"
},
"description": "Section identifier",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
}
}
}
},
"/library/sections/{sectionId}/intros": {
"delete": {
"tags": ["Library"],
"security": [
{
"user_token": ["admin"]
}
],
"operationId": "librarySectionDeleteIntros",
"summary": "Delete section intro markers",
"description": "Delete all the intro markers in a section",
"parameters": [
{
"in": "path",
"name": "sectionId",
"schema": {
"type": "integer"
},
"description": "Section identifier",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
}
}
}
},
"/library/sections/{sectionId}/location": {
"get": {
"tags": ["Content"],
"operationId": "librarySectionGetLocations",
"summary": "Get all folder locations",
"description": "Get all folder locations of the media in a section",
"parameters": [
{
"in": "path",
"name": "sectionId",
"schema": {
"type": "integer"
},
"description": "Section identifier",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/MediaContainer"
},
{
"type": "object",
"properties": {
"Directory": {
"type": "array",
"items": {
"type": "object",
"properties": {
"fastKey": {
"type": "string"
},
"key": {
"type": "string"
},
"title": {
"type": "string"
}
}
}
}
}
}
]
}
}
}
}
}
}
}
}
},
"/library/sections/{sectionId}/nearest": {
"get": {
"tags": ["Content"],
"operationId": "librarySectionGetNearest",
"summary": "The nearest audio tracks",
"description": "Get the nearest audio tracks to a particular analysis",
"parameters": [
{
"in": "path",
"name": "sectionId",
"schema": {
"type": "integer"
},
"description": "Section identifier",
"required": true
},
{
"in": "query",
"name": "type",
"schema": {
"type": "integer"
},
"description": "The metadata type to fetch (should be 10 for audio track)"
},
{
"in": "query",
"name": "values",
"schema": {
"type": "array",
"items": {
"type": "integer",
"minimum": 50,
"maximum": 50
}
},
"explode": false,
"required": true,
"description": "The music analysis to center the search. Typically obtained from the `musicAnalysis` of a track"
},
{
"in": "query",
"name": "limit",
"schema": {
"type": "integer"
},
"description": "The limit of the number of items to fetch; defaults to 50"
},
{
"in": "query",
"name": "maxDistance",
"schema": {
"type": "number"
},
"description": "The maximum distance to search, defaults to 0.25"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/mediaContainerWithMetadata"
},
"examples": {
"Zoolander Metadata": {
"value": {
"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"
}
]
}
]
}
}
}
}
}
}
}
}
}
},
"/library/sections/{sectionId}/moment": {
"get": {
"tags": ["Content"],
"operationId": "librarySectionGetMoment",
"summary": "Set section moments",
"description": "Get moments in a library section (typically for photos)",
"parameters": [
{
"in": "path",
"name": "sectionId",
"schema": {
"type": "integer"
},
"description": "Section identifier",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/mediaContainerWithArtwork"
},
"examples": {
"someClusters": {
"value": {
"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"
}
]
}
}
}
}
}
}
}
}
}
},
"/library/sections/{sectionId}/prefs": {
"get": {
"tags": ["Library"],
"operationId": "librarySectionGetPrefs",
"summary": "Get section prefs",
"description": "Get the prefs for a section by id and potentially overriding the agent",
"parameters": [
{
"in": "path",
"name": "sectionId",
"schema": {
"type": "integer"
},
"description": "Section identifier",
"required": true
},
{
"in": "query",
"name": "agent",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/mediaContainerWithSettings"
},
"examples": {
"somePrefs": {
"value": {
"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"
}
]
}
}
}
}
}
}
}
}
},
"put": {
"tags": ["Library"],
"security": [
{
"user_token": ["admin"]
}
],
"operationId": "librarySectionPutPrefs",
"summary": "Set section prefs",
"description": "Set the prefs for a section by id",
"parameters": [
{
"in": "path",
"name": "sectionId",
"schema": {
"type": "integer"
},
"description": "Section identifier",
"required": true
},
{
"in": "query",
"name": "prefs",
"schema": {
"type": "object"
},
"required": true,
"example": {
"hidden": 0,
"enableCinemaTrailers": 1
}
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
}
}
}
},
"/library/sections/{sectionId}/refresh": {
"post": {
"tags": ["Library"],
"security": [
{
"user_token": ["admin"]
}
],
"operationId": "librarySectionPostRefresh",
"summary": "Refresh section",
"description": "Start a refresh of this section",
"parameters": [
{
"in": "path",
"name": "sectionId",
"schema": {
"type": "integer"
},
"description": "Section identifier",
"required": true
},
{
"in": "query",
"name": "force",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"description": "Whether the update of metadata and items should be performed even if modification dates indicate the items have not change"
},
{
"in": "query",
"name": "path",
"schema": {
"type": "string"
},
"description": "Restrict refresh to the specified path"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
}
}
},
"delete": {
"tags": ["Library"],
"security": [
{
"user_token": ["admin"]
}
],
"operationId": "librarySectionDeleteRefresh",
"summary": "Cancel section refresh",
"description": "Cancel the refresh of a section",
"parameters": [
{
"in": "path",
"name": "sectionId",
"schema": {
"type": "integer"
},
"description": "Section identifier",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
}
}
}
},
"/library/sections/{sectionId}/sorts": {
"get": {
"tags": ["Library"],
"operationId": "librarySectionGetSorts",
"summary": "Get a section sorts",
"description": "Get the sort mechanisms available in a section",
"parameters": [
{
"in": "path",
"name": "sectionId",
"schema": {
"type": "integer"
},
"description": "Section identifier",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/MediaContainer"
},
{
"type": "object",
"properties": {
"Directory": {
"type": "array",
"items": {
"$ref": "#/components/schemas/sort"
}
}
}
}
]
}
}
},
"examples": {
"movieSorts": {
"value": {
"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"
}
]
}
}
}
}
}
}
}
}
}
},
"/library/streams/{streamId}.{ext}": {
"get": {
"tags": ["Library"],
"operationId": "libraryGetStreamsStream",
"summary": "Get a stream",
"description": "Get a stream (such a a sidecar subtitle stream)",
"parameters": [
{
"in": "path",
"name": "streamId",
"schema": {
"type": "integer"
},
"required": true,
"description": "The id of the stream"
},
{
"in": "path",
"name": "ext",
"schema": {
"type": "string"
},
"required": true,
"description": "The extension of the stream. Required to fetch the `sub` portion of `idx`/`sub` subtitles"
},
{
"in": "query",
"name": "encoding",
"schema": {
"type": "string"
},
"required": false,
"description": "The requested encoding for the subtitle (only used for text subtitles)"
},
{
"in": "query",
"name": "format",
"schema": {
"type": "string"
},
"required": false,
"description": "The requested format for the subtitle to convert the subtitles to (only used for text subtitles)"
},
{
"in": "query",
"name": "autoAdjustSubtitle",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"required": false,
"description": "Whether the server should attempt to automatically adjust the subtitle timestamps to match the media"
}
],
"responses": {
"200": {
"description": "The stream in the requested format."
},
"403": {
"description": "The media is not accessible to the user",
"content": {
"text/html": {
"examples": {
"forbidden": {
"summary": "Forbidden",
"value": "<html><head><title>Forbidden</title></head><body><h1>403 Forbidden</h1></body></html>"
}
}
}
}
},
"404": {
"description": "The stream doesn't exist or has no data",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
},
"501": {
"description": "The stream is not a sidecar subtitle",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Implemented",
"value": "<html><head><title>Not Implemented</title></head><body><h1>501 Not Implemented</h1></body></html>"
}
}
}
}
}
}
},
"put": {
"tags": ["Library"],
"operationId": "libraryPutStreamsStream",
"summary": "Set a stream offset",
"description": "Set a stream offset in ms. This may not be respected by all clients",
"parameters": [
{
"in": "path",
"name": "streamId",
"schema": {
"type": "integer"
},
"required": true,
"description": "The id of the stream"
},
{
"in": "path",
"name": "ext",
"schema": {
"type": "string"
},
"required": true,
"description": "This is not a part of this endpoint but documented here to satisfy OpenAPI"
},
{
"in": "query",
"name": "offset",
"schema": {
"type": "integer"
},
"required": false,
"description": "The offest in ms"
}
],
"responses": {
"200": {
"description": "The stream in the requested format."
},
"400": {
"description": "The stream doesn't exist",
"content": {
"text/html": {
"examples": {
"badRequest": {
"summary": "A parameter has a bad value or required parameter is missing",
"value": "<html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>"
}
}
}
}
}
}
},
"delete": {
"tags": ["Library"],
"operationId": "libraryDeleteStreamsStream",
"summary": "Delete a stream",
"description": "Delete a stream. Only applies to downloaded subtitle streams or a sidecar subtitle when media deletion is enabled.",
"parameters": [
{
"in": "path",
"name": "streamId",
"schema": {
"type": "integer"
},
"required": true,
"description": "The id of the stream"
},
{
"in": "path",
"name": "ext",
"schema": {
"type": "string"
},
"required": true,
"description": "This is not a part of this endpoint but documented here to satisfy OpenAPI"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
},
"403": {
"description": "This user cannot delete this stream",
"content": {
"text/html": {
"examples": {
"forbidden": {
"summary": "Forbidden",
"value": "<html><head><title>Forbidden</title></head><body><h1>403 Forbidden</h1></body></html>"
}
}
}
}
},
"500": {
"description": "The stream cannot be deleted",
"content": {
"text/html": {
"examples": {
"badParam": {
"summary": "Processing failed inside the server",
"value": "<html><head><title>Internal Server Error</title></head><body><h1>500 Internal Server Error</h1></body></html>"
}
}
}
}
}
}
}
},
"/library/streams/{streamId}/loudness": {
"get": {
"tags": ["Library"],
"operationId": "libraryGetStreamsStreamLoudness",
"summary": "Get loudness about a stream",
"description": "The the loudness of a stream in db, one number per line, one entry per 100ms",
"parameters": [
{
"in": "path",
"name": "streamId",
"schema": {
"type": "integer"
},
"required": true,
"description": "The id of the stream"
},
{
"in": "query",
"name": "subsample",
"schema": {
"type": "integer"
},
"description": "Subsample result down to return only the provided number of samples"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"text/plain": {
"schema": {
"type": "string"
},
"examples": {
"someOfLoudness": {
"value": "-40.0\n-40.0\n-40.0\n-36.9\n-25.3\n-22.9\n-21.5\n-20.6\n"
}
}
}
}
},
"403": {
"description": "The media is not accessible to the user",
"content": {
"text/html": {
"examples": {
"forbidden": {
"summary": "Forbidden",
"value": "<html><head><title>Forbidden</title></head><body><h1>403 Forbidden</h1></body></html>"
}
}
}
}
},
"404": {
"description": "The stream doesn't exist, or the loudness feature is not available on this PMS",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
}
}
}
},
"/library/streams/{streamId}/levels": {
"get": {
"tags": ["Library"],
"operationId": "libraryGetStreamsStreamLevels",
"summary": "Get loudness about a stream in json",
"description": "The the loudness of a stream in db, one entry per 100ms",
"parameters": [
{
"in": "path",
"name": "streamId",
"schema": {
"type": "integer"
},
"required": true,
"description": "The id of the stream"
},
{
"in": "query",
"name": "subsample",
"schema": {
"type": "integer"
},
"description": "Subsample result down to return only the provided number of samples"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/MediaContainer"
},
{
"type": "object",
"properties": {
"totalSamples": {
"type": "string",
"description": "The total number of samples (as a string)"
},
"Level": {
"type": "array",
"items": {
"type": "object",
"properties": {
"v": {
"type": "number",
"description": "The level in db."
}
}
}
}
}
}
]
}
}
},
"examples": {
"someOfLoudness": {
"value": {
"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
}
]
}
}
}
}
}
}
},
"403": {
"$ref": "#/components/responses/responses-403"
},
"404": {
"$ref": "#/components/responses/responses-404"
}
}
}
},
"/library/tags": {
"get": {
"tags": ["Library"],
"operationId": "libraryGetTags",
"summary": "Get all library tags of a type",
"description": "Get all library tags of a type",
"parameters": [
{
"in": "query",
"name": "type",
"schema": {
"type": "integer"
},
"description": "The type of tags to fetch"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/MediaContainer"
},
{
"type": "object",
"properties": {
"Directory": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"filter": {
"type": "string",
"description": "The filter string to view metadata wit this tag"
},
"tag": {
"type": "string",
"description": "The name of the tag"
},
"tagType": {
"type": "integer",
"description": "The type of the tag"
},
"tagKey": {
"type": "string",
"description": "The key of this tag. This is a universal key across all PMS instances and plex.tv services"
},
"thumb": {
"type": "string",
"description": "The URL to a thumbnail for this tag"
}
}
}
}
}
}
]
}
}
},
"examples": {
"someOfLoudness": {
"value": {
"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",
"thumb": "https://metadata-static.plex.tv/people/5d77683785719b001f3a4386.jpg"
},
{
"id": 184,
"filter": "actor=184",
"tag": "Julianne Moore",
"tagType": 6,
"tagKey": "5d7768256f4521001ea989be",
"thumb": "https://metadata-static.plex.tv/6/people/6ff18839116b7c7d4eb3cb4a5d401943.jpg"
},
{
"id": 267,
"filter": "actor=267",
"tag": "Dwayne Johnson",
"tagType": 6,
"tagKey": "5d77682b6f4521001ea99f61",
"thumb": "https://metadata-static.plex.tv/1/people/117e6b9ffe277568350e4c5c552f7800.jpg"
}
]
}
}
}
}
}
}
}
}
}
},
"/livetv/dvrs": {
"get": {
"tags": ["DVRs"],
"summary": "Get DVRs",
"description": "Get the list of all available DVRs",
"operationId": "livetvDvrGetSlash",
"responses": {
"200": {
"description": "OK",
"headers": {
"X-Plex-Container-Total-Size": {
"description": "Provided on all MediaContainer objects indicating the total size of objects available",
"schema": {
"type": "integer"
}
},
"X-Plex-Container-Start": {
"description": "Provided on all MediaContainer objects indicating the offset of where this container page starts",
"schema": {
"type": "integer"
}
}
},
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/mediaContainerWithStatus_properties-MediaContainer"
},
{
"type": "object",
"properties": {
"DVR": {
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"language": {
"type": "string"
},
"lineup": {
"type": "string"
},
"uuid": {
"type": "string"
},
"Device": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Device-items"
}
}
}
}
}
}
}
]
}
}
},
"examples": {
"simple": {
"value": {
"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",
"uri": "http://10.0.0.42",
"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"
}
]
}
}
}
}
}
}
}
}
},
"post": {
"tags": ["DVRs"],
"security": [
{
"user_token": ["admin"]
}
],
"summary": "Create a DVR",
"description": "Creation of a DVR, after creation of a devcie and a lineup is selected",
"operationId": "livetvDvrPostSlash",
"parameters": [
{
"in": "query",
"name": "lineup",
"schema": {
"type": "string"
},
"example": "lineup://tv.plex.providers.epg.onconnect/USA-HI51418-DEFAULT",
"description": "The EPG lineup."
},
{
"in": "query",
"name": "device",
"schema": {
"type": "array",
"items": {
"type": "string"
}
},
"example": "device[]=device://tv.plex.grabbers.hdhomerun/1053C0CA",
"description": "The device."
},
{
"in": "query",
"name": "language",
"schema": {
"type": "string"
},
"example": "eng",
"description": "The language."
}
],
"responses": {
"200": {
"$ref": "#/components/responses/dvrRequestHandler_slash-get-responses-200"
}
}
}
},
"/livetv/dvrs/{dvrId}": {
"get": {
"tags": ["DVRs"],
"summary": "Get a single DVR",
"description": "Get a single DVR by its id (key)",
"operationId": "livetvDvrGetDVR",
"parameters": [
{
"in": "path",
"name": "dvrId",
"schema": {
"type": "integer"
},
"description": "The ID of the DVR.",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"headers": {
"X-Plex-Container-Total-Size": {
"description": "Provided on all MediaContainer objects indicating the total size of objects available",
"schema": {
"type": "integer"
}
},
"X-Plex-Container-Start": {
"description": "Provided on all MediaContainer objects indicating the offset of where this container page starts",
"schema": {
"type": "integer"
}
}
},
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/mediaContainerWithStatus_properties-MediaContainer"
},
{
"type": "object",
"properties": {
"DVR": {
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"language": {
"type": "string"
},
"lineup": {
"type": "string"
},
"uuid": {
"type": "string"
},
"Device": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Device-items"
}
}
}
}
}
}
}
]
}
}
},
"examples": {
"simple": {
"value": {
"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",
"uri": "http://10.0.0.42",
"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"
}
]
}
}
}
}
}
}
}
}
},
"delete": {
"tags": ["DVRs"],
"security": [
{
"user_token": ["admin"]
}
],
"summary": "Delete a single DVR",
"description": "Delete a single DVR by its id (key)",
"operationId": "livetvDvrDeleteDVR",
"parameters": [
{
"in": "path",
"name": "dvrId",
"schema": {
"type": "integer"
},
"description": "The ID of the DVR.",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
}
}
}
},
"/livetv/dvrs/{dvrId}/channels/{channel}/tune": {
"post": {
"tags": ["DVRs"],
"summary": "Tune a channel on a DVR",
"description": "Tune a channel on a DVR to the provided channel",
"operationId": "livetvDvrPostChannelsChannelTune",
"parameters": [
{
"in": "path",
"name": "dvrId",
"schema": {
"type": "integer"
},
"description": "The ID of the DVR.",
"required": true
},
{
"in": "path",
"name": "channel",
"schema": {
"type": "string"
},
"example": "2.1",
"description": "The channel ID to tune",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"headers": {
"X-Plex-Container-Total-Size": {
"description": "Provided on all MediaContainer objects indicating the total size of objects available",
"schema": {
"type": "integer"
}
},
"X-Plex-Container-Start": {
"description": "Provided on all MediaContainer objects indicating the offset of where this container page starts",
"schema": {
"type": "integer"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/mediaContainerWithMetadata"
},
"examples": {
"channelMetadata": {
"value": {
"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
}
]
}
]
}
]
}
]
}
}
}
}
}
}
},
"500": {
"description": "Tuning failed",
"content": {
"text/html": {
"examples": {
"badParam": {
"summary": "Processing failed inside the server",
"value": "<html><head><title>Internal Server Error</title></head><body><h1>500 Internal Server Error</h1></body></html>"
}
}
}
}
}
}
}
},
"/livetv/dvrs/{dvrId}/devices/{deviceId}": {
"put": {
"tags": ["DVRs"],
"security": [
{
"user_token": ["admin"]
}
],
"summary": "Add a device to an existing DVR",
"description": "Add a device to an existing DVR",
"operationId": "livetvDvrPutDvrDevice",
"parameters": [
{
"in": "path",
"name": "dvrId",
"schema": {
"type": "integer"
},
"description": "The ID of the DVR.",
"required": true
},
{
"in": "path",
"name": "deviceId",
"schema": {
"type": "integer"
},
"description": "The ID of the device to add.",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"headers": {
"X-Plex-Container-Total-Size": {
"description": "Provided on all MediaContainer objects indicating the total size of objects available",
"schema": {
"type": "integer"
}
},
"X-Plex-Container-Start": {
"description": "Provided on all MediaContainer objects indicating the offset of where this container page starts",
"schema": {
"type": "integer"
}
}
},
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/mediaContainerWithStatus_properties-MediaContainer"
},
{
"type": "object",
"properties": {
"DVR": {
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"language": {
"type": "string"
},
"lineup": {
"type": "string"
},
"uuid": {
"type": "string"
},
"Device": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Device-items"
}
}
}
}
}
}
}
]
}
}
},
"examples": {
"simple": {
"value": {
"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",
"uri": "http://10.0.0.42",
"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"
}
]
}
}
}
}
}
}
}
}
},
"delete": {
"tags": ["DVRs"],
"security": [
{
"user_token": ["admin"]
}
],
"summary": "Remove a device from an existing DVR",
"description": "Remove a device from an existing DVR",
"operationId": "livetvDvrDeleteDvrDevice",
"parameters": [
{
"in": "path",
"name": "dvrId",
"schema": {
"type": "integer"
},
"description": "The ID of the DVR.",
"required": true
},
{
"in": "path",
"name": "deviceId",
"schema": {
"type": "integer"
},
"description": "The ID of the device to add.",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"headers": {
"X-Plex-Container-Total-Size": {
"description": "Provided on all MediaContainer objects indicating the total size of objects available",
"schema": {
"type": "integer"
}
},
"X-Plex-Container-Start": {
"description": "Provided on all MediaContainer objects indicating the offset of where this container page starts",
"schema": {
"type": "integer"
}
}
},
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/mediaContainerWithStatus_properties-MediaContainer"
},
{
"type": "object",
"properties": {
"DVR": {
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"language": {
"type": "string"
},
"lineup": {
"type": "string"
},
"uuid": {
"type": "string"
},
"Device": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Device-items"
}
}
}
}
}
}
}
]
}
}
},
"examples": {
"simple": {
"value": {
"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",
"uri": "http://10.0.0.42",
"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"
}
]
}
}
}
}
}
}
}
}
}
},
"/livetv/dvrs/{dvrId}/lineups": {
"put": {
"tags": ["DVRs"],
"security": [
{
"user_token": ["admin"]
}
],
"summary": "Add a DVR Lineup",
"description": "Add a lineup to a DVR device's set of lineups.",
"operationId": "livetvDvrPutLineup",
"parameters": [
{
"in": "path",
"name": "dvrId",
"schema": {
"type": "integer"
},
"description": "The ID of the DVR.",
"required": true
},
{
"in": "query",
"name": "lineup",
"schema": {
"type": "string"
},
"required": true,
"description": "The lineup to delete"
}
],
"responses": {
"200": {
"description": "OK",
"headers": {
"X-Plex-Container-Total-Size": {
"description": "Provided on all MediaContainer objects indicating the total size of objects available",
"schema": {
"type": "integer"
}
},
"X-Plex-Container-Start": {
"description": "Provided on all MediaContainer objects indicating the offset of where this container page starts",
"schema": {
"type": "integer"
}
}
},
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/mediaContainerWithStatus_properties-MediaContainer"
},
{
"type": "object",
"properties": {
"DVR": {
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"language": {
"type": "string"
},
"lineup": {
"type": "string"
},
"uuid": {
"type": "string"
},
"Device": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Device-items"
}
}
}
}
}
}
}
]
}
}
},
"examples": {
"simple": {
"value": {
"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",
"uri": "http://10.0.0.42",
"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"
}
]
}
}
}
}
}
}
}
}
},
"delete": {
"tags": ["DVRs"],
"security": [
{
"user_token": ["admin"]
}
],
"summary": "Delete a DVR Lineup",
"description": "Deletes a DVR device's lineup.",
"operationId": "livetvDvrDeleteLineup",
"parameters": [
{
"in": "path",
"name": "dvrId",
"schema": {
"type": "integer"
},
"description": "The ID of the DVR.",
"required": true
},
{
"in": "query",
"name": "lineup",
"schema": {
"type": "string"
},
"required": true,
"description": "The lineup to delete"
}
],
"responses": {
"200": {
"description": "OK",
"headers": {
"X-Plex-Container-Total-Size": {
"description": "Provided on all MediaContainer objects indicating the total size of objects available",
"schema": {
"type": "integer"
}
},
"X-Plex-Container-Start": {
"description": "Provided on all MediaContainer objects indicating the offset of where this container page starts",
"schema": {
"type": "integer"
}
}
},
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/mediaContainerWithStatus_properties-MediaContainer"
},
{
"type": "object",
"properties": {
"DVR": {
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"language": {
"type": "string"
},
"lineup": {
"type": "string"
},
"uuid": {
"type": "string"
},
"Device": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Device-items"
}
}
}
}
}
}
}
]
}
}
},
"examples": {
"simple": {
"value": {
"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",
"uri": "http://10.0.0.42",
"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"
}
]
}
}
}
}
}
}
}
}
}
},
"/livetv/dvrs/{dvrId}/prefs": {
"put": {
"tags": ["DVRs"],
"security": [
{
"user_token": ["admin"]
}
],
"summary": "Set DVR preferences",
"description": "Set DVR preferences by name avd value",
"operationId": "livetvDvrPutPrefs",
"parameters": [
{
"in": "path",
"name": "dvrId",
"schema": {
"type": "integer"
},
"description": "The ID of the DVR.",
"required": true
},
{
"in": "query",
"name": "name",
"schema": {
"type": "string"
},
"description": "Set the `name` preference to the provided value"
}
],
"responses": {
"200": {
"description": "OK",
"headers": {
"X-Plex-Container-Total-Size": {
"description": "Provided on all MediaContainer objects indicating the total size of objects available",
"schema": {
"type": "integer"
}
},
"X-Plex-Container-Start": {
"description": "Provided on all MediaContainer objects indicating the offset of where this container page starts",
"schema": {
"type": "integer"
}
}
},
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/mediaContainerWithStatus_properties-MediaContainer"
},
{
"type": "object",
"properties": {
"DVR": {
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"language": {
"type": "string"
},
"lineup": {
"type": "string"
},
"uuid": {
"type": "string"
},
"Device": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Device-items"
}
}
}
}
}
}
}
]
}
}
},
"examples": {
"simple": {
"value": {
"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",
"uri": "http://10.0.0.42",
"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"
}
]
}
}
}
}
}
}
}
}
}
},
"/livetv/dvrs/{dvrId}/reloadGuide": {
"post": {
"tags": ["DVRs"],
"security": [
{
"user_token": ["admin"]
}
],
"summary": "Tell a DVR to reload program guide",
"description": "Tell a DVR to reload program guide",
"operationId": "livetvDvrPostReloadGuide",
"parameters": [
{
"in": "path",
"name": "dvrId",
"schema": {
"type": "integer"
},
"description": "The ID of the DVR.",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"text/html": {
"examples": {
"ok": {
"summary": "OK",
"value": ""
}
}
}
},
"headers": {
"X-Plex-Activity": {
"schema": {
"type": "string"
},
"description": "The activity of the reload process"
}
}
}
}
},
"delete": {
"tags": ["DVRs"],
"security": [
{
"user_token": ["admin"]
}
],
"summary": "Tell a DVR to stop reloading program guide",
"description": "Tell a DVR to stop reloading program guide",
"operationId": "livetvDvrDeleteReloadGuide",
"parameters": [
{
"in": "path",
"name": "dvrId",
"schema": {
"type": "integer"
},
"description": "The ID of the DVR.",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
}
}
}
},
"/livetv/epg/channelmap": {
"get": {
"tags": ["EPG"],
"summary": "Compute the best channel map",
"description": "Compute the best channel map, given device and lineup",
"operationId": "livetvEpgGetChannelmap",
"parameters": [
{
"in": "query",
"name": "device",
"schema": {
"type": "string"
},
"required": true,
"description": "The URI describing the device"
},
{
"in": "query",
"name": "lineup",
"schema": {
"type": "string"
},
"required": true,
"description": "The URI describing the lineup"
}
],
"responses": {
"200": {
"description": "OK",
"headers": {
"X-Plex-Container-Total-Size": {
"description": "Provided on all MediaContainer objects indicating the total size of objects available",
"schema": {
"type": "integer"
}
},
"X-Plex-Container-Start": {
"description": "Provided on all MediaContainer objects indicating the offset of where this container page starts",
"schema": {
"type": "integer"
}
}
},
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/MediaContainer"
},
{
"type": "object",
"properties": {
"ChannelMapping": {
"type": "array",
"items": {
"type": "object",
"properties": {
"deviceIdentifier": {
"type": "string",
"description": "The channel description on the device"
},
"favorite": {
"type": "boolean"
},
"lineupIdentifier": {
"type": "string",
"description": "The channel identifier in the lineup"
},
"channelKey": {
"type": "string"
}
}
}
}
}
}
]
}
}
},
"examples": {
"computedLineup": {
"value": {
"MediaContainer": {
"size": 1,
"ChannelMapping": [
{
"channelKey": "5cc83d73af4a72001e9b16d7-5cab3c634df507001fefcad0",
"deviceIdentifier": "48.9",
"lineupIdentifier": "103"
}
]
}
}
}
}
}
}
},
"404": {
"description": "No device or provider with the identifier was found",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
},
"500": {
"description": "Failed to compute channel map",
"content": {
"text/html": {
"examples": {
"badParam": {
"summary": "Processing failed inside the server",
"value": "<html><head><title>Internal Server Error</title></head><body><h1>500 Internal Server Error</h1></body></html>"
}
}
}
}
}
}
}
},
"/livetv/epg/channels": {
"get": {
"tags": ["EPG"],
"summary": "Get channels for a lineup",
"description": "Get channels for a lineup within an EPG provider",
"operationId": "livetvEpgGetChannels",
"parameters": [
{
"in": "query",
"name": "lineup",
"schema": {
"type": "string"
},
"required": true,
"description": "The URI describing the lineup"
}
],
"responses": {
"200": {
"description": "OK",
"headers": {
"X-Plex-Container-Total-Size": {
"description": "Provided on all MediaContainer objects indicating the total size of objects available",
"schema": {
"type": "integer"
}
},
"X-Plex-Container-Start": {
"description": "Provided on all MediaContainer objects indicating the offset of where this container page starts",
"schema": {
"type": "integer"
}
}
},
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/MediaContainer"
},
{
"type": "object",
"properties": {
"Channel": {
"type": "array",
"items": {
"$ref": "#/components/schemas/channel"
}
}
}
}
]
}
}
},
"examples": {
"someChannels": {
"value": {
"MediaContainer": {
"size": 2,
"Channel": [
{
"callSign": "BBC1SCO",
"identifier": "001",
"thumb": "http://plex.tmsimg.com/h3/NowShowing/21439/s21439_h3_aa.png"
},
{
"callSign": "BBC2SCO",
"identifier": "002"
}
]
}
}
}
}
}
}
},
"404": {
"description": "No provider with the identifier was found",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
}
}
}
},
"/livetv/epg/countries": {
"get": {
"tags": ["EPG"],
"summary": "Get all countries",
"description": "This endpoint returns a list of countries which EPG data is available for. There are three flavors, as specfied by the `flavor` attribute",
"operationId": "livetvEpgGetCountries",
"responses": {
"200": {
"description": "OK",
"headers": {
"X-Plex-Container-Total-Size": {
"description": "Provided on all MediaContainer objects indicating the total size of objects available",
"schema": {
"type": "integer"
}
},
"X-Plex-Container-Start": {
"description": "Provided on all MediaContainer objects indicating the offset of where this container page starts",
"schema": {
"type": "integer"
}
}
},
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/MediaContainer"
},
{
"type": "object",
"properties": {
"Country": {
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"type": {
"type": "string"
},
"title": {
"type": "string"
},
"code": {
"type": "string",
"description": "Three letter code"
},
"language": {
"type": "string",
"description": "Three letter language code"
},
"languageTitle": {
"type": "string",
"description": "The title of the language"
},
"example": {
"type": "string"
},
"flavor": {
"type": "integer",
"enum": [0, 1, 2],
"description": "- `0`: The country is divided into regions, and following the key will lead to a list of regions.\n- `1`: The county is divided by postal codes, and an example code is returned in `example`.\n- `2`: The country has a single postal code, returned in `example`.\n"
}
}
}
}
}
}
]
}
}
},
"examples": {
"threeCountries": {
"value": {
"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
}
]
}
}
}
}
}
}
}
}
}
},
"/livetv/epg/countries/{country}/{epgId}/lineups": {
"get": {
"tags": ["EPG"],
"summary": "Get lineups for a country via postal code",
"description": "Returns a list of lineups for a given country, EPG provider and postal code",
"operationId": "livetvEpgGetCountriesCountryLineups",
"parameters": [
{
"in": "path",
"name": "country",
"schema": {
"type": "string"
},
"description": "3 letter country code",
"required": true
},
{
"in": "path",
"name": "epgId",
"schema": {
"type": "string"
},
"description": "The `providerIdentifier` of the provider",
"required": true
},
{
"in": "query",
"name": "postalCode",
"schema": {
"type": "string"
},
"description": "The postal code for the lineups to fetch"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/mediaContainerWithLineup"
},
"examples": {
"aSetOfLineups": {
"value": {
"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"
}
]
}
}
}
}
}
}
},
"404": {
"description": "No provider with the identifier was found",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
}
}
}
},
"/livetv/epg/countries/{country}/{epgId}/regions": {
"get": {
"tags": ["EPG"],
"summary": "Get regions for a country",
"description": "Get regions for a country within an EPG provider",
"operationId": "livetvEpgGetCountriesCountryRegions",
"parameters": [
{
"in": "path",
"name": "country",
"schema": {
"type": "string"
},
"description": "3 letter country code",
"required": true
},
{
"in": "path",
"name": "epgId",
"schema": {
"type": "string"
},
"description": "The `providerIdentifier` of the provider",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"headers": {
"X-Plex-Container-Total-Size": {
"description": "Provided on all MediaContainer objects indicating the total size of objects available",
"schema": {
"type": "integer"
}
},
"X-Plex-Container-Start": {
"description": "Provided on all MediaContainer objects indicating the offset of where this container page starts",
"schema": {
"type": "integer"
}
}
},
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/MediaContainer"
},
{
"type": "object",
"properties": {
"Country": {
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"type": {
"type": "string"
},
"title": {
"type": "string"
},
"national": {
"type": "boolean"
}
}
}
}
}
}
]
}
}
},
"examples": {
"someRegions": {
"value": {
"MediaContainer": {
"size": 2,
"Region": [
{
"key": "132718/lineups",
"type": "region",
"title": "Bruxelles"
},
{
"key": "116043/lineups",
"type": "region",
"title": "Région wallonne"
}
]
}
}
}
}
}
}
},
"404": {
"description": "No provider with the identifier was found",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
}
}
}
},
"/livetv/epg/countries/{country}/{epgId}/regions/{region}/lineups": {
"get": {
"tags": ["EPG"],
"summary": "Get lineups for a region",
"description": "Get lineups for a region within an EPG provider",
"operationId": "livetvEpgGetCountriesCountryRegionsRegionLineups",
"parameters": [
{
"in": "path",
"name": "country",
"schema": {
"type": "string"
},
"description": "3 letter country code",
"required": true
},
{
"in": "path",
"name": "epgId",
"schema": {
"type": "string"
},
"description": "The `providerIdentifier` of the provider",
"required": true
},
{
"in": "path",
"name": "region",
"schema": {
"type": "string"
},
"description": "The region for the lineup",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"headers": {
"X-Plex-Container-Total-Size": {
"description": "Provided on all MediaContainer objects indicating the total size of objects available",
"schema": {
"type": "integer"
}
},
"X-Plex-Container-Start": {
"description": "Provided on all MediaContainer objects indicating the offset of where this container page starts",
"schema": {
"type": "integer"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/mediaContainerWithLineup"
},
"examples": {
"aSetOfLineups": {
"value": {
"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
}
]
}
}
}
}
}
}
},
"404": {
"description": "No provider with the identifier was found",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
}
}
}
},
"/livetv/epg/languages": {
"get": {
"tags": ["EPG"],
"summary": "Get all languages",
"description": "Returns a list of all possible languages for EPG data.",
"operationId": "livetvEpgGetLanguages",
"responses": {
"200": {
"description": "OK",
"headers": {
"X-Plex-Container-Total-Size": {
"description": "Provided on all MediaContainer objects indicating the total size of objects available",
"schema": {
"type": "integer"
}
},
"X-Plex-Container-Start": {
"description": "Provided on all MediaContainer objects indicating the offset of where this container page starts",
"schema": {
"type": "integer"
}
}
},
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/MediaContainer"
},
{
"type": "object",
"properties": {
"Language": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "3 letter language code"
},
"title": {
"type": "string"
}
}
}
}
}
}
]
}
}
},
"examples": {
"threeLanguages": {
"value": {
"MediaContainer": {
"size": 3,
"Language": [
{
"code": "aar",
"title": "Afaraf"
},
{
"code": "abk",
"title": "аҧсуа"
},
{
"code": "afr",
"title": "Afrikaans"
}
]
}
}
}
}
}
}
}
}
}
},
"/livetv/epg/lineup": {
"get": {
"tags": ["EPG"],
"summary": "Compute the best lineup",
"description": "Compute the best lineup, given lineup group and device",
"operationId": "livetvEpgGetLineup",
"parameters": [
{
"in": "query",
"name": "device",
"schema": {
"type": "string"
},
"required": true,
"description": "The URI describing the device"
},
{
"in": "query",
"name": "lineupGroup",
"schema": {
"type": "string"
},
"required": true,
"description": "The URI describing the lineupGroup"
}
],
"responses": {
"200": {
"description": "OK",
"headers": {
"X-Plex-Activity": {
"schema": {
"type": "string"
},
"description": "The activity of the reload process"
}
}
},
"404": {
"description": "No device or provider with the identifier was found",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
},
"500": {
"description": "Could not get device's channels",
"content": {
"text/html": {
"examples": {
"badParam": {
"summary": "Processing failed inside the server",
"value": "<html><head><title>Internal Server Error</title></head><body><h1>500 Internal Server Error</h1></body></html>"
}
}
}
}
}
}
}
},
"/livetv/epg/lineupchannels": {
"get": {
"tags": ["EPG"],
"summary": "Get the channels for mulitple lineups",
"description": "Get the channels across multiple lineups",
"operationId": "livetvEpgGetLineupchannels",
"parameters": [
{
"in": "query",
"name": "lineup",
"schema": {
"type": "array",
"items": {
"type": "string"
}
},
"required": true,
"description": "The URIs describing the lineups"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/MediaContainer"
},
{
"type": "object",
"properties": {
"Lineup": {
"type": "array",
"items": {
"allOf": [
{
"$ref": "#/components/schemas/Lineup-items"
},
{
"type": "object",
"properties": {
"Channel": {
"type": "array",
"items": {
"$ref": "#/components/schemas/channel"
}
}
}
}
]
}
}
}
}
]
}
}
},
"examples": {
"aChannelSet": {
"description": "A lineup channels",
"value": {
"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"
}
]
}
]
}
}
}
}
}
}
},
"404": {
"description": "No provider with the identifier was found",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
}
}
}
},
"/livetv/sessions": {
"get": {
"tags": ["Live TV"],
"summary": "Get all sessions",
"description": "Get all livetv sessions and metadata",
"operationId": "livetvSessionsGetSlash",
"responses": {
"200": {
"description": "OK",
"headers": {
"X-Plex-Container-Total-Size": {
"description": "Provided on all MediaContainer objects indicating the total size of objects available",
"schema": {
"type": "integer"
}
},
"X-Plex-Container-Start": {
"description": "Provided on all MediaContainer objects indicating the offset of where this container page starts",
"schema": {
"type": "integer"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/mediaContainerWithMetadata",
"examples": {
"oneStream": {
"value": {
"MediaContainer": {
"size": 1,
"Metadata": [
{
"genuineMediaAnalysis": true,
"live": true,
"key": "/livetv/sessions/dc30f95e-6379-44f7-8168-172ffc820496",
"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
}
]
}
]
}
]
}
]
}
}
}
}
}
}
}
}
}
}
},
"/livetv/sessions/{sessionId}": {
"get": {
"tags": ["Live TV"],
"summary": "Get a single session",
"description": "Get a single livetv session and metadata",
"operationId": "livetvSessionsGetSession",
"parameters": [
{
"in": "path",
"name": "sessionId",
"schema": {
"type": "string"
},
"description": "The session id",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"headers": {
"X-Plex-Container-Total-Size": {
"description": "Provided on all MediaContainer objects indicating the total size of objects available",
"schema": {
"type": "integer"
}
},
"X-Plex-Container-Start": {
"description": "Provided on all MediaContainer objects indicating the offset of where this container page starts",
"schema": {
"type": "integer"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/mediaContainerWithMetadata",
"examples": {
"oneStream": {
"value": {
"MediaContainer": {
"size": 1,
"Metadata": [
{
"genuineMediaAnalysis": true,
"live": true,
"key": "/livetv/sessions/dc30f95e-6379-44f7-8168-172ffc820496",
"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
}
]
}
]
}
]
}
]
}
}
}
}
}
}
}
}
}
}
},
"/livetv/sessions/{sessionId}/{consumerId}/index.m3u8": {
"get": {
"tags": ["Live TV"],
"summary": "Get a session playlist index",
"description": "Get a playlist index for playing this session",
"operationId": "livetvSessionsGetSessionConsumerIndex",
"parameters": [
{
"in": "path",
"name": "sessionId",
"schema": {
"type": "string"
},
"description": "The session id",
"required": true
},
{
"in": "path",
"name": "consumerId",
"schema": {
"type": "string"
},
"description": "The consumer id",
"required": true
}
],
"responses": {
"200": {
"description": "Index playlist for playing HLS content",
"content": {
"application/vnd.apple.mpegurl": {
"examples": {
"anIndex": {
"value": "#EXTM3U\n#EXT-X-VERSION:4\n#EXT-X-TARGETDURATION:3\n#EXT-X-MEDIA-SEQUENCE:0\n#EXT-X-PROGRAM-DATE-TIME:2024-05-22T17:18:48.044851000Z\n#EXTINF:0.551044, nodesc\n00000.ts\n#EXTINF:1.001000, nodesc\n00001.ts\n#EXTINF:1.067323, nodesc\n00002.ts\n#EXTINF:1.001000, nodesc\n00003.ts\n"
}
}
}
}
},
"404": {
"description": "Session or consumer not found"
}
}
}
},
"/livetv/sessions/{sessionId}/{consumerId}/{segmentId}": {
"get": {
"tags": ["Live TV"],
"summary": "Get a single session segment",
"description": "Get a single livetv session segment",
"operationId": "livetvSessionsGetSessionConsumerSegment",
"parameters": [
{
"in": "path",
"name": "sessionId",
"schema": {
"type": "string"
},
"description": "The session id",
"required": true
},
{
"in": "path",
"name": "consumerId",
"schema": {
"type": "string"
},
"description": "The consumer id",
"required": true
},
{
"in": "path",
"name": "segmentId",
"schema": {
"type": "string"
},
"description": "The segment id",
"required": true
}
],
"responses": {
"200": {
"description": "MPEG-TS segment for playing HLS content"
},
"404": {
"description": "Session, consumer, or segment not found"
}
}
}
},
"/log": {
"put": {
"tags": ["Log"],
"security": [
{
"user_token": ["admin"]
}
],
"summary": "Logging a single-line message to the Plex Media Server log",
"description": "This endpoint will write a single-line log message, including a level and source to the main Plex Media Server log.\n\nNote: This endpoint responds to all HTTP verbs **except POST** but PUT is preferred\n",
"operationId": "logPutSlash",
"parameters": [
{
"in": "query",
"name": "level",
"schema": {
"type": "integer",
"enum": [0, 1, 2, 3, 4]
},
"description": "An integer log level to write to the PMS log with.\n - 0: Error\n - 1: Warning\n - 2: Info\n - 3: Debug\n - 4: Verbose\n"
},
{
"in": "query",
"name": "message",
"schema": {
"type": "string"
},
"description": "The text of the message to write to the log."
},
{
"in": "query",
"name": "source",
"schema": {
"type": "string"
},
"description": "A string indicating the source of the message."
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
}
}
},
"post": {
"tags": ["Log"],
"security": [
{
"user_token": ["admin"]
}
],
"summary": "Logging a multi-line message to the Plex Media Server log",
"description": "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.\n",
"operationId": "logPostSlash",
"requestBody": {
"description": "Line separated list of log items",
"content": {
"text/plain": {
"examples": {
"twoLogs": {
"value": "level=3&source=diskless%20client&Things%20are%20OK%20right%20now\nlevel=0&source=diskless%20client&We%20have%20a%20problem\n"
}
}
}
}
},
"responses": {
"200": {
"$ref": "#/components/responses/200"
},
"400": {
"$ref": "#/components/responses/400"
}
}
}
},
"/log/networked": {
"post": {
"tags": ["Log"],
"security": [
{
"user_token": ["admin"]
}
],
"summary": "Enabling Papertrail",
"description": "This endpoint will enable all Plex Media Serverlogs to be sent to the Papertrail networked logging site for a period of time\n\nNote: This endpoint responds to all HTTP verbs but POST is preferred\n",
"operationId": "logPostPapertrail",
"parameters": [
{
"in": "query",
"name": "minutes",
"schema": {
"type": "integer"
},
"description": "The number of minutes logging should be sent to Papertrail"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
},
"403": {
"description": "User doesn't have permission",
"content": {
"text/html": {
"examples": {
"forbidden": {
"summary": "Forbidden",
"value": "<html><head><title>Forbidden</title></head><body><h1>403 Forbidden</h1></body></html>"
}
}
}
}
}
}
}
},
"/media/grabbers": {
"get": {
"tags": ["Devices"],
"summary": "Get available grabbers",
"description": "Get available grabbers visible to the server",
"operationId": "mediaGrabberGetSlash",
"parameters": [
{
"in": "query",
"name": "protocol",
"schema": {
"type": "string"
},
"example": "livetv",
"description": "Only return grabbers providing this protocol."
}
],
"responses": {
"200": {
"description": "OK",
"headers": {
"X-Plex-Container-Total-Size": {
"description": "Provided on all MediaContainer objects indicating the total size of objects available",
"schema": {
"type": "integer"
}
},
"X-Plex-Container-Start": {
"description": "Provided on all MediaContainer objects indicating the offset of where this container page starts",
"schema": {
"type": "integer"
}
}
},
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/MediaContainer"
},
{
"type": "object",
"properties": {
"MediaGrabber": {
"type": "array",
"items": {
"type": "object",
"properties": {
"title": {
"type": "string"
},
"identifier": {
"type": "string"
},
"protocol": {
"type": "string"
}
}
}
}
}
}
]
}
}
},
"examples": {
"twoDevices": {
"value": {
"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"
}
]
}
}
}
}
}
}
}
}
}
},
"/media/grabbers/devices": {
"get": {
"tags": ["Devices"],
"security": [
{
"user_token": ["admin"]
}
],
"summary": "Get all devices",
"description": "Get the list of all devices present",
"operationId": "mediaGrabberGetDevices",
"responses": {
"200": {
"description": "OK",
"headers": {
"X-Plex-Container-Total-Size": {
"description": "Provided on all MediaContainer objects indicating the total size of objects available",
"schema": {
"type": "integer"
}
},
"X-Plex-Container-Start": {
"description": "Provided on all MediaContainer objects indicating the offset of where this container page starts",
"schema": {
"type": "integer"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/mediaContainerWithDevice"
},
"examples": {
"twoDevices": {
"value": {
"MediaContainer": {
"size": 2,
"Devices": [
{
"key": "1053C0CA",
"lastSeenAt": "1461450473",
"make": "Silicondust",
"model": "HDHomeRun EXTEND",
"modelNumber": "HDTC-2US",
"protocol": "livetv",
"tuners": "2",
"sources": "Antenna,Cable",
"uri": "http://10.0.0.164",
"uuid": "1053C0CA"
},
{
"key": "141007E7",
"lastSeenAt": "1461450479",
"make": "Silicondust",
"model": "HDHomeRun EXPAND",
"modelNumber": "HDHR3-4DC",
"protocol": "livetv",
"tuners": "4",
"sources": "Cable",
"uri": "http://home.techconnect.nl:8822",
"uuid": "141007E7"
}
]
}
}
}
}
}
}
}
}
},
"post": {
"tags": ["Devices"],
"security": [
{
"user_token": ["admin"]
}
],
"summary": "Add a device",
"description": "This endpoint adds a device to an existing grabber. The device is identified, and added to the correct grabber.",
"operationId": "mediaGrabberPostDevices",
"parameters": [
{
"in": "query",
"name": "uri",
"schema": {
"type": "string"
},
"example": "http://10.0.0.5",
"description": "The URI of the device."
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/mediaContainerWithDevice"
},
"examples": {
"addedDevice": {
"value": {
"MediaContainer": {
"size": 1,
"Device": [
{
"key": "1053C0CA",
"lastSeenAt": 1461450473,
"make": "Silicondust",
"model": "HDHomeRun EXTEND",
"modelNumber": "HDTC-2US",
"protocol": "livetv",
"tuners": "2",
"uri": "http://10.0.0.5",
"uuid": "1053C0CA"
}
]
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/400"
}
}
}
},
"/media/grabbers/devices/discover": {
"post": {
"tags": ["Devices"],
"security": [
{
"user_token": ["admin"]
}
],
"summary": "Tell grabbers to discover devices",
"description": "Tell grabbers to discover devices",
"operationId": "mediaGrabberPostDeviceDiscover",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/mediaContainerWithDevice"
},
"examples": {
"discoveredDevice": {
"value": {
"MediaContainer": {
"size": 1,
"Device": [
{
"key": "1053C0CA",
"lastSeenAt": 1461450473,
"make": "Silicondust",
"model": "HDHomeRun EXTEND",
"modelNumber": "HDTC-2US",
"protocol": "livetv",
"tuners": "2",
"uri": "http://10.0.0.164",
"uuid": "1053C0CA"
}
]
}
}
}
}
}
}
}
}
}
},
"/media/grabbers/devices/{deviceId}": {
"get": {
"tags": ["Devices"],
"security": [
{
"user_token": ["admin"]
}
],
"summary": "Get device details",
"description": "Get a device's details by its id",
"operationId": "mediaGrabberDevicesDeviceGetSlash",
"parameters": [
{
"in": "path",
"name": "deviceId",
"schema": {
"type": "integer"
},
"description": "The ID of the device.",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/mediaContainerWithDevice"
},
"examples": {
"discoveredDevice": {
"value": {
"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",
"uri": "http://home.techconnect.nl:8822",
"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"
}
]
}
]
}
}
}
}
}
}
},
"404": {
"description": "Device not found",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
}
}
},
"delete": {
"tags": ["Devices"],
"security": [
{
"user_token": ["admin"]
}
],
"summary": "Remove a device",
"description": "Remove a devices by its id along with its channel mappings",
"operationId": "mediaGrabberDevicesDeviceDeleteSlash",
"parameters": [
{
"in": "path",
"name": "deviceId",
"schema": {
"type": "integer"
},
"description": "The ID of the device.",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"headers": {
"X-Plex-Container-Total-Size": {
"description": "Provided on all MediaContainer objects indicating the total size of objects available",
"schema": {
"type": "integer"
}
},
"X-Plex-Container-Start": {
"description": "Provided on all MediaContainer objects indicating the offset of where this container page starts",
"schema": {
"type": "integer"
}
}
},
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/MediaContainer"
},
{
"type": "object",
"properties": {
"message": {
"type": "string"
},
"status": {
"type": "integer"
}
}
}
]
}
}
},
"examples": {
"discoveredDevice": {
"value": {
"MediaContainer": {
"size": 0,
"message": "",
"status": 0
}
}
}
}
}
}
},
"404": {
"description": "Device not found",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
}
}
},
"put": {
"tags": ["Devices"],
"security": [
{
"user_token": ["admin"]
}
],
"summary": "Enable or disable a device",
"description": "Enable or disable a device by its id",
"operationId": "mediaGrabberDevicesDevicePutSlash",
"parameters": [
{
"in": "path",
"name": "deviceId",
"schema": {
"type": "integer"
},
"description": "The ID of the device.",
"required": true
},
{
"in": "query",
"name": "enabled",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"description": "Whether to enable the device"
}
],
"responses": {
"200": {
"description": "OK",
"headers": {
"X-Plex-Container-Total-Size": {
"description": "Provided on all MediaContainer objects indicating the total size of objects available",
"schema": {
"type": "integer"
}
},
"X-Plex-Container-Start": {
"description": "Provided on all MediaContainer objects indicating the offset of where this container page starts",
"schema": {
"type": "integer"
}
}
},
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/MediaContainer"
},
{
"type": "object",
"properties": {
"message": {
"type": "string"
},
"status": {
"type": "integer"
}
}
}
]
}
}
},
"examples": {
"discoveredDevice": {
"value": {
"MediaContainer": {
"size": 0,
"message": "",
"status": 0
}
}
}
}
}
}
},
"404": {
"description": "Device not found",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
}
}
}
},
"/media/grabbers/devices/{deviceId}/channelmap": {
"put": {
"tags": ["Devices"],
"summary": "Set a device's channel mapping",
"description": "Set a device's channel mapping",
"operationId": "mediaGrabberDevicesDevicePutChannelmap",
"parameters": [
{
"in": "path",
"name": "deviceId",
"schema": {
"type": "integer"
},
"description": "The ID of the device.",
"required": true
},
{
"in": "query",
"name": "channelMapping",
"schema": {
"type": "object"
},
"style": "deepObject",
"example": {
"46.3": 2,
"48.9": 4
},
"description": "The mapping of changes, passed as a map of device channel to lineup VCN."
},
{
"in": "query",
"name": "channelMappingByKey",
"schema": {
"type": "object"
},
"style": "deepObject",
"example": {
"46.3": "5cc83d73af4a72001e9b16d7-5cab3c634df507001fefcad0",
"48.9": "5cc83d73af4a72001e9b16d7-5cab3c63ec158a001d32db8d"
},
"description": "The mapping of changes, passed as a map of device channel to lineup key."
},
{
"in": "query",
"name": "channelsEnabled",
"schema": {
"type": "array",
"items": {
"type": "string"
}
},
"example": "46.1,44.1,45.1",
"description": "The channels which are enabled."
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/mediaContainerWithDevice"
},
"examples": {
"emptyContainer": {
"value": {
"MediaContainer": {
"message": "",
"size": 0,
"status": 0
}
}
}
}
}
}
}
}
}
},
"/media/grabbers/devices/{deviceId}/channels": {
"get": {
"tags": ["Devices"],
"security": [
{
"user_token": ["admin"]
}
],
"summary": "Get a device's channels",
"description": "Get a device's channels by its id",
"operationId": "mediaGrabberDevicesDeviceGetChannels",
"parameters": [
{
"in": "path",
"name": "deviceId",
"schema": {
"type": "integer"
},
"description": "The ID of the device.",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"headers": {
"X-Plex-Container-Total-Size": {
"description": "Provided on all MediaContainer objects indicating the total size of objects available",
"schema": {
"type": "integer"
}
},
"X-Plex-Container-Start": {
"description": "Provided on all MediaContainer objects indicating the offset of where this container page starts",
"schema": {
"type": "integer"
}
}
},
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/MediaContainer"
},
{
"type": "object",
"properties": {
"DeviceChannel": {
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"identifier": {
"type": "string"
},
"name": {
"type": "string"
},
"drm": {
"type": "boolean",
"description": "Indicates the channel is DRMed and thus may not be playable"
},
"hd": {
"type": "boolean"
},
"favorite": {
"type": "boolean"
},
"signalStrength": {
"type": "integer"
},
"signalQuality": {
"type": "integer"
}
}
}
}
}
}
]
}
}
},
"examples": {
"discoveredDevice": {
"value": {
"MediaContainer": {
"size": 48,
"DeviceChannel": [
{
"drm": false,
"hd": false,
"identifier": "46.1",
"name": "KPXO HD"
},
{
"drm": false,
"hd": false,
"identifier": "46.3",
"name": "KHON HD"
}
]
}
}
}
}
}
}
},
"404": {
"description": "Device not found",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
}
}
}
},
"/media/grabbers/devices/{deviceId}/prefs": {
"put": {
"tags": ["Devices"],
"security": [
{
"user_token": ["admin"]
}
],
"summary": "Set device preferences",
"description": "Set device preferences by its id",
"operationId": "mediaGrabberDevicesDevicePutPrefs",
"parameters": [
{
"in": "path",
"name": "deviceId",
"schema": {
"type": "integer"
},
"description": "The ID of the device.",
"required": true
},
{
"in": "query",
"name": "name",
"schema": {
"type": "string"
},
"description": "The preference names and values."
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
}
}
}
},
"/media/grabbers/devices/{deviceId}/scan": {
"post": {
"tags": ["Devices"],
"summary": "Tell a device to scan for channels",
"description": "Tell a device to scan for channels",
"operationId": "mediaGrabberDevicesDevicePostScan",
"parameters": [
{
"in": "path",
"name": "deviceId",
"schema": {
"type": "integer"
},
"description": "The ID of the device.",
"required": true
},
{
"in": "query",
"name": "source",
"schema": {
"type": "string"
},
"example": "Cable",
"description": "A valid source for the scan"
}
],
"responses": {
"200": {
"description": "OK",
"headers": {
"X-Plex-Activity": {
"schema": {
"type": "string"
},
"description": "The activity of the reload process"
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/mediaContainerWithDevice"
},
"examples": {
"emptyContainer": {
"value": {
"MediaContainer": {
"message": "",
"size": 0,
"status": 0
}
}
}
}
}
}
}
}
},
"delete": {
"tags": ["Devices"],
"summary": "Tell a device to stop scanning for channels",
"description": "Tell a device to stop scanning for channels",
"operationId": "mediaGrabberDeleteDevicesDeviceScan",
"parameters": [
{
"in": "path",
"name": "deviceId",
"schema": {
"type": "integer"
},
"description": "The ID of the device.",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/mediaContainerWithDevice"
},
"examples": {
"emptyContainer": {
"value": {
"MediaContainer": {
"message": "",
"size": 0,
"status": 0
}
}
}
}
}
}
}
}
}
},
"/media/grabbers/devices/{deviceId}/thumb/{version}": {
"get": {
"tags": ["Devices"],
"security": [
{
"user_token": ["admin"]
}
],
"summary": "Get device thumb",
"description": "Get a device's thumb for display to the user",
"operationId": "mediaGrabberDevicesDeviceGetThumbVersion",
"parameters": [
{
"in": "path",
"name": "deviceId",
"schema": {
"type": "integer"
},
"description": "The ID of the device.",
"required": true
},
{
"in": "path",
"name": "version",
"schema": {
"type": "integer"
},
"description": "A version number of the thumb used for busting cache",
"required": true
}
],
"responses": {
"200": {
"description": "The thumbnail for the device"
},
"301": {
"description": "The thumb URL on the device"
},
"404": {
"description": "No thumb found for this device",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
}
}
}
},
"/media/grabbers/operations/{operationId}": {
"delete": {
"tags": ["Subscriptions"],
"summary": "Cancel an existing grab",
"description": "Cancels an existing media grab (recording). It can be used to resolve a conflict which exists for a rolling subscription.\nNote: This cancellation does not persist across a server restart, but neither does a rolling subscription itself.",
"operationId": "mediaGrabberDeleteOperationsOperation",
"parameters": [
{
"in": "path",
"name": "operationId",
"schema": {
"type": "string"
},
"description": "The ID of the operation.",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
},
"403": {
"description": "User is not owner of the grab and not the admin",
"content": {
"text/html": {
"examples": {
"forbidden": {
"summary": "Forbidden",
"value": "<html><head><title>Forbidden</title></head><body><h1>403 Forbidden</h1></body></html>"
}
}
}
}
},
"404": {
"$ref": "#/components/responses/404"
}
}
}
},
"/media/providers": {
"get": {
"tags": ["Provider"],
"operationId": "getMediaProviders",
"summary": "Get the list of available media providers",
"description": "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.",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/serverConfiguration"
},
{
"type": "object",
"properties": {
"identifier": {
"type": "string",
"description": "A unique identifier for the provider, e.g. `com.plexapp.plugins.library`."
},
"title": {
"type": "string",
"description": "The title of the provider."
},
"types": {
"type": "string",
"description": "This attribute contains a comma-separated list of the media types exposed by the provider (e.g. `video, audio`)."
},
"protocols": {
"type": "string",
"description": "A comma-separated list of default protocols for the provider, which can be:\n- `stream`: The provider allows streaming media directly from the provider (e.g. for Vimeo). - `download`: The provider allows downloading media for offline storage, sync, etc. (e.g. Podcasts). - `livetv`: The provider provides live content which is only available on a schedule basis."
},
"Feature": {
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"type": {
"type": "string"
},
"Directory": {
"type": "array",
"items": {
"$ref": "#/components/schemas/directory"
}
}
}
}
}
}
}
]
}
}
},
"examples": {
"providerWithEpg": {
"summary": "Media providers including EPG",
"value": {
"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,
"myPlexUsername": "me@somewhere.else",
"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&sectionID=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"
}
]
}
]
}
}
}
}
}
}
}
}
},
"post": {
"tags": ["Provider"],
"operationId": "postMediaProviders",
"summary": "Add a media provider",
"description": "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.",
"parameters": [
{
"in": "query",
"name": "url",
"required": true,
"schema": {
"type": "string"
},
"description": "The URL of the media provider to add."
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
},
"400": {
"$ref": "#/components/responses/400"
}
}
}
},
"/media/providers/refresh": {
"post": {
"tags": ["Provider"],
"operationId": "postMediaProvidersRefresh",
"summary": "Refresh media providers",
"description": "Refresh all known media providers. This is useful in case a provider has updated features.",
"responses": {
"200": {
"$ref": "#/components/responses/200"
}
}
}
},
"/media/providers/{provider}": {
"delete": {
"tags": ["Provider"],
"operationId": "deleteMediaProvider",
"summary": "Delete a media provider",
"description": "Deletes a media provider with the given id",
"parameters": [
{
"in": "path",
"name": "provider",
"schema": {
"type": "string"
},
"description": "The ID of the media provider to delete",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
},
"400": {
"$ref": "#/components/responses/400"
},
"403": {
"description": "Cannot delete a provider which is a child of another provider",
"content": {
"text/html": {
"examples": {
"forbidden": {
"summary": "Forbidden",
"value": "<html><head><title>Forbidden</title></head><body><h1>403 Forbidden</h1></body></html>"
}
}
}
}
}
}
}
},
"/media/providers/metadata": {
"get": {
"tags": ["Metadata Agents"],
"security": [
{
"user_token": ["admin"]
}
],
"operationId": "getMetadataAgentProviders",
"summary": "Get the list of available metadata agent providers",
"description": "Get the list of all available metadata agent providers for this PMS.",
"parameters": [
{
"in": "query",
"name": "metadataTypes",
"required": false,
"schema": {
"type": "array",
"items": {
"type": "integer"
},
"example": "1,2,3,4"
},
"description": "A comma-separated list of metadata types to filter the providers by. If not specified, all providers are returned."
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/MediaContainer"
},
{
"type": "object",
"properties": {
"MetadataAgentProvider": {
"type": "array",
"items": {
"$ref": "#/components/schemas/metadataAgentProvider"
}
}
}
}
]
}
}
},
"examples": {
"Themoviedb Metadata Provider": {
"value": {
"MediaContainer": {
"size": 1,
"MetadataAgentProvider": [
{
"id": "1",
"identifier": "tv.plex.agents.custom.themoviedb",
"title": "The Movie Database",
"uri": "http://localhost/themoviedb/api",
"agentType": "primary",
"MetadataType": [
{
"type": 1
},
{
"type": 2
},
{
"type": 3
},
{
"type": 4
}
],
"online": true
}
]
}
}
}
}
}
}
}
}
},
"post": {
"tags": ["Metadata Agents"],
"security": [
{
"user_token": ["admin"]
}
],
"operationId": "postMetadataAgentProviders",
"summary": "Add a metadata agent provider",
"description": "This endpoint registers a metadata agent provider with the server. The provider URI must respond with a valid MediaProvider response.",
"parameters": [
{
"in": "query",
"name": "uri",
"required": true,
"schema": {
"type": "string"
},
"description": "The URI of the metadata agent provider to add."
}
],
"responses": {
"200": {
"$ref": "#/components/responses/metadataAgentProviderManager_slash-get-responses-200"
},
"400": {
"$ref": "#/components/responses/400"
},
"409": {
"description": "A provider with the same identifier already exists",
"$ref": "#/components/responses/409"
}
}
}
},
"/media/providers/metadata/{providerId}": {
"get": {
"tags": ["Metadata Agents"],
"security": [
{
"user_token": ["admin"]
}
],
"operationId": "getMetadataAgentProvider",
"summary": "Get a metadata agent provider",
"description": "Get the metadata agent provider with the given id.",
"parameters": [
{
"in": "path",
"name": "providerId",
"schema": {
"type": "integer"
},
"description": "The ID of the metadata agent provider to get",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/components/responses/metadataAgentProviderManager_slash-get-responses-200"
},
"404": {
"$ref": "#/components/responses/404"
}
}
},
"put": {
"tags": ["Metadata Agents"],
"security": [
{
"user_token": ["admin"]
}
],
"operationId": "putMetadataAgentProvider",
"summary": "Modify a metadata agent provider",
"description": "Modify the metadata agent provider with the given id. Only the URI is passed, the response to the URI will determine the other properties.",
"parameters": [
{
"in": "path",
"name": "providerId",
"schema": {
"type": "integer"
},
"description": "The ID of the metadata agent provider to modify",
"required": true
},
{
"in": "query",
"name": "uri",
"schema": {
"type": "string"
},
"description": "The new URI of the metadata agent provider."
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/MediaContainer"
},
{
"type": "object",
"properties": {
"MetadataAgentProvider": {
"type": "array",
"items": {
"$ref": "#/components/schemas/metadataAgentProvider"
}
}
}
}
]
}
}
},
"examples": {
"Themoviedb Metadata Provider": {
"value": {
"MediaContainer": {
"size": 1,
"MetadataAgentProvider": [
{
"id": "1",
"identifier": "tv.plex.agents.custom.themoviedb",
"title": "The Movie Database",
"uri": "http://localhost/themoviedb/api",
"agentType": "primary",
"MetadataType": [
{
"type": 1
},
{
"type": 2
},
{
"type": 3
},
{
"type": 4
}
],
"online": true
}
]
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/400"
}
}
},
"delete": {
"tags": ["Metadata Agents"],
"security": [
{
"user_token": ["admin"]
}
],
"operationId": "deleteMetadataAgentProvider",
"summary": "Delete a metadata agent provider",
"description": "Deletes a metadata agent provider with the given id. This will fail if the provider is being used inside a MetadataAgentGroup.",
"parameters": [
{
"in": "path",
"name": "providerId",
"schema": {
"type": "integer"
},
"description": "The ID of the metadata agent provider to delete",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
},
"400": {
"$ref": "#/components/responses/400"
},
"403": {
"description": "Cannot delete a provider which is currently used inside a group.",
"content": {
"text/html": {
"examples": {
"forbidden": {
"summary": "Forbidden",
"value": "<html><head><title>Forbidden</title></head><body><h1>403 Forbidden</h1></body></html>"
}
}
}
}
},
"404": {
"$ref": "#/components/responses/404"
}
}
}
},
"/media/providers/metadata/group": {
"get": {
"tags": ["Metadata Agents"],
"security": [
{
"user_token": ["admin"]
}
],
"operationId": "getMetadataAgentProviderGroups",
"summary": "Get the list of available metadata agent provider groups",
"description": "Get the list of all available metadata agent provider groups for this PMS.",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/MediaContainer"
},
{
"type": "object",
"properties": {
"MetadataAgentProviderGroup": {
"type": "array",
"items": {
"$ref": "#/components/schemas/metadataAgentProviderGroup"
}
}
}
}
]
}
}
},
"examples": {
"Themoviedb Metadata Provider": {
"value": {
"MediaContainer": {
"size": 1,
"MetadataAgentProviderGroup": [
{
"id": "1",
"title": "TheMovieDatabase",
"primaryIdentifier": "tv.plex.agents.custom.themoviedb",
"MetadataAgentProviderGroupItem": [
{
"id": "1",
"metadataAgentProviderGroupId": "3",
"metadataAgentProviderId": "6",
"order": 1000
},
{
"id": "2",
"metadataAgentProviderGroupId": "3",
"metadataAgentProviderId": "7",
"order": 2000
},
{
"id": "3",
"metadataAgentProviderGroupId": "3",
"metadataAgentProviderId": "8",
"order": 3000
}
]
}
]
}
}
}
}
}
}
}
}
},
"post": {
"tags": ["Metadata Agents"],
"security": [
{
"user_token": ["admin"]
}
],
"operationId": "postMetadataAgentProviderGroups",
"summary": "Add a metadata agent provider group",
"description": "This endpoint registers a new metadata agent provider group and creates a new MetadataAgentGroupItem for the primraryIdentifier.",
"parameters": [
{
"in": "query",
"name": "title",
"required": true,
"schema": {
"type": "string"
},
"description": "The title of the metadata agent provider group to add."
},
{
"in": "query",
"name": "primaryIdentifier",
"required": true,
"schema": {
"type": "string"
},
"description": "The identifier of the metadata agent provider which will be the primary for the group."
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/MediaContainer"
},
{
"type": "object",
"properties": {
"MetadataAgentProviderGroup": {
"type": "array",
"items": {
"$ref": "#/components/schemas/metadataAgentProviderGroup"
}
}
}
}
]
}
}
},
"examples": {
"Themoviedb Metadata Provider": {
"value": {
"MediaContainer": {
"size": 1,
"MetadataAgentProviderGroup": [
{
"id": "1",
"title": "TheMovieDatabase",
"primaryIdentifier": "tv.plex.agents.custom.themoviedb",
"MetadataAgentProviderGroupItem": [
{
"id": "1",
"metadataAgentProviderGroupId": "3",
"metadataAgentProviderId": "6",
"order": 1000
},
{
"id": "2",
"metadataAgentProviderGroupId": "3",
"metadataAgentProviderId": "7",
"order": 2000
},
{
"id": "3",
"metadataAgentProviderGroupId": "3",
"metadataAgentProviderId": "8",
"order": 3000
}
]
}
]
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/400"
}
}
}
},
"/media/providers/metadata/group/{groupId}": {
"get": {
"tags": ["Metadata Agents"],
"security": [
{
"user_token": ["admin"]
}
],
"operationId": "getMetadataAgentProviderGroup",
"summary": "Get a metadata agent provider group",
"description": "Get the metadata agent provider group with the given id.",
"parameters": [
{
"in": "path",
"name": "groupId",
"schema": {
"type": "integer"
},
"description": "The ID of the metadata agent provider group to get",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/MediaContainer"
},
{
"type": "object",
"properties": {
"MetadataAgentProviderGroup": {
"type": "array",
"items": {
"$ref": "#/components/schemas/metadataAgentProviderGroup"
}
}
}
}
]
}
}
},
"examples": {
"Themoviedb Metadata Provider": {
"value": {
"MediaContainer": {
"size": 1,
"MetadataAgentProviderGroup": [
{
"id": "1",
"title": "TheMovieDatabase",
"primaryIdentifier": "tv.plex.agents.custom.themoviedb",
"MetadataAgentProviderGroupItem": [
{
"id": "1",
"metadataAgentProviderGroupId": "3",
"metadataAgentProviderId": "6",
"order": 1000
},
{
"id": "2",
"metadataAgentProviderGroupId": "3",
"metadataAgentProviderId": "7",
"order": 2000
},
{
"id": "3",
"metadataAgentProviderGroupId": "3",
"metadataAgentProviderId": "8",
"order": 3000
}
]
}
]
}
}
}
}
}
}
},
"404": {
"$ref": "#/components/responses/404"
}
}
},
"put": {
"tags": ["Metadata Agents"],
"security": [
{
"user_token": ["admin"]
}
],
"operationId": "putMetadataAgentProviderGroup",
"summary": "Modify a metadata agent provider group",
"description": "Modify the metadata agent group with the given id. Only the title can be changed.",
"parameters": [
{
"in": "path",
"name": "groupId",
"schema": {
"type": "integer"
},
"description": "The ID of the metadata agent provider group to update",
"required": true
},
{
"in": "query",
"name": "title",
"schema": {
"type": "string"
},
"description": "The title of the metadata agent provider group to update."
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/MediaContainer"
},
{
"type": "object",
"properties": {
"MetadataAgentProviderGroup": {
"type": "array",
"items": {
"$ref": "#/components/schemas/metadataAgentProviderGroup"
}
}
}
}
]
}
}
},
"examples": {
"Themoviedb Metadata Provider": {
"value": {
"MediaContainer": {
"size": 1,
"MetadataAgentProviderGroup": [
{
"id": "1",
"title": "TheMovieDatabase",
"primaryIdentifier": "tv.plex.agents.custom.themoviedb",
"MetadataAgentProviderGroupItem": [
{
"id": "1",
"metadataAgentProviderGroupId": "3",
"metadataAgentProviderId": "6",
"order": 1000
},
{
"id": "2",
"metadataAgentProviderGroupId": "3",
"metadataAgentProviderId": "7",
"order": 2000
},
{
"id": "3",
"metadataAgentProviderGroupId": "3",
"metadataAgentProviderId": "8",
"order": 3000
}
]
}
]
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/400"
}
}
},
"delete": {
"tags": ["Metadata Agents"],
"security": [
{
"user_token": ["admin"]
}
],
"operationId": "deleteMetadataAgentProviderGroup",
"summary": "Delete a metadata agent provider group",
"description": "Deletes a metadata agent provider group with the given id. This will also delete any MetadataAgentGroupItem objects associated with the group.",
"parameters": [
{
"in": "path",
"name": "groupId",
"schema": {
"type": "integer"
},
"description": "The ID of the metadata agent provider group to delete",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
},
"404": {
"$ref": "#/components/responses/404"
}
}
}
},
"/media/providers/metadata/group/{groupId}/items/{providerId}": {
"put": {
"tags": ["Metadata Agents"],
"security": [
{
"user_token": ["admin"]
}
],
"operationId": "putMetadataAgentProviderGroupItem",
"summary": "Modify a metadata agent provider group's items",
"description": "Modify a metadata agent provider group's items. This will assign the specified provider id to the group if it does not already exist.\n\nProviding the optional after query parameter on an existing group item will move its position in the group relative to the item with the specified ID.\n",
"parameters": [
{
"in": "path",
"name": "groupId",
"schema": {
"type": "integer"
},
"description": "The ID of the metadata agent group",
"required": true
},
{
"in": "path",
"name": "providerId",
"schema": {
"type": "integer"
},
"description": "The ID of the metadata agent provider",
"required": true
},
{
"in": "query",
"name": "after",
"schema": {
"type": "number"
},
"description": "The ID of the group item to place this item after. This only works if the group item already exists. A -1 value will place the item at the beginning."
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/MediaContainer"
},
{
"type": "object",
"properties": {
"MetadataAgentProviderGroupItem": {
"type": "array",
"items": {
"$ref": "#/components/schemas/metadataAgentProviderGroupItem"
}
}
}
}
]
}
}
},
"examples": {
"Example Provider Group Item": {
"value": {
"MediaContainer": {
"size": 1,
"MetadataAgentProviderGroupItem": [
{
"id": "1",
"metadataAgentProviderGroupId": "3",
"metadataAgentProviderId": "6",
"order": 1000
}
]
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/400"
}
}
},
"delete": {
"tags": ["Metadata Agents"],
"security": [
{
"user_token": ["admin"]
}
],
"operationId": "deleteMetadataAgentProviderGroupItem",
"summary": "Delete a metadata agent provider group item",
"description": "Deletes a metadata agent provider group item with the given id.",
"parameters": [
{
"in": "path",
"name": "groupId",
"schema": {
"type": "integer"
},
"description": "The ID of the metadata agent provider group",
"required": true
},
{
"in": "path",
"name": "providerId",
"schema": {
"type": "integer"
},
"description": "The ID of the metadata agent provider",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
},
"403": {
"description": "Cannot delete the primary provider of a group.",
"content": {
"text/html": {
"examples": {
"forbidden": {
"summary": "Forbidden",
"value": "<html><head><title>Forbidden</title></head><body><h1>403 Forbidden</h1></body></html>"
}
}
}
}
},
"404": {
"$ref": "#/components/responses/404"
}
}
}
},
"/media/subscriptions": {
"get": {
"tags": ["Subscriptions"],
"summary": "Get all subscriptions",
"description": "Get all subscriptions and potentially the grabs too",
"operationId": "mediaSubscriptionsGetSlash",
"parameters": [
{
"in": "query",
"name": "includeGrabs",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"description": "Indicates whether the active grabs should be included as well"
},
{
"in": "query",
"name": "includeStorage",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"description": "Compute the storage of recorded items desired by this subscription"
}
],
"responses": {
"200": {
"description": "OK",
"headers": {
"X-Plex-Container-Total-Size": {
"description": "Provided on all MediaContainer objects indicating the total size of objects available",
"schema": {
"type": "integer"
}
},
"X-Plex-Container-Start": {
"description": "Provided on all MediaContainer objects indicating the offset of where this container page starts",
"schema": {
"type": "integer"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/mediaContainerWithSubscription"
},
"examples": {
"Subs": {
"value": {
"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
}
]
}
]
}
}
}
}
}
}
},
"403": {
"description": "User cannot access DVR on this server",
"content": {
"text/html": {
"examples": {
"forbidden": {
"summary": "Forbidden",
"value": "<html><head><title>Forbidden</title></head><body><h1>403 Forbidden</h1></body></html>"
}
}
}
}
}
}
},
"post": {
"tags": ["Subscriptions"],
"summary": "Create a subscription",
"description": "Create a subscription. The query parameters should be mostly derived from the [template](#tag/Subscriptions/operation/mediaSubscriptionsGetTemplate)",
"operationId": "mediaSubscriptionsPostSlash",
"parameters": [
{
"in": "query",
"name": "targetLibrarySectionID",
"schema": {
"type": "integer"
},
"example": 1,
"description": "The library section into which we'll grab the media. Not actually required when the subscription is to a playlist."
},
{
"in": "query",
"name": "targetSectionLocationID",
"schema": {
"type": "integer"
},
"example": 3,
"description": "The section location into which to grab."
},
{
"in": "query",
"name": "type",
"schema": {
"type": "integer"
},
"example": 2,
"description": "The type of the thing we're subscribing too (e.g. show, season)."
},
{
"in": "query",
"name": "hints",
"schema": {
"type": "object"
},
"style": "deepObject",
"example": {
"title": "Family Guy"
},
"description": "Hints describing what we're looking for. Note: The hint `ratingKey` is required for downloading from a PMS remote."
},
{
"in": "query",
"name": "prefs",
"schema": {
"type": "object"
},
"style": "deepObject",
"example": {
"minVideoQuality": 720
},
"description": "Subscription preferences."
},
{
"in": "query",
"name": "params",
"schema": {
"type": "object"
},
"style": "deepObject",
"example": {
"mediaProviderID": 1
},
"description": "Subscription parameters.\n - `mediaProviderID`: Required for downloads to indicate which MP the subscription will download into\n - `source`: Required for downloads to indicate the source of the downloaded content.\n"
}
],
"responses": {
"200": {
"description": "OK",
"headers": {
"X-Plex-Container-Total-Size": {
"description": "Provided on all MediaContainer objects indicating the total size of objects available",
"schema": {
"type": "integer"
}
},
"X-Plex-Container-Start": {
"description": "Provided on all MediaContainer objects indicating the offset of where this container page starts",
"schema": {
"type": "integer"
}
}
},
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/MediaContainer"
},
{
"type": "object",
"properties": {
"MediaSubscription": {
"type": "array",
"items": {
"$ref": "#/components/schemas/mediaSubscription"
}
}
}
}
]
}
}
},
"examples": {
"addedSub": {
"value": {
"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
}
]
}
]
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/400"
},
"403": {
"description": "User cannot access DVR on this server",
"content": {
"text/html": {
"examples": {
"forbidden": {
"summary": "Forbidden",
"value": "<html><head><title>Forbidden</title></head><body><h1>403 Forbidden</h1></body></html>"
}
}
}
}
},
"409": {
"description": "An subscription with the same parameters already exists",
"content": {
"text/html": {
"examples": {
"conflict": {
"summary": "Conflict",
"value": "<html><head><title>Conflict</title></head><body><h1>409 Conflict</h1></body></html>"
}
}
}
}
}
}
}
},
"/media/subscriptions/process": {
"post": {
"tags": ["Subscriptions"],
"summary": "Process all subscriptions",
"description": "Process all subscriptions asynchronously",
"operationId": "mediaSubscriptionsPostProcess",
"responses": {
"200": {
"description": "OK",
"content": {
"text/html": {
"examples": {
"ok": {
"summary": "OK",
"value": ""
}
}
}
},
"headers": {
"X-Plex-Activity": {
"schema": {
"type": "string"
},
"description": "The activity of the process"
}
}
},
"403": {
"description": "User cannot access DVR on this server",
"content": {
"text/html": {
"examples": {
"forbidden": {
"summary": "Forbidden",
"value": "<html><head><title>Forbidden</title></head><body><h1>403 Forbidden</h1></body></html>"
}
}
}
}
}
}
}
},
"/media/subscriptions/{subscriptionId}": {
"get": {
"tags": ["Subscriptions"],
"summary": "Get a single subscription",
"description": "Get a single subscription and potentially the grabs too",
"operationId": "mediaSubscriptionsGetSubscription",
"parameters": [
{
"in": "path",
"name": "subscriptionId",
"schema": {
"type": "integer"
},
"required": true
},
{
"in": "query",
"name": "includeGrabs",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"description": "Indicates whether the active grabs should be included as well"
},
{
"in": "query",
"name": "includeStorage",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"description": "Compute the storage of recorded items desired by this subscription"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/mediaContainerWithSubscription"
},
"examples": {
"Subs": {
"value": {
"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
}
]
}
]
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/400"
},
"403": {
"description": "User cannot access DVR on this server or cannot access this subscription",
"content": {
"text/html": {
"examples": {
"forbidden": {
"summary": "Forbidden",
"value": "<html><head><title>Forbidden</title></head><body><h1>403 Forbidden</h1></body></html>"
}
}
}
}
},
"404": {
"$ref": "#/components/responses/404"
}
}
},
"delete": {
"tags": ["Subscriptions"],
"summary": "Delete a subscription",
"description": "Delete a subscription, cancelling all of its grabs as well",
"operationId": "mediaSubscriptionsDeleteSubscription",
"parameters": [
{
"in": "path",
"name": "subscriptionId",
"schema": {
"type": "integer"
},
"required": true
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
},
"400": {
"$ref": "#/components/responses/400"
},
"403": {
"description": "User cannot access DVR on this server or cannot access this subscription",
"content": {
"text/html": {
"examples": {
"forbidden": {
"summary": "Forbidden",
"value": "<html><head><title>Forbidden</title></head><body><h1>403 Forbidden</h1></body></html>"
}
}
}
}
},
"404": {
"$ref": "#/components/responses/404"
}
}
},
"put": {
"tags": ["Subscriptions"],
"summary": "Edit a subscription",
"description": "Edit a subscription's preferences",
"operationId": "mediaSubscriptionsPutSubscription",
"parameters": [
{
"in": "path",
"name": "subscriptionId",
"schema": {
"type": "integer"
},
"required": true
},
{
"in": "query",
"name": "prefs",
"schema": {
"type": "object"
},
"style": "deepObject",
"example": {
"minVideoQuality": 720
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/mediaContainerWithSubscription"
},
"examples": {
"Subs": {
"value": {
"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
}
]
}
]
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/400"
},
"403": {
"description": "User cannot access DVR on this server or cannot access this subscription",
"content": {
"text/html": {
"examples": {
"forbidden": {
"summary": "Forbidden",
"value": "<html><head><title>Forbidden</title></head><body><h1>403 Forbidden</h1></body></html>"
}
}
}
}
},
"404": {
"$ref": "#/components/responses/404"
}
}
}
},
"/media/subscriptions/{subscriptionId}/move": {
"put": {
"tags": ["Subscriptions"],
"security": [
{
"user_token": ["admin"]
}
],
"summary": "Re-order a subscription",
"description": "Re-order a subscription to change its priority",
"operationId": "mediaSubscriptionsPutSubscriptionMove",
"parameters": [
{
"in": "path",
"name": "subscriptionId",
"schema": {
"type": "integer"
},
"required": true
},
{
"in": "query",
"name": "after",
"schema": {
"type": "integer"
},
"description": "The subscription to move this sub after. If missing will insert at the beginning of the list"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/mediaContainerWithSubscription"
},
"examples": {
"Subs": {
"value": {
"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
}
]
}
]
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/400"
},
"403": {
"description": "User cannot access DVR on this server or cannot access this subscription",
"content": {
"text/html": {
"examples": {
"forbidden": {
"summary": "Forbidden",
"value": "<html><head><title>Forbidden</title></head><body><h1>403 Forbidden</h1></body></html>"
}
}
}
}
},
"404": {
"$ref": "#/components/responses/404"
}
}
}
},
"/media/subscriptions/scheduled": {
"get": {
"tags": ["Subscriptions"],
"summary": "Get all scheduled recordings",
"description": "Get all scheduled recordings across all subscriptions",
"operationId": "mediaSubscriptionsGetScheduled",
"responses": {
"200": {
"description": "OK",
"headers": {
"X-Plex-Container-Total-Size": {
"description": "Provided on all MediaContainer objects indicating the total size of objects available",
"schema": {
"type": "integer"
}
},
"X-Plex-Container-Start": {
"description": "Provided on all MediaContainer objects indicating the offset of where this container page starts",
"schema": {
"type": "integer"
}
}
},
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/MediaContainer"
},
{
"type": "object",
"properties": {
"MediaGrabOperation": {
"type": "array",
"items": {
"$ref": "#/components/schemas/mediaGrabOperation"
}
}
}
}
]
}
}
},
"examples": {
"aGrab": {
"value": {
"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"
}
]
}
]
}
}
]
}
}
}
}
}
}
},
"403": {
"description": "User cannot access DVR on this server",
"content": {
"text/html": {
"examples": {
"forbidden": {
"summary": "Forbidden",
"value": "<html><head><title>Forbidden</title></head><body><h1>403 Forbidden</h1></body></html>"
}
}
}
}
}
}
}
},
"/media/subscriptions/template": {
"get": {
"tags": ["Subscriptions"],
"summary": "Get the subscription template",
"description": "Get the templates for a piece of media which could include fetching one airing, season, the whole show, etc.",
"operationId": "mediaSubscriptionsGetTemplate",
"parameters": [
{
"in": "query",
"name": "guid",
"schema": {
"type": "string"
},
"example": "plex://episode/5fc70265c40548002d539d23",
"description": "The guid of the item for which to get the template"
}
],
"responses": {
"200": {
"description": "OK",
"headers": {
"X-Plex-Container-Total-Size": {
"description": "Provided on all MediaContainer objects indicating the total size of objects available",
"schema": {
"type": "integer"
}
},
"X-Plex-Container-Start": {
"description": "Provided on all MediaContainer objects indicating the offset of where this container page starts",
"schema": {
"type": "integer"
}
}
},
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/MediaContainer"
},
{
"type": "object",
"properties": {
"SubscriptionTemplate": {
"type": "array",
"items": {
"type": "object",
"properties": {
"MediaSubscription": {
"type": "array",
"items": {
"allOf": [
{
"$ref": "#/components/schemas/mediaSubscription"
},
{
"type": "object",
"properties": {
"parameters": {
"type": "string",
"description": "Parameter string for creating this subscription"
},
"selected": {
"type": "boolean"
},
"type": {
"type": "integer",
"description": "Metadata type number"
},
"targetLibrarySectionID": {
"type": "integer",
"description": "Where this subscription will record to"
},
"title": {
"type": "string",
"example": "This Episode",
"description": "The title of this subscription type"
},
"airingsType": {
"type": "string"
},
"librarySectionTitle": {
"type": "string"
},
"locationPath": {
"type": "string"
}
}
}
]
}
}
}
}
}
}
}
]
}
}
},
"examples": {
"threeCountries": {
"value": {
"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&params%5BairingChannels%5D=5fc76db1286b56002e2bed03-5fc705ea104230002d14d8f1%253D3%25252E2%252520KBTXDT2%252520%252528The%252520CW%252529&params%5BairingTimes%5D=1715319000%252C1715281200&params%5BlibraryType%5D=2&params%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",
"thumb": "https://metadata-static.plex.tv/4/gracenote/499a3c4f04eb050705ade1eab8b5a61a.jpg",
"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&params%5BairingChannels%5D=5fc76db1286b56002e2bed03-5fc705ea104230002d14d8f1%253D3%25252E2%252520KBTXDT2%252520%252528The%252520CW%252529&params%5BairingTimes%5D=1715319000%252C1715281200&params%5BlibraryType%5D=2&params%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",
"thumb": "https://metadata-static.plex.tv/1/gracenote/1df5e54a60dfe28b4afac1a445fc86df.jpg",
"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"
}
]
}
]
}
]
}
}
}
}
}
}
},
"403": {
"description": "User cannot access DVR on this server",
"content": {
"text/html": {
"examples": {
"forbidden": {
"summary": "Forbidden",
"value": "<html><head><title>Forbidden</title></head><body><h1>403 Forbidden</h1></body></html>"
}
}
}
}
}
}
}
},
"/photo/:/transcode": {
"get": {
"tags": ["Transcoder"],
"summary": "Transcode an image",
"description": "Transcode an image, possibly changing format or size",
"operationId": "imageTranscode",
"parameters": [
{
"in": "query",
"name": "url",
"schema": {
"type": "string"
},
"description": "The source URL for the image to transcode. Note, if this URL requires a token such as `X-Plex-Token`, it should be given as a query parameter to this url.",
"example": "/library/metadata/265/thumb/1715112705"
},
{
"in": "query",
"name": "format",
"schema": {
"type": "string",
"enum": ["jpg", "jpeg", "png", "ppm"]
},
"required": false,
"description": "The output format for the image; defaults to jpg"
},
{
"in": "query",
"name": "width",
"schema": {
"type": "integer"
},
"description": "The desired width of the output image"
},
{
"in": "query",
"name": "height",
"schema": {
"type": "integer"
},
"description": "The desired height of the output image"
},
{
"in": "query",
"name": "quality",
"schema": {
"type": "integer",
"minimum": -1,
"maximum": 127
},
"required": false,
"description": "The desired quality of the output. -1 means the highest quality. Defaults to -1"
},
{
"in": "query",
"name": "background",
"schema": {
"type": "string"
},
"required": false,
"description": "The background color to apply before painting the image. Only really applicable if image has transparency. Defaults to none",
"example": "#ff5522"
},
{
"in": "query",
"name": "upscale",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"required": false,
"description": "Indicates if image should be upscaled to the desired width/height. Defaults to false"
},
{
"in": "query",
"name": "minSize",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"required": false,
"description": "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."
},
{
"in": "query",
"name": "rotate",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"required": false,
"description": "Obey the rotation values specified in EXIF data. Defaults to true."
},
{
"in": "query",
"name": "blur",
"schema": {
"type": "integer"
},
"required": false,
"description": "Apply a blur to the image, Defaults to 0 (none)"
},
{
"in": "query",
"name": "saturation",
"schema": {
"type": "integer",
"minimum": 0,
"maximum": 100
},
"required": false,
"description": "Scale the image saturation by the specified percentage. Defaults to 100"
},
{
"in": "query",
"name": "opacity",
"schema": {
"type": "integer",
"minimum": 0,
"maximum": 100
},
"required": false,
"description": "Render the image at the specified opacity percentage. Defaults to 100"
},
{
"in": "query",
"name": "chromaSubsampling",
"schema": {
"type": "integer",
"enum": [0, 1, 2, 3]
},
"required": false,
"description": "Use the specified chroma subsambling.\n - 0: 411\n - 1: 420\n - 2: 422\n - 3: 444\nDefaults to 3 (444)"
},
{
"in": "query",
"name": "blendColor",
"schema": {
"type": "string"
},
"required": false,
"description": "The color to blend with the image. Defaults to none",
"example": "#ff5522"
}
],
"responses": {
"200": {
"description": "The resulting image",
"content": {
"image/jpeg": {
"schema": {
"type": "string",
"format": "binary"
}
},
"image/png": {
"schema": {
"type": "string",
"format": "binary"
}
},
"image/x-portable-pixmap": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
},
"400": {
"$ref": "#/components/responses/400"
},
"403": {
"$ref": "#/components/responses/403"
},
"404": {
"$ref": "#/components/responses/404"
}
}
}
},
"/playlists": {
"get": {
"tags": ["Playlist"],
"summary": "Retrieve Playlists",
"description": "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.",
"operationId": "playlistGetSlash",
"parameters": [
{
"in": "query",
"name": "playlistType",
"schema": {
"type": "string",
"enum": ["audio", "video", "photo"]
},
"description": "Limit to a type of playlist"
},
{
"in": "query",
"name": "smart",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"description": "Type of playlists to return, smart or not. When not provided, will return both."
}
],
"responses": {
"200": {
"description": "OK",
"headers": {
"X-Plex-Container-Total-Size": {
"description": "Provided on all MediaContainer objects indicating the total size of objects available",
"schema": {
"type": "integer"
}
},
"X-Plex-Container-Start": {
"description": "Provided on all MediaContainer objects indicating the offset of where this container page starts",
"schema": {
"type": "integer"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/mediaContainerWithPlaylistMetadata"
},
"examples": {
"playlists": {
"description": "A list of playlists",
"value": {
"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
}
]
}
}
}
}
}
}
}
}
},
"post": {
"tags": ["Library Playlists"],
"summary": "Create a Playlist",
"description": "Create a new playlist. By default the playlist is blank.",
"operationId": "playlistPostSlash",
"parameters": [
{
"in": "query",
"name": "uri",
"schema": {
"type": "string"
},
"description": "The content URI for what we're playing (e.g. `library://...`)."
},
{
"in": "query",
"name": "playQueueID",
"schema": {
"type": "integer"
},
"description": "To create a playlist from an existing play queue."
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/mediaContainerWithPlaylistMetadata"
},
"examples": {
"playlist": {
"description": "A created playlist",
"value": {
"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
}
]
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/400"
}
}
}
},
"/playlists/{playlistId}": {
"get": {
"tags": ["Playlist"],
"summary": "Retrieve Playlist",
"description": "Gets detailed metadata for a playlist. A playlist for many purposes (rating, editing metadata, tagging), can be treated like a regular metadata item:\nSmart 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.",
"operationId": "playlistGetPlaylist",
"parameters": [
{
"in": "path",
"name": "playlistId",
"schema": {
"type": "integer"
},
"description": "The ID of the playlist",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/mediaContainerWithPlaylistMetadata"
},
"examples": {
"playlist": {
"description": "An example playlist",
"value": {
"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
}
]
}
}
}
}
}
}
},
"404": {
"description": "Playlist not found (or user may not have permission to access playlist)",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
}
}
},
"delete": {
"tags": ["Library Playlists"],
"summary": "Delete a Playlist",
"description": "Deletes a playlist by provided id",
"operationId": "playlistDeletePlaylist",
"parameters": [
{
"in": "path",
"name": "playlistId",
"schema": {
"type": "integer"
},
"description": "The ID of the playlist",
"required": true
}
],
"responses": {
"204": {
"$ref": "#/components/responses/204"
},
"404": {
"description": "Playlist not found (or user may not have permission to access playlist)",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
}
}
},
"put": {
"tags": ["Library Playlists"],
"summary": "Editing a Playlist",
"description": "Edits a playlist in the same manner as [editing metadata](#tag/Provider/operation/metadataPutItem)",
"operationId": "playlistPutPlaylist",
"parameters": [
{
"in": "path",
"name": "playlistId",
"schema": {
"type": "integer"
},
"description": "The ID of the playlist",
"required": true
}
],
"responses": {
"204": {
"$ref": "#/components/responses/204"
},
"404": {
"description": "Playlist not found (or user may not have permission to access playlist)",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
}
}
}
},
"/playlists/{playlistId}/items": {
"get": {
"tags": ["Playlist"],
"summary": "Retrieve Playlist Contents",
"description": "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.",
"operationId": "playlistGetItems",
"parameters": [
{
"in": "path",
"name": "playlistId",
"schema": {
"type": "integer"
},
"description": "The ID of the playlist",
"required": true
},
{
"in": "query",
"name": "type",
"schema": {
"type": "array",
"items": {
"type": "integer"
}
},
"explode": false,
"description": "The metadata types of the item to return. Values past the first are only used in fetching items from the background processing playlist."
}
],
"responses": {
"200": {
"description": "OK",
"headers": {
"X-Plex-Container-Total-Size": {
"description": "Provided on all MediaContainer objects indicating the total size of objects available",
"schema": {
"type": "integer"
}
},
"X-Plex-Container-Start": {
"description": "Provided on all MediaContainer objects indicating the offset of where this container page starts",
"schema": {
"type": "integer"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/mediaContainerWithMetadata"
},
"examples": {
"contents": {
"description": "Example playlist items",
"value": {
"MediaContainer": {
"size": 100,
"Metadata": [
{
"playlistItemID": 123,
"restOf": "metadataHere"
}
]
}
}
}
}
}
}
},
"404": {
"description": "Playlist not found (or user may not have permission to access playlist)",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
}
}
},
"delete": {
"tags": ["Library Playlists"],
"summary": "Clearing a playlist",
"description": "Clears a playlist, only works with dumb playlists. Returns the playlist.",
"operationId": "playlistDeleteItems",
"parameters": [
{
"in": "path",
"name": "playlistId",
"schema": {
"type": "integer"
},
"description": "The ID of the playlist",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/components/responses/slash-post-responses-200"
},
"400": {
"$ref": "#/components/responses/400"
},
"404": {
"description": "Playlist not found (or user may not have permission to access playlist)",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
}
}
},
"put": {
"tags": ["Library Playlists"],
"summary": "Adding to a Playlist",
"description": "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.",
"operationId": "playlistPutItems",
"parameters": [
{
"in": "path",
"name": "playlistId",
"schema": {
"type": "integer"
},
"description": "The ID of the playlist",
"required": true
},
{
"in": "query",
"name": "uri",
"schema": {
"type": "string"
},
"description": "The content URI for the playlist."
},
{
"in": "query",
"name": "playQueueID",
"schema": {
"type": "integer"
},
"description": "The play queue to add to a playlist."
}
],
"responses": {
"200": {
"$ref": "#/components/responses/slash-post-responses-200"
},
"400": {
"$ref": "#/components/responses/400"
},
"404": {
"description": "Playlist not found (or user may not have permission to access playlist)",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
}
}
}
},
"/playlists/{playlistId}/items/{generatorId}": {
"get": {
"tags": ["Library Playlists"],
"summary": "Get a playlist generator",
"description": "Get a playlist's generator. Only used for optimized versions",
"operationId": "playlistGetItemsGenerator",
"parameters": [
{
"in": "path",
"name": "playlistId",
"schema": {
"type": "integer"
},
"description": "The ID of the playlist",
"required": true
},
{
"in": "path",
"name": "generatorId",
"schema": {
"type": "integer"
},
"description": "The generator item ID to delete.",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/MediaContainer"
},
{
"type": "object",
"properties": {
"Item": {
"type": "array",
"items": {
"type": "object",
"properties": {
"composite": {
"type": "string",
"description": "The composite thumbnail image path"
},
"id": {
"type": "integer"
},
"type": {
"type": "integer",
"enum": [-1, 42],
"description": "The type of this generator"
},
"title": {
"type": "string"
},
"target": {
"type": "string"
},
"targetTagID": {
"type": "integer",
"description": "The tag of this generator's settings"
},
"Status": {
"type": "object",
"properties": {
"itemsCount": {
"type": "integer"
},
"itemsCompleteCount": {
"type": "integer"
},
"itemsSuccessfulCount": {
"type": "integer"
},
"totalSize": {
"type": "integer"
},
"state": {
"type": "string",
"enum": [
"pending",
"complete",
"failed"
]
}
}
},
"MediaSettings": {
"type": "object",
"properties": {
"directPlay": {
"type": "boolean"
},
"directStream": {
"type": "boolean"
},
"directStreamAudio": {
"type": "boolean"
},
"autoAdjustQuality": {
"type": "boolean"
},
"videoQuality": {
"type": "integer",
"minimum": 0,
"maximum": 100
},
"videoBitrate": {
"type": "integer"
},
"maxVideoBitrate": {
"type": "integer"
},
"musicBitrate": {
"type": "integer"
},
"peakBitrate": {
"type": "integer"
},
"photoQuality": {
"type": "integer",
"minimum": 0,
"maximum": 100
},
"subtitles": {
"type": "string",
"enum": [
"auto",
"burn",
"none",
"sidecar",
"embedded",
"segmented"
]
},
"advancedSubtitles": {
"type": "string",
"enum": [
"auto",
"burn",
"none",
"sidecar",
"embedded",
"segmented"
]
},
"autoAdjustSubtitle": {
"type": "boolean"
},
"videoResolution": {
"type": "string"
},
"photoResolution": {
"type": "string"
},
"audioChannelCount": {
"type": "integer"
},
"subtitleSize": {
"type": "integer"
},
"audioBoost": {
"type": "integer"
},
"secondsPerSegment": {
"type": "integer"
},
"disableResolutionRotation": {
"type": "boolean"
}
}
},
"Policy": {
"type": "object",
"properties": {
"scope": {
"type": "string",
"enum": ["all", "count"]
},
"value": {
"type": "integer",
"description": "If the scope is count, the number of items to optimize"
},
"unwatched": {
"type": "boolean",
"description": "True if only unwatched items are optimized"
}
}
},
"Location": {
"type": "object",
"properties": {
"uri": {
"type": "string"
},
"librarySectionID": {
"type": "integer"
}
}
},
"Device": {
"type": "object",
"properties": {
"profile": {
"type": "string"
}
}
}
}
}
}
}
}
]
}
}
},
"examples": {
"optimizeGenerator": {
"value": {
"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"
}
}
]
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/400"
},
"404": {
"description": "Playlist not found (or user may not have permission to access playlist) or generator not found",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
}
}
},
"delete": {
"tags": ["Library Playlists"],
"summary": "Delete a Generator",
"description": "Deletes an item from a playlist. Only works with dumb playlists.",
"operationId": "playlistDeleteItemsGenerator",
"parameters": [
{
"in": "path",
"name": "playlistId",
"schema": {
"type": "integer"
},
"description": "The ID of the playlist",
"required": true
},
{
"in": "path",
"name": "generatorId",
"schema": {
"type": "integer"
},
"description": "The generator item ID to delete.",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/components/responses/slash-post-responses-200"
},
"400": {
"$ref": "#/components/responses/400"
},
"404": {
"description": "Playlist not found (or user may not have permission to access playlist) or generator not found",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
}
}
},
"put": {
"tags": ["Library Playlists"],
"summary": "Modify a Generator",
"description": "Modify a playlist generator. Only used for optimizer",
"operationId": "playlistPutItemsGenerator",
"parameters": [
{
"in": "path",
"name": "playlistId",
"schema": {
"type": "integer"
},
"description": "The ID of the playlist",
"required": true
},
{
"in": "path",
"name": "generatorId",
"schema": {
"type": "integer"
},
"description": "The generator item ID to modify.",
"required": true
},
{
"in": "query",
"name": "Item",
"schema": {
"type": "object",
"properties": {
"type": {
"type": "integer"
},
"title": {
"type": "string"
},
"target": {
"type": "string"
},
"targetTagID": {
"type": "integer"
},
"locationID": {
"type": "integer"
},
"Location": {
"type": "object",
"properties": {
"uri": {
"type": "string"
}
}
},
"Policy": {
"type": "object",
"properties": {
"scope": {
"type": "string",
"enum": ["all", "count"]
},
"value": {
"type": "integer"
},
"unwatched": {
"type": "integer",
"enum": [0, 1]
}
}
}
}
},
"explode": true,
"style": "deepObject",
"example": {
"type": 42,
"title": "Jack-Jack Attack",
"target": "",
"targetTagID": 1,
"locationID": -1,
"Location": {
"uri": "library://82503060-0d68-4603-b594-8b071d54819e/item/%2Flibrary%2Fmetadata%2F146"
},
"Policy": {
"scope": "all",
"value": "",
"unwatched": 0
}
},
"description": "Note: OpenAPI cannot properly render this query parameter example ([See GHI](https://github.com/OAI/OpenAPI-Specification/issues/1706)). It should be rendered as:\n\nItem[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\n"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/slash-post-responses-200"
},
"400": {
"$ref": "#/components/responses/400"
},
"404": {
"description": "Playlist not found (or user may not have permission to access playlist) or generator not found",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
}
}
}
},
"/playlists/{playlistId}/items/{generatorId}/items": {
"get": {
"tags": ["Library Playlists"],
"summary": "Get a playlist generator's items",
"description": "Get a playlist generator's items",
"operationId": "playlistGetItemsGeneratorItems",
"parameters": [
{
"in": "path",
"name": "playlistId",
"schema": {
"type": "integer"
},
"description": "The ID of the playlist",
"required": true
},
{
"in": "path",
"name": "generatorId",
"schema": {
"type": "integer"
},
"description": "The generator item ID to delete.",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/MediaContainer"
},
{
"type": "object",
"properties": {
"Metadata": {
"allOf": [
{
"$ref": "#/components/schemas/metadata"
},
{
"type": "object",
"properties": {
"processingState": {
"type": "string",
"enum": [
"processed",
"completed",
"tombstoned",
"disabled",
"error",
"pending"
],
"description": "The state of processing if this generator is part of an optimizer playlist"
},
"processingStateContext": {
"type": "string",
"enum": [
"good",
"sourceFileUnavailable",
"sourceFileMetadataError",
"clientProfileError",
"ioError",
"transcoderError",
"unknownError",
"mediaAnalysisError",
"downloadFailed",
"accessDenied",
"cannotTranscode",
"codecInstallError"
],
"description": "The error which could have occurred (or `good`)"
}
}
}
]
}
}
}
]
}
}
},
"examples": {
"optimizeGenerator": {
"value": {
"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"
}
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/400"
},
"404": {
"description": "Playlist not found (or user may not have permission to access playlist) or generator not found",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
}
}
}
},
"/playlists/{playlistId}/items/{generatorId}/{metadataId}/{action}": {
"put": {
"tags": ["Library Playlists"],
"summary": "Reprocess a generator",
"description": "Make a generator reprocess (refresh)",
"operationId": "playlistPutItemsGeneratorReprocess",
"parameters": [
{
"in": "path",
"name": "playlistId",
"schema": {
"type": "integer"
},
"description": "The ID of the playlist",
"required": true
},
{
"in": "path",
"name": "generatorId",
"schema": {
"type": "integer"
},
"description": "The generator item ID to act on",
"required": true
},
{
"in": "path",
"name": "metadataId",
"schema": {
"type": "integer"
},
"description": "The metadata item ID to act on",
"required": true
},
{
"in": "path",
"name": "action",
"schema": {
"type": "string",
"enum": ["reprocess", "disable", "enable"]
},
"description": "The action to perform for this item on this optimizer queue",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
},
"400": {
"$ref": "#/components/responses/400"
},
"404": {
"description": "Playlist not found (or user may not have permission to access playlist) or generator or metadata item not found",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
}
}
}
},
"/playlists/{playlistId}/items/{playlistItemId}/move": {
"put": {
"tags": ["Library Playlists"],
"summary": "Moving items in a playlist",
"description": "Moves an item in a playlist. Only works with dumb playlists.",
"operationId": "playlistPutItemsMove",
"parameters": [
{
"in": "path",
"name": "playlistId",
"schema": {
"type": "integer"
},
"description": "The ID of the playlist",
"required": true
},
{
"in": "path",
"name": "playlistItemId",
"schema": {
"type": "integer"
},
"description": "The playlist item ID to move.",
"required": true
},
{
"in": "query",
"name": "after",
"schema": {
"type": "integer"
},
"description": "The playlist item ID to insert the new item after. If not provided, item is moved to beginning of playlist"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/slash-post-responses-200"
},
"400": {
"$ref": "#/components/responses/400"
},
"404": {
"description": "Playlist not found (or user may not have permission to access playlist)",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
}
}
}
},
"/playlists/{playlistId}/generators": {
"get": {
"tags": ["Library Playlists"],
"summary": "Get a playlist's generators",
"description": "Get all the generators in a playlist",
"operationId": "playlistGetGenerators",
"parameters": [
{
"in": "path",
"name": "playlistId",
"schema": {
"type": "integer"
},
"description": "The ID of the playlist",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/MediaContainer"
},
{
"type": "object",
"properties": {
"PlayQueueGenerator": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"playlistID": {
"type": "integer"
},
"uri": {
"type": "string",
"description": "The URI indicating the search for this generator"
},
"createdAt": {
"type": "integer"
},
"updatedAt": {
"type": "integer"
},
"changedAt": {
"type": "integer"
},
"type": {
"type": "integer",
"enum": [-1, 42],
"description": "The type of playlist generator.\n\n - -1: A smart playlist generator\n - 42: A optimized version generator\n"
}
}
}
}
}
}
]
}
}
},
"examples": {
"aGenerator": {
"value": {
"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
}
]
}
}
}
}
}
}
},
"404": {
"description": "Playlist not found (or user may not have permission to access playlist) or generator not found",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
}
}
}
},
"/playlists/upload": {
"post": {
"tags": ["Library Playlists"],
"security": [
{
"user_token": ["admin"]
}
],
"summary": "Upload",
"description": "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.",
"operationId": "playlistPostUpload",
"parameters": [
{
"in": "query",
"name": "path",
"schema": {
"type": "string"
},
"example": "/home/barkley/playlist.m3u",
"description": "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 `path` argument is a directory, that path will be scanned for playlist files to be processed. Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it. The GUID of each playlist is based on the filename. If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it. The GUID of each playlist is based on the filename."
},
{
"in": "query",
"name": "force",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"description": "Force overwriting of duplicate playlists. By default, a playlist file uploaded with the same path will overwrite the existing playlist. The `force` argument is used to disable overwriting. If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded."
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
},
"403": {
"$ref": "#/components/responses/200"
},
"500": {
"description": "The playlist could not be imported",
"content": {
"text/html": {
"examples": {
"badParam": {
"summary": "Processing failed inside the server",
"value": "<html><head><title>Internal Server Error</title></head><body><h1>500 Internal Server Error</h1></body></html>"
}
}
}
}
}
}
}
},
"/playQueues": {
"post": {
"tags": ["Play Queue"],
"summary": "Create a play queue",
"description": "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`.\nNote: Either `uri` or `playlistID` must be specified",
"operationId": "playQueuePostSlash",
"parameters": [
{
"in": "query",
"name": "uri",
"schema": {
"type": "string"
},
"description": "The content URI for what we're playing."
},
{
"in": "query",
"name": "playlistID",
"schema": {
"type": "integer"
},
"description": "the ID of the playlist we're playing."
},
{
"in": "query",
"name": "type",
"schema": {
"type": "string",
"enum": ["audio", "video", "photo"]
},
"required": true,
"description": "The type of play queue to create"
},
{
"in": "query",
"name": "key",
"schema": {
"type": "string"
},
"description": "The key of the first item to play, defaults to the first in the play queue."
},
{
"in": "query",
"name": "shuffle",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"description": "Whether to shuffle the playlist, defaults to 0."
},
{
"in": "query",
"name": "repeat",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"description": "If the PQ is bigger than the window, fill any empty space with wraparound items, defaults to 0."
},
{
"in": "query",
"name": "continuous",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"description": "Whether to create a continuous play queue (e.g. from an episode), defaults to 0."
},
{
"in": "query",
"name": "extrasPrefixCount",
"schema": {
"type": "integer"
},
"description": "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 `extrasPrefixCount` should be omitted as a parameter instead of passing 0."
},
{
"in": "query",
"name": "recursive",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"description": "Only applies to queues of type photo, whether to retrieve all descendent photos from an album or section, defaults to 1."
},
{
"in": "query",
"name": "onDeck",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"description": "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."
}
],
"responses": {
"200": {
"description": "OK",
"headers": {
"X-Plex-Container-Total-Size": {
"description": "Provided on all MediaContainer objects indicating the total size of objects available",
"schema": {
"type": "integer"
}
},
"X-Plex-Container-Start": {
"description": "Provided on all MediaContainer objects indicating the offset of where this container page starts",
"schema": {
"type": "integer"
}
}
},
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/properties-MediaContainer"
},
{
"type": "object",
"properties": {
"playQueueID": {
"type": "integer",
"description": "The ID of the play queue, which is used in subsequent requests."
},
"playQueueSelectedItemID": {
"type": "integer",
"description": "The queue item ID of the currently selected item."
},
"playQueueSelectedItemOffset": {
"type": "integer",
"description": "The offset of the selected item in the play queue, from the beginning of the queue."
},
"playQueueSelectedMetadataItemID": {
"type": "integer",
"description": "The metadata item ID of the currently selected item (matches `ratingKey` attribute in metadata item if the media provider is a library)."
},
"playQueueShuffled": {
"type": "boolean",
"description": "Whether or not the queue is shuffled."
},
"playQueueSourceURI": {
"type": "string",
"description": "The original URI used to create the play queue."
},
"playQueueTotalCount": {
"type": "integer",
"description": "The total number of items in the play queue."
},
"playQueueVersion": {
"type": "integer",
"description": "The version of the play queue. It increments every time a change is made to the play queue to assist clients in knowing when to refresh."
},
"playQueueLastAddedItemID": {
"type": "string",
"description": "Defines where the \"Up Next\" region starts"
}
}
}
]
}
}
},
"examples": {
"playQueue": {
"description": "A play queue",
"value": {
"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"
}
]
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/400"
}
}
}
},
"/playQueues/{playQueueId}": {
"get": {
"tags": ["Play Queue"],
"summary": "Retrieve a play queue",
"description": "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.",
"operationId": "playQueueQueueGetSlash",
"parameters": [
{
"in": "path",
"name": "playQueueId",
"schema": {
"type": "integer"
},
"required": true,
"description": "The ID of the play queue."
},
{
"in": "query",
"name": "own",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"description": "If the server should transfer ownership to the requesting client (used in remote control scenarios)."
},
{
"in": "query",
"name": "center",
"schema": {
"type": "string"
},
"description": "The play queue item ID for the center of the window - this doesn't change the current selected item."
},
{
"in": "query",
"name": "window",
"schema": {
"type": "integer"
},
"description": "How many items on each side of the center of the window"
},
{
"in": "query",
"name": "includeBefore",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"description": "Whether to include the items before the center (if 0, center is not included either), defaults to 1."
},
{
"in": "query",
"name": "includeAfter",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"description": "Whether to include the items after the center (if 0, center is not included either), defaults to 1."
}
],
"responses": {
"200": {
"$ref": "#/components/responses/slash-post-responses-200"
},
"400": {
"$ref": "#/components/responses/400"
},
"404": {
"description": "Play queue not found",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
}
}
},
"put": {
"tags": ["Play Queue"],
"summary": "Add a generator or playlist to a play queue",
"operationId": "playQueueQueuePutSlash",
"description": "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.",
"parameters": [
{
"in": "path",
"name": "playQueueId",
"schema": {
"type": "integer"
},
"required": true,
"description": "The ID of the play queue."
},
{
"in": "query",
"name": "uri",
"schema": {
"type": "string"
},
"description": "The content URI for what we're adding to the queue."
},
{
"in": "query",
"name": "playlistID",
"schema": {
"type": "string"
},
"description": "The ID of the playlist to add to the playQueue."
},
{
"in": "query",
"name": "next",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"description": "Play this item next (defaults to 0 - queueing at the end of manually queued items)."
}
],
"responses": {
"200": {
"$ref": "#/components/responses/slash-post-responses-200"
},
"400": {
"$ref": "#/components/responses/400"
},
"404": {
"description": "Play queue not found",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
}
}
}
},
"/playQueues/{playQueueId}/items": {
"delete": {
"tags": ["Play Queue"],
"summary": "Clear a play queue",
"operationId": "playQueueQueueDeleteItems",
"description": "Deletes all items in the play queue, and increases the version of the play queue.",
"parameters": [
{
"in": "path",
"name": "playQueueId",
"schema": {
"type": "integer"
},
"description": "The ID of the play queue.",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/mediaContainerWithPlaylistMetadata"
},
"examples": {
"playQueue": {
"description": "An empty play queue",
"value": {
"MediaContainer": {
"playQueueID": 9631,
"playQueueSelectedItemID": 2211762,
"playQueueSelectedItemOffset": 0,
"playQueueSelectedMetadataItemID": 1941458,
"playQueueShuffled": false,
"playQueueTotalCount": 0,
"playQueueVersion": 2,
"size": 0
}
}
}
}
}
}
}
}
}
},
"/playQueues/{playQueueId}/items/{playQueueItemId}": {
"delete": {
"tags": ["Play Queue"],
"summary": "Delete an item from a play queue",
"operationId": "playQueueQueueDeleteItemsItem",
"description": "Deletes an item in a play queue. Increments the version of the play queue. Returns the modified play queue.",
"parameters": [
{
"in": "path",
"name": "playQueueId",
"schema": {
"type": "integer"
},
"description": "The ID of the play queue.",
"required": true
},
{
"in": "path",
"name": "playQueueItemId",
"schema": {
"type": "integer"
},
"description": "The play queue item ID to delete.",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/components/responses/slash-post-responses-200"
},
"400": {
"$ref": "#/components/responses/400"
},
"404": {
"description": "Play queue not found",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
}
}
}
},
"/playQueues/{playQueueId}/items/{playQueueItemId}/move": {
"put": {
"tags": ["Play Queue"],
"summary": "Move an item in a play queue",
"operationId": "playQueueQueuePutItemsMove",
"description": "Moves an item in a play queue, and increases the version of the play queue. Returns the modified play queue.",
"parameters": [
{
"in": "path",
"name": "playQueueId",
"schema": {
"type": "integer"
},
"description": "The ID of the play queue.",
"required": true
},
{
"in": "path",
"name": "playQueueItemId",
"schema": {
"type": "integer"
},
"description": "The play queue item ID to delete.",
"required": true
},
{
"in": "query",
"name": "after",
"schema": {
"type": "integer"
},
"description": "The play queue item ID to insert the new item after. If not present, moves to the beginning."
}
],
"responses": {
"200": {
"$ref": "#/components/responses/slash-post-responses-200"
},
"400": {
"$ref": "#/components/responses/400"
},
"404": {
"description": "Play queue or queue item not found",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
}
}
}
},
"/playQueues/{playQueueId}/reset": {
"put": {
"tags": ["Play Queue"],
"summary": "Reset a play queue",
"operationId": "playQueuePlayQueueReset",
"description": "Reset a play queue to the first item being the current item",
"parameters": [
{
"in": "path",
"name": "playQueueId",
"schema": {
"type": "integer"
},
"description": "The ID of the play queue.",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/components/responses/slash-post-responses-200"
},
"400": {
"$ref": "#/components/responses/400"
},
"404": {
"description": "Play queue not found",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
}
}
}
},
"/playQueues/{playQueueId}/shuffle": {
"put": {
"tags": ["Play Queue"],
"summary": "Shuffle a play queue",
"operationId": "playQueueQueuePutItemsShuffle",
"description": "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.",
"parameters": [
{
"in": "path",
"name": "playQueueId",
"schema": {
"type": "integer"
},
"description": "The ID of the play queue.",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/mediaContainerWithPlaylistMetadata"
},
"examples": {
"playQueue": {
"description": "A shuffled play queue",
"value": {
"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"
}
]
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/400"
},
"404": {
"description": "Play queue not found or current item not found",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
}
}
}
},
"/playQueues/{playQueueId}/unshuffle": {
"put": {
"tags": ["Play Queue"],
"summary": "Unshuffle a play queue",
"operationId": "playQueueQueuePutItemsUnshuffle",
"description": "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.",
"parameters": [
{
"in": "path",
"name": "playQueueId",
"schema": {
"type": "integer"
},
"description": "The ID of the play queue.",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/components/responses/slash-post-responses-200"
},
"400": {
"$ref": "#/components/responses/400"
},
"404": {
"description": "Play queue not found or current item not found",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
}
}
}
},
"/security/resources": {
"get": {
"tags": ["General"],
"summary": "Get Source Connection Information",
"description": "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.",
"operationId": "securityGetResources",
"parameters": [
{
"in": "query",
"name": "source",
"schema": {
"type": "string"
},
"required": true,
"description": "The source identifier with an included prefix."
},
{
"in": "query",
"name": "refresh",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"description": "Force refresh"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/MediaContainer"
},
{
"type": "object",
"properties": {
"Device": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"clientIdentifier": {
"type": "string"
},
"accessToken": {
"type": "string"
},
"Connection": {
"type": "array",
"items": {
"type": "object",
"properties": {
"protocol": {
"type": "string"
},
"address": {
"type": "string"
},
"uri": {
"type": "string"
},
"port": {
"type": "integer"
},
"local": {
"type": "boolean",
"description": "Indicates if the connection is the server's LAN address"
},
"relay": {
"type": "boolean",
"description": "Indicates the connection is over a relayed connection"
}
}
}
}
}
}
}
}
]
}
}
},
"examples": {
"resource": {
"description": "An example of a resource for a remote server",
"value": {
"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",
"uri": "https://10-0-2-123.93b10b279ff8456686414add109854cd.plex.direct:32400",
"port": 32400,
"local": true
},
{
"protocol": "https",
"address": "64.71.188.222",
"uri": "https://64-71-188-222.93b10b279ff8456686414add109854cd.plex.direct:32403",
"port": 32403,
"local": false
},
{
"protocol": "https",
"address": "139.162.158.105",
"uri": "https://139-162-158-105.93b10b279ff8456686414add109854cd.plex.direct:8443",
"port": 8443,
"local": false,
"relay": true
}
]
}
}
}
}
}
}
}
},
"400": {
"description": "A query param is missing or the wrong value",
"content": {
"text/html": {
"examples": {
"badRequest": {
"summary": "A parameter has a bad value or required parameter is missing",
"value": "<html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>"
}
}
}
}
},
"403": {
"description": "Invalid or no token provided or a transient token could not be created",
"content": {
"text/html": {
"examples": {
"forbidden": {
"summary": "Forbidden",
"value": "<html><head><title>Forbidden</title></head><body><h1>403 Forbidden</h1></body></html>"
}
}
}
}
}
}
}
},
"/security/token": {
"post": {
"tags": ["General"],
"summary": "Get Transient Tokens",
"description": "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.\nNote: This endpoint responds to all HTTP verbs but POST in preferred",
"operationId": "securityPostToken",
"parameters": [
{
"in": "query",
"name": "type",
"schema": {
"type": "string",
"enum": ["delegation"]
},
"required": true,
"description": "The value `delegation` is the only supported `type` parameter."
},
{
"in": "query",
"name": "scope",
"schema": {
"type": "string",
"enum": ["all"]
},
"required": true,
"description": "The value `all` is the only supported `scope` parameter."
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/mediaContainer"
},
{
"type": "object",
"properties": {
"token": {
"type": "string",
"description": "The transient token"
}
}
}
]
}
}
},
"examples": {
"token": {
"description": "An example of a transient token",
"value": {
"MediaContainer": {
"size": 0,
"token": "transient-90904684-f91a-4391-8bf7-e0dfa7240285"
}
}
}
}
}
}
},
"400": {
"description": "A query param is missing or the wrong value",
"content": {
"text/html": {
"examples": {
"badRequest": {
"summary": "A parameter has a bad value or required parameter is missing",
"value": "<html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>"
}
}
}
}
},
"403": {
"description": "Invalid or no token provided or a transient token could not be created",
"content": {
"text/html": {
"examples": {
"forbidden": {
"summary": "Forbidden",
"value": "<html><head><title>Forbidden</title></head><body><h1>403 Forbidden</h1></body></html>"
}
}
}
}
}
}
}
},
"/services/ultrablur/colors": {
"get": {
"tags": ["UltraBlur"],
"summary": "Get UltraBlur Colors",
"description": "Retrieves the four colors extracted from an image for clients to use to generate an ultrablur image.",
"operationId": "ultraBlurGetColors",
"parameters": [
{
"in": "query",
"name": "url",
"schema": {
"type": "string"
},
"example": "/library/metadata/217745/art/1718931408",
"description": "Url for image which requires color extraction. Can be relative PMS library path or absolute url."
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/MediaContainer"
},
{
"type": "object",
"properties": {
"UltraBlurColors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"topLeft": {
"type": "string",
"description": "The color (hex) for the top left quadrant."
},
"topRight": {
"type": "string",
"description": "The color (hex) for the top right quadrant."
},
"bottomRight": {
"type": "string",
"description": "The color (hex) for the bottom right quadrant."
},
"bottomLeft": {
"type": "string",
"description": "The color (hex) for the bottom left quadrant."
}
}
}
}
}
}
]
}
}
},
"examples": {
"colors": {
"description": "Colors extracted from provided image url.",
"value": {
"MediaContainer": {
"size": 1,
"UltraBlurColors": [
{
"topLeft": "44181b",
"topRight": "55140b",
"bottomRight": "9a3936",
"bottomLeft": "31313a"
}
]
}
}
}
}
}
}
},
"404": {
"description": "The image url could not be found.",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
},
"500": {
"description": "The server was unable to successfully extract the UltraBlur colors.",
"content": {
"text/html": {
"examples": {
"badParam": {
"summary": "Processing failed inside the server",
"value": "<html><head><title>Internal Server Error</title></head><body><h1>500 Internal Server Error</h1></body></html>"
}
}
}
}
}
}
}
},
"/services/ultrablur/image": {
"get": {
"tags": ["UltraBlur"],
"summary": "Get UltraBlur Image",
"description": "Retrieves a server-side generated UltraBlur image based on the provided color inputs. Clients should always call this via the photo transcoder endpoint.",
"operationId": "ultraBlurGetImage",
"parameters": [
{
"in": "query",
"name": "topLeft",
"schema": {
"type": "string"
},
"example": "3f280a",
"description": "The base color (hex) for the top left quadrant."
},
{
"in": "query",
"name": "topRight",
"schema": {
"type": "string"
},
"example": "6b4713",
"description": "The base color (hex) for the top right quadrant."
},
{
"in": "query",
"name": "bottomRight",
"schema": {
"type": "string"
},
"example": "0f2a43",
"description": "The base color (hex) for the bottom right quadrant."
},
{
"in": "query",
"name": "bottomLeft",
"schema": {
"type": "string"
},
"example": "1c425d",
"description": "The base color (hex) for the bottom left quadrant."
},
{
"in": "query",
"name": "width",
"schema": {
"type": "integer",
"minimum": 320,
"maximum": 3840
},
"example": 1920,
"description": "Width in pixels for the image."
},
{
"in": "query",
"name": "height",
"schema": {
"type": "integer",
"minimum": 240,
"maximum": 2160
},
"example": 1080,
"description": "Height in pixels for the image."
},
{
"in": "query",
"name": "noise",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"example": 1,
"description": "Whether to add noise to the ouput image. Noise can reduce color banding with the gradients. Image sizes with noise will be larger."
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"image/png": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
},
"400": {
"description": "Requested width and height parameters are out of bounds (maximum 3840 x 2160)",
"content": {
"text/html": {
"examples": {
"badRequest": {
"summary": "A parameter has a bad value or required parameter is missing",
"value": "<html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>"
}
}
}
}
}
}
}
},
"/status/sessions": {
"get": {
"tags": ["Status"],
"security": [
{
"user_token": ["admin"]
}
],
"summary": "List Sessions",
"description": "List all current playbacks on this server",
"operationId": "statusGetSlash",
"responses": {
"200": {
"description": "OK",
"headers": {
"X-Plex-Container-Total-Size": {
"description": "Provided on all MediaContainer objects indicating the total size of objects available",
"schema": {
"type": "integer"
}
},
"X-Plex-Container-Start": {
"description": "Provided on all MediaContainer objects indicating the offset of where this container page starts",
"schema": {
"type": "integer"
}
}
},
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/properties-MediaContainer"
},
{
"type": "object",
"properties": {
"Metadata": {
"type": "array",
"items": {
"allOf": [
{
"type": "object",
"properties": {
"User": {
"type": "object",
"description": "The user playing the content",
"properties": {
"id": {
"type": "string",
"description": "The id of the user"
},
"thumb": {
"type": "string",
"description": "Thumb image to display for the user"
},
"title": {
"type": "string",
"description": "The username"
}
}
},
"Player": {
"type": "object",
"description": "Info about the player being used",
"properties": {
"address": {
"type": "string",
"description": "The remote address"
},
"machineIdentifier": {
"type": "string",
"description": "The identifier of the client"
},
"model": {
"type": "string",
"description": "The model of the client"
},
"platform": {
"type": "string",
"description": "The platform of the client"
},
"platformVersion": {
"type": "string",
"description": "The platformVersion of the client"
},
"product": {
"type": "string",
"description": "The product name of the client"
},
"remotePublicAddress": {
"type": "string",
"description": "The client's public address"
},
"state": {
"type": "string",
"description": "The client's last reported state"
},
"title": {
"type": "string",
"description": "The title of the client"
},
"vendor": {
"type": "string",
"description": "The vendor of the client"
},
"version": {
"type": "string",
"description": "The version of the client"
},
"local": {
"type": "boolean",
"description": "Indicating if the client is playing from the local LAN"
},
"relayed": {
"type": "boolean",
"description": "Indicating if the client is playing over a relay connection"
},
"secure": {
"type": "boolean",
"description": "Indicating if the client is playing over HTTPS"
},
"userID": {
"type": "integer",
"description": "The id of the user"
}
}
},
"Session": {
"type": "object",
"description": "Info about the playback session",
"properties": {
"id": {
"type": "string",
"description": "The id of the playback session"
},
"bandwidth": {
"type": "integer",
"description": "The bandwidth used by this client's playback in kbps"
},
"location": {
"type": "string",
"enum": ["lan", "wan"],
"description": "The location of the client"
}
}
}
}
},
{
"$ref": "#/components/schemas/metadata"
}
]
}
}
}
}
]
}
}
},
"examples": {
"playlists": {
"description": "A playback session",
"value": {
"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",
"thumb": "https://plex.tv/users/abcdef0123456789/avatar?c=1234567890",
"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"
}
}
]
}
}
}
}
}
}
}
}
}
},
"/status/sessions/background": {
"get": {
"tags": ["Status"],
"security": [
{
"user_token": ["admin"]
}
],
"summary": "Get background tasks",
"description": "Get the list of all background tasks",
"operationId": "statusGetBackground",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/MediaContainer"
},
{
"type": "object",
"properties": {
"TranscodeJob": {
"type": "array",
"items": {
"type": "object",
"properties": {
"generatorID": {
"type": "integer"
},
"type": {
"type": "string",
"enum": ["transcode"]
},
"key": {
"type": "string"
},
"progress": {
"type": "number",
"minimum": 0,
"maximum": 100
},
"speed": {
"type": "number",
"description": "The speed of the transcode; 1.0 means real-time"
},
"remaining": {
"type": "integer",
"description": "The number of seconds remaining in this job"
},
"size": {
"type": "integer",
"description": "The size of the result so far"
},
"title": {
"type": "string"
},
"thumb": {
"type": "string"
},
"ratingKey": {
"type": "string"
},
"targetTagID": {
"type": "integer",
"description": "The tag associated with the job. This could be the tag containing the optimizer settings."
}
}
}
}
}
}
]
}
}
},
"examples": {
"optimizer": {
"description": "An example of the media optimizer running",
"value": {
"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
}
]
}
}
}
}
}
}
}
}
}
},
"/status/sessions/history/all": {
"get": {
"tags": ["Status"],
"summary": "List Playback History",
"description": "List all playback history (Admin can see all users, others can only see their own).\nPagination should be used on this endpoint. Additionally this endpoint supports `includeFields`, `excludeFields`, `includeElements`, and `excludeElements` parameters.",
"operationId": "statusGetHistoryAll",
"parameters": [
{
"in": "query",
"name": "accountID",
"schema": {
"type": "integer"
},
"description": "The account id to restrict view history"
},
{
"in": "query",
"name": "viewedAt",
"schema": {
"type": "integer"
},
"description": "The time period to restrict history (typically of the form `viewedAt>=12456789`)"
},
{
"in": "query",
"name": "librarySectionID",
"schema": {
"type": "integer"
},
"description": "The library section id to restrict view history"
},
{
"in": "query",
"name": "metadataItemID",
"schema": {
"type": "integer"
},
"description": "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 `metadata_items.id`, `parents.id`, or `grandparents.id` internally depending on the metadata type."
},
{
"in": "query",
"name": "sort",
"schema": {
"type": "array",
"items": {
"type": "string"
}
},
"example": "viewedAt:desc,accountID",
"description": "The field on which to sort. Multiple orderings can be specified separated by `,` and the direction specified following a `:` (`desc` or `asc`; `asc` is assumed if not provided). Note `metadataItemID` may not be used here."
}
],
"responses": {
"200": {
"description": "OK",
"headers": {
"X-Plex-Container-Total-Size": {
"description": "Provided on all MediaContainer objects indicating the total size of objects available",
"schema": {
"type": "integer"
}
},
"X-Plex-Container-Start": {
"description": "Provided on all MediaContainer objects indicating the offset of where this container page starts",
"schema": {
"type": "integer"
}
}
},
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"$ref": "#/components/schemas/properties-MediaContainer"
},
{
"type": "object",
"properties": {
"Metadata": {
"type": "array",
"items": {
"type": "object",
"properties": {
"historyKey": {
"type": "string",
"description": "The key for this individual history item"
},
"key": {
"type": "string",
"description": "The metadata key for the item played"
},
"ratingKey": {
"type": "string",
"description": "The rating key for the item played"
},
"librarySectionID": {
"type": "string",
"description": "The library section id containing the item played"
},
"title": {
"type": "string",
"description": "The title of the item played"
},
"type": {
"type": "string",
"description": "The metadata type of the item played"
},
"thumb": {
"type": "string",
"description": "The thumb of the item played"
},
"originallyAvailableAt": {
"type": "string",
"description": "The originally available at of the item played"
},
"viewedAt": {
"type": "integer",
"description": "The time when the item was played"
},
"accountID": {
"type": "integer",
"description": "The account id of this playback"
},
"deviceID": {
"type": "integer",
"description": "The device id which played the item"
}
}
}
}
}
}
]
}
}
},
"examples": {
"aHistory": {
"description": "OK",
"value": {
"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
}
]
}
}
}
}
}
}
}
}
}
},
"/status/sessions/history/{historyId}": {
"get": {
"tags": ["Status"],
"security": [
{
"user_token": ["admin"]
}
],
"summary": "Get Single History Item",
"description": "Get a single history item by id",
"operationId": "statusGetHistory",
"parameters": [
{
"in": "path",
"name": "historyId",
"schema": {
"type": "integer"
},
"description": "The id of the history item (the `historyKey` from above)",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/components/responses/historyAll-get-responses-200"
},
"404": {
"description": "History item not found",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
}
}
},
"delete": {
"tags": ["Status"],
"security": [
{
"user_token": ["admin"]
}
],
"summary": "Delete Single History Item",
"description": "Delete a single history item by id",
"operationId": "statusDeleteHistory",
"parameters": [
{
"in": "path",
"name": "historyId",
"schema": {
"type": "integer"
},
"description": "The id of the history item (the `historyKey` from above)",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"headers": {
"X-Plex-Container-Total-Size": {
"description": "Provided on all MediaContainer objects indicating the total size of objects available",
"schema": {
"type": "integer"
}
},
"X-Plex-Container-Start": {
"description": "Provided on all MediaContainer objects indicating the offset of where this container page starts",
"schema": {
"type": "integer"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/mediaContainer"
},
"examples": {
"emptyContainer": {
"description": "OK",
"value": {
"MediaContainer": {
"size": 0
}
}
}
}
}
}
},
"404": {
"description": "History item not found",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
}
}
}
},
"/status/sessions/terminate": {
"post": {
"tags": ["Status"],
"security": [
{
"user_token": ["admin"]
}
],
"summary": "Terminate a session",
"description": "Terminate a playback session kicking off the user",
"operationId": "statusPostTerminate",
"parameters": [
{
"in": "query",
"name": "sessionId",
"schema": {
"type": "string"
},
"required": true,
"example": "cdefghijklmnopqrstuvwxyz",
"description": "The session id (found in the `Session` element in [/status/sessions](#tag/Status/operation/statusGetSlash))"
},
{
"in": "query",
"name": "reason",
"schema": {
"type": "string"
},
"example": "Stop Playing",
"description": "The reason to give to the user (typically displayed in the client)"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
},
"401": {
"description": "Server does not have the feature enabled",
"content": {
"text/html": {
"examples": {
"unauthorized": {
"summary": "Unauthorized",
"value": "<html><head><title>Unauthorized</title></head><body><h1>401 Unauthorized</h1></body></html>"
}
}
}
}
},
"403": {
"description": "sessionId is empty",
"content": {
"text/html": {
"examples": {
"forbidden": {
"summary": "Forbidden",
"value": "<html><head><title>Forbidden</title></head><body><h1>403 Forbidden</h1></body></html>"
}
}
}
}
},
"404": {
"description": "Session not found",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
}
}
}
},
"/{transcodeType}/:/transcode/universal/decision": {
"get": {
"tags": ["Transcoder"],
"summary": "Make a decision on media playback",
"description": "Make a decision on media playback based on client profile, and requested settings such as bandwidth and resolution.",
"operationId": "transcodeDecision",
"parameters": [
{
"$ref": "#/components/parameters/transcodeType"
},
{
"$ref": "#/components/parameters/transcodeSessionId"
},
{
"in": "query",
"name": "advancedSubtitles",
"schema": {
"type": "string",
"enum": ["burn", "text", "unknown"]
},
"example": "burn",
"description": "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\n"
},
{
"in": "query",
"name": "audioBoost",
"schema": {
"type": "integer",
"minimum": 1
},
"example": 50,
"description": "Percentage of original audio loudness to use when transcoding (100 is equivalent to original volume, 50 is half, 200 is double, etc)"
},
{
"in": "query",
"name": "audioChannelCount",
"schema": {
"type": "integer",
"minimum": 1,
"maximum": 8
},
"example": 5,
"description": "Target video number of audio channels."
},
{
"in": "query",
"name": "autoAdjustQuality",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"example": 1,
"description": "Indicates the client supports ABR."
},
{
"in": "query",
"name": "autoAdjustSubtitle",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"example": 1,
"description": "Indicates if the server should adjust subtitles based on Voice Activity Data."
},
{
"in": "query",
"name": "directPlay",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"example": 1,
"description": "Indicates the client supports direct playing the indicated content."
},
{
"in": "query",
"name": "directStream",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"example": 1,
"description": "Indicates the client supports direct streaming the video of the indicated content."
},
{
"in": "query",
"name": "directStreamAudio",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"example": 1,
"description": "Indicates the client supports direct streaming the audio of the indicated content."
},
{
"in": "query",
"name": "disableResolutionRotation",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"example": 1,
"description": "Indicates if resolution should be adjusted for orientation."
},
{
"in": "query",
"name": "hasMDE",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"example": 1,
"description": "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"
},
{
"in": "query",
"name": "location",
"schema": {
"type": "string",
"enum": ["lan", "wan", "cellular"]
},
"example": "wan",
"description": "Network type of the client, can be used to help determine target bitrate."
},
{
"in": "query",
"name": "mediaBufferSize",
"schema": {
"type": "integer"
},
"example": 102400,
"description": "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."
},
{
"in": "query",
"name": "mediaIndex",
"schema": {
"type": "integer"
},
"example": 0,
"description": "Index of the media to transcode. -1 or not specified indicates let the server choose."
},
{
"in": "query",
"name": "musicBitrate",
"schema": {
"type": "integer",
"minimum": 0
},
"example": 5000,
"description": "Target bitrate for audio only files (in kbps, used to transcode)."
},
{
"in": "query",
"name": "offset",
"schema": {
"type": "number"
},
"example": 90.5,
"description": "Offset from the start of the media (in seconds)."
},
{
"in": "query",
"name": "partIndex",
"schema": {
"type": "integer"
},
"example": 0,
"description": "Index of the part to transcode. -1 or not specified indicates the server should join parts together in a transcode"
},
{
"in": "query",
"name": "path",
"schema": {
"type": "string"
},
"example": "/library/metadata/151671",
"description": "Internal PMS path of the media to transcode."
},
{
"in": "query",
"name": "peakBitrate",
"schema": {
"type": "integer",
"minimum": 0
},
"example": 12000,
"description": "Maximum bitrate (in kbps) to use in ABR."
},
{
"in": "query",
"name": "photoResolution",
"schema": {
"type": "string",
"pattern": "^\\d[x:]\\d$"
},
"example": "1080x1080",
"description": "Target photo resolution."
},
{
"in": "query",
"name": "protocol",
"schema": {
"type": "string",
"enum": ["http", "hls", "dash"]
},
"example": "dash",
"description": "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)\n"
},
{
"in": "query",
"name": "secondsPerSegment",
"schema": {
"type": "integer"
},
"example": 5,
"description": "Number of seconds to include in each transcoded segment"
},
{
"in": "query",
"name": "subtitleSize",
"schema": {
"type": "integer",
"minimum": 1
},
"example": 50,
"description": "Percentage of original subtitle size to use when burning subtitles (100 is equivalent to original size, 50 is half, ect)"
},
{
"in": "query",
"name": "subtitles",
"schema": {
"type": "string",
"enum": [
"auto",
"burn",
"none",
"sidecar",
"embedded",
"segmented",
"unknown"
]
},
"example": "Burn",
"description": "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\n"
},
{
"in": "query",
"name": "videoBitrate",
"schema": {
"type": "integer",
"minimum": 0
},
"example": 12000,
"description": "Target video bitrate (in kbps)."
},
{
"in": "query",
"name": "videoQuality",
"schema": {
"type": "integer",
"minimum": 0,
"maximum": 99
},
"example": 50,
"description": "Target photo quality."
},
{
"in": "query",
"name": "videoResolution",
"schema": {
"type": "string",
"pattern": "^\\d[x:]\\d$"
},
"example": "1080x1080",
"description": "Target maximum video resolution."
},
{
"in": "header",
"name": "X-Plex-Client-Identifier",
"schema": {
"type": "string"
},
"required": true,
"description": "Unique per client."
},
{
"in": "header",
"name": "X-Plex-Client-Profile-Extra",
"schema": {
"type": "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%2Chevc&audioCodec=aac&protocol=dash)",
"description": "See [Profile Augmentations](#section/API-Info/Profile-Augmentations) ."
},
{
"in": "header",
"name": "X-Plex-Client-Profile-Name",
"schema": {
"type": "string"
},
"example": "generic",
"description": "Which built in Client Profile to use in the decision. Generally should only be used to specify the Generic profile."
},
{
"in": "header",
"name": "X-Plex-Device",
"schema": {
"type": "string"
},
"example": "Windows",
"description": "Device the client is running on"
},
{
"in": "header",
"name": "X-Plex-Model",
"schema": {
"type": "string"
},
"example": "standalone",
"description": "Model of the device the client is running on"
},
{
"in": "header",
"name": "X-Plex-Platform",
"schema": {
"type": "string"
},
"example": "Chrome",
"description": "Client Platform"
},
{
"in": "header",
"name": "X-Plex-Platform-Version",
"schema": {
"type": "string"
},
"example": 135,
"description": "Client Platform Version"
},
{
"in": "header",
"name": "X-Plex-Session-Identifier",
"schema": {
"type": "string"
},
"description": "Unique per client playback session. Used if a client can playback multiple items at a time (such as a browser with multiple tabs)"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/mediaContainerWithDecision"
},
"examples": {
"Big-buck-bunny Decision": {
"value": {
"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."
}
}
}
}
}
}
}
}
}
},
"/{transcodeType}/:/transcode/universal/fallback": {
"post": {
"tags": ["Transcoder"],
"summary": "Manually trigger a transcoder fallback",
"description": "Manually trigger a transcoder fallback ex: HEVC to h.264 or hw to sw",
"operationId": "transcodeFallback",
"parameters": [
{
"$ref": "#/components/parameters/transcodeType"
},
{
"$ref": "#/components/parameters/transcodeSessionId"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
},
"404": {
"description": "Session ID does not exist",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Not Found",
"value": "<html><head><title>Not Found</title></head><body><h1>404 Not Found</h1></body></html>"
}
}
}
}
},
"412": {
"description": "Transcode could not fallback",
"content": {
"text/html": {
"examples": {
"notFound": {
"summary": "Precondition Failed",
"value": "<html><head><title>Precondition Failed</title></head><body><h1>412 Precondition Failed</h1></body></html>"
}
}
}
}
},
"500": {
"description": "Transcode failed to fallback",
"content": {
"text/html": {
"examples": {
"badParam": {
"summary": "Processing failed inside the server",
"value": "<html><head><title>Internal Server Error</title></head><body><h1>500 Internal Server Error</h1></body></html>"
}
}
}
}
}
}
}
},
"/{transcodeType}/:/transcode/universal/start.*": {
"get": {
"tags": ["Transcoder"],
"summary": "Start A Transcoding Session",
"description": "Starts the transcoder and returns the corresponding streaming resource document.",
"operationId": "transcodeStart",
"parameters": [
{
"$ref": "#/components/parameters/transcodeType"
},
{
"$ref": "#/components/parameters/transcodeSessionId"
},
{
"in": "query",
"name": "advancedSubtitles",
"schema": {
"type": "string",
"enum": ["burn", "text", "unknown"]
},
"example": "burn",
"description": "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\n"
},
{
"in": "query",
"name": "audioBoost",
"schema": {
"type": "integer",
"minimum": 1
},
"example": 50,
"description": "Percentage of original audio loudness to use when transcoding (100 is equivalent to original volume, 50 is half, 200 is double, etc)"
},
{
"in": "query",
"name": "audioChannelCount",
"schema": {
"type": "integer",
"minimum": 1,
"maximum": 8
},
"example": 5,
"description": "Target video number of audio channels."
},
{
"in": "query",
"name": "autoAdjustQuality",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"example": 1,
"description": "Indicates the client supports ABR."
},
{
"in": "query",
"name": "autoAdjustSubtitle",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"example": 1,
"description": "Indicates if the server should adjust subtitles based on Voice Activity Data."
},
{
"in": "query",
"name": "directPlay",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"example": 1,
"description": "Indicates the client supports direct playing the indicated content."
},
{
"in": "query",
"name": "directStream",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"example": 1,
"description": "Indicates the client supports direct streaming the video of the indicated content."
},
{
"in": "query",
"name": "directStreamAudio",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"example": 1,
"description": "Indicates the client supports direct streaming the audio of the indicated content."
},
{
"in": "query",
"name": "disableResolutionRotation",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"example": 1,
"description": "Indicates if resolution should be adjusted for orientation."
},
{
"in": "query",
"name": "hasMDE",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"example": 1,
"description": "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"
},
{
"in": "query",
"name": "location",
"schema": {
"type": "string",
"enum": ["lan", "wan", "cellular"]
},
"example": "wan",
"description": "Network type of the client, can be used to help determine target bitrate."
},
{
"in": "query",
"name": "mediaBufferSize",
"schema": {
"type": "integer"
},
"example": 102400,
"description": "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."
},
{
"in": "query",
"name": "mediaIndex",
"schema": {
"type": "integer"
},
"example": 0,
"description": "Index of the media to transcode. -1 or not specified indicates let the server choose."
},
{
"in": "query",
"name": "musicBitrate",
"schema": {
"type": "integer",
"minimum": 0
},
"example": 5000,
"description": "Target bitrate for audio only files (in kbps, used to transcode)."
},
{
"in": "query",
"name": "offset",
"schema": {
"type": "number"
},
"example": 90.5,
"description": "Offset from the start of the media (in seconds)."
},
{
"in": "query",
"name": "partIndex",
"schema": {
"type": "integer"
},
"example": 0,
"description": "Index of the part to transcode. -1 or not specified indicates the server should join parts together in a transcode"
},
{
"in": "query",
"name": "path",
"schema": {
"type": "string"
},
"example": "/library/metadata/151671",
"description": "Internal PMS path of the media to transcode."
},
{
"in": "query",
"name": "peakBitrate",
"schema": {
"type": "integer",
"minimum": 0
},
"example": 12000,
"description": "Maximum bitrate (in kbps) to use in ABR."
},
{
"in": "query",
"name": "photoResolution",
"schema": {
"type": "string",
"pattern": "^\\d[x:]\\d$"
},
"example": "1080x1080",
"description": "Target photo resolution."
},
{
"in": "query",
"name": "protocol",
"schema": {
"type": "string",
"enum": ["http", "hls", "dash"]
},
"example": "dash",
"description": "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)\n"
},
{
"in": "query",
"name": "secondsPerSegment",
"schema": {
"type": "integer"
},
"example": 5,
"description": "Number of seconds to include in each transcoded segment"
},
{
"in": "query",
"name": "subtitleSize",
"schema": {
"type": "integer",
"minimum": 1
},
"example": 50,
"description": "Percentage of original subtitle size to use when burning subtitles (100 is equivalent to original size, 50 is half, ect)"
},
{
"in": "query",
"name": "subtitles",
"schema": {
"type": "string",
"enum": [
"auto",
"burn",
"none",
"sidecar",
"embedded",
"segmented",
"unknown"
]
},
"example": "Burn",
"description": "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\n"
},
{
"in": "query",
"name": "videoBitrate",
"schema": {
"type": "integer",
"minimum": 0
},
"example": 12000,
"description": "Target video bitrate (in kbps)."
},
{
"in": "query",
"name": "videoQuality",
"schema": {
"type": "integer",
"minimum": 0,
"maximum": 99
},
"example": 50,
"description": "Target photo quality."
},
{
"in": "query",
"name": "videoResolution",
"schema": {
"type": "string",
"pattern": "^\\d[x:]\\d$"
},
"example": "1080x1080",
"description": "Target maximum video resolution."
},
{
"in": "header",
"name": "X-Plex-Client-Identifier",
"schema": {
"type": "string"
},
"required": true,
"description": "Unique per client."
},
{
"in": "header",
"name": "X-Plex-Client-Profile-Extra",
"schema": {
"type": "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%2Chevc&audioCodec=aac&protocol=dash)",
"description": "See [Profile Augmentations](#section/API-Info/Profile-Augmentations) ."
},
{
"in": "header",
"name": "X-Plex-Client-Profile-Name",
"schema": {
"type": "string"
},
"example": "generic",
"description": "Which built in Client Profile to use in the decision. Generally should only be used to specify the Generic profile."
},
{
"in": "header",
"name": "X-Plex-Device",
"schema": {
"type": "string"
},
"example": "Windows",
"description": "Device the client is running on"
},
{
"in": "header",
"name": "X-Plex-Model",
"schema": {
"type": "string"
},
"example": "standalone",
"description": "Model of the device the client is running on"
},
{
"in": "header",
"name": "X-Plex-Platform",
"schema": {
"type": "string"
},
"example": "Chrome",
"description": "Client Platform"
},
{
"in": "header",
"name": "X-Plex-Platform-Version",
"schema": {
"type": "string"
},
"example": 135,
"description": "Client Platform Version"
},
{
"in": "header",
"name": "X-Plex-Session-Identifier",
"schema": {
"type": "string"
},
"description": "Unique per client playback session. Used if a client can playback multiple items at a time (such as a browser with multiple tabs)"
}
],
"responses": {
"200": {
"description": "MPD file (see ISO/IEC 23009-1:2022), m3u8 file (see RFC 8216), or binary http stream",
"content": {
"text/html": {
"example": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<MPD xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n xmlns=\"urn:mpeg:dash:schema:mpd:2011\"\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n xsi:schemaLocation=\"urn:mpeg:dash:schema:mpd:2011 http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-DASH_schema_files/DASH-MPD.xsd\"\n profiles=\"urn:mpeg:dash:profile:isoff-live:2011\"\n type=\"static\"\n mediaPresentationDuration=\"PT0H10M34.5333S\"\n maxSegmentDuration=\"PT2S\"\n minBufferTime=\"PT10S\">\n <Period start=\"PT0S\" id=\"0\" duration=\"PT0H10M34.5333S\">\n <AdaptationSet segmentAlignment=\"true\">\n <SegmentTemplate timescale=\"1\" duration=\"1\" initialization=\"session/00lsab52ccmh9htfgwqz0o8k/$RepresentationID$/header\" media=\"session/00lsab52ccmh9htfgwqz0o8k/$RepresentationID$/$Number$.m4s\" startNumber=\"0\">\n </SegmentTemplate>\n <Representation id=\"0\" mimeType=\"video/mp4\" codecs=\"avc1.640028\" bandwidth=\"20000000\" width=\"1920\" height=\"1080\">\n </Representation>\n </AdaptationSet>\n <AdaptationSet segmentAlignment=\"true\">\n <SegmentTemplate timescale=\"1\" duration=\"1\" initialization=\"session/00lsab52ccmh9htfgwqz0o8k/$RepresentationID$/header\" media=\"session/00lsab52ccmh9htfgwqz0o8k/$RepresentationID$/$Number$.m4s\" startNumber=\"0\">\n </SegmentTemplate>\n <Representation id=\"1\" mimeType=\"audio/mp4\" codecs=\"mp4a.40.2\" bandwidth=\"256000\" audioSamplingRate=\"48000\">\n <AudioChannelConfiguration schemeIdUri=\"urn:mpeg:dash:23003:3:audio_channel_configuration:2011\" value=\"2\"/>\n </Representation>\n </AdaptationSet>\n </Period>\n</MPD>\n"
},
"application/vnd.apple.mpegurl": {
"example": "#EXTM3U\n#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=3538000,RESOLUTION=1280x720,FRAME-RATE=60.000000\nsession/32635662-0d05-4acd-8f72-512cc64396d4/base/index.m3u8\n"
},
"video/x-matroska": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
},
"400": {
"$ref": "#/components/responses/400"
},
"403": {
"$ref": "#/components/responses/403"
},
"404": {
"$ref": "#/components/responses/404"
}
}
}
},
"/{transcodeType}/:/transcode/universal/subtitles": {
"get": {
"tags": ["Transcoder"],
"summary": "Transcode subtitles",
"description": "Only transcode subtitle streams.",
"operationId": "transcodeSubtitles",
"parameters": [
{
"$ref": "#/components/parameters/transcodeType"
},
{
"$ref": "#/components/parameters/transcodeSessionId"
},
{
"in": "query",
"name": "advancedSubtitles",
"schema": {
"type": "string",
"enum": ["burn", "text", "unknown"]
},
"example": "burn",
"description": "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\n"
},
{
"in": "query",
"name": "audioBoost",
"schema": {
"type": "integer",
"minimum": 1
},
"example": 50,
"description": "Percentage of original audio loudness to use when transcoding (100 is equivalent to original volume, 50 is half, 200 is double, etc)"
},
{
"in": "query",
"name": "audioChannelCount",
"schema": {
"type": "integer",
"minimum": 1,
"maximum": 8
},
"example": 5,
"description": "Target video number of audio channels."
},
{
"in": "query",
"name": "autoAdjustQuality",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"example": 1,
"description": "Indicates the client supports ABR."
},
{
"in": "query",
"name": "autoAdjustSubtitle",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"example": 1,
"description": "Indicates if the server should adjust subtitles based on Voice Activity Data."
},
{
"in": "query",
"name": "directPlay",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"example": 1,
"description": "Indicates the client supports direct playing the indicated content."
},
{
"in": "query",
"name": "directStream",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"example": 1,
"description": "Indicates the client supports direct streaming the video of the indicated content."
},
{
"in": "query",
"name": "directStreamAudio",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"example": 1,
"description": "Indicates the client supports direct streaming the audio of the indicated content."
},
{
"in": "query",
"name": "disableResolutionRotation",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"example": 1,
"description": "Indicates if resolution should be adjusted for orientation."
},
{
"in": "query",
"name": "hasMDE",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"example": 1,
"description": "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"
},
{
"in": "query",
"name": "location",
"schema": {
"type": "string",
"enum": ["lan", "wan", "cellular"]
},
"example": "wan",
"description": "Network type of the client, can be used to help determine target bitrate."
},
{
"in": "query",
"name": "mediaBufferSize",
"schema": {
"type": "integer"
},
"example": 102400,
"description": "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."
},
{
"in": "query",
"name": "mediaIndex",
"schema": {
"type": "integer"
},
"example": 0,
"description": "Index of the media to transcode. -1 or not specified indicates let the server choose."
},
{
"in": "query",
"name": "musicBitrate",
"schema": {
"type": "integer",
"minimum": 0
},
"example": 5000,
"description": "Target bitrate for audio only files (in kbps, used to transcode)."
},
{
"in": "query",
"name": "offset",
"schema": {
"type": "number"
},
"example": 90.5,
"description": "Offset from the start of the media (in seconds)."
},
{
"in": "query",
"name": "partIndex",
"schema": {
"type": "integer"
},
"example": 0,
"description": "Index of the part to transcode. -1 or not specified indicates the server should join parts together in a transcode"
},
{
"in": "query",
"name": "path",
"schema": {
"type": "string"
},
"example": "/library/metadata/151671",
"description": "Internal PMS path of the media to transcode."
},
{
"in": "query",
"name": "peakBitrate",
"schema": {
"type": "integer",
"minimum": 0
},
"example": 12000,
"description": "Maximum bitrate (in kbps) to use in ABR."
},
{
"in": "query",
"name": "photoResolution",
"schema": {
"type": "string",
"pattern": "^\\d[x:]\\d$"
},
"example": "1080x1080",
"description": "Target photo resolution."
},
{
"in": "query",
"name": "protocol",
"schema": {
"type": "string",
"enum": ["http", "hls", "dash"]
},
"example": "dash",
"description": "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)\n"
},
{
"in": "query",
"name": "secondsPerSegment",
"schema": {
"type": "integer"
},
"example": 5,
"description": "Number of seconds to include in each transcoded segment"
},
{
"in": "query",
"name": "subtitleSize",
"schema": {
"type": "integer",
"minimum": 1
},
"example": 50,
"description": "Percentage of original subtitle size to use when burning subtitles (100 is equivalent to original size, 50 is half, ect)"
},
{
"in": "query",
"name": "subtitles",
"schema": {
"type": "string",
"enum": [
"auto",
"burn",
"none",
"sidecar",
"embedded",
"segmented",
"unknown"
]
},
"example": "Burn",
"description": "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\n"
},
{
"in": "query",
"name": "videoBitrate",
"schema": {
"type": "integer",
"minimum": 0
},
"example": 12000,
"description": "Target video bitrate (in kbps)."
},
{
"in": "query",
"name": "videoQuality",
"schema": {
"type": "integer",
"minimum": 0,
"maximum": 99
},
"example": 50,
"description": "Target photo quality."
},
{
"in": "query",
"name": "videoResolution",
"schema": {
"type": "string",
"pattern": "^\\d[x:]\\d$"
},
"example": "1080x1080",
"description": "Target maximum video resolution."
},
{
"in": "header",
"name": "X-Plex-Client-Identifier",
"schema": {
"type": "string"
},
"required": true,
"description": "Unique per client."
},
{
"in": "header",
"name": "X-Plex-Client-Profile-Extra",
"schema": {
"type": "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%2Chevc&audioCodec=aac&protocol=dash)",
"description": "See [Profile Augmentations](#section/API-Info/Profile-Augmentations) ."
},
{
"in": "header",
"name": "X-Plex-Client-Profile-Name",
"schema": {
"type": "string"
},
"example": "generic",
"description": "Which built in Client Profile to use in the decision. Generally should only be used to specify the Generic profile."
},
{
"in": "header",
"name": "X-Plex-Device",
"schema": {
"type": "string"
},
"example": "Windows",
"description": "Device the client is running on"
},
{
"in": "header",
"name": "X-Plex-Model",
"schema": {
"type": "string"
},
"example": "standalone",
"description": "Model of the device the client is running on"
},
{
"in": "header",
"name": "X-Plex-Platform",
"schema": {
"type": "string"
},
"example": "Chrome",
"description": "Client Platform"
},
{
"in": "header",
"name": "X-Plex-Platform-Version",
"schema": {
"type": "string"
},
"example": 135,
"description": "Client Platform Version"
},
{
"in": "header",
"name": "X-Plex-Session-Identifier",
"schema": {
"type": "string"
},
"description": "Unique per client playback session. Used if a client can playback multiple items at a time (such as a browser with multiple tabs)"
}
],
"responses": {
"200": {
"description": "Transcoded subtitle file",
"content": {
"text/srt": {
"example": "1\n00:00:02,499 --> 00:00:06,416\n[SERENE MUSIC]\n\n2\n00:00:11,791 --> 00:00:13,958\n[BROOK BABBLES] \n[FLY BUZZES]\n\n3\n00:00:16,166 --> 00:00:17,666\n[BIRD TWEETS]\n\n4\n00:00:17,666 --> 00:00:18,708\n[WINGS FLAP]\n\n5\n00:00:19,833 --> 00:00:20,374\n[BIRD TWEETS] \n[WINGS FLAP]\n\n6\n00:00:20,374 --> 00:00:21,041\n[THUD]\n\n7\n00:00:21,374 --> 00:00:22,249\n[THUD]\n\n8\n00:00:22,249 --> 00:00:23,083\n[SQUIRREL LAUGHS]\n\n9\n00:00:26,249 --> 00:00:27,541\n[SNORES]\n\n10\n00:00:29,416 --> 00:00:30,708\n[SNORES]\n\n11\n00:00:32,749 --> 00:00:34,041\n[BUNNY SNORES]\n\n12\n00:00:35,916 --> 00:00:37,249\n[BUNNY SNORES]\n"
}
}
},
"400": {
"$ref": "#/components/responses/400"
},
"403": {
"$ref": "#/components/responses/403"
},
"404": {
"$ref": "#/components/responses/404"
}
}
}
},
"/updater/status": {
"get": {
"tags": ["Updater"],
"security": [
{
"user_token": ["admin"]
}
],
"summary": "Querying status of updates",
"description": "Get the status of updating the server",
"operationId": "updaterGetStatus",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"MediaContainer": {
"allOf": [
{
"type": "object",
"properties": {
"canInstall": {
"type": "boolean",
"description": "Indicates whether this install can be updated through these endpoints (typically only on MacOS and Windows)"
},
"autoUpdateVersion": {
"type": "integer",
"description": "The version of the updater (currently `1`)"
},
"checkedAt": {
"type": "integer",
"description": "The last time a check for updates was performed"
},
"downloadURL": {
"type": "string",
"description": "The URL where the update is available"
},
"status": {
"type": "integer",
"description": "The current error code (`0` means no error)"
},
"Release": {
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string",
"description": "The URL key of the update"
},
"version": {
"type": "string",
"description": "The version available"
},
"added": {
"type": "string",
"description": "A list of what has been added in this version"
},
"fixed": {
"type": "string",
"description": "A list of what has been fixed in this version"
},
"downloadURL": {
"type": "string",
"description": "The URL of where this update is available"
},
"state": {
"type": "string",
"enum": [
"available",
"downloading",
"downloaded",
"installing",
"tonight",
"skipped",
"error",
"notify",
"done"
],
"description": "The status of this update.\n\n- available - This release is available\n- downloading - This release is downloading\n- downloaded - This release has been downloaded\n- installing - This release is installing\n- tonight - This release will be installed tonight\n- skipped - This release has been skipped\n- error - This release has an error\n- notify - This release is only notifying it is available (typically because it cannot be installed on this setup)\n- done - This release is complete\n"
}
}
}
}
}
}
]
}
}
},
"examples": {
"status": {
"description": "An example of update status",
"value": {
"MediaContainer": {
"size": 1,
"autoUpdateVersion": 1,
"canInstall": true,
"checkedAt": 1715109491,
"downloadURL": "https://plex.tv/downloads/latest/5?channel=16&build=windows-x86_64&distro=windows&X-Plex-Token=xxxxxxxxxxxxxxxxxxxx",
"status": 0,
"Release": [
{
"key": "https://plex.tv/updater/releases/5315",
"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)",
"downloadURL": "https://plex.tv/downloads/latest/5?channel=16&build=windows-x86_64&distro=windows&X-Plex-Token=xxxxxxxxxxxxxxxxxxxx",
"state": "available"
}
]
}
}
}
}
}
}
}
}
}
},
"/updater/check": {
"put": {
"tags": ["Updater"],
"security": [
{
"user_token": ["admin"]
}
],
"summary": "Checking for updates",
"description": "Perform an update check and potentially download",
"operationId": "updaterPutCheck",
"parameters": [
{
"in": "query",
"name": "download",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"description": "Indicate that you want to start download any updates found."
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200"
}
}
}
},
"/updater/apply": {
"put": {
"tags": ["Updater"],
"security": [
{
"user_token": ["admin"]
}
],
"summary": "Applying updates",
"description": "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.",
"operationId": "updaterPutApply",
"parameters": [
{
"in": "query",
"name": "tonight",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"description": "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."
},
{
"in": "query",
"name": "skip",
"schema": {
"type": "integer",
"enum": [0, 1]
},
"description": "Indicate that the latest version should be marked as skipped. The <Release> entry for this version will have the `state` set to `skipped`."
}
],
"responses": {
"200": {
"description": "The update process started correctly",
"content": {
"text/html": {
"examples": {
"ok": {
"summary": "OK",
"value": ""
}
}
}
}
},
"400": {
"description": "This system cannot install updates",
"content": {
"text/html": {
"examples": {
"badRequest": {
"summary": "A parameter has a bad value or required parameter is missing",
"value": "<html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>"
}
}
}
}
},
"500": {
"description": "The update process failed to start",
"content": {
"text/html": {
"examples": {
"badParam": {
"summary": "Processing failed inside the server",
"value": "<html><head><title>Internal Server Error</title></head><body><h1>500 Internal Server Error</h1></body></html>"
}
}
}
}
}
}
}
}
}
}