Moogsoft Docs

resolveAlerts

A Graze API POST request that resolves a list of alerts.

Back to Graze API EndPoint Reference.

Request arguments

Endpoint resolveAlerts takes the following request arguments:

Name

Type

Required

Description

auth_token

String

Yes

A valid auth_token returned from the authenticate request. See the authenticate endpoint for more information.

alert_ids

Array of Numbers

Yes

List of IDs of the alerts you want to resolve.

thread_entry_comment

String

No

Thread entry comment you want to add to the resolved alerts. HTML and XML tags are stripped from the thread entry text. Reserved characters are converted to HTML entities, for example, & is converted to &.

Response

Endpoint resolveAlerts returns the following response:

Successful requests return a JSON object containing the following:

Name

Type

Description

status

Boolean

Whether or not the alerts were resolved.

resolved_alerts

Number list

List of IDs of alerts that were resolved.

failed_alerts

Number list

List of IDs of alerts that failed to be resolved.

API behavior in active and historic databases

The behavior of this endpoint depends on whether the relevant Situation is open, closed and still in the active database, or closed and archived to the historic database. This endpoint updates the Situation as follows:

See API Update Behavior for more information on Situation statuses.

Examples

The following examples demonstrate typical use of endpoint resolveAlerts:

Request example

Example cURL request to set alerts 45, 76, and 352 as resolved with the comment "Resolved'":

curl -X POST -u graze:graze -k -v "https://localhost/graze/v1/resolveAlerts" -H "Content-Type: application/json; charset=UTF-8" -d '{"alert_ids" : [45,76,352], "thread_entry_comment" : "Resolved"}'

Response example

Example response showing that alerts 45, 76 and 352 were successfully resolved and no alerts failed:

{"status":true,"resolved_alerts":[45,76,352],"failed_alerts":[]}