Get Server List

This API command is used to get all the servers that are found on the local network. All servers, regardless if the token used has access to the server, will be returned in the list.

URL

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

Parameters

NameDescription
ip_addressThe IP address of the Plex Media server.
plex_tokenThe Plex token.

Return Status

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

Response

XML string value that lists all servers available. An example of the XML returned from the request is shown below:

<MediaContainer size="2">
<Server name="PlexServer" host="192.168.1.20" address="192.168.1.20" port="32400" machineIdentifier="426a344045c33cf5a6695a6b7fe6ced812ba41b5" version="1.30.2.6563-3d4dc0cce" />
<Server name="PlexServer2" host="192.168.1.30" address="192.168.1.30" port="32400" machineIdentifier="4b556027a56abd6dcdf72484464db7467d837430" version="1.40.1.8227-c0dd5a73e" />
</MediaContainer>

The XML returned contains a root MediaContainer element. This element contains only a size attribute that indicates the total number of servers in the list.

MediaContainer Attributes
AttributeDescription
sizeThe number of servers.

Within the MediaContainer element there are multiple additional child elements that provide more details about each server. These child elements are listed using multiple Server elements.

Server Attributes
AttributeDescription
nameThe name of the server.
hostThe host name of the server. If there is no host name associated with the server then the IP address is displayed.
addressThe IP address of the server.
portThe Plex Media Server port.
machineIdentifierUnique identifier for the server.
versionThe version of Plex Media Server that is installed.

Remarks

As mentioned above, servers that the token used in this command can't access will be returned in the response.

Examples

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