You need to sign in to do that
Don't have an account?
Bryan Leaman 6
How can I collect a debug log for an incoming API call?
We have a third-party integration with our salesforce org. I believe they're using SOAP api calls at API version 41.0. The calls are creating data in our org and those record inserts and updates fire custom triggers. However, when I add a user trace for the API user, I don't get any logs of the activity.
I haven't coded SOAP apis into salesforce, but I see there are debug headers that are available. But I don't want debugging turned on for every call, just when I initiate a trace on the user.
Would adding debug headers to the API calls *always* generate logs? Or would it only generate logs when I define a user trace for the API user?
I haven't coded SOAP apis into salesforce, but I see there are debug headers that are available. But I don't want debugging turned on for every call, just when I initiate a trace on the user.
Would adding debug headers to the API calls *always* generate logs? Or would it only generate logs when I define a user trace for the API user?
All Answers
You can try using Event Monitoring feature which is available as paid version to check detailed logs of API. You can use the METHOD_NAME, USER_ID, CLIENT_ID to identify who and what was making each call.
Check below references that can give more details.
https://www.salesforce4ever.com/catch-logs-from-your-api-user-thanks-to-automations-and-event-monitoring/
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_debugging_API_calls.htm
Please mark as Best Answer if above information was helpful.
Thanks,
That's our scenario, but I'm not seeing any logs whatsoever even though my trigger code is running. However, there are instances where my custom trigger launches a @Future method for geolocation callouts and *those* do show up in the logs. I guess I could add monitor statements and generate a log entry in an object of some kind, but if an exception is generated, I'm not sure I'd be able to catch it.
Thanks,