Get a Single Device

This API command is used to get information about a single device that has been authorized to access the Plex server.

While a device can be removed from the authorized device list, the information about the device is still kept within the Plex database, and can be retrieved using this API command.

URL

GET http://{ip_address}:32400/devices/{id}?X-Plex-Token={plex_token}

Parameters

NameDescription
ip_addressThe IP address of the Plex Media server.
plex_tokenThe Plex token.
idThe key associated with a device. This key can be found by calling the Devices API command and looking for the device.

Return Status

HTTP CodeDescription
200Success - The request was successful.
401Unauthorized - The Plex token provided was not valid.

Response

XML string value that lists the device that has accessed the Plex server. An example of the XML returned from the request is shown below:

<?xml version="1.0" encoding="UTF-8"?>
<MediaContainer size="1" identifier="com.plexapp.system.devices">
    <Device id="7" name="Plex Web (Firefox)" platform="" clientIdentifier="63tn6wik38f" createdAt="1456185758" />
</MediaContainer>

Remarks

The XML returned provides a list of the devices that have accessed the Plex server. The root is the MediaContainer element. This element contains a few attributes that provide overall information about the devices that have accessed the server.

MediaContainer Attributes for Plex Devices
AttributeDescription
sizeThe number of devices returned by the command.
identifierThe identifier for this type of item in Plex.

Within the MediaContainer is one Device child elements the represents the device that has accessed the Plex server.

Device Attributes
AttributeDescription
idThe unique integer value used to identify the device.
nameThe name of the device.
platformThe platform of the device.
clientIdentifierThe identifier for this type of device in Plex.
createdAtThe date and time the device was created on the Plex server. This would represent the first time the device accessed the server.

As mentioned earlier, the information about the device that has previously accessed the Plex server. If the device was removed from the server's authorized devices, information about the device can still be returned by this API command.

Examples

curl -X GET http://{ip_address}:32400/devices/{id}?X-Plex-Token={plex_token}
import requests
plex_url = http://{ip_address}:32400/devices/{id}?X-Plex-Token={plex_token}
response = requests.get(plex_url)
print(response.text)
$response = Invoke-RestMethod 'http://{ip_address}:32400/devices/{id}?X-Plex-Token={plex_token}' -Method 'GET'
Write-Output $response
Subscribe
Display