make the event endpoint restful