Set the route constraints for the api