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. 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.list in the following categories:
|
|
showAll | Boolean | If all organizations should be included in the results. Requires Super-Ops. | |
show | Array | An array of data column field names that can be returned. |
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": "0001-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@ilstechnology.com",
"createdOn": "2014-05-13T21:23:55.561Z",
"updatedBy": "admin@devicewise.com",
"updatedOn": "2014-06-06T19:27:04.136Z"
},
{
"id": "5391cf323100465ec1000087",
"name": "Turn on Heater when Cold",
"started": false,
"eventType": "property.change",
"reportMode": "failure",
"reportUntil": "0001-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": "john.doe@ilstechnology.com",
"createdOn": "2014-06-06T14:24:50.984Z",
"updatedBy": "john.doe@ilstechnology.com",
"updatedOn": "2014-06-11T12:49:46.064Z"
}
]
}
}
}
Response Parameters
Name
|
Type
|
Description
|
---|---|---|
count | Integer | The total number of triggers. |
fields | Array | An array of data column field names that can be returned. |
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 - No trigger
events will be reported
On - All trigger events will be reported. When On is selected the all trigger events are reported for the next 30 days and later it automatically switches to the default On failure mode. On failure(default) - Only events that failed will be reported. |
reportUntil | String | The reportUntil applies only when reportMode in On and provides the date/time when the reportMode will switch to On failure(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/hour of when the trigger can run. Example DH:0:2 = Sunday at 0200 |
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. |
startedOn | Timestamp | The date & time when the trigger was last started. |
stoppedOn | Timestamp | The date & time when the trigger was last stopped. |