Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

REST API Rate Limit

Testy
New Contributor III
New Contributor III

Is there a way to add a delay to Saviynt when making multiple API calls? I'm getting a 429 error "too many requests". the limit is 12 requests every 6 seconds, how would i add this to the rest connector?

I added the below to the configJSON (and something similar to the ConnectionJSON) but no luck
"apiRateLimitConfig": {
"retryAfterCalls": 12,
"retryWaitSeconds": 6
}

17 REPLIES 17

rushikeshvartak
All-Star
All-Star
  • Multiple call in which json ?
  • above is used per user/ task.

 


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

  1. ImportAccountEntJSON
  2. used to import accounts/groups/group memberships

It should work. Do you see any logs on api rate limit during import job execution 


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

"ecm-worker","2024-05-30T17:55:49.946+00:00","2024-05-30T17:55:49.670428414Z stdout F 2024-05-30 17:55:49,670 [quartzScheduler_Worker-5] DEBUG rest.RestProvisioningService - Got Webservice API Response: [headers:[Server: openresty, Date: Thu, 30 May 2024 17:55:49 GMT, Content-Type: application/json, Transfer-Encoding: chunked, Connection: keep-alive, Access-Control-Allow-Credentials: true, Access-Control-Allow-Headers: X-Requested-With, Origin, Content-Type, Accept, Accept-Language, Authorization, If-Modified-Since, X-Api-Key, Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS, PATCH, X-Request-Id: , Retry-After: 1], responseText:{"error_code":"429050","message":"Too many requests"}"

This is target application response. Can you check logs printing saviynt sending delay request parameter 


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

what should i be looking for? there are quite a few things going on in the logs.

NM
Valued Contributor
Valued Contributor

Hi @Testy , look for the parameter which you have defined in config json .. "apiratelimitconfig"

Testy
New Contributor III
New Contributor III

Thanks, i found the below

[quartzScheduler_Worker-4] DEBUG integration.ExternalConnectionCallService - Key=ConfigJSON Value={"showLogs":true,"
"ecm-worker","2024-06-04T12:39:19.789+00:00","2024-06-04T12:39:18.912641038Z stdout F "apiRateLimitConfig": {"
"ecm-worker","2024-06-04T12:39:19.789+00:00","2024-06-04T12:39:18.912647637Z stdout F "retryAfterCalls": 12,"
"ecm-worker","2024-06-04T12:39:19.789+00:00","2024-06-04T12:39:18.912653337Z stdout F "retryWaitSeconds": 100"
"ecm-worker","2024-06-04T12:39:19.789+00:00","2024-06-04T12:39:18.912658937Z stdout F }"
"ecm-worker","2024-06-04T12:39:19.789+00:00","2024-06-04T12:39:18.912664537Z stdout F }"

This should be called from connection Json and not from configJson


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

i deleted it from the configJSON and ran it only in the connectionJSON, however it did not show in the logs. 
i see this entry in the logs: rest.RestProvisioningService - Called API 10 times. So, keeping 100 sec sleep mode for next API call" 

but i might've seen that also when it was in the configJSON

NM
Valued Contributor
Valued Contributor

Its for Okta and not rest connection 


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Testy
New Contributor III
New Contributor III

hi @rushikeshvartak not sure if you saw my message above but i deleted it from the configJSON and ran it only in the connectionJSON, however it did not show in the logs. 

Does it works for provisioning use cases ?


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

We're not provisioning, just importing users and groups

Refer https://forums.saviynt.com/t5/identity-governance/rest-connector-is-it-possible-to-introduce-wait-ti... 

"apiRateLimitConfig": {
"retryAfterCalls": 50,
"retryWaitSeconds": 60
}

Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

@rushikeshvartak this is what I have in the ConnectionJSON but its still throwing the 429 error when importing users and groups
"apiRateLimitConfig": {
"retryAfterCalls": 12,
"retryWaitSeconds": 6
}