Skip to content
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.

Showing a KPI with the number of open alerts

Hector Garcia Tellado edited this page Oct 31, 2017 · 1 revision

Step 1: Get the list of alerts

Get the total count of open or acknoledged alerts, without actually fetching the alerts data, i.e. use totalcount=y and limit=0.

Request

GET {Device Telemetry endpoint}/alerts?status=!closed&limit=0&totalcount=y

Response

Content-Type: application/json; charset=utf-8

{
    Count: 0
    TotalCount: ...
    Items: []
    "$metadata": {
        $type: AlertsList;1
        $uri: ...
    }
}

Step 1: Render the KPI in the UI

Use the TotalCount property from the response to show the KPI.