set the routes to constraints for the api.