Update alert types

PUT /api/alert_types

Allows editing the definition of multiple alert types at once. Only available to Garmat administrators.

Body

The parameters to define alert types

  • Map with the params for the different alert types

    Additional properties are allowed.

    Hide alert_types attribute Show alert_types attribute object
    • type_id object

      Latest update for booth

      Additional properties are allowed.

      Hide type_id attributes Show type_id attributes object

Responses

  • OK

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

      List of alert types

      Hide data attributes Show data attributes object
      • base_tag string

        The name of the tag emitted by the PLC to watch for changes on.

      • A second conditioner used in different ways depending on the alert type.

      • A secondary tag to use in different ways depending on the alert type.

      • id string

        The id of the alert type.

      • name string

        The human readable name given to the alert.

      • A threshold used in different ways depending on the alert type.

      • type string

        The kind of alert type. time | tag | tag_threshold | value_threshold.

  • Unauthorized

    Hide response attribute Show response attribute object
    • error string

      Human readable version of the error status code

PUT /api/alert_types
curl \
 -X PUT http://localhost:4000/api/alert_types \
 -d '{"alert_types":{"57df5898-0c40-4176-9dd4-e0c96c6c810e":{"threshold":3,"condition_over":5}}}'
Request examples
{
  "alert_types": {
    "57df5898-0c40-4176-9dd4-e0c96c6c810e": {
      "threshold": 3,
      "condition_over": 5
    }
  }
}
Response examples (200)
{
  "data": [
    {
      "id": "57df5898-0c40-4176-9dd4-e0c96c6c810e",
      "name": "Flame Guard Alarm",
      "type": "time",
      "base_tag": "FlameGuardAlarm_count",
      "extra_tag": "i_xFlameAlarm",
      "threshold": 5,
      "condition_over": 5
    }
  ]
}
Response examples (401)
{
  "error": "Error Reason"
}
Response examples (401)
{
  "error": "Error Reason"
}