question

Chetan Nayak avatar image
Chetan Nayak asked ·

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);


c# calllog paging
1 |1000 characters needed characters left characters exceeded

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

1 Answer

· Write an 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.

Share
1 |1000 characters needed characters left characters exceeded

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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