simplify the get action of ApiController.js