查询告警事件

GET /api/alarmEvents

请求参数

参数名 类型 必填 描述
deviceId 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,默认当前时刻
code string 告警类型
handleResult string 告警状态 ,new:未处理,confirm:已确认,falsepositive:误报
sourceType string 告警来源类型,ai或者 sensor
level string 告警级别,CRITICAL:危重,WARN:警告,INFO:一般

请求样例

GET /api/alarmEvents?pageSize=20&pageNo=1 HTTP/1.1
Host: 60.205.223.53:8443
Content-Type: application/json
Authorization: Bearer xxx.xxxx.xxx
Cache-Control: no-cache

响应样例

{
  "returnCode": 0,
  "result": {
    "totalResults": 875399,
    "numResults": 2,
    "pageSize": 2,
    "pageNo": 1,
    "results": [
      {
        "id": "6d3004d5-59a9-4dcf-b05d-fe5475605627",
        "deviceid": "0dee7ce7-29fa-40b7-b736-82f6591791c7",
        "code": "Snapshot",
        "level": "info",
        "sourceType": "sensor",
        "source": "0dee7ce7-29fa-40b7-b736-82f6591791c7",
        "description": "",
        "origin": 1560502387,
        "createTime": 1560502388399,
        "contents": [
          {
            "path": "/data/image/analyse/0dee7ce7-29fa-40b7-b736-82f6591791c7_1560502387519.jpg"
          }
        ],
        "handleResult": "new"
      },
      {
        "id": "87ec5384-6823-4506-aa6e-60c5cfb1c752",
        "deviceid": "0dee7ce7-29fa-40b7-b736-82f6591791c7",
        "code": "Snapshot",
        "level": "info",
        "sourceType": "sensor",
        "source": "0dee7ce7-29fa-40b7-b736-82f6591791c7",
        "description": "",
        "origin": 1560502399,
        "createTime": 1560502399238,
        "contents": [
          {
            "path": "/data/image/analyse/0dee7ce7-29fa-40b7-b736-82f6591791c7_1560502398987.jpg"
          }
        ],
        "handleResult": "new"
      }
    ]
  }
}