---
title: "获取设备异常日志"
method: POST
path: "/api/v1/things/device/msg/abnormal-log/index"
tags: ["things/device/msg", "thingsDeviceMsg"]
---

# 获取设备异常日志

`POST /api/v1/things/device/msg/abnormal-log/index`

## Request body

- DeviceMsgAbnormalLogIndexReq
  - `action` integer — 触发1 还是解除2
  - `areaID` string — 只有管理员有权限
  - `areaIDPath` string — 只有管理员有权限
  - `areaIDs` string[] — 只有管理员有权限
  - `belongGroup` object — key是group的purpose, value是里面包含的分组id 只有partitionBy 传该参数的时候才会返回
  - `deviceName` string — 设备名
  - `page` PageInfo
    - `orders` OrderBy[] — 排序
      - `field` string — 排序的字段名
      - `sort` integer — 排序方式：1 从小到大, 2 从大到小
    - `page` integer — 页码
    - `size` integer — 每页大小
  - `productCategoryID` integer — 只有管理员有权限
  - `productID` string — 产品id
  - `projectID` string — 只有管理员有权限
  - `timeEnd` string — 时间的结束(毫秒时间戳)
  - `timeStart` string — 获取时间的开始(毫秒时间戳)
  - `type` string — 异常类型

## Response `200`

A successful response.

- object
  - `code` integer
  - `data` DeviceMsgAbnormalLogIndexResp
    - `list` DeviceMsgAbnormalLogInfo[], required — 数据
      - `action` integer — 触发1 还是解除2
      - `deviceName` string
      - `productID` string
      - `reason` string — 原因
      - `timestamp` string — 发生时间戳(毫秒时间戳)
      - `traceID` string — 服务器端事务id
      - `type` string — 异常类型
    - `page` integer — 页码
    - `pageSize` integer — 每页大小
    - `total` integer
  - `msg` string

---

[API](https://skmtc.net/unitedrhino/apis/things-api.md) · [All operations](https://skmtc.net/unitedrhino/apis/things-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/unitedrhino/things-api/versions/f3bdeb916389/schema)
