Which one would be better in terms of response time and performance: 1. using an external REST webservice to fetch data from salesforce. OR 2. using apex webservices and call them from the external source to fetch data from Salesforce.
If there's a REST resource available in the standard salesforce API's, then ideal way is to always use them.
Custom Apex webservices should be used when you want to return custom data type.
With respect to speed and performance, in the end they'll all be Salesforce API's but to avoid maintenance overheads, you should be using the standard salesforce APIs wherever possible.
Here's a good documentation about which API to be used when - https://help.salesforce.com/articleView?id=integrate_what_is_api.htm&type=5
Hi Mohit,
If there's a REST resource available in the standard salesforce API's, then ideal way is to always use them.
Custom Apex webservices should be used when you want to return custom data type.
With respect to speed and performance, in the end they'll all be Salesforce API's but to avoid maintenance overheads, you should be using the standard salesforce APIs wherever possible.
Here's a good documentation about which API to be used when - https://help.salesforce.com/articleView?id=integrate_what_is_api.htm&type=5
Hope this helps.