get/set min and max through api