trigger.action.list
The trigger.action.list command is used to list all trigger action types with their inputs and outputs.
TR50 Request
{
"cmd": {
"command": "trigger.action.list"
}
}
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": [
{
"type": "alarm.publish"
"folder": "alarm",
"icon": "alarm",
"inputs": [
{
"key": "thingKey",
"name": "Thing Key",
"required": true,
"type": "thingkey"
},
{
"key": "alarmKey",
"name": "Alarm Key",
"required": true,
"type": "string"
},
{
"key": "state",
"name": "State",
"required": true,
"type": "number"
},
{
"key": "republish",
"name": "Republish",
"options": [
[
"false",
"False"
],
[
"true",
"True"
]
],
"required": false,
"type": "dropdown"
},
...
],
"outputs": [
{
"key": "value",
"name": "Value",
"type": "object"
}
],
"routes": [
{
"name": "Success",
"route": "success"
},
{
"name": "Failure",
"route": "failure"
}
],
},
...
]
}
}
}
Response Parameters
Name |
Type |
Description |
---|---|---|
result |
Array |
An array consisting of result objects. |
Result Object
Name |
Type |
Description |
---|---|---|
type |
String |
The action type. |
folder |
String |
The name of the group folder that this action type belongs to. |
icon |
String |
The icon to display in the portal for this action type. |
inputs |
Array |
Array of objects describing input parameters for this action type. |
outputs |
Array |
Array of objects describing output parameters for this action type. |
routes |
Array |
An enumeration of the possible routes from this action type. |
Input/Output Object
Name |
Type |
Description |
---|---|---|
key |
String |
The input parameter field key. |
name |
String |
The name of this input. |
required |
Boolean |
Whether this parameter is required. |
type |
String |
The type of this input's value. |
multiline |
Boolean |
Whether a string type is multiline. |
count |
Boolean |
If multiple values are allowed, the maximum array size. |
options |
Array |
The array of select box input options. |