GET
/
resources
declare(strict_types=1);

require 'vendor/autoload.php';

use LukeHagar\Plex_API;
use LukeHagar\Plex_API\Models\Operations;

$sdk = Plex_API\PlexAPI::builder()
    ->setSecurity(
        '<YOUR_API_KEY_HERE>'
    )
    ->build();



$response = $sdk->plex->getServerResources(
    clientID: '3381b62b-9ab7-4e37-827b-203e9809eb58',
    includeHttps: Operations\IncludeHttps::Enable,
    includeRelay: Operations\IncludeRelay::Enable,
    includeIPv6: Operations\IncludeIPv6::Enable

);

if ($response->plexDevices !== null) {
    // handle response
}
[
  {
    "name": "<string>",
    "product": "<string>",
    "productVersion": "<string>",
    "platform": null,
    "platformVersion": null,
    "device": null,
    "clientIdentifier": "<string>",
    "createdAt": "2019-06-24T11:38:02Z",
    "lastSeenAt": "2019-06-24T11:38:02Z",
    "provides": "<string>",
    "ownerId": null,
    "sourceTitle": null,
    "publicAddress": "<string>",
    "accessToken": "<string>",
    "owned": true,
    "home": true,
    "synced": true,
    "relay": true,
    "presence": true,
    "httpsRequired": true,
    "publicAddressMatches": true,
    "dnsRebindingProtection": true,
    "natLoopbackSupported": true,
    "connections": [
      {
        "protocol": "http",
        "address": "<string>",
        "port": 123,
        "uri": "<string>",
        "local": true,
        "relay": true,
        "IPv6": true
      }
    ]
  }
]

Authorizations

X-Plex-Token
string
header
required

Plex Authentication Token

Headers

X-Plex-Client-Identifier
string
required

An opaque identifier unique to the client (UUID, serial number, or other unique device ID)

Query Parameters

includeHttps
enum<integer>
default:0

Include Https entries in the results

Available options:
0,
1
Example:

1

includeRelay
enum<integer>
default:0
Available options:
0,
1
Example:

1

includeIPv6
enum<integer>
default:0

Include IPv6 entries in the results

Available options:
0,
1
Example:

1

Response

200
application/json
List of Plex Devices. This includes Plex hosted servers and clients
name
string
required
product
string
required
productVersion
string
required
platform
string | null
required
platformVersion
string | null
required
device
string | null
required
clientIdentifier
string
required
createdAt
string
required

The time the device was created/registered

Example:

"2019-06-24T11:38:02Z"

lastSeenAt
string
required

The last time the device was seen

Example:

"2019-06-24T11:38:02Z"

provides
string
required
ownerId
integer | null
required

ownerId is null when the device is owned by the token used to send the request

sourceTitle
string | null
required
publicAddress
string
required
accessToken
string
required
owned
boolean
required
home
boolean
required
synced
boolean
required
relay
boolean
required
presence
boolean
required
httpsRequired
boolean
required
publicAddressMatches
boolean
required
dnsRebindingProtection
boolean
required
natLoopbackSupported
boolean
required
connections
object[]
required