How do exponential fallback starting with 1sec wait ?

Hi guys, I am developing an app, but sometimes I got  429 responses, this is because "rate limit per minute".  Is there any documentation code maybe in Node JS or something like that to implement this part? It will be helpful for some developers. 

Thanks :)

0
👍 Spot On 💡 Innovative Approach 💪 Stellar Advice ✅ Solved 🪄 Remove Kudos
7 commentaires
Avatar
Serge S.

Hi Marco! Thanks for sharing your question on the API Community!

Currently, there's a rate limit of 100 requests per minute. In reality, it all comes down to a wiser use of exponential cooldown, which will allow your app to make as many calls as it needs to. Basically, it means you can make about 100 calls and then wait only 1 or 2 seconds before you can make another 100, so your app will not have to wait a full minute or more to overcome the cooldown. Please let me know if making calls with artificial delays (so that after the first error the app waits for 1-2 second before the next call) will work for you.

1
👍 Spot On 💡 Innovative Approach 💪 Stellar Advice ✅ Solved 🪄 Remove Kudos


Hi Serge, first of all, thanks for your soon answer.

 

So, I don't do the complete 100 requests. I send around 50 or 60 requests but sometimes they are one after other. So if I understood well, I can make them and if I got a 429, I can wait 2 seconds and send the rest of my requests?

 

PS : In the future will be ok if the API can retrieve the hours of a project.  

0
👍 Spot On 💡 Innovative Approach 💪 Stellar Advice ✅ Solved 🪄 Remove Kudos
Avatar
Serge S.

You're right, Marco. If you receive the error, please wait 1 or 2 seconds and send the rest of the requests.

As for the ability to retrieve the hours of a Project, could you please specify? Are you referring to hours entered in the Custom Fields or hours actually logged via the Time Tracker and visible in the Timelog View?

0
👍 Spot On 💡 Innovative Approach 💪 Stellar Advice ✅ Solved 🪄 Remove Kudos

Ok, that is good to know, thanks for that, I really appreciate. 

No, is not a custom field. (I attached an image ). I mean, is there a way to get the sum of the whole tasks in a project? 

Well, I guess it has to be in other thread. 

 

0
👍 Spot On 💡 Innovative Approach 💪 Stellar Advice ✅ Solved 🪄 Remove Kudos
Avatar
Serge S.

Hey Marco! I apologize for not replying earlier!

Thank you for the clarification. At the moment, there's no straightforward way to get a sum of all Timelog records for a Folder/Project via API. However, I'd recommend the following solution: make a call to get all records of the needed Project/Folder with the help of [GET] /folders/{folderId}/timelogs command and make your app calculate the results. Hope this will work for you! :)

0
👍 Spot On 💡 Innovative Approach 💪 Stellar Advice ✅ Solved 🪄 Remove Kudos

Hi, Dont worry. Indeed, that is what I do, but sometimes I do other operations and different folders etc That is why some of my requests are complicated. But it is ok.  

It will be helpful if in the future the API can evolve.  Thanks !!

 

0
👍 Spot On 💡 Innovative Approach 💪 Stellar Advice ✅ Solved 🪄 Remove Kudos
Avatar
Serge S.

We are definitely keen on developing our API, Marco! I'd suggest sharing your feedback along with the use case in our Product Feedback section. This way other users will be able to support your idea with votes and our Product Team can gauge the popularity of the request and prioritize the roadmap accordingly. :)

0
👍 Spot On 💡 Innovative Approach 💪 Stellar Advice ✅ Solved 🪄 Remove Kudos

Folllowing List for Post: How do exponential fallback starting with 1sec wait ?
[this list is visible for admins and agents only]

Haut de la page
Didn’t find what you were looking for? Write new post