Moogsoft Docs

closeSituation

A MoogDb v2 method that closes a Situation.

Back to MoogDb V2 API Method Reference.

Request arguments

Method closeSituation takes the following request arguments:

Name

Type

Required

Description

situationId

Number

Yes

Situation ID.

closeAlerts

Constant

Yes

Determines how the alerts in the Situation are treated. One of:

  • CLOSE_NO_ALERT: No alerts are closed.

  • CLOSE_ALL_ALERTS: All alerts are closed.

  • CLOSE_UNUSED_ALERTS: Only alerts that are unique to this Situation are closed.

To access these constants from a MooBot, precede them with the module name, for example:

moogdb.CLOSE_NO_ALERT

Response

Method closeSituation returns the following response:

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

Response example