/alerts/active/count v.s. /alerts/active?status=actual for zones inconsistency #665
Replies: 3 comments 3 replies
-
/alerts/active?status=actual&message_type=alert®ion_type=land&limit=500 Not sure I completely follow the comparisons being made here, but I would not expect this query to match the count endpoint numbers since it is filtering out messageType and status. Also, the limit currently is not recognized on the active endpoint so it is not needed. https://vlab.noaa.gov/web/nws-common-alerting-protocol/cap-documentation#msgtype |
Beta Was this translation helpful? Give feedback.
-
Since the documentation for /alerts/active/count says
the filters on /alerts/active?status=actual&message_type=alert should match (unless there are alerts counted that are message_type=alert with a status other than actual). When doing the query /alerts/active?type=land and ?type=marine, shouldn't the counts for those in /alerts/active/count match the number of events in the detailed queries? Then there's the whole thing about zones mentioned in the /alerts/active/count that do not appear in the UGC parts of the detailed queries. Still very confused... |
Beta Was this translation helpful? Give feedback.
-
I've done some more digging and have a couple of questions about the /alerts/active/count return:
I've managed to get the counts closer by assuming (1) is correct (count an alert for each zone found in UGC), but...
I've attached the revised check-api.php program V1.02 |
Beta Was this translation helpful? Give feedback.
-
I've written a script that displays current alerts on GRLevel3 radar software https://github.com/ktrue/NWS-alerts-placefile
Sometimes, /alerts/active?status=actual has alerts with UGC entries for zones involved, but seems to occasionally miss including zones (particularly for Marine alerts) in the UGC entries. The map at www.weather.gov and the www.weather.gov/gis/ show the shading for alerts correctly (but are not using api.weather.gov for data.. they're using the mapserver data instead).
I wrote a small PHP script to fetch the counts, land and marine alerts set (divided by land and marine to stay below the limit=500 on the queries) and noticed the following:
I've attached the script .. run with check-api.php?force to fetch the current data, omit the ?force to use the cached data.
sample output (snipped):
check-api.zip
Beta Was this translation helpful? Give feedback.
All reactions