---
updatedAt: 2025-12-30T22:20:16.000Z
agentTools:
  projectIndex: https://docs.uplynk.com/llms.txt
---

# Get Premium Zones Manifest Errors

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:

<Table align={["left","left","left","left"]}>
  <thead>
    <tr>
      <th>
        Parameter
      </th>

      <th>
        Data Type
      </th>

      <th>
        Description
      </th>

      <th>
        Required
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        period
      </td>

      <td>
        Integer
      </td>

      <td>
        Aggregates the data over a defined time interval in seconds, simplifying analysis by grouping data points within consistent time windows.

        * _Accepted Values:_* 10, 20, 30, 40, 50, 60, 120
      </td>

      <td>
        Optional; default is None.
      </td>
    </tr>

    <tr>
      <td>
        start
      </td>

      <td>
        String
      </td>

      <td>
        Indicates the date and time (UTC) at which the statistics start period should begin.<br /><br />**Syntax:** `YYYY-MM-DDThh:mm:ss`<br />**Example:** `2025-02-12T15:53:00`
      </td>

      <td>
        Either `start` or `end` is required. If only `start` is passed, the system will fill the `end` based on a 5-minute block.
      </td>
    </tr>

    <tr>
      <td>
        end
      </td>

      <td>
        String
      </td>

      <td>
        Indicates the date and time (UTC) at which the statistics start period should end.<br /><br />**Syntax:** `YYYY-MM-DDThh:mm:ss`<br />**Example:** `2025-02-12T15:57:10`
      </td>

      <td>
        Either `start` or `end` is required. If only `end` is passed, the system will fill the `start` based on a 5-minute block.
      </td>
    </tr>

    <tr>
      <td>
        page
      </td>

      <td>
        Integer
      </td>

      <td>
        Page number of results to return.
      </td>

      <td>
        Optional; default is `1`.
      </td>
    </tr>

    <tr>
      <td>
        page_size
      </td>

      <td>
        Integer
      </td>

      <td>
        Number of items returned per page.
      </td>

      <td>
        Optional; default is `1000` with maximum of `5000`.
      </td>
    </tr>

    <tr>
      <td>
        force
      </td>

      <td>
        Boolean
      </td>

      <td>
        If data for a portion of the date range specified is not yet processed, `force=false` will return what is available. Otherwise, a `202` response will be returned with the current maximum timestamp available.
      </td>

      <td>
        Optional; default is`false`.
      </td>
    </tr>
  </tbody>
</Table>

## 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).

<TutorialTile
  backgroundColor="#018FF4"
  emoji="🦉"
  id="682d18228dd6230012097fad"
  link="https://docs.uplynk.com/v2.0/recipes/api-auth-for-classic-authentication-v4-apis"
  slug="api-auth-for-classic-authentication-v4-apis"
  title="API Auth for Classic Authentication (V4 APIs)"
/>

```python
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

```json
{
  "@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
}
```