I have several web services that run internally that are utilised within SharePoint. We are using SharePoint 2013 On Prem but are planning a move to the cloud. I currently have a farm solution which acts as a proxy to call these web services, so I can make ajax calls from within SP and avoid any cross domain issues.
With the move to the cloud, I need to expose the data retrieved from these web services to be used in SPFx Client Side Web Parts or SharePoint Hosted apps. So far, in a development environment and with an O365 developer subscription, I have created a provider hosted app with an associated MVC web application and have used WEB API 2 to call these web services and pass the data - again the MVC app acting as a proxy. When we migrate, the MVC app will be hosted internally and therefore be able to call the internal web services.
The part I can't figure out is how to call the web api in the provider hosted app from other apps/web parts in the site. I'm trying to replicate creating a web service in the cloud as I have done with a farm solution and stored in the ISAPI folder. I'm looking for advice on how I can access the web service within the provider hosted app from other apps/web parts within the same site as the provider hosted app.The internal web service can not be made public. Any advice appreciated. Thanks!