The Premium Zones Manifest Errors API provides manifest server statistics (HTTP return codes) for a time range, including 200, 4xx, and 5xx returns. This API is meant to debug HTTP errors. This API only provides valid data when an account owner has Premium Zones enabled on their account.
Each return code with a different failure reason will have stats returned. If there is no data for say a 4xx, nothing will be returned. However, 403 errors with different failure reasons will have its own stats to help debug system issues.
Records can be requested for the past 48 hours (sliding window) with a maximum window size of five minutes.
Base URL
Use the following base URL to perform an HTTP GET:
https://services.uplynk.com/api/v4/monitoring/premium-zone/server-stats
Request Parameters
The following table details the required and optional parameters for making a request to the DRM Statistics API:
Parameter | Data Type | Description | Required |
|---|---|---|---|
period | Integer | Aggregates the data over a defined time interval in seconds, simplifying analysis by grouping data points within consistent time windows.
| Optional; default is None. |
start | String | Indicates the date and time (UTC) at which the statistics start period should begin. | Either |
end | String | Indicates the date and time (UTC) at which the statistics start period should end. | Either |
page | Integer | Page number of results to return. | Optional; default is |
page_size | Integer | Number of items returned per page. | Optional; default is |
force | Boolean | If data for a portion of the date range specified is not yet processed, | Optional; default is |
Sample Request
The code below (Python 3) shows how to retrieve Premium Zone manifest server HTTP codes with error reasons.
This code imports names from the api_auth module for V4 APIs (see below).
import json
import requests
from api_auth import APICredentials, APIParams
class PZ_ManifestErrors:
def __init__(self):
self.host = "https://services.uplynk.com"
def run(self):
"""
Get the latest manifest statistics.
"""
self._get_manifest_errors()
def _get_manifest_errors(self):
params = {
'period': 60,
'start': '2025-12-30T15:53:00',
'end': '2025-12-30T15:57:10',
'page': 1,
'page_size': 5000,
'force': False,
}
url = f"{self.host}/api/v4/monitoring/premium-zone/manifest-errors"
response = requests.get(
url, params={**params, **APIParams(APICredentials()).get_params({})}
)
if response.status_code == 200:
print(json.dumps(response.json(), indent=2)) # Pretty print JSON response
else:
print("Error:", response.status_code)
print(response.json())
if __name__ == "__main__":
PZ_ManifestErrors().run()Response Schema
The response returns manifest server HTTP response data.
| Field | Data Type | Description |
|---|---|---|
| @id | String | The request URL with query parameters included. |
| @type | String | The type of response, which is always TimeSeries. |
| start | String | The start time of the requested statistics range in YYYY-MM-DDThh:mm:ss.SSSZ format. |
| end | String | The end time of the requested statistics range in YYYY-MM-DDThh:mm:ss.SSSZ format. |
| items | Array | List of HTTP return codes and errors (schema below). |
| total_items | Integer | The total number of HTTP return codes with errors returned. |
| max_pages | Integer | Total number of pages in the API response. |
| current_page | Integer | Current page number of the API response. |
HTTP Return Codes and Errors Item Schema
| Field | Data Type | Description |
|---|---|---|
| period_timestamp | String | Timestamp for the requested period interval. |
| code | String | HTTP return code. |
| reason | String | Reason for HTTP error which is returned when code != 200. |
| num_records | String | Number of records with matching code and reason. |
Sample Response
{
"@id": "/api/v4/monitoring/premium-zone/manifest-errors?period=60&start=2025-12-30T15:53:00&end=2025-12-30T15:57:10&page=1&page_size=5000&force=False",
"@type": "TimeSeries",
"start": "2025-12-30T15:53:00.000Z",
"end": "2025-12-30T15:57:01.000Z",
"items": [
{
"period_timestamp": "2025-12-30T15:53:00+00:00",
"code": 200,
"reason": "",
"num_records": 1261
},
{
"period_timestamp": "2025-12-30T15:54:00+00:00",
"code": 200,
"reason": "",
"num_records": 1350
},
{
"period_timestamp": "2025-12-30T15:55:00+00:00",
"code": 200,
"reason": "",
"num_records": 1205
},
{
"period_timestamp": "2025-12-30T15:56:00+00:00",
"code": 200,
"reason": "",
"num_records": 1194
}
],
"total_items": 4,
"current_page": 1
}