closeAlert
A Graze API POST request that closes one or more alerts.
Back to Graze API EndPoint Reference.
Request arguments
Endpoint closeAlert
takes the following request arguments:
Name | Type | Required | Description |
---|---|---|---|
| String | Yes | A valid |
| Number | No, if you specify | A single alert ID. You must provide a single |
| Array of Numbers | No, if you specify | A list of alert IDs. You must provide a single |
| String | No | Thread entry comment you want to add to the closed alert. HTML and XML tags are stripped from the thread entry text. Reserved characters are converted to HTML entities, for example, |
Response
Endpoint closeAlert
returns the following response:
API update behavior
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.
Examples
The following examples demonstrate typical use of endpoint closeAlert
:
Request example
Example cURL request to close alert IDs 78, 234, and 737:
curl -X POST -u graze:graze -k -v "https://localhost/graze/v1/closeAlert" -H "Content-Type: application/json; charset=UTF-8" -d '{"alert_ids" : [78,234,737],"thread_entry_comment" : "Closing as agreed during team discussion 1/1/2018" }'