Behind the Curtain: Developer API Alpha

I am putting the finishing touches on the API Alpha Release this week, as well as an example web application.

The preliminary documentation for getting started is on our new Wiki at
The JSON is still fluid so I may be changing a few of the device/agency/alert/response attribute names.

I did have a bit of trouble yesterday in making a test application. While getting the cross-site scripting to work, I stumbled on 2 errors.
First, I spent almost an hour debugging invalid requests, trying different Apache configs and different data formats, before realizing I had inadvertently typed instead of (facepalm)

After I figured that out, I had to learn a bit about CORS and HTTP Headers. It seems that, if you want to set headers like Authorization, you first need to establish which headers your page will accept from another domain. I kept running into 401 errors and, upon inspecting the request, found that my Authorization header was not being sent. (Using jQuery’s AJAX method and a beforeSend to insert the OAuth2 Bearer Token)

After some more fiddling with the AJAX and digging around the internet, I found that I needed to accept the OPTIONS request method, which I had previously not heard of.
Once I figured that out, it was a simple matter to implement the preflight workflow and enable CORS for my web application.

Please try out the API and let me know how it works for you. We will be continuously improving it as time goes on.