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. Defaults to the configured maximum limit.

sort

String

 

Field to sort by. Prefix with - to sort descending.

triggerId

String

Yes

Id of the trigger of which reports to find.

hasFailure

Boolean

 

Return only reports where success is false.

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.

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.