Get collection metadata by URL as XML?

Hi, I’m using Plex Exporter in an enhanced version (by myself) to offer my Plex Server metadata to my kids (living apart from myself). By retrieving XML files from the Plex Server, the data is prepared and displayed and also written to a CSV file.

This works quite well for movies, shows, seasons and episodes.
For example the link for a movie XML is http://localhost:32400/library/metadata/86165 (the required token is not displayed here).

I’m wondering if there is a XML-URL for Collections as well? Thanks for any hints.

A great resource here is the Python PlexAPI library.

Collection plexapi.collection — Python PlexAPI documentation

You can view the source for all methods, including the Plex API URLs that are called.

Thanks for the link. It seem that there is no dedicated Plex API link to get the Collections information. But that’s no problem. The Plex Exporter anyway loops over all movies. And the movie-XML contains the Collection informations for this one movie. So I just have to build required structures by myself.

It’s the same URL, just with the collection’s ratingKey.

From where do I get the collection’s ratingKey?
A movie’s (which is contained in a collection) XML only includes this line:

<Collection id="22316" filter="collection=22316" tag="<collection name>" />

This id gives me a 404 Not Found if I use the URL from my first post and replace 86165 with 22316.

Found a solution :grinning:

http://<host>:32400/library/sections/1/collection/?X-Plex-Token=<token>

gives me a nice list of all collections in section 1.

http://<host>:32400/library/sections/1/collection/<id>?X-Plex-Token=<token>

gives me all details of collection <id> (which is the same as from my previous post)

Now the question for potential future problems I might have:
Where would I have found a documentation of this URL’s?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.