Which IIQ version are you inquiring about?
8.5p1
Please share any images or screenshots, if relevant.
Share all details about your problem, including any error messages you may have received.
IAM wizards, I beseech thee!
Request:
I’m curious how to setup Account Aggregation Retries when receiving a 429 error, and how to appropriately throttle API requests to avoid it.
I’m hoping to:
1. get some eyes on our implementation and criticize it if needed
2. save someone else a headache if they have a similar issue
Context:
We currently use an Account Aggregation for the BlackLine (finance) application, which has a default global API rate limit of 1000 requests/minute (see here). Our personal aggregation pulls about 760~ users, with a parent call for /v1/users and then 3 child calls per user (for /teams, /entities, and /roles-products).
That’s a lot of calls very quickly, so we’ve changed a few things in hopes to try to fix the 429 errors we’d occasionally see. Here’s what we did:
- Added throttle to each call using a Before-Rule. We added the following Beanshell code to make sure the Thread sleeps 650 ms between each call (parent call included):
<Source>
<![CDATA[
import java.util.concurrent.TimeUnit;
// Throttle all calls
try {
TimeUnit.MILLISECONDS.sleep(650); // 300ms and 400ms still saw occasional 429 errors...
} catch (InterruptedException e) {
log.warn("Throttle interrupted", e);
Thread.currentThread().interrupt();
}
]]>
</Source>
- Added this before-rule to each call (4 total) within the application object.
- Added retry logic to the BlackLine app object based on other topics found in the dev community (here and here) - we implemented this code within our app object:
<entry key="retryCount" value="5"/>
<entry key="retryWait" value="60000"/>
<entry key="aggregationRetryErrors">
<value>
<List>
<String>429</String>
<String>Too Many Requests</String>
<String>Rate limit quota violation</String>
<String>UsersAndDevices-V1_Default</String>
</List>
</value>
</entry>
<entry key="maxRetryCount" value="5"/>
<entry key="retryWaitTime" value="60000"/>
<entry key="retryableErrors">
<value>
<List>
<String>429</String>
<String>Too Many Requests</String>
<String>Rate limit quota violation</String>
<String>UsersAndDevices-V1_Default</String>
</List>
</value>
</entry>
- In the account aggregation task, we set
sequential=”true” - Set pagination for
/v1/usersto 300 instead of the default 25.
With these changes, we were seeing a relatively successful rate of aggregations, but I want to make sure this is the best solution here.
The average time after these changes is about 25-30 minutes for our 760 users, but success rate is higher (about 90%+).
The average time before these changes was about 7 minutes, but success rate was anywhere between 50% - 80%.
All recorded Fails and Cancels for these figures were due to 429 Errors.
When perusing the Web Services Connector docs, there is a setting for provisioning retries, but not for account aggregation retries… so I’m going off of the dev topics above, hoping that they’re working as intended?

