New API for ajax-style data downloads.

This new file is intented to be the base for the new graphing system.