adding flask rest server and changing data schema to require unique ids for all events instead of hijacking the time field