Skip to main content

checkSituationFlag

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.

Request arguments

Method checkSituationFlag takes the following request arguments:

Name

Type

Required

Description

sitn_id

Number

Yes

ID of the Situation to check.

flag

String

Yes

Name of the flag to check for the specified Situation ID.

Response

Method checkSituationFlag 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 checkSituationFlag:

Request example

Example request to check whether Situation 1 contains the flag S1:

var result = JSON.stringify(moogdb.checkSituationFlag(1, "S1"))

Response example

Example response returning true because the Situation contains the specified flags:

true