log.list
The log.list command is used to list log entries for a thing.
TR50 Request
{
"list": {
"command": "log.list",
"params": {
"thingKey": "mythingkey",
"offset": 0,
"limit": 10,
"level": 1,
"corrId": "mycorrelationid",
"triggerId": "52daa76ae017ace6793a6160"
}
}
}
Request Parameters
Name |
Type |
Required |
Description |
---|---|---|---|
thingKey |
String |
|
The key of the thing for which to return log entries for. |
thingId |
String |
|
The id of the thing for which to return log entries for. |
triggerId |
String |
|
The ID of the trigger for which log entries are requested. |
campaignId |
String |
|
The id of the campaign for which to return log entries for. |
offset |
Integer |
|
The starting list offset, used for pagination, defaults to 0 if not specified. |
limit |
Integer |
|
Limits the number of results returned. Defaults to the maximum configured size. |
start |
String |
|
Start of a date range for log entries. |
end |
String |
|
End of a date range for log entries. |
level |
Integer |
|
The requested level of the logged entry. |
corrId |
String |
|
The correlation ID that was set to define related data objects. |
TR50 Response
If the command is sent successfully a success message and the log list is returned. Otherwise, an error and error message will be returned.
{
"list": {
"success": true,
"params": {
"count": 42,
"result": [
{
"id": "52daa76ae017ace6793a6160",
"ts": "2014-03-27T13:39:26.635-04:00",
"thingId": "531c907b5d80f1330c238757",
"thingKey": "mythingkey",
"thingName": "My thing",
"triggerId": "53f1330c2387571c907b5d80",
"type": 0,
"corrId": "mycorrelationid",
"level": 1,
"msg": "Log message"
},
...
]
}
}
}
Response Parameters
Name |
Type |
Description |
---|---|---|
count |
Integer |
The total number of results. |
result |
Array |
The array of log objects. |
Result Array Object
Name |
Type |
Description |
---|---|---|
id |
String |
The object id of the log entry. |
ts |
String |
The timestamp of the log entry. |
thingId |
String |
The object id of the thing the log entry is associated with. |
thingKey |
String |
The key of the thing the log entry is associated with. |
thingName |
String |
The name of the thing the log entry is associated with. |
triggerId |
String |
The ID of the trigger that the log entry is associated with. |
type |
Integer |
0:TypeUser, 1:TypeSystem, 2:TypeAudit, 3:TypeTrigger |
corrId |
String |
The correlation ID that relate log entries. |
level |
Integer |
The level of the log entry. |
msg |
String |
The message associated with this log entry. |