Moogsoft Docs

closeAlert

A MoogDb v2 method that closes one or more alerts.

Back to MoogDb V2 API Method Reference.

Request arguments

Method closeAlert takes the following request arguments:

Name

Type

Required

Description

alertId

Number

No, if you specify alertIds.

A single alert ID. You must provide a single alertId or a list of alertIds.

alertIds

JSON List

No, if you specify alertId.

A list of alert IDs. You must provide a single alertId or a list of alertIds.

thread_entry_comment

String

No

Thread entry comment you want to add to the closed alert. HTML and XML tags are stripped from the thread entry text. Moogsoft AIOps converts reserved characters to HTML entities, for example, & is converted to &.

Response

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

Request example

Example request to close alerts 78, 234, and 737 with a thread entry comment:

var success = moogdb.closeAlert([78,234,737], "Closing as agreed during team discussion 1/1/2018");

Response example