getSituationsWithFlag
A MoogDb v2 method that returns all the Situations which have a specified flag.
See Situation Flags for more information on Moogsoft AIOps Situation flags.
Request arguments
Method getSituationsWithFlag
takes the following request arguments:
Name |
Type |
Required |
Description |
---|---|---|---|
|
String |
Yes |
Name of the flag to search for. |
|
Number |
No |
Starting point of the result set to return. Default is 0. |
|
Number |
No |
Number of results to return. Default is 1000. |
Response
Method getSituationsWithFlag
returns the following response:
Type |
Description |
---|---|
JSON Array |
An array of the Situation IDs that have the specified flag associated with them. |
Examples
The following examples demonstrate typical use of method getSituationsWithFlag
:
Request example
Example request to return all Situations with flag "S1":
var result = JSON.stringify(moogdb.getSituationsWithFlag("S1",0,1000))
Response example
Example response returning the Situation IDs with the specified flag:
[1, 2, 3]