Move another API function into the controller.