question

Chetan Nayak avatar image
Chetan Nayak asked Phong Vu answered

C# Calllog API return rows limited

I am using the RingCentral.net C CallLog API with admin account. I do get call logs for all users but only getting 100 rows. I tried different dates in datefrom param. I do see data for the different dates but only 100 rows each time. is there page setting that will give me all data? Do i need to loop through the pages to get all data for the 90 days? There is no mention in the documentation other than to set dateFrom. Thanks

Here's the code

RestClient rc = new RestClient("client_id", "client_secret", true);

await rc.Authorize("Admin phone", "admin ext id", "password");

var parameters = new ReadCompanyCallLogParameters();

parameters.view = "Detailed";

parameters.dateFrom = "2019-06-01T00:00:00.000Z";

parameters.dateTo = "2019-06-10T00:00:00.000Z";


var resp = await rc.Restapi().Account().CallLog().List(parameters);

string json = JsonConvert.SerializeObject(resp, Formatting.Indented);

var exportFileName = @"\\<server>\RingCentral\ProdCallLog" + DateTime.Now.ToString("yyyyMMddHHmmssfff") + ".json";

File.WriteAllText(exportFileName, json);


rest api
1 |3000

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

1 Answer

Phong Vu avatar image
Phong Vu answered

You can set the perPage query parameter to the number of rows you want to read. The max number is 1000. Then you can use the paging from the returned response to read next or previous pages.

1 |3000

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

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