call API and pass data in controller.

call API and pass data in controller.