Skip to main content

Alerts

The individual alerts behind the availability figures. You get one row per alert, with when it opened, when it closed, and how much of it fell inside the period you asked for.

/v1/availability adds up a device's outages into one percentage for the month. This endpoint lists each alert behind that figure. Both read the same records, so they always agree.

downMinutes only counts minutes inside the period: an alert that opened before the period counts only from the first minute of it, and one that has not closed counts up to the end of the period (or up to now, if the period hasn't ended yet).

An alert with no clearedAt is still open.


Alerts per device GET /v1/alerts​

Returns every alert that overlapped the period, oldest first.

Query parameters​

  • fromdate

    First day of the period, YYYY-MM-DD in Philippine time. Omit both from and to for the current calendar month.

  • todate

    Last day of the period, inclusive. The range must be 92 days or less.

  • codestring

    Restrict to one or more alert codes, e.g. reyee_device_offline. Repeat the parameter or pass a comma separated list. Multiple values mean any of them.

  • statusstring

    open for alerts that have not cleared, cleared for those that have. Omit for both.

  • deviceTypestring

    Restrict to one kind of device, e.g. Access Point, Gateway, Terminal. Matches deviceType on /v1/devices.

  • siteCodestring

    Restrict to one or more sites. Repeat the parameter or pass a comma separated list, and match is case-insensitive. Takes the same siteCode this endpoint returns, so a code read off a row can be passed straight back.

  • gatewayIdstring

    Restrict to one or more devices. Repeat the parameter or pass a comma separated list. Takes the same gatewayId this endpoint returns.

  • workspaceIdstring

    Scope to a single workspace. Must be one returned by GET /v1/workspaces. An id outside your token's set returns 403.

  • pageSizeinteger

    Rows per page, 1–5000. Defaults to 500.

  • pageTokenstring

    nextPageToken from the previous response.

Response object​

  • siteCodestring

    Site the device belongs to.

  • deviceNamestring

    Display name of the device.

  • gatewayIdstring

    Unique identifier of the device.

  • deviceTypestring

    Access Point, Gateway, Terminal, and so on.

  • alertstring

    Title of the alert, e.g. Device offline.

  • codestring

    Machine-readable kind, e.g. reyee_device_offline, terminal_offline, device_offline.

  • severitystring

    info, warning or critical.

  • raisedAtstring

    RFC3339 instant the alert opened.

  • clearedAtstring

    RFC3339 instant the alert closed, or null while it is still open.

  • downMinutesnumber

    Minutes of this alert that fell inside the window.

GET/v1/alerts
curl "https://polaris.revlv.com/v1/alerts?from=2026-04-01&to=2026-04-30&status=open" \
-H "Authorization: Bearer {token}"
Response
{
"data": [
{
"siteCode": "PH1-2026-549",
"deviceName": "AP1_Inside of Barangay Hall Office",
"gatewayId": "G1TA2FM00455A",
"deviceType": "Access Point",
"alert": "Device offline",
"code": "reyee_device_offline",
"severity": "warning",
"raisedAt": "2026-04-05T13:20:00Z",
"clearedAt": "2026-04-05T15:05:00Z",
"downMinutes": 105
},
{
"siteCode": "PH1-2026-549",
"deviceName": "AP2_Left Wing of KALIPI Association Building",
"gatewayId": "G1U0471012564",
"deviceType": "Access Point",
"alert": "Device offline",
"code": "reyee_device_offline",
"severity": "warning",
"raisedAt": "2026-04-28T02:10:00Z",
"clearedAt": null,
"downMinutes": 4190
}
],
"pageInfo": {
"hasNextPage": false,
"nextPageToken": ""
}
}