Initial REST api routes and logic