Skip to main content

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

auth_token

String

Yes

A valid auth_token returned from the authenticate request. Alternatively, basic authenticate headers can be used in place of this parameter. See the authenticate endpoint for more information and usage examples.

alert_id

Number

No, if you specify alert_ids.

A single alert ID. You must provide a single alert_id or a list of alert_ids.

alert_ids

Array of Numbers

No, if you specify alert_id.

A list of alert IDs. You must provide a single alert_id or a list of alert_ids.

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. Reserved characters are converted to HTML entities, for example, & is converted to &.

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" }'

Response example