---
title: "获取云端诊断日志"
method: POST
path: "/api/v1/things/device/msg/hub-log/index"
tags: ["things/device/msg", "thingsDeviceMsg"]
---

# 获取云端诊断日志

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

## Request body

- DeviceMsgHubLogIndexReq
  - `actions` string[] — 过滤操作类型 connected:上线 disconnected:下线 property:属性 event:事件 action:操作 thing:物模型提交的操作为匹配的日志
  - `content` string — 过滤内容
  - `deviceName` string — 设备名
  - `page` PageInfo
    - `orders` OrderBy[] — 排序
      - `field` string — 排序的字段名
      - `sort` integer — 排序方式：1 从小到大, 2 从大到小
    - `page` integer — 页码
    - `size` integer — 每页大小
  - `productID` string — 产品id 获取产品id下的所有设备信息
  - `requestID` string — 过滤请求ID
  - `timeEnd` string — 时间的结束(毫秒时间戳)
  - `timeStart` string — 获取时间的开始(毫秒时间戳)
  - `topics` string[] — 过滤主题

## Response `200`

A successful response.

- object
  - `code` integer
  - `data` DeviceMsgHubLogIndexResp
    - `list` DeviceMsgHubLogInfo[], required — 数据
      - `action` string, required — connected:上线 disconnected:下线 property:属性 event:事件 action:操作 thing:物模型提交的操作为匹配的日志
      - `content` string, required
      - `requestID` string, required
      - `respPayload` string, required
      - `resultCode` string, required
      - `timestamp` string, required — 发生时间戳(毫秒时间戳)
      - `topic` string, required
      - `traceID` string, required
    - `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)
