trigger.report.list
The trigger.report.list command is used to find and return a list of trigger reports.
TR50 Request
{
"cmd": {
"command": "trigger.report.list",
"params": {
"limit": "20",
"offset": 0,
"sort": "-ts",
"triggerId": "55045da3681fdc50ac0471bf"
}
}
}
Request Parameters
Name | Type | Required | Description |
---|---|---|---|
offset | Integer | The starting list offset, used for pagination. Defaults to 0 if not specified. | |
limit | Integer | Limit the number of results returned. The maximum limit you can set is 2000. Defaults to 2000. | |
sort | String | sort is an optional parameter that defines the sort order of the result set. It allows to arrange the list in either ascending(+) or descending(-) order. It is possible to sort trigger.report.list in the following category:ts | |
triggerId | String | Yes | Id of the trigger of which reports to find. |
hasFailure | Boolean | Return only reports where success is false. | |
show | Array | An array of field names of the data columns to return. | |
Start | String | No | Start of a date range for report entries. |
End | String | No | End of a date range for report entries. |
TR50 Response
If the command is sent successfully a success message is returned. Otherwise, an error and error message will be returned.
{
"1": {
"success": true,
"params": {
"count": 3508,
"result": [
{
"id": "5760310e681fdc1dba10e6b9",
"triggerId": "55045da3681fdc50ac0471bf",
"ts": "2016-06-14T12:30:06.316-04:00",
"processedBy": "server",
"eventType": "thing.connection",
"success": true,
"execTime": 2150131
},
...
]
}
}
}
Response Parameters
Name
|
Type
|
Description
|
---|---|---|
result | Array | An array consisting of result objects. |
fields | Array | An array of field names of data columns capable of being returned. |
Result Object
Name | Type | Description |
---|---|---|
id | String | The unique identifier of the report. |
triggerId | String | The unique identifer of the trigger. |
ts | String | The timestamp of the trigger. |
eventType | String | The trigger event type. |
success | Boolean | Whether the trigger finished successfully or not. |
execTime | String | Time trigger took to execute, in nanoseconds. |
event | Object | A data structure that contains information about the event that caused the trigger to run. The fields available in the object will vary. |
errCode | Integer | If the trigger execution ended in an error, the error code will be returned. |
errMsg | String | If the trigger execution ended in an error, the error message will be returned. |
lastActionId | String | The Id of the last action that executed. |