Moogsoft Docs

setAlertAcknowledgeState

A Graze API POST request that acknowledges or unacknowledges the owner of the specified alert ID.

Back to Graze API EndPoint Reference.

Request arguments

Endpoint setAlertAcknowledgeState 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_id

Number

Yes

ID of the alert that you want to acknowledge or not acknowledge.

acknowledged

Number

Yes

The acknowledge state you want to apply to the alert: 0 for unacknowledged, 1 for acknowledged.

Response

Endpoint setAlertAcknowledgeState returns the following response:

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 setAlertAcknowledgeState:

Request example

Example cURL request to set the acknowledge state of alert ID 7 to "acknowledged":

curl -X POST -u graze:graze -k -v "https://localhost/graze/v1/setAlertAcknowledgeState" -H "Content-Type: application/json; charset=UTF-8" -d '{"alert_id" : 7, "acknowledged" : 1 }'

Response example