Last Updated on : 2023-06-19 07:06:52
Query device event log
GET: /v1.0/iot-03/devices/{device_id}/logs
Parameter name | Type | IN | Required | Description |
---|---|---|---|---|
device_id | String | uri | true | Device ID |
event_types | String | query | true | Event types supported by log query. Multiple event types are supported, separated by commas (,) and must be transmitted. (1 online, 2 offline, 3 device activation, 4 device reset, 6 Firmware upgrade, 7 data report, 8 device semaphore, 9 device restart, 10 timing information) |
start_time | Long | query | true | The start timestamp of the query, 13 digits |
end_time | Long | query | true | The end timestamp of the query, 13 digits |
size | Integer | query | false | The size of the number of logs to be queried (the default is 20) |
query_type | Integer | query | false | Query type, the default is 1, (1 free version, 2 paid version) |
last_row_key | String | query | false | Pagination parameter, last_row_key in the return value of the previous page request, query the first page when the passed parameter is empty |
Parameter name | Type | Description |
---|---|---|
result | DeviceLogRes | Basic Pagination Information |
Description of result
Parameter name | Type | Description |
---|---|---|
last_row_key | String | The identifier of the current page, which can be used as the lastRowKey parameter value of the next page query |
device_id | String | Device id |
has_more | Boolean | Is there a next page |
total | Long | Total number of eligible data |
list | List | Data List |
Description of list
Parameter name | Type | Description |
---|---|---|
event_time | Long | Event Time |
event_from | String | The source of the event trigger: 1 device itself, 2 client instructions, 3 third-party platforms, 4 cloud instructions, -1 unknown |
event_id | Integer | Type of event: 1 online, 2 offline, 3 device activation, 4 device reset, 6 firmware upgrade, 8 device semaphore, 9 device restart, 10 timing information |
event_value | String | Event Value |
GET: /v1.0/iot-03/devices/xxxxx/logs?last_row_key=xxx&event_types=1,2&start_time=1545898159931&end_time=1545898159935&size=20
For more information, see error code.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback