(statistics)
API Calls that perform operations with Plex Media Server Statistics
- get_statistics - Get Media Statistics
This will return the media statistics for the server
import plex_api
s = plex_api.PlexAPI(
access_token="<YOUR_API_KEY_HERE>",
x_plex_client_identifier='Postman',
)
res = s.statistics.get_statistics(timespan=4)
if res.object is not None:
# handle response
pass
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
timespan |
Optional[int] | ➖ | The timespan to retrieve statistics for the exact meaning of this parameter is not known |
4 |
operations.GetStatisticsResponse
Error Object | Status Code | Content Type |
---|---|---|
errors.GetStatisticsResponseBody | 401 | application/json |
errors.SDKError | 4xx-5xx | / |