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->getMediaProviders(
xPlexToken: 'CV5xoxjTpFKUzBTShsaf'
);
if ($response->object !== null) {
// handle response
}{
"MediaContainer": {
"identifier": "<string>",
"offset": 123,
"size": 123,
"totalSize": 123,
"allowCameraUpload": true,
"allowChannelAccess": true,
"allowMediaDeletion": true,
"allowSharing": true,
"allowSync": true,
"allowTuners": true,
"backgroundProcessing": true,
"certificate": true,
"companionProxy": true,
"countryCode": "<string>",
"diagnostics": "<string>",
"eventStream": true,
"friendlyName": "<string>",
"hubSearch": true,
"itemClusters": true,
"livetv": 7,
"machineIdentifier": "<unknown>",
"mediaProviders": true,
"multiuser": true,
"musicAnalysis": 2,
"myPlex": true,
"myPlexMappingState": "<unknown>",
"myPlexSigninState": "<unknown>",
"myPlexSubscription": true,
"myPlexUsername": "<string>",
"offlineTranscode": "<unknown>",
"ownerFeatures": "<string>",
"platform": "<string>",
"platformVersion": "<string>",
"pluginHost": true,
"pushNotifications": true,
"readOnlyLibraries": true,
"streamingBrainABRVersion": 123,
"streamingBrainVersion": 123,
"sync": true,
"transcoderActiveVideoSessions": 123,
"transcoderAudio": true,
"transcoderLyrics": true,
"transcoderPhoto": true,
"transcoderSubtitles": true,
"transcoderVideo": true,
"transcoderVideoBitrates": "<unknown>",
"transcoderVideoQualities": "<string>",
"transcoderVideoResolutions": "<unknown>",
"updatedAt": 123,
"updater": true,
"version": "<string>",
"voiceSearch": true,
"Feature": [
{
"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>"
}
],
"key": "<string>",
"type": "<string>"
}
],
"protocols": "<string>",
"title": "<string>",
"types": "<string>"
}
}Get the list of all available media providers for this PMS. This will generally include the library provider and possibly EPG if DVR is set up.
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->getMediaProviders(
xPlexToken: 'CV5xoxjTpFKUzBTShsaf'
);
if ($response->object !== null) {
// handle response
}{
"MediaContainer": {
"identifier": "<string>",
"offset": 123,
"size": 123,
"totalSize": 123,
"allowCameraUpload": true,
"allowChannelAccess": true,
"allowMediaDeletion": true,
"allowSharing": true,
"allowSync": true,
"allowTuners": true,
"backgroundProcessing": true,
"certificate": true,
"companionProxy": true,
"countryCode": "<string>",
"diagnostics": "<string>",
"eventStream": true,
"friendlyName": "<string>",
"hubSearch": true,
"itemClusters": true,
"livetv": 7,
"machineIdentifier": "<unknown>",
"mediaProviders": true,
"multiuser": true,
"musicAnalysis": 2,
"myPlex": true,
"myPlexMappingState": "<unknown>",
"myPlexSigninState": "<unknown>",
"myPlexSubscription": true,
"myPlexUsername": "<string>",
"offlineTranscode": "<unknown>",
"ownerFeatures": "<string>",
"platform": "<string>",
"platformVersion": "<string>",
"pluginHost": true,
"pushNotifications": true,
"readOnlyLibraries": true,
"streamingBrainABRVersion": 123,
"streamingBrainVersion": 123,
"sync": true,
"transcoderActiveVideoSessions": 123,
"transcoderAudio": true,
"transcoderLyrics": true,
"transcoderPhoto": true,
"transcoderSubtitles": true,
"transcoderVideo": true,
"transcoderVideoBitrates": "<unknown>",
"transcoderVideoQualities": "<string>",
"transcoderVideoResolutions": "<unknown>",
"updatedAt": 123,
"updater": true,
"version": "<string>",
"voiceSearch": true,
"Feature": [
{
"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>"
}
],
"key": "<string>",
"type": "<string>"
}
],
"protocols": "<string>",
"title": "<string>",
"types": "<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
A unique identifier for the provider, e.g. com.plexapp.plugins.library.
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.
7
2
A comma-separated list of features which are enabled for the server owner
The suggested video quality bitrates to present to the user
The suggested video resolutions to the above quality bitrates
Show child attributes
Show child attributes
Show child attributes
A comma-separated list of default protocols for the provider, which can be:
stream: The provider allows streaming media directly from the provider (e.g. for Vimeo). - download: The provider allows downloading media for offline storage, sync, etc. (e.g. Podcasts). - livetv: The provider provides live content which is only available on a schedule basis.The title of the provider.
This attribute contains a comma-separated list of the media types exposed by the provider (e.g. video, audio).
Was this page helpful?