We have external webservice which is making query to our sales force and getting the data. how can i see the logs for that external service, like what query they are making and what is returned.
-
is the external webservice calling a custom Apex webservice? or just using the OOTB SFDC REST or SOAP API?– cropredyJan 3, 2017 at 21:06
-
Can we get stats on outbound api calls in even monintoring, if so, from which event type? Ex : from a salesforce vf page I am making an api GET call, will the details be logged in evenlogfile obejct? Also if I do a post call with a payload will endpoint, request and response be logged?– JamesFeb 7, 2017 at 17:09
2 Answers
@DanielBallinger has one solution but frankly, when faced with this situation in my orgs, if the third party service is making OOTB REST/SOAP API calls on Salesforce, I go to that third party system's logging to see what queries are made and the responses therein.
If the third party system is having issues, that system should be doing logging. SFDC OOTB REST/SOAP APIs are guaranteed to deliver correct results given whatever query is supplied (hence perhaps explaining why the queries aren't logged in SFDC as part of the standard license).
Should you be using a custom REST service, then the incoming request and response can be logged to a custom Log__c
object.
One option is to use the Event Monitoring API (This will be a paid feature outside of a developer edition org).
With this API you can pull a log file down that shows all API calls made within a 24-hour period. You would just need to select the correct Event Type based on the API being called. Not that this won't show you the data returned at the time the call was made.