myLPFM v3.5 Help from REC Networks

Alerting API

Feature avaialble for REC Clients with a $350 minimum spend.

Introduction

This is a lightweight application programming interface (API) which presents all current (unexpired) EAS and weather alerts for an LPFM facility that is an REC Client. This code can then be used in conjunction with Javascript code or can be locally cached in a database for display on a station's website, mobile app, station desktop application or RDS system.

EAS test alerts (RWT, RMT, NPT and DMO) do not appear in this API result.

Policies

This API is intended to be used only by the REC Client LPFM station for the purpose of distributing alerts through their channels of communication and is not authorized for any other reason.

There are currently no enforced rate limits on this API. We expect this API to be accessed whenever someone visits the station's website where EAS and weather alerts are displayed.

For developers who wish to cache this API data in their database in conjunction with an LPFM station's use should limit their queries to one per minute (60 per hour) as the source data from the IPAWS-OPEN system is only polled by REC once per minute.

Any abuses of this resource may be subject to suspension or rate limiting.

We thank you for following these good standards of practice.

NOTE: This functionality is provided 'as-is' and assumes that the user is an intermediate to expert level web developer.

REC provides no technical support related to the deployment of this API code in any programming language or application. REC's technical support is limited to the delivery of alerting data.

Endpoint

The endpoint for this data is:
https://mylpfm.com/api/alertlist/?f=[Facility ID]
For example, if the station is Facility ID 123456: https://mylpfm.com/api/alertlist/?f=123456

Data is returned in JSON.

Data Dictionary

Example of a JSON alert

There is no top level section in this code return.

alert section

This section may have multiple entries for each valid alert.

areaDescription of the counties and other areas covered by the alert.
eventShort description of the alert event.
headlineA more desriptive version of the alert, which usually includes the originator of the alert, time of issue and expiration time.
easIndicates whether this alert went over EAS:
N = No
Y = Yes
easCodeOn EAS alerts, the three letter EAS code (such as CAE, TOR,
easCodeDescOn EAS alerts, a plain English description of the EAS code used.
easOrgOn EAS alerts, the originator of the EAS alert.
easOrgDescripOn EAS alerts, a plain English description of the EAS alert originator.
idInternal REC identifier for this alert.
urlURL to read the alert detail using the myLPFM Public Alert display.
expireDate and time the alert will expire. This is in the time zone of the location of the alert.

status section

There will only be one status section per JSON result,

codeResult of query. See status code table below.
highOn successful queries, the high value of the array associated with alert. For example, if there was only one alert, this value would be 0. If there were two alerts, this value would be 1 (alerts 0 and 1).

Status Codes

200Query was successful.
1Facility ID entered was not 6 characters.
2Facility ID entered was not an LPFM station.
3Facility ID entered is not at REC Client level.
4Facility ID has no FIPS county data associated with it. The LPFM station needs to log into myLPFM in order to set up their service area before this API can be used.