1

I did some searching and haven't found any result that is helpful other than perhaps this one - Rest API: How to log/monitor executed SOQL queries.

However, the above post suggests that I need to use Rest API Events and Event Monitoring to get any information about REST API activity on the platform.

My challenge is that the REST API Event Type (https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_eventlogfile_restapi.htm) doesn't have any data that seems meaningful in troubleshooting underlying errors with the API request/Query.

For my specific scenario, I am a windows user trying to debug a third party iPad app which makes dozens if not hundreds of individual calls to /services/data/v##.#/query/?q= to pull data into the app from Salesforce. Since I don't have access to a Mac computer, I can't emulate the app and look at the local request tree to monitor each request and see the response. Today I had to sit on the phone with the third party developers for an hour while they reviewed all of this data for me on their Mac, showing me that the underlying problem was that the query includes a field that the user doesn't have access to (thus returning an invalid field error).

Without a way to debug this on the Salesforce side, I am left with little info to point me in the right direction when a SOQL query fails due to an invalid field, query timeout, etc. I can't even see what query was run at what time.

I setup debug logging for my user in our sandbox and then made a query using workbench, and the debug log is completely empty. Am I missing something? Or is this a challenge that we all face? I can't believe there isn't a better way, so I'm hoping someone can point me in the right direction.

5
  • One of the approaches would be to setup proxy as mentioned here -- apple.stackexchange.com/questions/18108/….
    – kurunve
    Commented Mar 17, 2021 at 15:49
  • There's a reason real time event monitoring doesn't expose the query - security. If the app could point to an apex rest service, you could get debug log
    – cropredy
    Commented Mar 17, 2021 at 16:57
  • @cropredy just out of curiosity, how would exposing the query cause a security concern? I'm not looking for the query result, just the query string itself. I don't see how having 'SELECT Id,Name,Field_Name__c FROM Object__c' would impose a security risk? Commented Mar 17, 2021 at 17:51
  • the WHERE clause could contain PII
    – cropredy
    Commented Mar 17, 2021 at 17:56
  • @cropredy fair point, I hadn't thought of that. Commented Mar 17, 2021 at 18:41

0

You must log in to answer this question.

Browse other questions tagged .