Moogsoft Docs

addAlertToSituation

A Graze API POST request that adds a specified alert to a specified Situation.

Back to Graze API EndPoint Reference.

Request arguments

Endpoint addAlertToSituation 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

Alert ID.

sitn_id

Numnber

Yes

Situation ID.

Response

Endpoint addAlertToSituation returns the following response:

API update behavior

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:

This endpoint does not add the alert to the Situation if the alert has been archived to the historic database even if the Situation is still in the active database.

See API Update Behavior for more information on Situation statuses.

Examples

The following examples demonstrate typical use of endpoint addAlertToSituation:

Request example

Example cURL request to add alert ID 16 to Situation ID 7:

curl -X POST -u graze:graze -k -v "https://localhost/graze/v1/addAlertToSituation" -H "Content-Type: application/json; charset=UTF-8" -d '{"alert_id" : 16, "sitn_id" : 7 }'
Response example