# Video Experience

This guide will help you fetch metrics and dimensions used to compile Smartsight Video Experience dashboards.

### Number of plays <mark style="color:green;">GET</mark> <a href="#plays" id="plays"></a>

Returns total number of video plays happened within the specified timeframe

<pre class="language-bash" data-overflow="wrap" data-line-numbers><code class="lang-bash">curl 'https://smartsight3.mediamelon.com/mm-apis/metricquery/&#x3C;customer-id>?planlevel=&#x3C;level>&#x26;period=start=1729666800,end=1730271600&#x26;metrics=viewercount'
<strong>-x GET --header 'Authorization: Bearer &#x3C;access_token>'
</strong></code></pre>

{% hint style="info" %}
If you run this request yourself it will not work, you should replace the \<access\_token> in this example with your own Keycloak access\_token you get by running [Fetch Auth Token](https://docs.mediamelon.com/mediamelon/smartsight-apis/accessing-the-api#auth-token)
{% endhint %}

#### Required request path parameters

<table data-view="cards"><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><code>customer-id</code> string</td><td>A path parameter in form of a string. This is the unique identifier and you will be able to find this Id on your user profile page.</td><td></td></tr></tbody></table>

#### Required request query parameters

<table data-view="cards"><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><code>planlevel</code>string</td><td>A query parameter in form of a string. This is the plan identifier number associated with CustomerID and you will be able to find this plan level using https://smartsight.mediamelon.com/planLevelByCustId/&#x3C;customer-id></td><td></td></tr><tr><td><code>period</code> string</td><td>A query parameter in comma-separated string format. It needs to in the format of start date and end date (eg: start=1729666800,end=1730271600) in epoch time. For reference, use this <a href="https://www.epochconverter.com/">Epoch Time converter</a></td><td></td></tr><tr><td><code>metrics</code>string</td><td>A query parameter<code>metrics=viewercount</code> in string format. The request can also be made with comma-separated format to retrieve combinations of metrics.</td><td></td></tr></tbody></table>

#### Response

<details>

<summary><mark style="color:green;">GET</mark> <mark style="background-color:green;">200</mark></summary>

{% code overflow="wrap" lineNumbers="true" %}

```json
{
    "totalcount": 1,
    "pagecount": 1,
    "totalrecords": 1,
    "response": [
        {
            "viewercount": 5029111,
            "totalpages": 1
        }
    ]
}
```

{% endcode %}

</details>

***

### Number of attempts <mark style="color:green;">GET</mark> <a href="#attempts" id="attempts"></a>

Returns total number of attempts on all platforms within the specified timeframe.

{% code overflow="wrap" lineNumbers="true" %}

```bash
curl 'https://smartsight3.mediamelon.com/mm-apis/metricquery/<customer-id>?planlevel=<level>&period=start=1729666800,end=1730271600&metrics=attempts'
-x GET --header 'Authorization: Bearer <access_token>'
```

{% endcode %}

#### Required request path parameters

<table data-view="cards"><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><code>customer-id</code> string</td><td>A path parameter in form of a string. This is the unique identifier and you will be able to find this Id on your user profile page.</td><td></td></tr></tbody></table>

#### Required request query parameters

<table data-view="cards"><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><code>planlevel</code>string</td><td>A query parameter in form of a string. This is the plan identifier number associated with CustomerID and you will be able to find this plan level using https://smartsight.mediamelon.com/planLevelByCustId/&#x3C;customer-id></td><td></td></tr><tr><td><code>period</code> string</td><td>A query parameter in comma-separated string format. It needs to in the format of start date and end date (eg: start=1729666800,end=1730271600) in epoch time. For reference, use this <a href="https://www.epochconverter.com/">Epoch Time converter</a></td><td></td></tr><tr><td><code>metrics</code>string</td><td>A query parameter <code>metrics=attempts</code> string format. The request can also be made with comma-separated format to retrieve combinations of metrics.</td><td></td></tr></tbody></table>

#### Response

<details>

<summary><mark style="color:green;">GET</mark> <mark style="background-color:green;">200</mark></summary>

{% code overflow="wrap" lineNumbers="true" %}

```json
{
    "totalcount": 1,
    "pagecount": 1,
    "totalrecords": 1,
    "response": [
        {
            "attempts": 5029111,
            "totalpages": 1
        }
    ]
}
```

{% endcode %}

</details>

***

### Number of concurrent sessions <mark style="color:green;">GET</mark> <a href="#attempts" id="attempts"></a>

Returns total number of concurrent sessions on all platforms within the specified timeframe.

{% code overflow="wrap" lineNumbers="true" %}

```bash
curl 'https://smartsight3.mediamelon.com/mm-apis/metricquery/<customer-id>?planlevel=<level>&period=start=1729666800,end=1730271600&metrics=concurviewavg'
-x GET --header 'Authorization: Bearer <access_token>'
```

{% endcode %}

#### Required request path parameters

<table data-view="cards"><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><code>customer-id</code> string</td><td>A path parameter in form of a string. This is the unique identifier and you will be able to find this Id on your user profile page.</td><td></td></tr></tbody></table>

#### Required request query parameters

<table data-view="cards"><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><code>planlevel</code>string</td><td>A query parameter in form of a string. This is the plan identifier number associated with CustomerID and you will be able to find this plan level using https://smartsight.mediamelon.com/planLevelByCustId/&#x3C;customer-id></td><td></td></tr><tr><td><code>period</code> string</td><td>A query parameter in comma-separated string format. It needs to in the format of start date and end date (eg: start=1729666800,end=1730271600) in epoch time. For reference, use this <a href="https://www.epochconverter.com/">Epoch Time converter</a></td><td></td></tr><tr><td><code>metrics</code>string</td><td>A query parameter <code>metrics=concurrentviewavg</code> in string format. The request can also be made with comma-separated format to retrieve combinations of metrics.</td><td></td></tr></tbody></table>

#### Response

<details>

<summary><mark style="color:green;">GET</mark> <mark style="background-color:green;">200</mark></summary>

{% code overflow="wrap" lineNumbers="true" %}

```json
{
    "totalcount": 1,
    "pagecount": 1,
    "totalrecords": 1,
    "response": [
        {
            "concurviewavg": 52911,
            "totalpages": 1
        }
    ]
}
```

{% endcode %}

</details>

***

### Number of ended plays <mark style="color:green;">GET</mark> <a href="#attempts" id="attempts"></a>

Returns total number of endplays on all platforms within the specified timeframe.

{% code overflow="wrap" lineNumbers="true" %}

```bash
curl 'https://smartsight3.mediamelon.com/mm-apis/metricquery/<customer-id>?planlevel=<level>&period=start=1729666800,end=1730271600&metrics=endedplays'
-x GET --header 'Authorization: Bearer <access_token>'
```

{% endcode %}

#### Required request path parameters

<table data-view="cards"><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><code>customer-id</code> string</td><td>A path parameter in form of a string. This is the unique identifier and you will be able to find this Id on your user profile page.</td><td></td></tr></tbody></table>

#### Required request query parameters

<table data-view="cards"><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><code>planlevel</code>string</td><td>A query parameter in form of a string. This is the plan identifier number associated with CustomerID and you will be able to find this plan level using https://smartsight.mediamelon.com/planLevelByCustId/&#x3C;customer-id></td><td></td></tr><tr><td><code>period</code> string</td><td>A query parameter in comma-separated string format. It needs to in the format of start date and end date (eg: start=1729666800,end=1730271600) in epoch time. For reference, use this <a href="https://www.epochconverter.com/">Epoch Time converter</a></td><td></td></tr><tr><td><code>metrics</code>string</td><td>A query parameter <code>metrics=endedplays</code> in string format. The request can also be made with comma-separated format to retrieve combinations of metrics.</td><td></td></tr></tbody></table>

#### Response

<details>

<summary><mark style="color:green;">GET</mark> <mark style="background-color:green;">200</mark></summary>

{% code overflow="wrap" lineNumbers="true" %}

```json
{
    "totalcount": 1,
    "pagecount": 1,
    "totalrecords": 1,
    "response": [
        {
            "endedplays": 5440,
            "totalpages": 1
        }
    ]
}
```

{% endcode %}

</details>

***

### Number of fatal errors <mark style="color:green;">GET</mark> <a href="#attempts" id="attempts"></a>

Returns total number of fatal errors on all platforms within the specified timeframe.

{% code overflow="wrap" lineNumbers="true" %}

```bash
curl 'https://smartsight3.mediamelon.com/mm-apis/metricquery/<customer-id>?planlevel=<level>&period=start=1729666800,end=1730271600&metrics=errors'
-x GET --header 'Authorization: Bearer <access_token>'
```

{% endcode %}

#### Required request path parameters

<table data-view="cards"><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><code>customer-id</code> string</td><td>A path parameter in form of a string. This is the unique identifier and you will be able to find this Id on your user profile page.</td><td></td></tr></tbody></table>

#### Required request query parameters

<table data-view="cards"><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><code>planlevel</code>string</td><td>A query parameter in form of a string. This is the plan identifier number associated with CustomerID and you will be able to find this plan level using https://smartsight.mediamelon.com/planLevelByCustId/&#x3C;customer-id></td><td></td></tr><tr><td><code>period</code> string</td><td>A query parameter in comma-separated string format. It needs to in the format of start date and end date (eg: start=1729666800,end=1730271600) in epoch time. For reference, use this <a href="https://www.epochconverter.com/">Epoch Time converter</a></td><td></td></tr><tr><td><code>metrics</code>string</td><td>A query parameter <code>metrics=errors</code> in string format. The request can also be made with comma-separated format to retrieve combinations of metrics.</td><td></td></tr></tbody></table>

#### Response

<details>

<summary><mark style="color:green;">GET</mark> <mark style="background-color:green;">200</mark></summary>

{% code overflow="wrap" lineNumbers="true" %}

```json
{
    "totalcount": 1,
    "pagecount": 1,
    "totalrecords": 1,
    "response": [
        {
            "errors": 4301460,
            "totalpages": 1
        }
    ]
}
```

{% endcode %}

</details>

***

### Percentage of EBVS <mark style="color:green;">GET</mark> <a href="#attempts" id="attempts"></a>

Returns percentage of viewers did EBVS on all platforms within the specified timeframe.

{% code overflow="wrap" lineNumbers="true" %}

```bash
curl 'https://smartsight3.mediamelon.com/mm-apis/metricquery/<customer-id>?planlevel=<level>&period=start=1729666800,end=1730271600&metrics=startupabandonmentrate,viewercount'
-x GET --header 'Authorization: Bearer <access_token>'
```

{% endcode %}

#### Required request path parameters

<table data-view="cards"><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><code>customer-id</code> string</td><td>A path parameter in form of a string. This is the unique identifier and you will be able to find this Id on your user profile page.</td><td></td></tr></tbody></table>

#### Required request query parameters

<table data-view="cards"><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><code>planlevel</code>string</td><td>A query parameter in form of a string. This is the plan identifier number associated with CustomerID and you will be able to find this plan level using https://smartsight.mediamelon.com/planLevelByCustId/&#x3C;customer-id></td><td></td></tr><tr><td><code>period</code> string</td><td>A query parameter in comma-separated string format. It needs to in the format of start date and end date (eg: start=1729666800,end=1730271600) in epoch time. For reference, use this <a href="https://www.epochconverter.com/">Epoch Time converter</a></td><td></td></tr><tr><td><code>metrics</code>string</td><td>Combination of query parameters <code>metrics= startupabandonement, viewercount</code>in string format. This request needs comma-separated metrics to retrieve the rquested data.</td><td></td></tr></tbody></table>

#### Response

<details>

<summary><mark style="color:green;">GET</mark> <mark style="background-color:green;">200</mark></summary>

{% code overflow="wrap" lineNumbers="true" %}

```json
{
    "totalcount": 1,
    "pagecount": 1,
    "totalrecords": 1,
    "response": [
        {
            "startupabandonmentrate": 1.5064117092165317,
            "viewercount": 5029111,
            "attempts": 5140361,
            "failurerate": 0.6578331755298898,
            "totalpages": 1
        }
    ]
}
```

{% endcode %}

</details>

***

### Percentage of buffering ratio <mark style="color:green;">GET</mark> <a href="#attempts" id="attempts"></a>

Returns percentage of buffering ratio on all platforms within the specified timeframe.

{% code overflow="wrap" lineNumbers="true" %}

```bash
curl 'https://smartsight3.mediamelon.com/mm-apis/metricquery/<customer-id>?planlevel=<level>&period=start=1729666800,end=1730271600&metrics=bufferingratio'
-x GET --header 'Authorization: Bearer <access_token>'
```

{% endcode %}

#### Required request path parameters

<table data-view="cards"><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><code>customer-id</code> string</td><td>A path parameter in form of a string. This is the unique identifier and you will be able to find this Id on your user profile page.</td><td></td></tr></tbody></table>

#### Required request query parameters

<table data-view="cards"><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><code>planlevel</code>string</td><td>A query parameter in form of a string. This is the plan identifier number associated with CustomerID and you will be able to find this plan level using https://smartsight.mediamelon.com/planLevelByCustId/&#x3C;customer-id></td><td></td></tr><tr><td><code>period</code> string</td><td>A query parameter in comma-separated string format. It needs to in the format of start date and end date (eg: start=1729666800,end=1730271600) in epoch time. For reference, use this <a href="https://www.epochconverter.com/">Epoch Time converter</a></td><td></td></tr><tr><td><code>metrics</code>string</td><td>A query parameter <code>metrics= bufferingratio</code> string format. The request can also be made with comma-separated format to retrieve combinations of metrics.</td><td></td></tr></tbody></table>

#### Response

<details>

<summary><mark style="color:green;">GET</mark> <mark style="background-color:green;">200</mark></summary>

{% code overflow="wrap" lineNumbers="true" %}

```json
{
    "totalcount": 1,
    "pagecount": 1,
    "totalrecords": 1,
    "response": [
        {
            "bufferingratio": 0.4690097628503022,
            "playdur": 6797067654.0,
            "totalpages": 1
        }
    ]
}
```

{% endcode %}

</details>

***

### Startup Delay <mark style="color:green;">GET</mark> <a href="#attempts" id="attempts"></a>

Returns average startup delay on all platforms within the specified timeframe.

{% code overflow="wrap" lineNumbers="true" %}

```bash
curl 'https://smartsight3.mediamelon.com/mm-apis/metricquery/<customer-id>?planlevel=<level>&period=start=1729666800,end=1730271600&metrics=latency'
-x GET --header 'Authorization: Bearer <access_token>'
```

{% endcode %}

#### Required request path parameters

<table data-view="cards"><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><code>customer-id</code> string</td><td>A path parameter in form of a string. This is the unique identifier and you will be able to find this Id on your user profile page.</td><td></td></tr></tbody></table>

#### Required request query parameters

<table data-view="cards"><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><code>planlevel</code>string</td><td>A query parameter in form of a string. This is the plan identifier number associated with CustomerID and you will be able to find this plan level using https://smartsight.mediamelon.com/planLevelByCustId/&#x3C;customer-id></td><td></td></tr><tr><td><code>period</code> string</td><td>A query parameter in comma-separated string format. It needs to in the format of start date and end date (eg: start=1729666800,end=1730271600) in epoch time. For reference, use this <a href="https://www.epochconverter.com/">Epoch Time converter</a></td><td></td></tr><tr><td><code>metrics</code>string</td><td>A query parameter <code>metrics= latency</code> string format. The request can also be made with comma-separated format to retrieve combinations of metrics.</td><td></td></tr></tbody></table>

#### Response

<details>

<summary><mark style="color:green;">GET</mark> <mark style="background-color:green;">200</mark></summary>

{% code overflow="wrap" lineNumbers="true" %}

```json
{
    "totalcount": 1,
    "pagecount": 1,
    "totalrecords": 1,
    "response": [
        {
            "latency": 1.4630588827727207,
            "viewercount": 5029111,
            "totalpages": 1
        }
    ]
}
```

{% endcode %}

</details>

***

### Q Metric <mark style="color:green;">GET</mark> <a href="#attempts" id="attempts"></a>

Returns Q-metric score on all platforms within the specified timeframe.

{% code overflow="wrap" lineNumbers="true" %}

```bash
curl 'https://smartsight3.mediamelon.com/mm-apis/metricquery/<customer-id>?planlevel=<level>&period=start=1729666800,end=1730271600&
metrics=qualityofexperience,bufferingratio,latency,failurerate,playdur,cdn&
dimension=cdn&aggby=cdn&filter='
-x GET --header 'Authorization: <access_token>'
```

{% endcode %}

#### Required request path parameters

<table data-view="cards"><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><code>customer-id</code> string</td><td>A path parameter in form of a string. This is the unique identifier and you will be able to find this Id on your user profile page.</td><td></td></tr></tbody></table>

#### Required request query parameters

<table data-view="cards"><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><code>planlevel</code>string</td><td>A query parameter in form of a string. This is the plan identifier number associated with CustomerID and you will be able to find this plan level using https://smartsight.mediamelon.com/planLevelByCustId/&#x3C;customer-id></td><td></td></tr><tr><td><code>period</code> string</td><td>A query parameter in comma-separated string format. It needs to in the format of start date and end date (eg: start=1729666800,end=1730271600) in epoch time. For reference, use this <a href="https://www.epochconverter.com/">Epoch Time converter</a></td><td></td></tr><tr><td><code>metrics</code>string</td><td>Combination of query parameters <code>metrics=qualityofexperience,bufferingratio,latency,failurerate,playdur,cdn</code><br>in string format.<br>This request needs comma-separated metrics to retrieve the requested data.</td><td></td></tr><tr><td><code>dimension</code>string</td><td>A query parameter in form of a string. You can get the Q-metric data based on the dimensions mentioned in the query e.g player, cdn, platform.</td><td></td></tr><tr><td><code>aggby</code>string</td><td>A query parameter in form of a string. The requested data will aggregated by given dimension query parameter.</td><td></td></tr></tbody></table>

#### Response

<details>

<summary><mark style="color:green;">GET</mark> <mark style="background-color:green;">200</mark></summary>

{% code overflow="wrap" lineNumbers="true" %}

```json
{
    "totalcount": 40,
    "pagecount": 40,
    "totalrecords": 40,
    "response": [
        {
            "qualityofexperience": 0,
            "bufferingratio": 2.173613690151101,
            "latency": 8.986333333333333,
            "failurerate": 0.0,
            "playdur": 32958.0,
            "cdn": "",
            "viewercount": 75,
            "attempts": 87,
            "totalpages": 40
        },
        .
        ..
        ...
        ....
        {
            "qualityofexperience": 0,
            .
            .
            .        
            "viewercount": 0,
            "attempts": 26,
            "totalpages": 40
        }
    ]
}
```

{% endcode %}

</details>

***

### Percentage of CIRR <mark style="color:green;">GET</mark> <a href="#attempts" id="attempts"></a>

Returns percentage score of CIRR on all platforms within the specified timeframe.

{% code overflow="wrap" lineNumbers="true" %}

```bash
curl 'https://smartsight3.mediamelon.com/mm-apis/metricquery/<customer-id>?planlevel=<level>&period=start=1729666800,end=1730271600&
metrics=sumbuffwaitcirr'
-x GET --header 'Authorization: Bearer <access_token>'
```

{% endcode %}

#### Required request path parameters

<table data-view="cards"><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><code>customer-id</code> string</td><td>A path parameter in form of a string. This is the unique identifier and you will be able to find this Id on your user profile page.</td><td></td></tr></tbody></table>

#### Required request query parameters

<table data-view="cards"><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><code>planlevel</code>string</td><td>A query parameter in form of a string. This is the plan identifier number associated with CustomerID and you will be able to find this plan level using https://smartsight.mediamelon.com/planLevelByCustId/&#x3C;customer-id></td><td></td></tr><tr><td><code>period</code> string</td><td>A query parameter in comma-separated string format. It needs to in the format of start date and end date (eg: start=1729666800,end=1730271600) in epoch time. For reference, use this <a href="https://www.epochconverter.com/">Epoch Time converter</a></td><td></td></tr><tr><td><code>metrics</code>string</td><td>A query parameter <code>metrics= sumbuffwaitcirr</code> string format. The request can also be made with comma-separated format to retrieve combinations of metrics.</td><td></td></tr></tbody></table>

#### Response

<details>

<summary><mark style="color:green;">GET</mark> <mark style="background-color:green;">200</mark></summary>

{% code overflow="wrap" lineNumbers="true" %}

```json
{
    "totalcount": 1,
    "pagecount": 1,
    "totalrecords": 1,
    "response": [
        {
            "sumbuffwaitcirr": 0.27824154511000987,
            "playdur": 3949121578.0,
            "totalpages": 1
        }
    ]
}
```

{% endcode %}

</details>

***

### Percentage of VRT <mark style="color:green;">GET</mark> <a href="#attempts" id="attempts"></a>

Returns percentage score of VRT on all platforms within the specified timeframe.

{% code overflow="wrap" lineNumbers="true" %}

```bash
curl 'https://smartsight3.mediamelon.com/mm-apis/metricquery/<customer-id>?planlevel=<level>&period=start=1729666800,end=1730271600&
metrics=vrtbufferingratio'
-x GET --header 'Authorization: Bearer <access_token>'
```

{% endcode %}

#### Required request path parameters

<table data-view="cards"><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><code>customer-id</code> string</td><td>A path parameter in form of a string. This is the unique identifier and you will be able to find this Id on your user profile page.</td><td></td></tr></tbody></table>

#### Required request query parameters

<table data-view="cards"><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><code>planlevel</code>string</td><td>A query parameter in form of a string. This is the plan identifier number associated with CustomerID and you will be able to find this plan level using https://smartsight.mediamelon.com/planLevelByCustId/&#x3C;customer-id></td><td></td></tr><tr><td><code>period</code> string</td><td>A query parameter in comma-separated string format. It needs to in the format of start date and end date (eg: start=1729666800,end=1730271600) in epoch time. For reference, use this <a href="https://www.epochconverter.com/">Epoch Time converter</a></td><td></td></tr><tr><td><code>metrics</code>string</td><td>A query parameter <code>metrics= sumbuffwaitvrt</code> string format. The request can also be made with comma-separated format to retrieve combinations of metrics.</td><td></td></tr></tbody></table>

#### Response

<details>

<summary><mark style="color:green;">GET</mark> <mark style="background-color:green;">200</mark></summary>

{% code overflow="wrap" lineNumbers="true" %}

```json
{
    "totalcount": 1,
    "pagecount": 1,
    "totalrecords": 1,
    "response": [
        {
            "vrtbufferingratio": 0.21285364991616879,
            "playdur": 3949121578.0,
            "totalpages": 1
        }
    ]
}
```

{% endcode %}

</details>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.mediamelon.com/mediamelon/smartsight-apis/accessing-the-api/video-experience.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
