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.
GET http://[IP address]:32400/playlists/[Playlist ID]?X-Plex-Token=[PlexToken]
|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 |
|200||Success - The request was successful.|
|401||Unauthorized - The Plex token provided was not valid.|
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.
|size||The number of playlists returned for the playlist ID.|
MediaContainer there is one
Playlist child element that contains the details about the playlist.
|content||Address of the content.|
|ratingKey||An integer value representing the unique identifier for the playlist.|
|key||The relative URL of the items in the playlist. This URL returns information about the items in the playlist.|
|guid||The global unique identifier for the playlist.|
|type||The type of object.|
|title||The name 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 for the last time the playlist was created.|
|updatedAt||The date and time for the last time the playlist was updated.|
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: