# 查询设备历史命令 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 NameFormatRequired?Description
startdateYesStart time of the query, format example:2019-10-10T08:00:35
enddateNoThe end time of the query, format example:2019-10-10T08:00:35
pageintNoSpecify page number
per_pageintNoSpecify the number of output devices per page, the default is 30, and the maximum is 100
#### HTTP request Return Parameters
NameFormatDescription
errnointCall error code, where 0 means success.
error stringError description, where "succ" means success.
datajsonDevice dependent message returned after the interface is successfully invoked; see Data Description Table
#### Data Description Table
NameFormatDescription
pageintCurrent page number
per_pageintNumber of devices per page
total_countintTotal
itemsarray-jsonFor information about device history commands, see items description table
#### items Description Table
NameFormatDescription
cmd_uuidstringCommand ID
device_idstringDevice ID
expire_timedateExpiration
statusintCommand status
send_timedateSend time
confirm_timedateResponse time
confirm_bodystringResponse content,Hexadecimal characters
bodystringRequest 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)