Moogsoft Docs

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 behavior in active and historic databases

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 examples demonstrate typical use of method setAlertCustomInfo:

Response example