Plex status/session

http://{ip_address}:32400/status/sessions?X-Plex-Token={plex_token}

The above command is supposed to return data similar to the data below. When
I issue that command I always get this result
[edit] not sure how to properly post this data the \ character seems to work

<MediaContainer size="0"> </MediaContainer>

I’ve tried every token listed in the device.xml output. What am I doing wrong.

<?xml version="1.0" encoding="UTF-8"?>
<MediaContainer size="1">
    <Video addedAt="1667839612" art="/library/metadata/286254/art/1667839616" createdAtAccuracy="epoch,local" createdAtTZOffset="0" duration="734166" guid="com.plexapp.agents.none://dcb84084c59465d53f8698a7c75a343a00d1b00f?lang=xn" key="/library/metadata/286254" librarySectionID="14" librarySectionKey="/library/sections/14" librarySectionTitle="Other videos" originallyAvailableAt="2022-11-07" ratingKey="286254" sessionKey="2" skipCount="4" subtype="clip" thumb="/library/metadata/286254/thumb/1667839616" title="tos-1720x720-cfg01" type="movie" updatedAt="1667839616" viewOffset="0" year="2022">
        <Media id="350106" videoProfile="main" audioChannels="2" audioCodec="aac" container="mp4" duration="734166" height="720" optimizedForStreaming="1" protocol="dash" videoCodec="h264" videoFrameRate="24p" videoResolution="720p" width="1720" selected="1">
            <Part id="350466" videoProfile="main" container="mp4" duration="734166" height="720" optimizedForStreaming="1" protocol="dash" width="1720" decision="transcode" selected="1">
               <Stream bitrate="2147483647" codec="h264" default="1" displayTitle="720p (HEVC Main)" extendedDisplayTitle="720p (HEVC Main)" frameRate="24" height="720" id="273542" language="English" languageCode="eng" languageTag="en" streamType="1" width="1720" decision="transcode" location="segments-video" />
                <Stream bitrate="256" bitrateMode="cbr" channels="2" codec="aac" default="1" displayTitle="English (AC3 5.1)" extendedDisplayTitle="English (AC3 5.1)" id="273543" language="English" languageCode="eng" languageTag="en" selected="1" streamType="2" decision="transcode" location="segments-audio" />
            </Part>
        </Media>
        <User id="1" thumb="https://plex.tv/users/64045869dc35e78e/avatar?c=1661361687" title="APlexUser" />
        <Player address="127.0.0.1" device="Windows" machineIdentifier="k5y3j33nmvjvd0uhvnd9zi2x" model="bundled" platform="Firefox" platformVersion="108.0" product="Plex Web" profile="Firefox" state="playing" title="Firefox" version="4.87.2" local="1" relayed="0" secure="1" userID="1" />
        <Session id="rxiscwekkvkpukgi3pm9nklp" bandwidth="10000000" location="lan" />
        <TranscodeSession key="/transcode/sessions/rl42k5xbxdly8rld3itfqq4f" throttled="0" complete="0" progress="5.3000001907348633" size="-22" speed="6.9000000953674316" error="0" duration="734167" remaining="93" context="streaming" sourceVideoCodec="hevc" sourceAudioCodec="ac3" videoDecision="transcode" audioDecision="transcode" protocol="dash" container="mp4" videoCodec="h264" audioCodec="aac" audioChannels="2" transcodeHwRequested="1" transcodeHwEncoding="mf" transcodeHwEncodingTitle="Windows (Media Foundation)" timeStamp="1671053495.3404744" maxOffsetAvailable="39.018666666666668" minOffsetAvailable="0" />
   </Video>
</MediaContainer>

Mod-Edit: added code tags

A playback from your server needs to be in progress while you fetch this page. Otherwise you will always only see the first response above.

The activity icon is circling when plex is recording. Are you saying that there is no way to determine that plex is recording something?

This API call is only designed to list playback sessions.
I am not sure if there is one for ongoing recordings.
There might be one, but I don’t know what it is. You might be able to glean it from the developer console of your web browser while a recording is being indicated in the web app.

I found a way around the issue. Use the activities api and search the returned information for “Recording” If “Recording” found don’t shutdown the computer.

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