A Graze API POST request that resolves a list of alerts.
Back to Graze API EndPoint Reference.
Endpoint resolveAlerts
takes the following request arguments:
Name | Type | Required | Description |
---|---|---|---|
| String | Yes | A valid |
| Array of Numbers | Yes | List of alert IDs. |
| 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, |
Endpoint resolveAlerts
returns the following response:
Successful requests return a JSON object containing the following:
Name | Type | Description |
---|---|---|
| Boolean | Whether or not the alerts were resolved. |
| Number list | List of IDs of alerts that were resolved. |
| Number list | List of IDs of alerts that failed to be resolved. |
The behavior of this endpoint 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 endpoint updates the alert or Situation as follows:
See API Update Behavior for more information on Situation statuses.
The following examples demonstrate typical use of endpoint resolveAlerts
:
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"}'
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":[]}