查询告警规则列表

GET /api/alarmRules

请求参数

参数名 类型 必填 描述 限制
systemUid string 产品类型,包括:"bi": "BI", "safe": "安全", "quality": "质量", "labor": "劳务", "inspection": "物料"
pageSize int 每页事件数,默认20
pageNo int 返回第几页(第一页为1)
deviceType string 设备类型
alarmLevel int 告警级别,1:严重 2:警告 3:一般
alarmTitle string 告警标题,支持模糊查询

请求样例

GET /api/alarmRules HTTP/1.1
Content-Type: application/json
Authorization: Bearer xxx.xxxx.xxx
Cache-Control: no-cache
Postman-Token: cadfb57b-9f64-3b55-f3ea-559e8051cd6a

响应样例

{
  "returnCode": 0,
  "result": {
    "totalResults": 14,
    "numResults": 2,
    "pageSize": 2,
    "pageNo": 1,
    "results": [
      {
        "createdBy": "admin@site",
        "createdTime": 1572349628848,
        "id": "5db826bca7b11b0001c9d6d4",
        "systemUid": "safe",
        "tenantId": "80a3853d-4170-4aa0-a6b4-7fa310bb8546",
        "projectId": "4ccc8854-2edc-41ad-bb1c-938d52cd853e",
        "deviceType": "WaterMeter",
        "alarmTitle": "安全规则",
        "alarmContent": "",
        "alarmCondition": "(volume>=5)&&(valveState==1)",
        "alarmLevel": 2,
        "enable": true,
        "alarmConditions": [
          {
            "code": "volume",
            "operator": ">=",
            "value": "5"
          },
          {
            "code": "valveState",
            "operator": "==",
            "value": "1"
          }
        ],
        "deleted": false
      },
      {
        "createdBy": "admin@site",
        "createdTime": 1572348835761,
        "id": "5db823a3a7b11b0001c9d6d3",
        "systemUid": "inspection",
        "tenantId": "80a3853d-4170-4aa0-a6b4-7fa310bb8546",
        "projectId": "4ccc8854-2edc-41ad-bb1c-938d52cd853e",
        "deviceType": "WeighbridgeEquipment",
        "alarmTitle": "物料地磅",
        "alarmContent": "",
        "alarmCondition": "(record==10)",
        "alarmLevel": 3,
        "enable": true,
        "alarmConditions": [
          {
            "code": "record",
            "operator": "==",
            "value": "10"
          }
        ],
        "deleted": false
      }
    ]
  }
}