Get All Activities
A Plex server can have multiple activities running at different times. Activities such as scanning media, database maintenance or streaming can happen either on-demand or on a schedule.
You can view these activities in from the Plex Web app, or use this API command to request them from the server.
GET http://[IP address]:32400/activites/?X-Plex-Token=[PlexToken]
|IP address||The IP address of the Plex Media server.|
|PlexToken||The authentication Plex token.|
|200||Success - The request was successful.|
|401||Unauthorized - The Plex token provided was not valid.|
XML string value that lists all the current activites running on the server. An example of the XML returned from the request is shown below:
<?xml version="1.0" encoding="UTF-8"?> <MediaContainer size="1"> <Activity uuid="c3f190e4-eabb-4b3d-8811-b7c1f183560e" type="library.update.section" cancellable="0" userID="1" title="Scanning Photos" subtitle="4th Birthday" progress="30"> <Context librarySectionID="1" /> </Activity> </MediaContainer>
The XML returned provides a list of the all the running activities on the Plex server. The root is the
MediaContainer element. This element contains a single attribute that indicates the number of activites that are running.
|size||The number of activities.|
MediaContainer element will still be returned if no activites are running. The
size attribute will be 0, and there will be no
Activity child elements.
MediaContainer there are one or more
Activity child elements. Each
Activity element represents one running activity on the Plex server.
|uuid||Unique identifier for the activity.|
|type||The type of activity that is running.|
|cancellable||Flag indicating the activity can be cancelled.|
0 - the activity can't be cancelled, 1 - the activity can be cancelled.
|userID||The ID of the user running the activity.|
|title||The description of the activity.|
|subtitle||Additional description or the activity.|
|progress||The percentage of the activity that has completed.|
An activity can include one or more
Context child elements. These elements include additional information that is related to the activity, such as the library ID for a scan.
|librarySectionID||The identifier for the library section.|
Get the list of all activities on the Plex Media Server located at the IP address of 192.168.1.4: