question

Chris Carrillo avatar image
Chris Carrillo asked ·

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!

get company call log recordslast page
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 ·

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 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.

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 · ·

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 · ·

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.