I was wandering if there is a way to check API usage in the past. I know that you released a new endpoint that lets us check your API usage for the current day.
I think we reached out limit between Thursday and Friday but I cannot find a way to check this out!
Can you help us on this? Is it also possible to check which integration has been responsible for this?
We only have logs going back ~7 days, but from looking at your traffic over the past 7 days I can see a number of rate limit errors. They appear to be per-second rate limit errors, though, not per-day rate limit errors. This means that you're likely making requests to fast (i.e. more than 10 per second) instead of making too many requests overall.
I can also see a very large spike in request traffic at midnight every night; my guess would be that you run one or more jobs every night at midnight, which eats up the biggest chunk of your daily requests. I'd recommend the following:
Check your rate limiting implementation to make sure that you're not making more than 10 requests per second (which is the biggest contributor to your rate limit errors)
Examine the scripts/jobs you have that run right at midnight; the majority of your request traffic happens between 12am - 1am, so increasing efficiency here would go a long way for both your per-day and per-second limits.
We don't keep logs for this long, so I'm not able to go back and examine requests from March. I might be able to get the IP address of certain requests, but for requests made with a hapikey that's as much information as we have. OAuth tokens are connected to an app, so we can see which app is making the requests, but hapikeys are portal specific and don't have any information on the entity making the requests. Do you have more recent examples that you'd like me to dig into?
So it looks like you initially reached the limit on March 14th, and continued to hit the limit through the 15th. Once you hit the 40k limit, all further requests would fail. At midnight the next day, your limit would reset, so you'd get another 40k requests. It also appears that you will occasionally hit the per-second limit, which would contribute to your daily limit.
You first reached the limit on March 14th, and reached it again on the 15th
Requests would have started failing once you hit the limit on the 14th (roughly 10am)
As a side note, requests that hit the per-second limit will still count toward your daily limit; you'll want to make sure that you consistently keep your requests to below 10 requests per second in order to make full use of your daily 40k.
I'm seeing roughly 600,000 requests coming into that portal over the past couple of days. The vast majority of them are to the contacts API; specifically, the batch update endpoint. Have you run any imports or started using any integrations that use your API key lately?
There isn’t currently a way to set up notifications, but in theory you could poll the endpoint mentioned above periodically to keep tabs on your usage.
The daily limit resets at midnight in your portal’s timezone. If you’re regularly going over your limit and looking to get more calls per day, you can look into the API add on. You can find the pricing and details on our software pricing page by clicking to view add ons and clicking ‘more add ons’:
It’s not currently possible to check historical API usage for a portal’s API key. If you direct message me the Hub ID of the portal you’re referring to, I can take a look at your usage for Thursday & Friday to see if I notice anything. In general, this usage is only related to integrations that use your portal’s API key, so any integrations that appear in your Integrations page will not contribute to the daily usage limit.