Skip to main content

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

alertId

Number

No, if you use alertInfo.

Alert ID. This can be used alongside customInfoMap and merge but not alertInfo.

alertInfo

CEvent

No, if you use alertId.

A CEvent containing alert_id and custom_info attributes, the values of which will be used to replace the custom_info in the specified alert.

customInfoMap

Object

Yes, if you use alertId.

A map of name value pairs containing the new custom_info information.

merge

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:

setAlertCustomInfo_example.png