Inquire Device Historical Command
Request Method: GET
URL:http://api.heclouds.com/cmds/history/device_id
device_id: need to be replaced with device ID
URL Parameter
Parameter Name |
Format |
Required |
Description |
start |
date |
yes |
start time of query, format example: 2015-01-10T08:00:35 |
end |
date |
no |
end time of query, format example: 2015-01-10T08:00:35 |
page |
int |
no |
specify page number |
per_page |
int |
no |
specify number of output device per page, default to 30, up to 100 |
HTTP Request Return Parameter
Parameter Name |
Format |
Description |
errno |
int |
code for call error , 0 indicates call is successful |
error |
string |
error description, "succ" indicates call is successful |
data |
json |
device related information returned after successful interface call, see data description table |
data Description Table
Parameter Name |
Format |
Description |
page |
int |
current page number |
per_page |
int |
current total amount of per page |
total_count |
int |
total number |
items |
array-json |
device history command related information, see items description table |
items Description Table
Parameter Name |
Format |
Description |
cmd_uuid |
string |
command ID |
device_id |
string |
device ID |
expire_time |
date |
deadline |
status |
int |
command status |
send_time |
date |
sending time |
confirm_time |
date |
response time |
confirm_body |
string |
response content, hexadecimal character |
body |
string |
requesting content, hexadecimal character |
Example of Request
GET http://api.heclouds.com/cmds/history/3****78?start=2015-01-10T08:00:35 HTTP/1.1
Example of Return
{
"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"
},{...}
]
}
}