question

Chris Carrillo avatar image
Chris Carrillo asked Phong Vu commented

Get company call log records last page URI returns the first page URI

I am referencing this link and using the RingCentral .Net SDK. After getting my response from the request, I try to access the navigation.lastPage.uri value and I get the navigation.firstPage.uri value.

This is what my params look like:

ReadCompanyCallLogParameters companyCallLogParams = new ReadCompanyCallLogParameters
{
    dateFrom = ((DateTime) SqlDateTime.MinValue).ToString("yyyy-MM-ddTHH:mm:sssZ"),
    page = 1,
    perPage = 1000,
    view = "Detailed"
};
AccountCallLogResponse response = _client.Restapi().Account().CallLog().List(companyCallLogParams);

Is this a mistake or am I missing something? I know that my response should have many pages of records but it is returning the first page's value as the last page's value. Could the name of this be confused with navigation.previousPage.uri?

I appreciate the time and help!

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 Phong Vu commented

I doubt that the dateFrom you specified in your call was a recent date so it would return all records in a single call.

Can you do a quick test with smaller page? Let's say set the perPage= 50

Let me know

2 comments
1 |3000

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

Chris Carrillo avatar image Chris Carrillo commented ·

Hello @Phong Vu. Thanks for replying! Since the perPage max is 1000, that's what I use. I know my company should have well over 1000 records. I have tried setting the perPage param to 50 just as you suggested. The last page uri is still returning the first page uri.

0 Likes 0 ·
Phong Vu avatar image Phong Vu ♦♦ Chris Carrillo commented ·

Hi Chris,

I double check and you are right. They shows the same link with the same page's index number.

I was told from the eng. team that one should not rely on the lastPage info because the server does not create the last page in advance. It exists just for reference only. One reason for it is while one is read the call log, the others may delete it from other app etc.

Anyway, you should just use the nextPage when it is available.

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