Improve API REST method