getSituationAlertIds
A Graze API GET request that returns the total number of alerts, and a list of the alert IDs, for a specified Situation. This can be either all alerts or just those alerts unique to the Situation.
Back to Graze API EndPoint Reference.
Request arguments
Endpoint getSituationAlertIds
takes the following request arguments:
Name | Type | Required | Description |
---|---|---|---|
| String | Yes | A valid |
| Number | Yes | Situation ID. |
| Boolean | No |
Response
Endpoint getSituationAlertIds
returns the following response:
Successful requests return a JSON object containing the following:
Name | Type | Description |
---|---|---|
| Number | Total number of alerts, or unique alerts. |
| Number list | A list of the alert IDs. |
Examples
The following examples demonstrate typical use of endpoint getSituationAlertIds
:
Request example
Example cURL request to return all the alert IDs for Situation ID 362:
curl -G -u graze:graze -k -v "https://localhost/graze/v1/getSituationAlertIds" \ --data-urlencode "sitn_id=362" \ --data-urlencode "for_unique_alerts=false"
Response example
Example response returning all the alerts for Situation ID 362:
{"total_alerts":232,"alert_ids":[6,10,17,19,22,26,27,29,32,43,44,45,47,52,67,68,79,81,83,84,96,102,105,108,109,111,113,115,116,125,135,136,138,140,142,143,147,151,152,153,165,175,177,178,180,181,188,192,193,207,211,213,217,223,225,232,238,239,240,244,255,258,259,269,270,272,274,284,293,303,314,318,335,357,363,369,374,375,388,398,414,428,430,434,442,443,448,449,450,479,480,485,486,492,494,504,505,510,511,518,521,529,556,558,563,570,580,594,596,599,601,603,628,655,656,661,664,674,684,691,705,714,715,719,720,728,732,734,750,776,777,781,788,794,808,819,830,835,838,844,857,858,860,861,877,882,885,887,890,892,893,900,901,906,912,914,918,926,936,937,959,971,972,984,994,1004,1013,1016,1019,1020,1023,1033,1043,1045,1068,1076,1082,1083,1085,1099,1119,1124,1135,1137,1143,1147,1171,1185,1201,1207,1217,1225,1231,1238,1254,1271,1272,1274,1280,1282,1290,1292,1301,1320,1321,1322,1324,1326,1327,1331,1332,1333,1362,1379,1402,1414,1423,1433,1443,1454,1468,1472,1473,1481,1491,1510,1512,1517,1520,1522,1532,1534]}