# 查询设备历史命令
Request format: **GET**
URL:http(s)://api.heclouds.com/cmds/history/{device_id}
Note: device_id needs to be replaced with the device ID.
[I only want to see examples!!!](#1)
#### Url parameter
Parameter Name | Format | Required? | Description |
start | date | Yes | Start time of the query, format example:2019-10-10T08:00:35 |
end | date | No | The end time of the query, format example:2019-10-10T08:00:35 |
page | int | No | Specify page number |
per_page | int | No | Specify the number of output devices per page, the default is 30, and the maximum is 100 |
#### HTTP request Return Parameters
Name | Format | Description |
errno | int | Call error code, where 0 means success. |
error | string | Error description, where "succ" means success. |
data | json | Device dependent message returned after the interface is successfully invoked; see Data Description Table |
#### Data Description Table
Name | Format | Description |
page | int | Current page number |
per_page | int | Number of devices per page |
total_count | int | Total |
items | array-json | For information about device history commands, see items description table |
#### items Description Table
Name | Format | Description |
cmd_uuid | string | Command ID |
device_id | string | Device ID |
expire_time | date | Expiration |
status | int | Command status |
send_time | date | Send time |
confirm_time | date | Response time |
confirm_body | string | Response content,Hexadecimal characters |
body | string | Request content,Hexadecimal characters |
Request Example
```text
GET http://api.heclouds.com/cmds/history/3****78?start=2015-01-10T08:00:35 HTTP/1.1
```
#### Return example
```json
{
"errno": 0,
"error": "succ",
"data": {
"page": 1,
"per_page": 10,
"total_count": 100,
"items": [{
"cmd_uuid": "2302-312-21dgaapbafddfs",
"device_id": 223422,
"expire_time": "2016-07-05 00:00:00",
"send_time": "2016-07-05 00:00:00",
"confirm_time": "2016-07-05 00:00:00",
"confirm_body": "2463726571007b202274797022",
"body": " 2463726571007b202274797022"
},{
"cmd_uuid": "rezcgt2-se12-F2323Wdadfadfs",
"device_id": 223422,
"expire_time": "2016-07-05 01:01:01",
"send_time": "2016-07-05 03:01:02",
"confirm_time": "2016-07-05 02:02:02",
"confirm_body": "2463726571007b202274797022",
"body": " 2463726571007b202274797022"
},{...}
]
}
}
```
#### [< Cancel cache command](/book/application-develop/list/14cancel-cache-comm.md)
#### [Add trigger >
](/book/application-develop/list/15add-trigger.md)