Search API Connector Documentation
- How to Enable Request Logging
- Fields Logged
- Execution Time
- What Doesn't Get Logged?
- Can I Delete the AC_Log Sheet?
How to Enable Request Logging
To see a list and status of your requests, toggle on request logging from the Scheduling screen.
- request name
- trigger type (scheduled or manual)
- result (started, completed, or failed)
- execution time in milliseconds
- email address that executed the request
The log will include both manual and scheduled requests, and will be printed in sequential order into a sheet called AC_Log.
Note that the log records separate lines for "Request started" and "Request completed". This is to identify cases where requests begin as scheduled, but time out before they complete.
For single requests, execution time simply equals the difference between the start time and end time.
In the case of the "All" trigger, the start time will be the time trigger has started, while execution time will be the end time of each specific request that completed based on the initial start time. This is to help establish if request chains are near the Google run limit of 6 minutes (as the 6 minutes will be the total allowed runtime for the whole trigger chain).
What Doesn't Get Logged?
- requests that run through the IMPORTAPI custom function
- requests that weren't triggered. Usually this is related to exceeding Google's quotas (see Troubleshooting Triggers for more info).
Can I Delete the AC_Log Sheet?
Sure, you can delete rows or even the entire sheet, it will just recreate itself if you still have the AC_Log option on. It's a good idea to clean it up periodically to avoid producing too many unused cells in your sheet.
6 thoughts on “Request Logging”
Hello, thanks for developing such a nice product.
Can email notifications be sent when API requests fail?
This is possible in Supermetrics and Power My Analytics. Thanks!
Sorry, we don't currently have that feature. We'll be improving the account management and logging features later this year so will probably add in email notifications then.
Thanks for the quick response, Ana. Is there a list of error messages that populate the 'AC_Log' that we can reference?
We were looking at using Magic Cell Notifications GSheets add-on (https://www.notsomagicapps.com/magic-cell-notifications) to trigger an email based on certain 'AC_Log' cell values.
For example, contains 'Request failed' would trigger a Magic Cell Notifications email notification.
We did check the Error Messages KB article, but weren't confirm that these messages will be the same messages populated into the 'AC_Log' sheet cells:
There are several sources of error messages, including Google Apps Script/Google Sheets, the API, and API Connector itself, which all get collected into this log sheet, so I don't actually have a full listing of all the possibilities. However, I believe these strings are present in nearly all the errors that might appear in D (the "results" column):
Completed with errors,
OAuth access not granted or expired, and
With that said, there's also the case where Google times out and therefore doesn't return any error message at all. In those cases there would just be a
Request startedmessage with no corresponding
Request completed successfullyline. I'm not sure if Magic Cell Notifications can allow for this kind of conditional logic.
Thanks for the details. We are considering a helper column(s) in GSheets to serve as a conditional test. This helper column (along with some regex) could possibly be used with Magic Cell Notifications - or another GSheets add-on / custom script we may write.
We will post the notifications solution we settle on here. We would be ecstatic if Mixed Analytics (MA) had a native feature for notifications. FYI We are consulting for a client on the free MA trial now and are moving towards a paid subscription.
Thanks, I'd love to see your solution, and I'm sure others would benefit as well. And I hear what you're saying, you shouldn't need to hack this together so we'll definitely add this as a native feature in the future.