setSituationFlags
A Graze API POST request that updates the flags associated with a specified Situation. You can add flags to or remove them from a Situation.
See Situation Flags for more information on Moogsoft Enterprise Situation flags.
Back to Graze API EndPoint Reference.
Request arguments
Endpoint setSituationFlags
takes the following request arguments:
Name | Type | Required | Description |
---|---|---|---|
| String | Yes | A valid |
| Array of Numbers | Yes | An array of IDs for the Situations you want to update. |
| Array of Strings | Yes | Flags to be added to those Situations. If this is an empty list, no flags are added to the Situation. |
| Array of Strings | Yes | Flags you want to remove from the Situation. If this is an empty list, no flags are removed from the Situation. |
Response
Endpoint setSituationFlags
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 setSituationFlags
:
Request example
Example cURL request to change the flags assigned to a situation. This change can include adding and/or removing flags. If one of the change arguments is left empty, nothing will change for that action.
curl -X POST -u graze:graze -k -v "https://localhost/graze/v1/setSituationFlags" -H "Content-Type: application/json; charset=UTF-8" -d '{"sitn_ids":[ 1 ], "to_add": [ "NOTIFIED","TICKETED"],"to_remove": [] }'