setAlertCustomInfo
A MoogDb v2 method that updates the custom information for an alert.
You can use this method either with the alertInfo
CEvent or with both the alertID
and customInfoMap
arguments.
You can use the merge
parameter alongside either method. This determines whether to merge the new custom information data with existing data or replace it.
Back to MoogDb V2 API Method Reference.
Request arguments
Method setAlertCustomInfo
takes the following request arguments:
Name | Type | Required | Description |
---|---|---|---|
| Number | No, if you use | Alert ID. This can be used alongside |
| CEvent | No, if you use | A CEvent containing |
| Object | Yes, if you use | A map of name value pairs containing the new |
| Boolean | No |
Response
Method setAlertCustomInfo
returns the following response:
API update behavior
The behavior of this method depends on whether the relevant alert or Situation is open, closed and still in the active database, or closed and archived to the historic database. This method updates or returns information about the alert or Situation as follows:
See API Update Behavior for more information on Situation statuses.
Examples
The following example demonstrate typical use of method setAlertCustomInfo
:
moogdb.setAlertCustomInfo(2,{ "field1" : "value1" , "field2" : "value2" , "field3" : ["item1","item2","item3"] , "field4" : {"field4-1" : "value4-1","field4-2" : "value4-2"} },true);
Example results visible in the UI: