View a Single Playlist
Each user on the Plex server can create their own playlists. This API command can be used to get the information about one of those playlists for a specified user.
URL
GET http://[IP address]:32400/playlists/[Playlist ID]?X-Plex-Token=[PlexToken]
Parameters
Name | Description |
---|---|
IP address | The IP address of the Plex Media server. |
PlexToken | The temporary authentication Plex token. |
Playlist ID | The key associated with a playlist. This key can be found by calling the view playlists for a user API command and getting the value in the ratingsKey attribute. |
Return Status
HTTP Code | Description |
---|---|
200 | Success - The request was successful. |
401 | Unauthorized - The Plex token provided was not valid. |
Response
XML string value that lists the all the playlists associated with the user. An example of the XML returned from the request is shown below:
<?xml version="1.0" encoding="UTF-8"?> <MediaContainer size="1"> <Playlist content="library://x/directory/%2Flibrary%2Fsections%2F2%2Fall%3Ftype%3D1%26originallyAvailableAt%253E%253E%3D315464400%26originallyAvailableAt%253C%253C%3D631170000" ratingKey="279065" key="/playlists/279065/items" guid="com.plexapp.agents.none://4aeb2048-d28c-4f72-9bd9-ec8ed697dde0" type="playlist" title="1980's Movies" summary="" smart="1" playlistType="video" composite="/playlists/279065/composite/1649882407" icon="playlist://image.smart" duration="150764000" leafCount="22" addedAt="1649464327" updatedAt="1649882407"></Playlist> </MediaContainer>
The XML returned provides information about the playlist associated with the specified playlist ID. The root is the MediaContainer
element. This element contains a few attributes that provide overall information about the playlist.
Attribute | Description |
---|---|
size | The number of playlists. |
Within the MediaContainer
there is one Playlist
child element that contains the details about the playlist.
Attribute | Description |
---|---|
content | Address of the playlist. |
ratingKey | A key associated with the playlist. |
key | The relative URL of the items in the playlist. This URL returns information about the items in the playlist. |
guid | The unique identifier comprised of the Plex agent and playlist identifier for the agent. |
type | The type of media. |
title | The title of the playlist. |
summary | A description of the playlist. This can be changed by editing the playlist from within Plex after it has been created. |
smart | 1 - playlist is a smart playlist. 0 - playlist is not a smart playlist. |
playlistType | video - playlist contains videos/movies. audio - playlist contains audio/music. photo - playlist contains photos. |
composite | The URL of the image used to represent the playlist. |
icon | Icon used for smart playlists. Not used for non-smart playlists. |
duration | The total duration, in milliseconds, of the number of items in the playlist. This value doesn't exist for photo playlists. |
leafCount | Number of items in the playlist. |
addedAt | The date and time, in Unix time, the playlist was added to the library. |
updatedAt | The date and time in Unix time, the playlist was updated in the library. |
Examples
Example 1
Gets the playlist information for the playlist associated with ID 279065 on the Plex Media Server located at the IP address of 192.168.1.4:
GET http://192.168.1.4:32400/playlists/279065/?X-Plex-Token=L6vkd7JtLHjsH5987vYY