Updated api controller.