查询设备操作日志
# 查询设备操作日志
# 基本信息
API Path /giot/v2/devices/command/command-logs/{deviceId}
请求协议 HTTP
请求方法 GET
Query参数:
| 参数名 | 说明 | 必填 | 类型 | 限制 | 示例 |
|---|---|---|---|---|---|
| productCode | 产品code | 是 | [string] | ||
| pageSize | 每页多少条数据,默认20 | 否 | [int] | ||
| pageNo | 查询第几页数据,从1开始 | 否 | [int] |
Rest参数:
| 参数名 | 说明 | 必填 | 类型 | 值可能性 | 限制 | 示例 |
|---|---|---|---|---|---|---|
| deviceId | 设备id | 是 | [string] |
响应内容:
返回结果 Json Object
| 参数名 | 说明 | 必填 | 类型 | 值可能性 | 限制 | 示例 |
|---|---|---|---|---|---|---|
| endRow | 否 | [int] | ||||
| firstPage | 否 | [int] | ||||
| hasNextPage | 否 | [boolean] | ||||
| hasPreviousPage | 否 | [boolean] | ||||
| isFirstPage | 否 | [boolean] | ||||
| isLastPage | 否 | [boolean] | ||||
| lastPage | 否 | [int] | ||||
| list | 否 | [array] | ||||
| list>>ackTime | 应答时间 | 否 | [string] | |||
| list>>code | 命令编码 | 否 | [string] | |||
| list>>commandId | 命令id | 否 | [string] | |||
| list>>createTime | 日志记录时间 | 否 | [string] | |||
| list>>creatorId | 否 | [int] | ||||
| list>>deviceId | 设备id | 否 | [string] | |||
| list>>downTime | 下发时间 | 否 | [string] | |||
| list>>id | 消息id | 否 | [string] | |||
| list>>input | 命令输入参数 | 否 | [string] | |||
| list>>msgId | 否 | [string] | ||||
| list>>name | 命令名称 | 否 | [string] | |||
| list>>output | 命令输出参数 | 否 | [string] | |||
| list>>sourceFrom | 来源,1:mqtt,2:openapi | 否 | [int] | |||
| list>>status | 命令状态,0:处理中,1:已完成,3:超时 | 否 | [int] | |||
| navigateFirstPage | 否 | [int] | ||||
| navigateLastPage | 否 | [int] | ||||
| navigatePages | 否 | [int] | ||||
| navigatepageNums | 否 | [array] | ||||
| nextPage | 否 | [int] | ||||
| pageNum | 否 | [int] | ||||
| pageSize | 否 | [int] | ||||
| pages | 否 | [int] | ||||
| prePage | 否 | [int] | ||||
| size | 否 | [int] | ||||
| startRow | 否 | [int] | ||||
| total | 否 | [int] |
成功示例:
{
"pageNum": 1,
"pageSize": 20,
"size": 1,
"startRow": 0,
"endRow": 0,
"total": 1,
"pages": 1,
"list": [
{
"id": "87c8eed407214048b3b274ff5dfe4248", // 消息id
"deviceId": "10b7a582-fe37-47d2-a22e-2e1e6f0ff0f9", // 设备id
"name": "命令转发", // 命令名称
"code": "transmit", // 命令编码
"input": "{\"service\":\"1\",\"command\":\"2\"}", // 命令输入参数
"output": null, // 命令输出参数
"commandId": "ef24ae609daa457a8493f7248b57dff7", // 命令id
"downTime": 1631172457000, // 下发时间
"ackTime": null, // 应答时间
"creatorId": null,
"sourceFrom": 1, // 来源,1:mqtt,2:openapi
"status": 0, // 命令状态, 0:处理中,1:已完成,3:超时
"createTime": 1631172458000, // 日志记录时间
"msgId": "e14e634d-7dea-6f3e-a6cd-d4cccdbb27d3"
}
],
"prePage": 0,
"nextPage": 0,
"isFirstPage": true,
"isLastPage": true,
"hasPreviousPage": false,
"hasNextPage": false,
"navigatePages": 8,
"navigatepageNums": [
1
],
"navigateFirstPage": 1,
"navigateLastPage": 1,
"firstPage": 1,
"lastPage": 1
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
失败示例:
{
"code": 20151,
"message": "未找到指定id的设备或设备未授权",
"key": null
}
1
2
3
4
5
2
3
4
5
上次更新: 2021-12-01 16:48:01