Currently using OAuth2 and we’re finding that, over the past 24 hours, we’ve hit our limit of API calls well before the 24 hour bucket refresh. Is there a way we can see what our most frequently hit API endpoints were so that we can pinpoint what processes to slow down/disconnect if needed?
Good morning Matt,
Unfortunately we don’t have a way available for you to see that information the way we can internally. We do, however, have a way for you to monitor your usage and remaining quota: every call has those values attached on a returned header. You can find details here: API Token Quota and Usage Measurements - Keap Developer Portal
At the bottom of that page you can see an example of a Node Axios hook that monitors the headers in the response for every call to determine if you are approaching limits, but there is no reason you can’t do a similar hook on the request side to maintain a map of endpoints with a count of calls or somesuch, to see what you are utilizing most frequently. How that would be implemented will of course depend on which language, framework and libraries you are building on, but request hooks are a fairly common feature of such libraries.
- Tom Scott