Moogsoft Docs

getSituationFlags

A MoogDb v2 method that returns the flags for one or more Situations.

See Situation Flags for more information on Moogsoft AIOps Situation flags.

Request arguments

Method getSituationFlags takes the following request arguments:

Name

Type

Required

Description

sitn_ids

Array

Yes

IDs of the Situations to return the flags for.

Response

Method getSituationFlags returns the following response:

Type

Description

JSON Array

An array of the flags associated with the specified Situation IDs.

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 getSituationFlags:

Request example

Example request to return the flags associated with Situation IDs 1 and 2:

var result = JSON.stringify(moogdb.getSituationFlags([1, 2]))

Response example

Example response returning the flags associated with specified Situations:

{"1":["A1", "B1"], "2":["A1"]}