Moogsoft Docs

getActiveSituationIds

A Graze API GET request that returns the total number of active Situations, and a list of their Situation IDs. Active Situations are those that are not Closed, Resolved or Dormant.

Back to Graze API EndPoint Reference.

Request arguments

Endpoint getActiveSituationIds takes the following request argument:

Endpoint getActiveSituationIds takes no other arguments because this endpoint returns data on all active Situationses.

Response

Endpoint getActiveSituationIds returns the following response:

Successful requests return a JSON object containing the following:

Name

Type

Description

total_situations

Number

Total number of active Situations.

sitn_ids

Array

A list of active Situation IDs.

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

Request example

Example cURL request to return all active Situations in Moogsoft AIOps:

curl -G -u graze:graze -k -v "https://localhost/graze/v1/getActiveSituationIds"

Response example

Example response returning the IDs of ten Situations:

{ 
   "total_situations": 10, 
   "sitn_ids": [4, 5, 6, 12, 14, 15, 16, 17, 18, 19] 
}