Request format: GET
URL: http(s)://api.heclouds.com/nbiot/offline/history
I only want to see examples!!!
Parameter Name | Format | Required? | Description |
---|---|---|---|
imei | string | Yes | Device imei number |
start | string | Yes | Specified starting time, required |
end | string | No | Specified end time, optional |
page | int | No | Current page number |
per_page | int | No | Number of items displayed on each page |
sort | string | No | Timer sequencing mode, DESC descending order ASC ascending order, descending order by default |
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 |
Name | Format | Description |
---|---|---|
total_count | int | Number of cache command |
items | array-json | json data array of cache command; see item description list. |
Name | Format | Description |
---|---|---|
cmd_uuid | string | Cache command id |
type | string | Command type |
create_time | string | Command creation time |
valid_time | string | Command effective time |
expired_time | steing | Command expiration time |
send_time | string | Command release time |
send_status | int | Send status |
confirm_time | string | Response time |
confirm_status | string | Response status |
feedback_time | string | Feedback time |
imei | string | nbiot device identity code |
remain | int | Remaining retry times |
send_time/confirm_time possibly not existing
send_status status: 1.Command wait 2.Command cancelled 3.Command sent to device 4.Command expired 5.Command sent successfully 6.Command sent failure 8.Other undefined effors (undefined)
confirm_status status:: 0.SUCCESS (command executed sucessfully) 1.METHOD_NOT_AllOWED (operation not allowed by the object or resource) 2.FORBIDDEN (terminal unregistered) 3.NOT_FOUND (the object or resource is not found) 4.NTERNAl_SERVER_ERROR (device response code error) 5.TIME_OUT (device response timeout) 6.REQ_PARAM_ERROR (request parameter error) 7.RESP_ERROR (device response message error) 8.UNAUTHORIZED (no access right) 9.BAD_REQUEST (request format error, such as lack of parameter or code) 10.NOT_ACCEPTABlE (no preferred message format returnable) 11.UNSUPPORTED_CONTENT_FORMAT (specified message format not supported) 12.OFFlINE (device unregistered) 13.ADDR_OCCUPIED (device address occupied by other devices)
trigger_msg trigger type::
1. REGISTER 2. UPDATE 3. REGISTER | UPDATE combination 4. NOTIFY 5. REGISTER | NOTIFY combination 6. UPDATE | NOTIFY combination 7. NOTIFY | UPDATE | REGISTER combination
GET http://api.heclouds.com/nbiot/offline/history?imei=86582003***&start=2016-08-05T08:00:00&end=2016-08-06T08:00:00&page=2&per_page=10 HTTP/1.1
api-key: WhI*************v1c= //Must be MasterKey, because it involves personal privacy, use "*******" instead
{
"errno": 0,
"error": "succ",
"data":
{
"total_count": 100,
"items":
[
{
"cmd_uuid":"f6869ecb-3dc1-5374-9be0-4fb961f8af3c ",
"type":"READ",
"create_time":"2017-08-28 11:34:58",
"valid_time":"2017-08-28 11:34:58",
"expired_time":"2017-08-28 11:34:58",
"send_time":"2017-08-28 11:34:58",
"trigger_msg": 1,
"send_status": 5,// command release success
"confirm_time": "2017-08-28 11:34:58",
"confirm_status": "SUCCESS",
"feedback_time": "2019-02-28 13:50:43",
"imei":"869975031234561",
"remain":"3"//Remaining retry times
}
{…}
]
}
}