Moogsoft Docs

getSituationFlags

A Graze API GET request that returns the flags for one or an array of Situations.

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

Back to Graze API EndPoint Reference.

Request arguments

Endpoint getSituationFlags 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_ids

Array of Numbers

Yes

A list of Situation IDs.

Response

Endpoint getSituationFlags returns the following response:

Successful requests return a JSON object containing the following:

Name

Description

JSON List

List of the states those Situations

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 getSituationFlags:

Request example

Example cURL request to list an array of all flags associated with Situation 1.

curl -X GET -u graze:graze -k -v  https://localhost/graze/v1/getSituationFlags?sitn_ids=%5B1%5D

Response example

Example response returning the flags associated with Situation 1:

{
    "1": [
        "NOTIFIED",
        "TICKETED"
    ]
}