Error 429, and how to use the "Limit" headers

Hello dear community,

we build a daily running script that gets data from another side and puts it into our base. Everything is working smoothly, but we (for us randomly) get the “429, to many request” errors. I read the most threads here in the Forum regarding this error, and also the “limit” pages including the tipps on how decrease the number of requests. But I am unable to understand the part " The new /api-gateway endpoints return the current API rate limit usage through x-ratelimit headers."

Can someone provide me with an examplary code on how to use this? Me and my colleague are fairly new to APIs, we tried some stuff but none of it worked …

Cheers Tim

Please provide more information:

  • What version are you using?
  • How many requests do you execute per hour or day?
  • which programming language do you use?
  • what did you tried so far?
  • did you tried to google “how to read header value from request in programming language x”?
  1. What do you mean?

  2. It’s roughly around 100 per script run. We counted requests and querys.

  3. It’s written in Python

  4. We tried like


    Or
    image

  5. Yes

Hi @TimK ,
As far as I understand the quoted paragraph in the Limits page of the api documentation, there is no specific api call to get the limits, but each api call made through api-gateway (so with an URL looking like https://your server url/api-gateway/api/v2/something depending of what you are trying to do) should contains, in the response headers, x-ratelimit-limit, x-ratelimit-remaining and x-ratelimit-reset.

Strange thing is that when I try a List Rows to confirm that, I couldn’t find this data, so maybe I misunderstood something too.

Bests,
Benjamin

Sorry for the late reply. I can confirm that currently with 5.0.8, the x-ratelimits are not returned. The rate limits apply, but the headers are not returned.
This will be fixed with 5.1.x.
Best regards
Christoph

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.