trigger.update

The trigger.update command is used to update an existing trigger.

TR50 Request

{
  "cmd": {
    "command": "trigger.update",
    "params": {
      "id": "53728d6b31004662fe000052",
      "started": true
    }
  }
}

Request Parameters

Name

Type

Required

Description

id

String

Yes

The unique identifier to update.

started

Boolean

 

A trigger is only enabled once started it set to true.

name

String

 

The name of the trigger.

desc

String

 

The description of the trigger.

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.

event

Object

 

The event object. Parameters depend on the eventType. For more information, see  trigger.event.list.

actions

Array

 

Array of action objects. Parameters depend on the action type. For more information, see trigger.action.list.

TR50 Response

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

{
  "cmd": {
    "success": true
  }
}