question

corey-tenney9911 avatar image
corey-tenney9911 asked corey-tenney9911 commented

RingCentral Nuget Package and Paging

We have created a program that will download all extensions (about 2000) into a spreadsheet so we can modify and do some other things with them. During development everything went fine, but now that we are in production we cannot get more than ~100 extensions to come down.


We are using the RingCentral Nuget package, and I do not know how to set perPage setting.

extension
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

vyshakhbabji avatar image
vyshakhbabji Deactivated answered corey-tenney9911 commented
Hi ,

Assuming you are using /account/~/extension API to fetch extension info ,  here is the response you will get 

{
                 
  "uri" : "https://platform.devtest.ringcentral.com/restapi/v1.0/account/131074004/extension?page=1&perPage...;,
  "records" : [ 
//ext details
 ],
  "paging" : {
    "page" : 1,
    "totalPages" : 1,
    "perPage" : 100,
    "totalElements" : 8,
    "pageStart" : 0,
    "pageEnd" : 7
  },
"navigation" : {
    "nextPage" : {
      "uri" : "https://platform.devtest.ringcentral.com/restapi/v1.0/account/131074004/extension?page=2&perPage...;
    },
    "firstPage" : {
      "uri" : "https://platform.devtest.ringcentral.com/restapi/v1.0/account/131074004/extension?page=1&perPage...;
    },
    "lastPage" : {
      "uri" : "https://platform.devtest.ringcentral.com/restapi/v1.0/account/131074004/extension?page=4&perPage...;
    }
  }
}

You can use "next" navigation page url to seek to next page with the list of extensions  .





1 comment
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

corey-tenney9911 avatar image corey-tenney9911 commented ·
Although this didnt directly answer my question it did point me in the right way.  Its available in the object you get back when you make the first call.... from there I should be able to add the rest of the records etc.  Thanks for your help.

0 Likes 0 ·
Tyler Liu avatar image
Tyler Liu answered corey-tenney9911 commented
This is the official NuGet package that we support:  https://github.com/ringcentral/ringcentral-csharp-client

It is possible to specify the perPage parameter.

https://github.com/ringcentral/ringcentral-csharp-client/blob/master/RingCentral/Paths/ExtensionPath...

Sample usage:

rc.RestApi().Account().Extension().List(new { perPage = 1000 });

The maximum perPage allowed is 1000. If you have more records, you still need to handle pagination. Please refer to VB's answer for pagination handling.

1 comment
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

corey-tenney9911 avatar image corey-tenney9911 commented ·
Tyler thanks so much.  I went directly to the API and figured it out... I think I just about have this program hacked together now.
0 Likes 0 ·

Developer sandbox tools

Using the RingCentral Phone for Desktop, you can dial or receive test calls, send and receive test SMS or Fax messages in your sandbox environment.

Download RingCentral Phone for Desktop:

Tip: switch to the "sandbox mode" before logging in the app:

  • On MacOS: press "fn + command + f2" keys
  • On Windows: press "Ctrl + F2" keys