checkSituationFlag
A Graze API GET request that checks whether a flag is associated with a Situation.
See Situation Flags for more information on Moogsoft Onprem Situation flags.
Back to Graze API EndPoint Reference.
Request arguments
Endpoint checkSituationFlag
takes the following request arguments:
Name | Type | Required | Description |
---|---|---|---|
| String | Yes | A valid |
| Number | Yes | ID of the Situation to check. |
| String | Yes | Name of the flag to check for the specified Situation ID. |
Response
Endpoint checkSituationFlag
returns the following response:
Successful requests return a JSON object containing the following:
Type | Description |
---|---|
Boolean | Whether or not the flag is associated with the specified Situation. |
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 checkSituationFlag
:
Request example
Example cURL request to request a Boolean whether the specified Situation has the flag "NOTIFIED" associated with it.
curl -G -u graze:graze -k -v "https://localhost/graze/v1/checkSituationFlag" --data-urlencode 'sitn_id=1' --data-urlencode 'flag=NOTIFIED'
Response example
Example response returning the Boolean value true
because the Situation contains the specified flag:
true