Moogsoft Docs

getSituationIds

A MoogDb v2 method that returns the total number of Situations, and a list of their Situation IDs, for a Situation filter and a limit.

Back to MoogDb V2 API Method Reference.

Request arguments

Method getSituationIds takes the following request arguments:

Name

Type

Required

Description

query

JSON Object

Yes

A JSON object containing the alert filter information.

limit

Number

Maximum number of Situation IDs to return.

Response

Method getSituationIds returns the following response:

Type

Description

Native Object

A JSON object containing the total and the 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 getSituationIds:

Response example

Example response returning the total number of Situations and the Situation IDS matching the filter:

{
     "total_situations":10,
     "sitn_ids":[4, 5, 6, 12, 14, 15, 16, 17, 18, 19]
}