trigger.adddependencies

Description说明

object trigger.adddependencies(object/array triggerDependencies)

This method allows to create new trigger dependencies此方法允许创建新的触发器依赖关系.

Parameters参数

(object/array) Trigger dependencies to create触发依赖关系创建.

Each trigger dependency has the following parameters每个触发器依赖关系具有以下参数:

Parameter参数 Type类型 Description说明
triggerid(required) string ID of the dependent trigger依赖触发器的ID.
dependsOnTriggerid(required) string ID of the trigger that the trigger depends on触发依赖的触发器的ID.

Return values返回值

(object) Returns an object containing the IDs of the dependent triggers under the triggerids property.(object)返回一个对象,该对象包含triggerids属性下的依赖触发器的ID。

Examples范例

Add a trigger dependency添加触发器依赖关系

Make trigger “14092” dependent on trigger “13565.”触发器“14092”依赖于触发器“13565.”。

Request请求:

  1. {
  2. "jsonrpc": "2.0",
  3. "method": "trigger.adddependencies",
  4. "params": {
  5. "triggerid": "14092",
  6. "dependsOnTriggerid": "13565"
  7. },
  8. "auth": "038e1d7b1735c6a5436ee9eae095879e",
  9. "id": 1
  10. }

Response响应:

  1. {
  2. "jsonrpc": "2.0",
  3. "result": {
  4. "triggerids": [
  5. "14092"
  6. ]
  7. },
  8. "id": 1
  9. }

See also参考

Source来源

CTrigger::addDependencies() in frontends/php/include/classes/api/services/CTrigger.php.