Statistics
Get Bandwidth Statistics
Server
Media
Butler
Plex
Library
- GETGet Hash Value
- GETGet Recently Added
- GETGet All Libraries
- GETGet library details
- DELDelete library section
- GETGet library items
- GETGet all media of library
- GETRefresh Metadata Of The Library
- GETSearch library
- GETGet Genres of library media
- GETGet Countries of library media
- GETGet Actors of library media
- GETSearch All Libraries
- GETGet Media Metadata
- GETGet Items Children
- GETGet Top Watched Content
- GETGet On Deck
Watchlist
Playlists
Authentication
Sessions
Statistics
Get Bandwidth Statistics
This will return the bandwidth statistics for the server
GET
/
statistics
/
bandwidth
using LukeHagar.PlexAPI.SDK;
using LukeHagar.PlexAPI.SDK.Models.Components;
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
var res = await sdk.Statistics.GetBandwidthStatisticsAsync(timespan: 4);
// handle response
{
"MediaContainer": {
"size": 5497,
"Device": [
{
"id": 208,
"name": "Roku Express",
"platform": "Roku",
"clientIdentifier": "793095d235660625108ef785cc7646e9",
"createdAt": 1706470556
}
],
"Account": [
{
"id": 238960586,
"key": "/accounts/238960586",
"name": "Diane",
"defaultAudioLanguage": "en",
"autoSelectAudio": true,
"defaultSubtitleLanguage": "en",
"subtitleMode": 1,
"thumb": "https://plex.tv/users/50d83634246da1de/avatar?c=1707110967"
}
],
"StatisticsBandwidth": [
{
"accountID": 238960586,
"deviceID": 208,
"timespan": 6,
"at": 1718387650,
"lan": true,
"bytes": 22
}
]
}
}
Authorizations
Plex Authentication Token
Query Parameters
The timespan to retrieve statistics for the exact meaning of this parameter is not known
Response
200
application/json
Bandwidth Statistics
Example:
5497
Example:
208
Example:
"Roku Express"
Example:
"Roku"
Example:
"793095d235660625108ef785cc7646e9"
Example:
1706470556
Example:
238960586
Example:
"/accounts/238960586"
Example:
"Diane"
Example:
"en"
Example:
true
Example:
"en"
Example:
1
Example:
"https://plex.tv/users/50d83634246da1de/avatar?c=1707110967"
Example:
238960586
Example:
208
Example:
6
Example:
1718387650
Example:
true
Example:
22
using LukeHagar.PlexAPI.SDK;
using LukeHagar.PlexAPI.SDK.Models.Components;
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
var res = await sdk.Statistics.GetBandwidthStatisticsAsync(timespan: 4);
// handle response
{
"MediaContainer": {
"size": 5497,
"Device": [
{
"id": 208,
"name": "Roku Express",
"platform": "Roku",
"clientIdentifier": "793095d235660625108ef785cc7646e9",
"createdAt": 1706470556
}
],
"Account": [
{
"id": 238960586,
"key": "/accounts/238960586",
"name": "Diane",
"defaultAudioLanguage": "en",
"autoSelectAudio": true,
"defaultSubtitleLanguage": "en",
"subtitleMode": 1,
"thumb": "https://plex.tv/users/50d83634246da1de/avatar?c=1707110967"
}
],
"StatisticsBandwidth": [
{
"accountID": 238960586,
"deviceID": 208,
"timespan": 6,
"at": 1718387650,
"lan": true,
"bytes": 22
}
]
}
}