# Plex API Documentation ## Docs - [Intro](https://plexapi.dev/Intro.md) - [Open API Specification](https://plexapi.dev/Open-API-Specification.md) - [SDKs](https://plexapi.dev/SDKs.md) - [Cancel a running activity](https://plexapi.dev/api-reference/activities/cancel-a-running-activity.md): Cancel a running activity. Admins can cancel all activities but other users can only cancel their own - [Get all activities](https://plexapi.dev/api-reference/activities/get-all-activities.md): List all activities on the server. Admins can see all activities but other users can only see their own - [Get Token Details](https://plexapi.dev/api-reference/authentication/get-token-details.md): Get the User data from the provided X-Plex-Token - [Get User Sign In Data](https://plexapi.dev/api-reference/authentication/get-user-sign-in-data.md): Sign in user with username and password and return user data with Plex authentication token - [Get all Butler tasks](https://plexapi.dev/api-reference/butler/get-all-butler-tasks.md): Get the list of butler tasks and their scheduling - [Start a single butler task](https://plexapi.dev/api-reference/butler/start-a-single-butler-task.md) - [Start all Butler tasks](https://plexapi.dev/api-reference/butler/start-all-butler-tasks.md): 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: - [Stop a single butler task](https://plexapi.dev/api-reference/butler/stop-a-single-butler-task.md) - [Stop all Butler tasks](https://plexapi.dev/api-reference/butler/stop-all-butler-tasks.md): This endpoint will stop all currently running tasks and remove any scheduled tasks from the queue. - [Create collection](https://plexapi.dev/api-reference/collections/create-collection.md): Create a collection in the library - [Get a collection's image](https://plexapi.dev/api-reference/content/get-a-collections-image.md): Get an image for the collection based on the items within - [Get a metadata item](https://plexapi.dev/api-reference/content/get-a-metadata-item.md): Get one or more metadata items. - [Get all folder locations](https://plexapi.dev/api-reference/content/get-all-folder-locations.md): Get all folder locations of the media in a section - [Get items in a collection](https://plexapi.dev/api-reference/content/get-items-in-a-collection.md): Get items in a collection. Note if this collection contains more than 100 items, paging must be used. - [Get items in the section](https://plexapi.dev/api-reference/content/get-items-in-the-section.md): Get the items in a section, potentially filtering them - [Set section albums](https://plexapi.dev/api-reference/content/set-section-albums.md): Get all albums in a music section - [Set section artwork](https://plexapi.dev/api-reference/content/set-section-artwork.md): Get artwork for a library section - [Set section categories](https://plexapi.dev/api-reference/content/set-section-categories.md): Get categories in a library section - [Set section clusters](https://plexapi.dev/api-reference/content/set-section-clusters.md): Get clusters in a library section (typically for photos) - [Set section leaves](https://plexapi.dev/api-reference/content/set-section-leaves.md): Get all leaves in a section (such as episodes in a show section) - [Set section moments](https://plexapi.dev/api-reference/content/set-section-moments.md): Get moments in a library section (typically for photos) - [Similar tracks to transition from one to another](https://plexapi.dev/api-reference/content/similar-tracks-to-transition-from-one-to-another.md): Get a list of audio tracks starting at one and ending at another which are similar across the path - [The nearest audio tracks](https://plexapi.dev/api-reference/content/the-nearest-audio-tracks.md): Get the nearest audio tracks to a particular analysis - [Add a device](https://plexapi.dev/api-reference/devices/add-a-device.md): This endpoint adds a device to an existing grabber. The device is identified, and added to the correct grabber. - [Enable or disable a device](https://plexapi.dev/api-reference/devices/enable-or-disable-a-device.md): Enable or disable a device by its id - [Get a device's channels](https://plexapi.dev/api-reference/devices/get-a-devices-channels.md): Get a device's channels by its id - [Get all devices](https://plexapi.dev/api-reference/devices/get-all-devices.md): Get the list of all devices present - [Get available grabbers](https://plexapi.dev/api-reference/devices/get-available-grabbers.md): Get available grabbers visible to the server - [Get device details](https://plexapi.dev/api-reference/devices/get-device-details.md): Get a device's details by its id - [Get device thumb](https://plexapi.dev/api-reference/devices/get-device-thumb.md): Get a device's thumb for display to the user - [Remove a device](https://plexapi.dev/api-reference/devices/remove-a-device.md): Remove a devices by its id along with its channel mappings - [Set a device's channel mapping](https://plexapi.dev/api-reference/devices/set-a-devices-channel-mapping.md): Set a device's channel mapping - [Set device preferences](https://plexapi.dev/api-reference/devices/set-device-preferences.md): Set device preferences by its id - [Tell a device to scan for channels](https://plexapi.dev/api-reference/devices/tell-a-device-to-scan-for-channels.md): Tell a device to scan for channels - [Tell a device to stop scanning for channels](https://plexapi.dev/api-reference/devices/tell-a-device-to-stop-scanning-for-channels.md): Tell a device to stop scanning for channels - [Tell grabbers to discover devices](https://plexapi.dev/api-reference/devices/tell-grabbers-to-discover-devices.md): Tell grabbers to discover devices - [Add to download queue](https://plexapi.dev/api-reference/download-queue/add-to-download-queue.md): Available: 0.2.0 - [Create download queue](https://plexapi.dev/api-reference/download-queue/create-download-queue.md): Available: 0.2.0 - [Delete download queue items](https://plexapi.dev/api-reference/download-queue/delete-download-queue-items.md): delete items from a download queue - [Get a download queue](https://plexapi.dev/api-reference/download-queue/get-a-download-queue.md): Available: 0.2.0 - [Get download queue items](https://plexapi.dev/api-reference/download-queue/get-download-queue-items.md): Available: 0.2.0 - [Get download queue items](https://plexapi.dev/api-reference/download-queue/get-download-queue-items-1.md): Available: 0.2.0 - [Grab download queue item decision](https://plexapi.dev/api-reference/download-queue/grab-download-queue-item-decision.md): Available: 0.2.0 - [Grab download queue media](https://plexapi.dev/api-reference/download-queue/grab-download-queue-media.md): Available: 0.2.0 - [Restart processing of items from the decision](https://plexapi.dev/api-reference/download-queue/restart-processing-of-items-from-the-decision.md): Available: 0.2.0 - [Add a device to an existing DVR](https://plexapi.dev/api-reference/dvrs/add-a-device-to-an-existing-dvr.md): Add a device to an existing DVR - [Add a DVR Lineup](https://plexapi.dev/api-reference/dvrs/add-a-dvr-lineup.md): Add a lineup to a DVR device's set of lineups. - [Create a DVR](https://plexapi.dev/api-reference/dvrs/create-a-dvr.md): Creation of a DVR, after creation of a devcie and a lineup is selected - [Delete a DVR Lineup](https://plexapi.dev/api-reference/dvrs/delete-a-dvr-lineup.md): Deletes a DVR device's lineup. - [Delete a single DVR](https://plexapi.dev/api-reference/dvrs/delete-a-single-dvr.md): Delete a single DVR by its id (key) - [Get a single DVR](https://plexapi.dev/api-reference/dvrs/get-a-single-dvr.md): Get a single DVR by its id (key) - [Get DVRs](https://plexapi.dev/api-reference/dvrs/get-dvrs.md): Get the list of all available DVRs - [Remove a device from an existing DVR](https://plexapi.dev/api-reference/dvrs/remove-a-device-from-an-existing-dvr.md): Remove a device from an existing DVR - [Set DVR preferences](https://plexapi.dev/api-reference/dvrs/set-dvr-preferences.md): Set DVR preferences by name avd value - [Tell a DVR to reload program guide](https://plexapi.dev/api-reference/dvrs/tell-a-dvr-to-reload-program-guide.md): Tell a DVR to reload program guide - [Tell a DVR to stop reloading program guide](https://plexapi.dev/api-reference/dvrs/tell-a-dvr-to-stop-reloading-program-guide.md): Tell a DVR to stop reloading program guide - [Tune a channel on a DVR](https://plexapi.dev/api-reference/dvrs/tune-a-channel-on-a-dvr.md): Tune a channel on a DVR to the provided channel - [Compute the best channel map](https://plexapi.dev/api-reference/epg/compute-the-best-channel-map.md): Compute the best channel map, given device and lineup - [Compute the best lineup](https://plexapi.dev/api-reference/epg/compute-the-best-lineup.md): Compute the best lineup, given lineup group and device - [Get all countries](https://plexapi.dev/api-reference/epg/get-all-countries.md): This endpoint returns a list of countries which EPG data is available for. There are three flavors, as specfied by the `flavor` attribute - [Get all languages](https://plexapi.dev/api-reference/epg/get-all-languages.md): Returns a list of all possible languages for EPG data. - [Get channels for a lineup](https://plexapi.dev/api-reference/epg/get-channels-for-a-lineup.md): Get channels for a lineup within an EPG provider - [Get lineups for a country via postal code](https://plexapi.dev/api-reference/epg/get-lineups-for-a-country-via-postal-code.md): Returns a list of lineups for a given country, EPG provider and postal code - [Get lineups for a region](https://plexapi.dev/api-reference/epg/get-lineups-for-a-region.md): Get lineups for a region within an EPG provider - [Get regions for a country](https://plexapi.dev/api-reference/epg/get-regions-for-a-country.md): Get regions for a country within an EPG provider - [Get the channels for mulitple lineups](https://plexapi.dev/api-reference/epg/get-the-channels-for-mulitple-lineups.md): Get the channels across multiple lineups - [Connect to Eventsource](https://plexapi.dev/api-reference/events/connect-to-eventsource.md): Connect to the event source to get a stream of events - [Connect to WebSocket](https://plexapi.dev/api-reference/events/connect-to-websocket.md): Connect to the web socket to get a stream of events - [Get PMS identity](https://plexapi.dev/api-reference/general/get-pms-identity.md): Get details about this PMS's identity - [Get PMS info](https://plexapi.dev/api-reference/general/get-pms-info.md): Information about this PMS setup and configuration - [Get Source Connection Information](https://plexapi.dev/api-reference/general/get-source-connection-information.md): 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 t… - [Get Transient Tokens](https://plexapi.dev/api-reference/general/get-transient-tokens.md): This endpoint provides the caller with a temporary token with the same access level as the caller's token. These tokens are valid for up to 48 hours and are destroyed if the server instance is restarted. Note: This endpoint responds to all HTTP verbs but POST in preferred - [Change hub visibility](https://plexapi.dev/api-reference/hubs/change-hub-visibility.md): Changed the visibility of a hub for both the admin and shared users - [Create a custom hub](https://plexapi.dev/api-reference/hubs/create-a-custom-hub.md): Create a custom hub based on a metadata item - [Delete a custom hub](https://plexapi.dev/api-reference/hubs/delete-a-custom-hub.md): Delete a custom hub from the server - [Get a hub's items](https://plexapi.dev/api-reference/hubs/get-a-hubs-items.md): Get the items within a single hub specified by identifier - [Get global hubs](https://plexapi.dev/api-reference/hubs/get-global-hubs.md): Get the global hubs in this PMS - [Get hubs](https://plexapi.dev/api-reference/hubs/get-hubs.md): Get the list of hubs including both built-in and custom - [Get hubs for section by metadata item](https://plexapi.dev/api-reference/hubs/get-hubs-for-section-by-metadata-item.md): Get the hubs for a section by metadata item. Currently only for music sections - [Get postplay hubs](https://plexapi.dev/api-reference/hubs/get-postplay-hubs.md): Get the hubs for a metadata to be displayed in post play - [Get related hubs](https://plexapi.dev/api-reference/hubs/get-related-hubs.md): Get the hubs for a metadata related to the provided metadata item - [Get section hubs](https://plexapi.dev/api-reference/hubs/get-section-hubs.md): Get the hubs for a single section - [Get the continue watching hub](https://plexapi.dev/api-reference/hubs/get-the-continue-watching-hub.md): Get the global continue watching hub - [Get the hubs which are promoted](https://plexapi.dev/api-reference/hubs/get-the-hubs-which-are-promoted.md): Get the global hubs which are promoted (should be displayed on the home screen) - [Move Hub](https://plexapi.dev/api-reference/hubs/move-hub.md): Changed the ordering of a hub among others hubs - [Reset hubs to defaults](https://plexapi.dev/api-reference/hubs/reset-hubs-to-defaults.md): Reset hubs for this section to defaults and delete custom hubs - [Add items to a collection](https://plexapi.dev/api-reference/library-collections/add-items-to-a-collection.md): Add items to a collection by uri - [Delete an item from a collection](https://plexapi.dev/api-reference/library-collections/delete-an-item-from-a-collection.md): Delete an item from a collection - [Reorder an item in the collection](https://plexapi.dev/api-reference/library-collections/reorder-an-item-in-the-collection.md): Reorder items in a collection with one item after another - [Adding to a Playlist](https://plexapi.dev/api-reference/library-playlists/adding-to-a-playlist.md): 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. - [Clearing a playlist](https://plexapi.dev/api-reference/library-playlists/clearing-a-playlist.md): Clears a playlist, only works with dumb playlists. Returns the playlist. - [Create a Playlist](https://plexapi.dev/api-reference/library-playlists/create-a-playlist.md): Create a new playlist. By default the playlist is blank. - [Delete a Generator](https://plexapi.dev/api-reference/library-playlists/delete-a-generator.md): Deletes an item from a playlist. Only works with dumb playlists. - [Delete a Playlist](https://plexapi.dev/api-reference/library-playlists/delete-a-playlist.md): Deletes a playlist by provided id - [Editing a Playlist](https://plexapi.dev/api-reference/library-playlists/editing-a-playlist.md): Edits a playlist in the same manner as [editing metadata](#tag/Provider/operation/metadataPutItem) - [Get a playlist generator](https://plexapi.dev/api-reference/library-playlists/get-a-playlist-generator.md): Get a playlist's generator. Only used for optimized versions - [Get a playlist generator's items](https://plexapi.dev/api-reference/library-playlists/get-a-playlist-generators-items.md): Get a playlist generator's items - [Get a playlist's generators](https://plexapi.dev/api-reference/library-playlists/get-a-playlists-generators.md): Get all the generators in a playlist - [Modify a Generator](https://plexapi.dev/api-reference/library-playlists/modify-a-generator.md): Modify a playlist generator. Only used for optimizer - [Moving items in a playlist](https://plexapi.dev/api-reference/library-playlists/moving-items-in-a-playlist.md): Moves an item in a playlist. Only works with dumb playlists. - [Reprocess a generator](https://plexapi.dev/api-reference/library-playlists/reprocess-a-generator.md): Make a generator reprocess (refresh) - [Upload](https://plexapi.dev/api-reference/library-playlists/upload.md): 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. - [Ad-detect an item](https://plexapi.dev/api-reference/library/ad-detect-an-item.md): Start the detection of ads in a metadata item - [Add a library section](https://plexapi.dev/api-reference/library/add-a-library-section.md): Add a new library section to the server - [Add subtitles](https://plexapi.dev/api-reference/library/add-subtitles.md): Add a subtitle to a metadata item - [Add to an item's extras](https://plexapi.dev/api-reference/library/add-to-an-items-extras.md): Add an extra to a metadata item - [Analyze a section](https://plexapi.dev/api-reference/library/analyze-a-section.md): Start analysis of all items in a section. If BIF generation is enabled, this will also be started on this section - [Analyze an item](https://plexapi.dev/api-reference/library/analyze-an-item.md): Start the analysis of a metadata item - [Cancel section refresh](https://plexapi.dev/api-reference/library/cancel-section-refresh.md): Cancel the refresh of a section - [Clean bundles](https://plexapi.dev/api-reference/library/clean-bundles.md): Clean out any now unused bundles. Bundles can become unused when media is deleted - [Create a marker](https://plexapi.dev/api-reference/library/create-a-marker.md): Create a marker for this user on the metadata item - [Credit detect a metadata item](https://plexapi.dev/api-reference/library/credit-detect-a-metadata-item.md): Start credit detection on a metadata item - [Delete a collection](https://plexapi.dev/api-reference/library/delete-a-collection.md): Delete a library collection from the PMS - [Delete a library section](https://plexapi.dev/api-reference/library/delete-a-library-section.md): Delete a library section by id - [Delete a marker](https://plexapi.dev/api-reference/library/delete-a-marker.md): Delete a marker for this user on the metadata item - [Delete a media item](https://plexapi.dev/api-reference/library/delete-a-media-item.md): Delete a single media from a metadata item in the library - [Delete a metadata item](https://plexapi.dev/api-reference/library/delete-a-metadata-item.md): Delete a single metadata item from the library, deleting media as well - [Delete a stream](https://plexapi.dev/api-reference/library/delete-a-stream.md): Delete a stream. Only applies to downloaded subtitle streams or a sidecar subtitle when media deletion is enabled. - [Delete library caches](https://plexapi.dev/api-reference/library/delete-library-caches.md): Delete the hub caches so they are recomputed on next request - [Delete section indexes](https://plexapi.dev/api-reference/library/delete-section-indexes.md): Delete all the indexes in a section - [Delete section intro markers](https://plexapi.dev/api-reference/library/delete-section-intro-markers.md): Delete all the intro markers in a section - [Detect voice activity](https://plexapi.dev/api-reference/library/detect-voice-activity.md): Start the detection of voice in a metadata item - [Edit a library section](https://plexapi.dev/api-reference/library/edit-a-library-section.md): Edit a library section by id setting parameters - [Edit a marker](https://plexapi.dev/api-reference/library/edit-a-marker.md): Edit a marker for this user on the metadata item - [Edit a metadata item](https://plexapi.dev/api-reference/library/edit-a-metadata-item.md): Edit metadata items setting fields - [Empty section trash](https://plexapi.dev/api-reference/library/empty-section-trash.md): Empty trash in the section, permanently deleting media/metadata for missing media - [Generate thumbs of chapters for an item](https://plexapi.dev/api-reference/library/generate-thumbs-of-chapters-for-an-item.md): Start the chapter thumb generation for an item - [Get a chapter image](https://plexapi.dev/api-reference/library/get-a-chapter-image.md): Get a single chapter image for a piece of media - [Get a file from a metadata or media bundle](https://plexapi.dev/api-reference/library/get-a-file-from-a-metadata-or-media-bundle.md): Get a bundle file for a metadata or media item. This is either an image or a mp3 (for a show's theme) - [Get a library section by id](https://plexapi.dev/api-reference/library/get-a-library-section-by-id.md): 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. - [Get a media part](https://plexapi.dev/api-reference/library/get-a-media-part.md): Get a media part for streaming or download. - 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… - [Get a section composite image](https://plexapi.dev/api-reference/library/get-a-section-composite-image.md): Get a composite image of images in this section - [Get a section sorts](https://plexapi.dev/api-reference/library/get-a-section-sorts.md): Get the sort mechanisms available in a section - [Get a stream](https://plexapi.dev/api-reference/library/get-a-stream.md): Get a stream (such as a sidecar subtitle stream) - [Get all items in library](https://plexapi.dev/api-reference/library/get-all-items-in-library.md): Request all metadata items according to a query. - [Get all library tags of a type](https://plexapi.dev/api-reference/library/get-all-library-tags-of-a-type.md): Get all library tags of a type - [Get an image from part BIF](https://plexapi.dev/api-reference/library/get-an-image-from-part-bif.md): Extract an image from the BIF for a part at a particular offset - [Get an item's artwork, theme, etc](https://plexapi.dev/api-reference/library/get-an-items-artwork-theme-etc.md): Get the artwork, thumb, element for a metadata item - [Get an item's extras](https://plexapi.dev/api-reference/library/get-an-items-extras.md): Get the extras for a metadata item - [Get augmentation status](https://plexapi.dev/api-reference/library/get-augmentation-status.md): Get augmentation status and potentially wait for completion - [Get autocompletions for search](https://plexapi.dev/api-reference/library/get-autocompletions-for-search.md): The field to autocomplete on is specified by the `{field}.query` parameter. For example `genre.query` or `title.query`. Returns a set of items from the filtered items whose `{field}` starts with `{field}.query`. In the results, a `{field}.queryRange` will be present to express the range of the matc… - [Get BIF index for a part](https://plexapi.dev/api-reference/library/get-bif-index-for-a-part.md): Get BIF index for a part by index type - [Get collections in a section](https://plexapi.dev/api-reference/library/get-collections-in-a-section.md): Get all collections in a section - [Get common fields for items](https://plexapi.dev/api-reference/library/get-common-fields-for-items.md): Represents a "Common" item. It contains only the common attributes of the items selected by the provided filter Fields which are not common will be expressed in the `mixedFields` field - [Get library matches](https://plexapi.dev/api-reference/library/get-library-matches.md): The matches endpoint is used to match content external to the library with content inside the library. This is done by passing a series of semantic "hints" about the content (its type, name, or release year). Each type (e.g. movie) has a canonical set of minimal required hints. This ability to match… - [Get library sections (main Media Provider Only)](https://plexapi.dev/api-reference/library/get-library-sections-main-media-provider-only.md): 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. Li… - [Get list of first characters](https://plexapi.dev/api-reference/library/get-list-of-first-characters.md): Get list of first characters in this section - [Get loudness about a stream](https://plexapi.dev/api-reference/library/get-loudness-about-a-stream.md): The the loudness of a stream in db, one number per line, one entry per 100ms - [Get loudness about a stream in json](https://plexapi.dev/api-reference/library/get-loudness-about-a-stream-in-json.md): The the loudness of a stream in db, one entry per 100ms - [Get media for a person](https://plexapi.dev/api-reference/library/get-media-for-a-person.md): Get all the media for a single actor. - [Get metadata items as a tree](https://plexapi.dev/api-reference/library/get-metadata-items-as-a-tree.md): Get a tree of metadata items, such as the seasons/episodes of a show - [Get metadata matches for an item](https://plexapi.dev/api-reference/library/get-metadata-matches-for-an-item.md): Get the list of metadata matches for a metadata item - [Get metadata top users](https://plexapi.dev/api-reference/library/get-metadata-top-users.md): Get the list of users which have played this item starting with the most - [Get nearest tracks to metadata item](https://plexapi.dev/api-reference/library/get-nearest-tracks-to-metadata-item.md): Get the nearest tracks, sonically, to the provided track - [Get person details](https://plexapi.dev/api-reference/library/get-person-details.md): Get details for a single actor. - [Get random artwork](https://plexapi.dev/api-reference/library/get-random-artwork.md): Get random artwork across sections. This is commonly used for a screensaver. - [Get related items](https://plexapi.dev/api-reference/library/get-related-items.md): Get a hub of related items to a metadata item - [Get section filters](https://plexapi.dev/api-reference/library/get-section-filters.md): Get common filters on a section - [Get section prefs](https://plexapi.dev/api-reference/library/get-section-prefs.md): Get a section's preferences for a metadata type - [Get section prefs](https://plexapi.dev/api-reference/library/get-section-prefs-1.md): Get the prefs for a section by id and potentially overriding the agent - [Get similar items](https://plexapi.dev/api-reference/library/get-similar-items.md): Get a list of similar items to a metadata item - [Get the leaves of an item](https://plexapi.dev/api-reference/library/get-the-leaves-of-an-item.md): Get the leaves for a metadata item such as the episodes in a show - [Ingest a transient item](https://plexapi.dev/api-reference/library/ingest-a-transient-item.md): 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 e… - [Intro detect an item](https://plexapi.dev/api-reference/library/intro-detect-an-item.md): Start the detection of intros in a metadata item - [Match a metadata item](https://plexapi.dev/api-reference/library/match-a-metadata-item.md): Match a metadata item to a guid - [Merge a metadata item](https://plexapi.dev/api-reference/library/merge-a-metadata-item.md): Merge a metadata item with other items - [Optimize the Database](https://plexapi.dev/api-reference/library/optimize-the-database.md): Initiate optimize on the database. - [Refresh a metadata item](https://plexapi.dev/api-reference/library/refresh-a-metadata-item.md): Refresh a metadata item from the agent - [Refresh all sections](https://plexapi.dev/api-reference/library/refresh-all-sections.md): Tell PMS to refresh all section metadata - [Refresh section](https://plexapi.dev/api-reference/library/refresh-section.md): Start a refresh of this section - [Set a stream offset](https://plexapi.dev/api-reference/library/set-a-stream-offset.md): Set a stream offset in ms. This may not be respected by all clients - [Set an item's artwork, theme, etc](https://plexapi.dev/api-reference/library/set-an-items-artwork-theme-etc.md): Set the artwork, thumb, element for a metadata item Generally only the admin can perform this action. The exception is if the metadata is a playlist created by the user - [Set an item's artwork, theme, etc](https://plexapi.dev/api-reference/library/set-an-items-artwork-theme-etc-1.md): Set the artwork, thumb, element for a metadata item Generally only the admin can perform this action. The exception is if the metadata is a playlist created by the user - [Set metadata preferences](https://plexapi.dev/api-reference/library/set-metadata-preferences.md): Set the preferences on a metadata item - [Set section prefs](https://plexapi.dev/api-reference/library/set-section-prefs.md): Set the prefs for a section by id - [Set stream selection](https://plexapi.dev/api-reference/library/set-stream-selection.md): Set which streams (audio/subtitle) are selected by this user - [Set the fields of the filtered items](https://plexapi.dev/api-reference/library/set-the-fields-of-the-filtered-items.md): This endpoint takes an large possible set of values. Here are some examples. - **Parameters, extra documentation** - artist.title.value - When used with track, both artist.title.value and album.title.value need to be specified - title.value usage - Summary - Tracks always… - [Split a metadata item](https://plexapi.dev/api-reference/library/split-a-metadata-item.md): Split a metadata item into multiple items - [Start BIF generation of an item](https://plexapi.dev/api-reference/library/start-bif-generation-of-an-item.md): Start the indexing (BIF generation) of an item - [Stop refresh](https://plexapi.dev/api-reference/library/stop-refresh.md): Stop all refreshes across all sections - [Unmatch a metadata item](https://plexapi.dev/api-reference/library/unmatch-a-metadata-item.md): Unmatch a metadata item to info fetched from the agent - [Get a session playlist index](https://plexapi.dev/api-reference/live-tv/get-a-session-playlist-index.md): Get a playlist index for playing this session - [Get a single session](https://plexapi.dev/api-reference/live-tv/get-a-single-session.md): Get a single livetv session and metadata - [Get a single session segment](https://plexapi.dev/api-reference/live-tv/get-a-single-session-segment.md): Get a single LiveTV session segment - [Get all sessions](https://plexapi.dev/api-reference/live-tv/get-all-sessions.md): Get all livetv sessions and metadata - [Enabling papertrail](https://plexapi.dev/api-reference/log/enabling-papertrail.md) - [Logging a multi-line message to the Plex Media Server log](https://plexapi.dev/api-reference/log/logging-a-multi-line-message-to-the-plex-media-server-log.md): 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. - [Logging a single-line message to the Plex Media Server log](https://plexapi.dev/api-reference/log/logging-a-single-line-message-to-the-plex-media-server-log.md): This endpoint will write a single-line log message, including a level and source to the main Plex Media Server log. - [Add a generator or playlist to a play queue](https://plexapi.dev/api-reference/play-queue/add-a-generator-or-playlist-to-a-play-queue.md): 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. - [Clear a play queue](https://plexapi.dev/api-reference/play-queue/clear-a-play-queue.md): Deletes all items in the play queue, and increases the version of the play queue. - [Create a play queue](https://plexapi.dev/api-reference/play-queue/create-a-play-queue.md): 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… - [Delete an item from a play queue](https://plexapi.dev/api-reference/play-queue/delete-an-item-from-a-play-queue.md): Deletes an item in a play queue. Increments the version of the play queue. Returns the modified play queue. - [Move an item in a play queue](https://plexapi.dev/api-reference/play-queue/move-an-item-in-a-play-queue.md): Moves an item in a play queue, and increases the version of the play queue. Returns the modified play queue. - [Reset a play queue](https://plexapi.dev/api-reference/play-queue/reset-a-play-queue.md): Reset a play queue to the first item being the current item - [Retrieve a play queue](https://plexapi.dev/api-reference/play-queue/retrieve-a-play-queue.md): 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. - [Shuffle a play queue](https://plexapi.dev/api-reference/play-queue/shuffle-a-play-queue.md): 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. - [Unshuffle a play queue](https://plexapi.dev/api-reference/play-queue/unshuffle-a-play-queue.md): 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. - [List playlists](https://plexapi.dev/api-reference/playlist/list-playlists.md): 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. - [Retrieve Playlist](https://plexapi.dev/api-reference/playlist/retrieve-playlist.md): Gets detailed metadata for a playlist. A playlist for many purposes (rating, editing metadata, tagging), can be treated like a regular metadata item: Smart playlist details contain the `content` attribute. This is the content URI for the generator. This can then be parsed by a client to provide smar… - [Retrieve Playlist Contents](https://plexapi.dev/api-reference/playlist/retrieve-playlist-contents.md): Gets the contents of 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 playlis… - [Get Server Resources](https://plexapi.dev/api-reference/plex/get-server-resources.md): Get Plex server access tokens and server connections - [Get a preferences](https://plexapi.dev/api-reference/preferences/get-a-preferences.md): Get a single preference and value - [Get all preferences](https://plexapi.dev/api-reference/preferences/get-all-preferences.md): Get the list of all preferences - [Set preferences](https://plexapi.dev/api-reference/preferences/set-preferences.md): Set a set of preferences in query parameters - [Add a media provider](https://plexapi.dev/api-reference/provider/add-a-media-provider.md): 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. - [Delete a media provider](https://plexapi.dev/api-reference/provider/delete-a-media-provider.md): Deletes a media provider with the given id - [Get the list of available media providers](https://plexapi.dev/api-reference/provider/get-the-list-of-available-media-providers.md): 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. - [Refresh media providers](https://plexapi.dev/api-reference/provider/refresh-media-providers.md): Refresh all known media providers. This is useful in case a provider has updated features. - [Rate an item](https://plexapi.dev/api-reference/rate/rate-an-item.md): Set the rating on an item. This API does respond to the GET verb but applications should use PUT - [Search Hub](https://plexapi.dev/api-reference/search/search-hub.md): Perform a search and get the result as hubs - [Voice Search Hub](https://plexapi.dev/api-reference/search/voice-search-hub.md): Perform a search tailored to voice input and get the result as hubs - [Delete Single History Item](https://plexapi.dev/api-reference/status/delete-single-history-item.md): Delete a single history item by id - [Get background tasks](https://plexapi.dev/api-reference/status/get-background-tasks.md): Get the list of all background tasks - [Get Single History Item](https://plexapi.dev/api-reference/status/get-single-history-item.md): Get a single history item by id - [List Playback History](https://plexapi.dev/api-reference/status/list-playback-history.md): List all playback history (Admin can see all users, others can only see their own). Pagination should be used on this endpoint. Additionally this endpoint supports `includeFields`, `excludeFields`, `includeElements`, and `excludeElements` parameters. - [List Sessions](https://plexapi.dev/api-reference/status/list-sessions.md): List all current playbacks on this server - [Terminate a session](https://plexapi.dev/api-reference/status/terminate-a-session.md): Terminate a playback session kicking off the user - [Cancel an existing grab](https://plexapi.dev/api-reference/subscriptions/cancel-an-existing-grab.md): Cancels an existing media grab (recording). It can be used to resolve a conflict which exists for a rolling subscription. Note: This cancellation does not persist across a server restart, but neither does a rolling subscription itself. - [Create a subscription](https://plexapi.dev/api-reference/subscriptions/create-a-subscription.md): Create a subscription. The query parameters should be mostly derived from the [template](#tag/Subscriptions/operation/mediaSubscriptionsGetTemplate) - [Delete a subscription](https://plexapi.dev/api-reference/subscriptions/delete-a-subscription.md): Delete a subscription, cancelling all of its grabs as well - [Edit a subscription](https://plexapi.dev/api-reference/subscriptions/edit-a-subscription.md): Edit a subscription's preferences - [Get a single subscription](https://plexapi.dev/api-reference/subscriptions/get-a-single-subscription.md): Get a single subscription and potentially the grabs too - [Get all scheduled recordings](https://plexapi.dev/api-reference/subscriptions/get-all-scheduled-recordings.md): Get all scheduled recordings across all subscriptions - [Get all subscriptions](https://plexapi.dev/api-reference/subscriptions/get-all-subscriptions.md): Get all subscriptions and potentially the grabs too - [Get the subscription template](https://plexapi.dev/api-reference/subscriptions/get-the-subscription-template.md): Get the templates for a piece of media which could include fetching one airing, season, the whole show, etc. - [Process all subscriptions](https://plexapi.dev/api-reference/subscriptions/process-all-subscriptions.md): Process all subscriptions asynchronously - [Re-order a subscription](https://plexapi.dev/api-reference/subscriptions/re-order-a-subscription.md): Re-order a subscription to change its priority - [Mark an item as played](https://plexapi.dev/api-reference/timeline/mark-an-item-as-played.md): Mark an item as played. Note, this does not create any view history of this item but rather just sets the state as played. The client must provide either the `key` or `uri` query parameter This API does respond to the GET verb but applications should use PUT - [Mark an item as unplayed](https://plexapi.dev/api-reference/timeline/mark-an-item-as-unplayed.md): Mark an item as unplayed. The client must provide either the `key` or `uri` query parameter This API does respond to the GET verb but applications should use PUT - [Report media timeline](https://plexapi.dev/api-reference/timeline/report-media-timeline.md): 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). - [Make a decision on media playback](https://plexapi.dev/api-reference/transcoder/make-a-decision-on-media-playback.md): Make a decision on media playback based on client profile, and requested settings such as bandwidth and resolution. - [Manually trigger a transcoder fallback](https://plexapi.dev/api-reference/transcoder/manually-trigger-a-transcoder-fallback.md): Manually trigger a transcoder fallback ex: HEVC to h.264 or hw to sw - [Start A Transcoding Session](https://plexapi.dev/api-reference/transcoder/start-a-transcoding-session.md): Starts the transcoder and returns the corresponding streaming resource document. - [Transcode an image](https://plexapi.dev/api-reference/transcoder/transcode-an-image.md): Transcode an image, possibly changing format or size - [Transcode subtitles](https://plexapi.dev/api-reference/transcoder/transcode-subtitles.md): Only transcode subtitle streams. - [Get UltraBlur Colors](https://plexapi.dev/api-reference/ultrablur/get-ultrablur-colors.md): Retrieves the four colors extracted from an image for clients to use to generate an ultrablur image. - [Get UltraBlur Image](https://plexapi.dev/api-reference/ultrablur/get-ultrablur-image.md): Retrieves a server-side generated UltraBlur image based on the provided color inputs. Clients should always call this via the photo transcoder endpoint. - [Applying updates](https://plexapi.dev/api-reference/updater/applying-updates.md): 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. - [Checking for updates](https://plexapi.dev/api-reference/updater/checking-for-updates.md): Perform an update check and potentially download - [Querying status of updates](https://plexapi.dev/api-reference/updater/querying-status-of-updates.md): Get the status of updating the server - [Get list of all connected users](https://plexapi.dev/api-reference/users/get-list-of-all-connected-users.md): Get list of all users that are friends and have library access with the provided Plex authentication token - [Other resources](https://plexapi.dev/other-resources.md) ## OpenAPI Specs - [merge-code-samples-into-spec-with-code-samples](https://spec.speakeasy.com/plexapi/plexapi/merge-code-samples-into-spec-with-code-samples) - [openapi-with-code-samples](https://plexapi.dev/openapi-with-code-samples.yaml) - [openapi](https://plexapi.dev/api-reference/openapi.json) ## Optional - [Community](https://discord.gg/CYuDKV9uK3)