trigger.list

The trigger.list command is used to find and return a list of triggers.

TR50 Request

{
  "cmd": {
    "command": "trigger.list"
  }
}

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

 

A string indicated the direction (+ for ascending, - for descending) and column to sort the results by. To sort by the key descending, use "-key". Defaults to "+name".

showAll

Boolean

 

If all organizations should be included in the results. Requires Super-Ops.

TR50 Response

If the command is sent successfully a success message is returned. Otherwise, an error and error message will be returned.

{
  "cmd": {
    "success": true,
    "params": {
      "result": [
        {
          "id": "53728d6b31004662fe000052",
          "name": "Get SMS",
          "desc": "Gets an SMS",
          "started": false,
          "eventType": "twilio.sms.receive",
          "reportMode": "failure",
          "reportUntil": "2018-01-01T00:00:00Z",
          "firstAction": "0",
          "canvas": {
              "event": {
                  "left": "50",
                  "top": "50"
              },
              "success-end": [
                  {
                      "left": "150",
                      "top": "300"
                  }
              ]
          },
          "successCount": 4,
          "lastSuccess": "2014-05-14T15:30:14.551Z",
          "failureCount": 0,
          "lastFailure": "0001-01-01T00:00:00Z",
          "createdBy": "jhughes@example.com",DH:0:2
          "createdOn": "2014-05-13T21:23:55.561Z",
          "updatedBy": "admin@example.com",
          "updatedOn": "2014-06-06T19:27:04.136Z"
        },
        {
          "id": "5391cf323100465ec1000087",
          "name": "Turn on Heater when Cold",
          "started": false,
          "eventType": "property.change",
          "reportMode": "failure",
          "reportUntil": "2018-01-01T00:00:00Z",
          "firstAction": "0",
          "canvas": {
              "event": {
                  "left": "50",
                  "top": "50"
              },
              "success-end": [
                  {
                      "left": "150",
                      "top": "300"
                  }
              ]
          },
          "successCount": 4,
          "lastSuccess": "2014-06-11T09:00:45.038Z",
          "failureCount": 0,
          "lastFailure": "0001-01-01T00:00:00Z",
          "activeWindow": {
              "DH:4:13": false,
              "DH:4:14": false,
              "DH:4:15": false,
              "DH:4:16": false
          },
          "activeWindowTz": "America\/New_York",
          "createdBy": "user@example.com",
          "createdOn": "2014-06-06T14:24:50.984Z",
          "updatedBy": "user@example.com",
          "updatedOn": "2014-06-11T12:49:46.064Z"
        }
      ]
    }
  }
}

Response Parameters

Name

Type

Description

count

Integer

The total number of triggers.

result

Array

An array consisting of result objects.

Result Object

Name

Type

Description

id

String

The unique identifier of the trigger.

name

String

The name of the trigger.

desc

String

The description of the trigger.

started

Boolean

Whether the trigger has been started.

eventType

String

The trigger event type.

reportMode

String

Off

Do not report any trigger events.

On

Report all trigger events. All trigger events are reported for the next 30 days and afterward reporting mode automatically switches to the default On failure mode.

On failure (default)

Report only failed events.

reportUntil

String

The reportUntil attribute applies only when On is specified for reportMode and provides the date and time when the report mode will switch to On failure (the default).

firstAction

String

Identifier of the first action that takes place.

canvas

Array

Canvas information of where the event, failure-end, and success-end elements are places.

successCount

Integer

Number of times the trigger has been successfully executed.

dailySuccessCount

Integer

Number of times the trigger has been successfully executed today.

lastSuccess

String

Timestamp of the last successful execution associated with this trigger.

failureCount

Integer

Number of times the trigger has failed during execution.

dailyFailureCount

Integer

Number of times the trigger has failed during executed today.

lastFailure

String

Timestamp of the last failed execution associated with this trigger.

execTime

Integer

Time trigger took to last execute.

activeWindow

Array

Array of day and hour of when the trigger can run. For xample DH:0:2 represents Sunday at 02:00.

activeWindowTz

String

The timezone for the activeWindow.

createdBy

String

 The creator of this trigger.

createdOn

String

The creation timestamp of this trigger.

updatedBy

String

The updater of this trigger.

updatedOn

String

The update timestamp of this trigger.