using LukeHagar.PlexAPI.SDK;
using LukeHagar.PlexAPI.SDK.Models.Components;
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
var res = await sdk.Statistics.GetResourcesStatisticsAsync(timespan: 4);
// handle response
{
"MediaContainer": {
"size": 5497,
"StatisticsResources": [
{
"timespan": 6,
"at": 1718384427,
"hostCpuUtilization": 1.276,
"processCpuUtilization": 0.025,
"hostMemoryUtilization": 17.026,
"processMemoryUtilization": 0.493
}
]
}
}
This will return the resources for the server
using LukeHagar.PlexAPI.SDK;
using LukeHagar.PlexAPI.SDK.Models.Components;
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
var res = await sdk.Statistics.GetResourcesStatisticsAsync(timespan: 4);
// handle response
{
"MediaContainer": {
"size": 5497,
"StatisticsResources": [
{
"timespan": 6,
"at": 1718384427,
"hostCpuUtilization": 1.276,
"processCpuUtilization": 0.025,
"hostMemoryUtilization": 17.026,
"processMemoryUtilization": 0.493
}
]
}
}
Plex Authentication Token
The timespan to retrieve statistics for the exact meaning of this parameter is not known
Resource Statistics
The response is of type object
.