closeSituation
A Graze API POST request that closes a specified Situation which is currently open, and optionally closes alerts in the Situation.
Back to Graze API EndPoint Reference.
Request arguments
Endpoint closeSituation
takes the following request arguments:
Name | Type | Required | Description |
---|---|---|---|
| String | Yes | A valid |
| Number | Yes | Situation ID. |
| Number | Yes | Determines what to do with the alerts in the Situation:
|
Response
Endpoint closeSituation
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 closeSituation
:
Request example
Example cURL request to close Situation 7 and leave all its alerts open:
curl -X POST -u graze:graze -k -v "https://localhost/graze/v1/closeSituation" -H "Content-Type: application/json; charset=UTF-8" -d '{"sitn_id" : 7, "resolution" : 0 }'