This is a translation of the original English documentation page. Help us make it better.

trigger.adddependencies

Description

object trigger.adddependencies(object/array triggerDependencies)

This method allows to create new trigger dependencies.

This method is only available to Admin and Super admin user types. Permissions to call the method can be revoked in user role settings. See User roles for more information.

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.
dependsOnTriggerid
(required)
string ID of the trigger that the trigger depends on.

Valori di ritorno

(object) Restituisce un oggetto contenente gli ID dei triggers dipendenti sotto la proprietà triggerids.

Esempi

Add a trigger dependency

Make trigger "14092" dependent on trigger "13565."

Request:

{
           "jsonrpc": "2.0",
           "method": "trigger.adddependencies",
           "params": {
               "triggerid": "14092",
               "dependsOnTriggerid": "13565"
           },
           "auth": "038e1d7b1735c6a5436ee9eae095879e",
           "id": 1
       }

Response:

{
           "jsonrpc": "2.0",
           "result": {
               "triggerids": [
                   "14092"
               ]
           },
           "id": 1
       }

Guarda anche

Fonte

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