Skip to main content
GET
/
PlexPHP
declare(strict_types=1);

require 'vendor/autoload.php';

use LukeHagar\Plex_API;

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



$response = $sdk->server->getServerCapabilities(

);

if ($response->object !== null) {
    // handle response
}
{
  "MediaContainer": {
    "identifier": "<string>",
    "offset": 123,
    "size": 123,
    "totalSize": 123,
    "Directory": [
      {
        "title": "<string>",
        "type": "<string>",
        "art": "<string>",
        "content": true,
        "filter": "<string>",
        "hasPrefs": true,
        "hasStoreServices": true,
        "hubKey": "<string>",
        "identifier": "<string>",
        "key": "<string>",
        "lastAccessedAt": 123,
        "Pivot": [
          {
            "title": "<string>",
            "type": "<string>",
            "context": "<string>",
            "id": "<string>",
            "key": "<string>",
            "symbol": "<string>"
          }
        ],
        "share": 123,
        "thumb": "<string>",
        "titleBar": "<string>"
      }
    ]
  }
}

Authorizations

X-Plex-Token
string
header
required

Headers

accepts
enum<string>
default:application/xml
Available options:
application/json,
application/xml
X-Plex-Client-Identifier
string
required
Example:
X-Plex-Product
string
Example:
X-Plex-Version
string
Example:
X-Plex-Platform
string
Example:
X-Plex-Platform-Version
string
Example:
X-Plex-Device
string
Example:
X-Plex-Model
string
Example:
X-Plex-Device-Vendor
string
Example:
X-Plex-Device-Name
string
Example:
X-Plex-Marketplace
string
Example:

Response

200 - application/json
MediaContainer
object