查询告警记录

GET /api/alarmRecords

创建项目

请求参数

参数名 类型 必填 描述 限制
projectId string 项目唯一标识符
pageSize int 每页事件数,默认20
pageNo int 返回第几页(第一页为1)
startDate Date 事件日期起,格式为:2019-11-14T16%3A25%3A00.000%2B0800,默认两天前
endDate Date 事件日期止,格式为:2019-11-14T16%3A25%3A00.000%2B0800,默认当前时刻
deviceType string 设备类型
status int 0解除告警 1告警中
deviceId string 设备ID
alarmLevel int 告警级别,1:严重 2:警告 3:一般
alarmTitle string 告警标题,支持模糊查询

请求样例

GET /api/alarmRecords?pageSize=2&pageNo=1 HTTP/1.1
Content-Type: application/json
Authorization: Bearer xxx.xxxx.xxx
Cache-Control: no-cache
Postman-Token: 08410c55-ee2e-d3c3-9a8b-9ae49fa42c29

响应样例

{
  "returnCode": 0,
  "result": {
    "totalResults": 265,
    "numResults": 2,
    "pageSize": 2,
    "pageNo": 1,
    "results": [
      {
        "createdTime": 1572883789006,
        "id": "508c39be68fd459e9314c3fd5d038dac",
        "deviceId": "6ebfebc4-fc68-497a-8030-fa164ae4a7a2",
        "deviceName": "和风天气-CN101250101",
        "tenantId": "b0d9addd-4221-4a7e-a49f-4615891d533f",
        "projectId": "398ac9f1-bb57-4a85-ae3a-ac474bbb715c",
        "alarmRuleId": "5dad0bd0a7b11b0001bc2ee1",
        "alarmTitle": "天气预报告警",
        "alarmContent": "检测到天气报警,请注意预防",
        "alarmLevel": 1,
        "deviceType": "气象监测设备",
        "alarmTime": 1572883789006,
        "status": 1,
        "deleted": false
      },
      {
        "createdTime": 1572883189640,
        "id": "bfd8705b7eae415793e6623eddb9950a",
        "deviceId": "6ebfebc4-fc68-497a-8030-fa164ae4a7a2",
        "deviceName": "和风天气-CN101250101",
        "tenantId": "b0d9addd-4221-4a7e-a49f-4615891d533f",
        "projectId": "398ac9f1-bb57-4a85-ae3a-ac474bbb715c",
        "alarmRuleId": "5dad0bd0a7b11b0001bc2ee1",
        "alarmTitle": "天气预报告警",
        "alarmContent": "检测到天气报警,请注意预防",
        "alarmLevel": 1,
        "deviceType": "气象监测设备",
        "alarmTime": 1572883189640,
        "status": 1,
        "deleted": false
      }
    ]
  }
}