Moogsoft Docs

checkSituationFlag

A Graze API GET request that checks whether a flag is associated with a Situation.

See Situation Flags for more information on Moogsoft AIOps Situation flags.

Back to Graze API EndPoint Reference.

Request arguments

Endpoint checkSituationFlag 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.

sitn_id

Number

Yes

ID of the Situation to be checked.

flag

Number

Yes

Flag to be checked 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 behavior in active and historic databases

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:

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 -X GET -u graze:graze -k -v https://localhost/graze/v1/checkSituationFlag?sitn_id=1&flag=NOTIFIED

Response example

Example response returning the Boolean value true because the Situation contains the specified flag:

true