throttling

  • 1
  • Question
  • Updated 6 months ago

Recently I’ve deployed a new application after approval.

in some of the API call I send to RingCentral, I get 429 (“request rate exceeded”) as a response.

I read the API docs and found out that the throttling is done per extension.

https://developer.ringcentral.com/api-docs/latest/index.html#!#APIRateLimits.html


I wanted to ask some clarification questions:

1. the rate is per account or per extension in the account? I didn’t understand what’s the

rate if more than 1 extensions exist under an account.

meaning – if under a certain account there are 17 extensions (for example), but only one 

user grants access to the application I deployed, allowing me to access data for all extensions, 

what is the rate: per granted access (because only one user granted access) or per extension

(because there are 17 extensions in the case I described above)?

I hope that my question is clear.


2. is there a way to increase the throttling rate?


3. when calling “Get Extension Calls Log” API, it seems that the calls are returned in a descending

order. how can I get them in an ascending order?


4. in case I need to get a large amount of data, how would you suggest to do that? for instance, 

if I need to get data about calls that were done in the past 90 days.


5. is there a penalty when exceeding the throttling rate? is yes, what is it and how is it implemented?


thanks

Photo of Gaash Granot

Gaash Granot

  • 206 Points 100 badge 2x thumb

Posted 6 months ago

  • 1
Photo of AK

AK, Official Rep

  • 4,342 Points 4k badge 2x thumb

1. API Rate Limits

The Rate Limits for the application are set Per User ( RingCentral Extension ). All API methods are divided into API groups, each group having its own limit. 

Learn more about rate limits and API groups

API Usage Plan FAQ 

2. is there a way to increase the throttling rate?

We can increase the API Usage Plan on an application provided we review the actual use case associated with the API rate limit increase request. You would need to fill the Google Docs page below :

API Rate Limit increase request

3. when calling “Get Extension Calls Log” API, it seems that the calls are returned in a descending order. how can I get them in an ascending order?

The API response would list out the call log records in descending order but you can save them to a file and filter them in the ascending order. 

4. in case I need to get a large amount of data, how would you suggest to do that? for instance, 

if I need to get data about calls that were done in the past 90 days.

You can pass in the below query parameters to the GET Call Log API as below:

  • dateFrom
  • dateTo
For more information, please have a look at our Call Log API Reference

5. is there a penalty when exceeding the throttling rate? is yes, what is it and how is it implemented?

Kindly refer to the article by one of our Dev Admins on understanding 
How to avoid HTTP 429 throttling
(Edited)
Photo of Gaash Granot

Gaash Granot

  • 206 Points 100 badge 2x thumb
hi,

thanks for the quick response. i read your answers carefully and i have additional questions. the question number refers to my initial question number.


1. i executed the following code (pseudo code) -
Extension extension1 = new Extension (SOME_EXTENSION_ID);
Extension extension2 = new Extension (ANOTHER_EXTENSION_ID);

for (i = 0; i < 10; i++)
   extension1.getExtensionCallLog ();

for (i = 0; i < 10; i++)
   extension2.getExtensionCallLog ();

i used the same access token in both loops.

i got results for the first extension, but when i sent the first request in the second loop, i got 429 as a response status code.

therefore i ask again:
what is the rate - per granted access (per access token) or per extension (it's not the same thing, because i can use 1 access token to query about multiple extensions)?



4. i'll re-phrase my question:
there are cases in which i need to get a large number of calls data and their recording, in a very short time (which means - 2 heavy API calls for each call).
how can i sync 4,000 calls (for instance), which is actually 8,000 heavy API calls (get the call data and the recording for each call)? 


thanks again :)
Photo of Phong Vu

Phong Vu, Devangelist

  • 1,562 Points 1k badge 2x thumb
Hi Gaash,

Why don't you try to read call logs for all extensions in 1 API call (at the account level /account/~/call-log) then loop thru the records array to group call logs for each extension?

hope this helps,
Phong
Photo of Gaash Granot

Gaash Granot

  • 70 Points
i looked for such api a few times (and more bulk api calls) and didn't find it (including now). where can i find the full documentation for that api?

is there a bulk api to get many calls recordings in one api call?

thanks
Photo of Gaash Granot

Gaash Granot

  • 206 Points 100 badge 2x thumb
a kind reminder regarding my questions above and about my request.

thank you :)
Photo of AK

AK, Official Rep

  • 4,342 Points 4k badge 2x thumb
We would need to change the access level to 'Advanced' for you to access our Beta API's. I have just changed the access level of your Organization. 


Kindly login to Developer Portal and you should be able to look up this endpoint under the API Reference.
Photo of Gaash Granot

Gaash Granot

  • 206 Points 100 badge 2x thumb
got it, thanks :)

are there any news regarding the request i filled in the form that was specified above?

thank you.
Photo of AK

AK, Official Rep

  • 4,342 Points 4k badge 2x thumb
Gaash,

We would be increasing your Usage limits to 'Advanced' per the request form.  
Photo of Gaash Granot

Gaash Granot

  • 206 Points 100 badge 2x thumb
ok, thanks :)))

i just checked the application's rates, and they're the same as before.
how will the change affect the existing app?

thanks,

gaash
Photo of AK

AK, Official Rep

  • 4,342 Points 4k badge 2x thumb
We have increased the Rate/min under the HEAVY API Tier. Could you please confirm the Application name on the developer portal.