Forum Discussion

ApiTrader's avatar
ApiTrader
Frequent Visitor
3 years ago
Solved

How to handle api rate call limit within a function?

With the following step I invoke a function in order to get more details about a record. My API request, based on a Power Automate Flow, is running into some trouble due to the amount of calls. Now I want to throttle my calls in order to match the rate limit. How can I accomplish that?

Is it possible to count the loops and let the query wait for a specific delay or is it better, to distribute the amount on a timeframe? 

So, I mean something similiar like application.wait with VBA ðŸ¤£ Any help is appreciated

#"Invoked Custom Function" = Table.AddColumn(#"Changed Type", "voucher", each if [voucherStatus] <> "unchecked" then funcGetVouchers([id]) else null )
_________________________________________________________

 

(voucherId as text) as table =>

let
url = WebHookTriggerUri,
body = "{""endpoint"": ""vouchers/"&voucherId&"""}",
Parsed_JSON = Json.Document(body),
BuildQueryString = Uri.BuildQueryString(Parsed_JSON),

....

2 Replies