Stephen Gilmore

Rate limiting in Workday Studio

Oct. 25, 2022 #Workday Integrations #Workday Studio #Workday

Is your Workday Studio integration experiencing API rate limit issues? You can add a short pause to your integration with sleep.

// Sleep for 5,000ms (5s)
Thread.currentThread().sleep(5000)

Note: You should only use this when your integration is at or exceeding a rate limit. Applying it to every request could seriously slow down your integration. You could use something more like:

// Apply a 5 second delay when the rate limit drops below 25
props["rate_limit"] = message.getHeader("x-ratelimit-remaining");
props["rate_limit"] < 25 ? Thread.currentThread().sleep(5000) : ""

Good practices: