> For the complete documentation index, see [llms.txt](https://docs.mediamelon.com/mediamelon/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mediamelon.com/mediamelon/smartsight-apis/alerts.md).

# Alerts

This guide will help you fetch metrics and dimensions used to compile Smartsight Alerts dashboard. &#x20;

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

Returns the AI alerts.&#x20;

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

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

{% endcode %}

{% 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></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
[
    {
        "timestamp": 1727769181,
        "alertname": "BUFFERINGRATIO3",
        "qoename": "Buffering Ratio",
        "email_address": "vinayakd@mediamelon.com",
        "total_anomalies": 1,
        "starttime": 1727725976,
        "endtime": 1727769176,
        "totalsession": 300716,
        "totalaffectedsession": 7179,
        "anomalydate": "01-10-2024",
        "totalpages": 310
    },
    .
    ..
    ...
    ....
    .....
    {
        "timestamp": 1730233480,
        "alertname": "FATALERROR4",
        "qoename": "Fatal Errors",
        "email_address": "vinayakd@mediamelon.com",
        "total_anomalies": 1,
        "starttime": 1730190279,
        "endtime": 1730233479,
        "totalsession": 145606,
        "totalaffectedsession": 2328,
        "anomalydate": "29-10-2024",
        "totalpages": 310
    }
]
```

{% endcode %}

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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/alerts.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.
