Moogsoft Docs

getAlertIds

A MoogDb v2 method that returns the total number of alerts, and a list of the alert IDs, for an alert filter and a limit.

Back to MoogDb V2 API Method Reference.

Request arguments

Method getAlertIds 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 alert IDs to return.

Response

Method getAlertIds returns the following response:

Type

Description

Native Object

A JSON object containing the total number of alerts and their alert 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 getAlertIds:

Response example

Example response returning ten alert IDs:

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