set routes constraints for the api