Summary

Server-Sent Events (SSE) uses HTTP(S) text/event-stream content to stream "events" one-way to a subscriber. AllisonHouse's SSE system is comprised of an auto-scaling infrastructure which receives events directly from the systems responsible for writing the data, whether it's to disk or a database.

Provided you have a valid AllisonHouse authorization code (32 character string) with which to gain access to our data, you can connect to the URL below to subscribe to certain events. Events are prefixed with data: (per the SSE specification) followed by a JSON string.

* These events are only useful when paired with AllisonHouse's Level 3 radar (level3.*) and warnings (warnings.*) services.

URL Template

https://sse.allisonhouse.com/<authorization code>/<channel(s)>/[start time]

Replacements

  • <authorization code> is the AllisonHouse customer's unique authorization code.
    This can be retrieved from https://access.allisonhouse.com/login.php
  • <channel(s)> is a comma-separated list of channels you wish to receive events from.
    • warnings
    • level3_<SITE>
  • <start time> is an optional unix (second) timestamp of how far back to retrieve events which, if omitted, is ignored and no past events are retrieved.
An example might be https://sse.allisonhouse.com/32characterstring/warnings,level3_KTLX/

Sample Responses

The first response from our SSE system upon subscription will be retry: 1000. This is done inline with the W3C SSE specification. All events are prefixed with data: followed by the JSON strings below.

  • { "channel": "level3_KFTG", "data": "NET_20170127_0105", "event": "created", "timestamp": "1485479693737" }
  • { "channel": "level3_KFTG", "data": "N0Q_20170127_0114", "event": "created", "timestamp": "1485479776126" }
  • { "channel": "warnings", "data": "2017020712.SVR", "event": "created", "timestamp": "1486471780803" }
  • { "channel": "warnings", "data": "2017022018.FFW", "event": "created", "timestamp": "1487614419733" }
  • {"heartbeat":true}
A keep-alive heartbeat is sent from the system so that the client can become aware of any disconnects not captured by the client-side API.