added routes and views for api