A library, such as movies or TV shows, can contain many items. This API command will return all photos for a specific library that is available on the Plex server.
GET http://[IP address]:32400/library/sections/[Photo Library ID]/all?X-Plex-Token=[PlexToken]
|IP address||The IP address of the Plex Media server.|
|PlexToken||The temporary authentication Plex token.|
|Photo Library ID||The key associated with a photo library. This key can be found by calling the Libraries API command and looking for a photo library.|
|200||Success - The request was successful.|
|401||Unauthorized - The Plex token provided was not valid.|
XML string value that lists the information for the folder of all the photos in a library. An example of the XML returned from the request is shown below:
<?xml version="1.0" encoding="UTF-8"?> <MediaContainer size="25" allowSync="1" art="/:/resources/photo-fanart.jpg" identifier="com.plexapp.plugins.library" librarySectionID="1" librarySectionTitle="Photos" librarySectionUUID="fc948ea9-3fad-45e2-99ef-b461b2d746d2" mediaTagPrefix="/system/bundle/media/flags/" mediaTagVersion="1641342384" nocache="1" sortAsc="1" thumb="/:/resources/photo.png" title1="Photos" title2="All Photos" viewGroup="photo" viewMode="458810"> <Directory ratingKey="3663" key="/library/metadata/3663/children" guid="local://3663" type="photo" title="2002" summary="" index="1" composite="/library/metadata/3663/composite/1611751196" thumb="/library/metadata/3663/thumb/1611751196" art="/library/metadata/3663/art/1611751196" addedAt="1430260593" updatedAt="1611751196"></Directory> ... </MediaContainer>
The XML returned provides a list of the all music artists in a library that are available on the Plex server. The root is the
MediaContainer element. This element contains a few attributes that provide overall information about the music artist on the server.
|size||The number of photo folders in the library.|
|allowSync||1 - allow syncing content from this library.|
0 - don't allow syncing content from this library.
|art||Background artwork used to represent the library.|
|identifier||The type of item.|
|librarySectionID||The unique key associated with the library.|
|librarySectionTitle||The title of the library.|
|librarySectionUUID||Unique GUID identifier for the library.|
|mediaTagPrefix||Prefix for the media tag.|
|mediaTagVersion||Media tag version.|
Note: This could be a date and time value.
|nocache||1 - cache the library.|
0 - do not cache the library.
|sortAsc||1 - the library is sorted in ascending order.|
0 - the library is sorted in descending order.
|thumb||The thumbnail for the library.|
|title1||The title of the library item.|
Note: This appears to be internally created, and can't be changed by the server owner.
|title2||A description title for the library.|
|viewGroup||The group type used to view the library.|
|viewMode||Unknown integer value.|
MediaContainer there are one or more
Directory child elements. Each
Directory element represents one photo folder that has been associated with the Plex server.
|ratingKey||A key associated with the photo folder.|
|key||The relative URL of the photo folder detail information.|
|guid||The unique identifier for the music artist.|
|type||The type of item represented by this |
|title||The name of the photo folder.|
|summary||A summary of the photo.|
|composite||The composite image associated with the photo folder.|
|thumb||The thumbnail for the photo folder.|
|art||The background artwork used to represent the photo folder.|
|addedAt||The date and time the photo folder was added to the library.|
|updatedAt||The date and time the photo folder was updated in the library.|
Get the list of all photo folders from the library associated with ID 1 on the Plex Media Server located at the IP address of 192.168.1.4: