Add Alert Config

Last Updated on : 2021-12-21 02:44:30download

Add the alert configurations of a specified monitored object.

API address

POST: /v1.0/iot-03/si/alarm-config

Request parameter

Description of body

Parameter name Type IN Required Description
monitor_type String true The type of a specified metric. Valid values:
  • energy_collect: industrial energy consumption.
  • environment: industrial environment.
  • vibration: industrial vibration.
monitor_object_id String true The ID of a specified monitored object.
alarm_rules List false The collection of alert rules.
id Long false The ID of the primary key.
gmt_modified Long false The time when it is modified.

Description of alarm_rules

Parameter name Type IN Required Description
attr_code String true The code of a specified attribute.
range_rule String true The interval rules. Valid values:
  • open: (a…b)
  • closed: [a…b]
  • closedOpen: [a…b)
  • openClosed: (a…b]
  • greaterThan: (a…+∞)
  • atLeast: [a…+∞)
  • lessThan: (-∞…b)
  • atMost: (-∞…b]
  • all: (-∞…+∞)
range_value String true The interval value. Value range: -999999.99 to 999999.99.
alarm_config_id Long false The ID of a specified alert configuration.
alarm_level Integer true The level of a specified alert. Valid values:
  • 1: low-level.
  • 2: high-level.
id Long false The ID of the primary key.
gmt_modified Long false The time when it is modified.

Return parameter

Parameter name Type Description
result Boolean The returned result.

Request example

POST: /v1.0/iot-03/si/alarm-config

Return example

{ "result": true, "t": 1638239987342, "success": true }

Error code

For more information, see error code.