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->getServerPreferences(
);
if ($response->object !== null) {
// handle response
}{
"MediaContainer": {
"identifier": "<string>",
"offset": 123,
"size": 123,
"totalSize": 123,
"Setting": [
{
"type": "bool",
"default": "<string>",
"advanced": true,
"enumValues": "<string>",
"group": "<string>",
"hidden": true,
"id": "<string>",
"label": "<string>",
"summary": "<string>",
"value": "<string>"
}
]
}
}Get the list of all preferences
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->getServerPreferences(
);
if ($response->object !== null) {
// handle response
}{
"MediaContainer": {
"identifier": "<string>",
"offset": 123,
"size": 123,
"totalSize": 123,
"Setting": [
{
"type": "bool",
"default": "<string>",
"advanced": true,
"enumValues": "<string>",
"group": "<string>",
"hidden": true,
"id": "<string>",
"label": "<string>",
"summary": "<string>",
"value": "<string>"
}
]
}
}The token which identifies the user accessing the PMS. This can be either:
JWT tokens provide better security with:
OK
MediaContainer is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the parentTitle attribute may appear on the MediaContainer rather than being repeated on each track.
Show child attributes
The offset of where this container page starts among the total objects available. Also provided in the X-Plex-Container-Start header.
The total size of objects available. Also provided in the X-Plex-Container-Total-Size header.
Show child attributes
The type of the value of this setting
bool, int, text, double The default value of this setting
Whether the setting is considered advanced and normally hidden from the user
The possible values for this setting if restricted. The list is | separated with value:name entries.
The group name of this setting to aid in display of a hierarchy
Whether the setting is hidden or not
The query parameter name for this setting
A user-friendly name for the setting
A description of the setting
The current value of this setting
Was this page helpful?