i am doing several custom modules in Magento 2.
It is a good practice do all the thing orientated to API (thinking in be consume for an mobile app for example ) and also use those api internally in the view model?
Or should i create a controller for return json to the view model and API just for external calls?
For example, i want to show a popup with a list of products using KOjs.
should i use a controller to return the products of that AJAX call o can i use the magento 2 API "rest/V1/products"