Get history of alerts

GET /api/alerts

Allows you to retrieve a list of alerts filtered by the given pagination parameters.

Query parameters

  • filter string

    criteria to filter by

  • sort string

    criteria to sort by

  • limit string

    amount of results per page to return

  • page string

    page number

  • start string

    an ISO8601 formatted date to query data from

  • end string

    an ISO8601 formatted date to query data until

Responses

  • OK

    Hide response attributes Show response attributes object
    • data array[object]

      Historic alert data

      Hide data attributes Show data attributes object
      • active boolean

        Whether the alarm is currently active or not

      • booth_id string

        The id of the booth

      • The name of the booth where the alert happened

      • The id of the facility where the alert happened

      • The name of the facility where the alert happened

      • id string

        The id of the alert itself

      • ISO8601 encoded timestamp

      • type string

        The type of alarm

      • type_id string

        The id of the type of the alert

    • limit number

      The number of items per page currently applied

    • page number

      The number of the page returned

    • pages number

      The total number of pages matching the current search

    • total number

      The total number of accounts matching the query

  • Unauthorized

    Hide response attribute Show response attribute object
    • error string

      Human readable version of the error status code

GET /api/alerts
curl \
 -X GET http://localhost:4000/api/alerts
Response examples (200)
{
  "data": [
    {
      "id": "9520347b-b633-45c9-8b28-99f1d2989301",
      "type": "FlameGuardAlarm_count",
      "active": true,
      "type_id": "039c347b-b633-45c9-8b28-99f1d2983fb5",
      "booth_id": "57df5898-0c40-4176-9dd4-e0c96c6c810e",
      "booth_name": "Test Booth",
      "facility_id": "7e3c347b-b633-45c9-8b28-99f1d2983fb4",
      "triggered_at": "2023-09-06T00:00:00Z",
      "facility_name": "Test Facility"
    }
  ],
  "limit": 42.0,
  "page": 42.0,
  "pages": 42.0,
  "total": 42.0
}
Response examples (401)
{
  "error": "Error Reason"
}
Response examples (401)
{
  "error": "Error Reason"
}