Skip to main content

setSituationFlags

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.

Request arguments

Method setSituationFlags takes the following request arguments:

Name

Type

Required

Description

sitn_ids

Array of Numbers

Yes

An array of IDs for the Situations you want to update.

to_add

Array of Strings

Yes

Flags to be added to those Situations. If this is an empty list, no flags are added to the Situation.

to_remove

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.

Response

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

Request example

Example request to update Situation IDs 1 and 2:

var result = JSON.stringify(moogdb.setSituationFlags([1, 2], ["S1","S2"], ["S2"]))

Response example