A MoogDb v2 method that updates the flags associated with a Situation. You can add flags to or remove them from a Situation.
See Situation Flags for more information on Moogsoft Onprem Situation flags.
Method setSituationFlags
takes the following request arguments:
Name | Type | Required | Description |
---|---|---|---|
| Array of Numbers | Yes | An array of IDs for the Situations you want to update. |
| Array of Strings | Yes | Flags to be added to those Situations. If this is an empty list, no flags are added to the Situation. |
| Array of Strings | Yes | Flags you want to remove from the Situation. If this is an empty list, no flags are removed from the Situation. |
Method setSituationFlags
returns the following response:
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.
The following examples demonstrate typical use of method setSituationFlags
:
Example request to update Situation IDs 1 and 2:
var result = JSON.stringify(moogdb.setSituationFlags([1, 2], ["S1","S2"], ["S2"]))