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

The response is of type object[].