This method allows to update existing trigger prototypes. 此方法允许更新已有的触发器原型。

    (object/array) to be updated. (object/array)需要更新的触发器原型Trigger prototype properties。 The property must be defined for each trigger prototype, all other properties are optional. Only the passed properties will be updated, all others will remain unchanged. triggerid属性必须在每个触发器原型中已定义,其他所有属性为可选项。只有传递过去的属性会被更新,其他所有属性仍然保持不变。 Additionally to the the method accepts the following parameters. 除standard trigger prototype properties之外,该方法接受以下参数。

    The trigger expression has to be given in its expanded form and must contain at least one item prototype. 指定的触发器表达式必须为展开式,并且必须包含至少一个监控项原型。

    Enabling a trigger prototype 启用触发器原型

    Enable a trigger prototype, that is, set its status to 0. 启用一个触发器原型,即将其状态设置为0。

    Request 请求:

    Response 响应:

    Replacing trigger prototype tags 替换触发器原型标签

    Request 请求:

    Response 响应:

    CTriggerPrototype::update() in frontends/php/include/classes/api/services/CTriggerPrototype.php. CTriggerPrototype::update()方法可在frontends/php/include/classes/api/services/CTriggerPrototype.php中参考。