A MoogDb v2 method that checks whether a flag is associated with a Situation.
See Situation Flags for more information on Moogsoft Enterprise Situation flags.
Method checkSituationFlag
takes the following request arguments:
Name | Type | Required | Description |
---|---|---|---|
| Number | Yes | ID of the Situation to check. |
| String | Yes | Name of the flag to check for the specified Situation ID. |
Method checkSituationFlag
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 checkSituationFlag
:
Example request to check whether Situation 1 contains the flag S1:
var result = JSON.stringify(moogdb.checkSituationFlag(1, "S1"))
Example response returning true
because the Situation contains the specified flags:
true