A Graze API GET request that returns all the Situations which have the specified flag.
See Situation Flags for more information on Moogsoft Enterprise Situation flags.
Back to Graze API EndPoint Reference.
Endpoint getSituationsWithFlag
takes the following request arguments:
Name | Type | Required | Description |
---|---|---|---|
| String | Yes | A valid |
| String | Yes | Name of the flag to search for. |
| Number | No | Starting point of the result set to return. Default is 0. |
| Number | No | Maximum number of results to return. Default is 1000. |
Endpoint getSituationsWithFlag
returns the following response:
Successful requests return a JSON object containing the following:
Type | Description |
---|---|
JSON Array | An array of the Situation IDs that have the specified flag associated with them. |
The following examples demonstrate typical use of endpoint getSituationsWithFlag
:
Example cURL request to retrieve all Situations that have the specified flag associated with them.
curl -G -u graze:graze -k -v "https://localhost/graze/v1/getSituationsWithFlag" --data-urlencode 'flag=NOTIFIED'
Example response returning an array of all of the Situations that have the specified flag associated with them:
[ 1, 2, 5 ]