establish dynamic_api routes and controller