News & Announcements User Community Developer Community

Welcome to the RingCentral Community

Please note the community is currently under maintenance and is read-only.

Search
Make sure to review our Terms of Use and Community Guidelines.
  Please note the community is currently under maintenance and is read-only.
Home » Developers
Not getting all data for extension
Tags: rest api
Sep 23, 2021 at 4:24pm   •   7 replies  •  0 likes
len-ott


I see others have asked this, but I haven't seen a response that works for me.
I am trying to get all call log data for a specific extension in C#. I am using the code below.
This return 3 records for 9/20/2021, however, the web portal shows 16 records for 9/20 on this date.

Also, I noticed the api is returning one marked VOIP that does NOT show up from the web portal?
Is this a problem with the account I am using for the API? Happy to send a code sample.

var pageNum = 1 
ReadCompanyCallLogParameters readCompanyCallLogParameters = new ReadCompanyCallLogParameters
                    {
                        extensionNumber = "3020",
                        dateFrom = "2021-09-19T00:00:00.000Z",
                        dateTo = "2021-09-22T00:00:00.000Z",
                        page = pageNum,
                        perPage = 1000,
                    };
                    r = await rc.Restapi().Account(accountId).CallLog().List(readCompanyCallLogParameters);

7 Answers
answered on Oct 14, 2021 at 3:17pm  

I am trying to read the entire call log (all extensions) using C# :
r = await rc.Restapi().Account(accountId).CallLog().List(readCompanyCallLogParameters);
and not setting any extension. I started setting the extension number asit was easier test.
My problems is I am NOT getting all calls, just a subset and I don't see what that subset is!




 0
answered on Oct 8, 2021 at 5:02pm  

Looks like I need to create a new 'app' with more permissions? I am still puzzled why the

`rc.Restapi().Account(accountId).CallLog().List(readCompanyCallLogParameters)` doesn't return all of the call data? So for 10/1 to 10/8 I get 20 records, but when I look in the console, I see 435?!

Anyway, once my new app is approved for production I will try using the extensionID, which I can now get.


 0
on Oct 9, 2021 at 7:58am   •  0 likes

It's important to know how did you read the call log. You should not use the extension number as the query filter because that will return only records containing the extension number matching with that number. It is not all the call records of that extension. What console do you mean? Was that the call log from the service web?

answered on Sep 24, 2021 at 9:21am  

Ok I will try again. When I tried this yesterday I was getting an error that the account I was using was not allowed or authorized...


 0
on Sep 24, 2021 at 9:24am   •  0 likes

You need access token

answered on Sep 23, 2021 at 11:47pm  

@len-ott This API you will get extension id details

GET https://platform.devtest.ringcentral.com/restapi/v1.0/account/~/extension/~

Please check this ref:

https://community.ringcentral.com/questions/89517/c-resource-for-parameter-extensionid-is-not-found.html


 0
answered on Sep 23, 2021 at 7:23pm  

Phong, How do I get the Extension ID?


 0
answered on Sep 23, 2021 at 5:44pm  

Check the id (extension id is different from extension number) of the extension "3020", then call the read user call log using that extension id instead.

var parameters = new ReadUserCallLogParameters();
parameters.dateFrom = "2021-09-19T00:00:00.000Z";
parameters.dateTo = "2021-09-22T00:00:00.000Z"
var resp = await rcsdk.Restapi().Account().Extension("id").CallLog().List(parameters);

 0
answered on Sep 23, 2021 at 4:45pm  

Note, I get the exact same results when using the online "Try It Out", same number of records.


 0



A new Community is coming to RingCentral!

Posts are currently read-only as we transition into our new platform.

We thank you for your patience
during this downtime.

Try Workflow Builder

Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!

Try RingCentral Workflow Builder

PRODUCTS
RingEX
Message
Video
Phone
OPEN ECOSYSTEM
Developer Platform
APIs
Integrated Apps
App Gallery
Developer support
Games and rewards

RESOURCES
Resource center
Blog
Product Releases
Accessibility
QUICK LINKS
App Download
RingCentral App login
Admin Portal Login
Contact Sales
© 1999-2024 RingCentral, Inc. All rights reserved. Legal Privacy Notice Site Map Contact Us