manual:api:reference:action:create

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
manual:api:reference:action:create [2021/04/19 18:04]
martins-v fixing inconsistent entity names in the example
manual:api:reference:action:create [2021/04/19 18:16]
martins-v fixing inconsistent entity names in the example
Line 20: Line 20:
 | recovery_operations | array |Action ​ [[:​manual/​api/​reference/​action/​object#​action_recovery_operation|recovery operations]] to create for the action. | | recovery_operations | array |Action ​ [[:​manual/​api/​reference/​action/​object#​action_recovery_operation|recovery operations]] to create for the action. |
 | acknowledge_operations | array | Action [[:​manual/​api/​reference/​action/​object#​action_update_operation|update operations]] to create for the action. | | acknowledge_operations | array | Action [[:​manual/​api/​reference/​action/​object#​action_update_operation|update operations]] to create for the action. |
 +
 +
  
 ==== Return values ==== ==== Return values ====
Line 29: Line 31:
 === Create a trigger action === === Create a trigger action ===
  
-Create an action that will be run when a trigger from host "30045" that has the word "​memory"​ in its name goes into problem state. The action must first send a message to all users in user group "​7"​. If the event is not resolved in 4 minutes, it will run script "​3"​ on all hosts in group "​2"​. On trigger recovery it will notify all users who received any messages regarding the problem before. On trigger update, message with custom subject and body will be sent to all who left acknowledgments and comments via all media types.+Create an action that will be run when a trigger from host "10084" that has the word "​memory"​ in its name goes into problem state. The action must first send a message to all users in user group "​7"​. If the event is not resolved in 4 minutes, it will run script "​3"​ on all hosts in group "​2"​. On trigger recovery it will notify all users who received any messages regarding the problem before. On trigger update, message with custom subject and body will be sent to all who left acknowledgments and comments via all media types.
  
 Request: Request:
Line 47: Line 49:
                     "​conditiontype":​ 1,                     "​conditiontype":​ 1,
                     "​operator":​ 0,                     "​operator":​ 0,
-                    "​value":​ "30045"+                    "​value":​ "10084"
                 },                 },
                 {                 {
Line 134: Line 136:
 === Create a discovery action === === Create a discovery action ===
  
-Create an action that will link discovered hosts to template "30085".+Create an action that will link discovered hosts to template "10091".
  
 Request: Request:
Line 165: Line 167:
                 "​optemplate":​ [                 "​optemplate":​ [
                     {                     {
-                        "​templateid":​ "30085"+                        "​templateid":​ "10091"
                     }                     }
                 ],                 ],