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
Analytic API not matching API reports
Tags: rest api, analytics and reporting
Apr 28, 2023 at 6:46am   •   1 replies  •  0 likes
Allen Morgan

Im trying to just pull detailed call data, grouped by users, daily...


"timeRange": {
            "timeFrom": "2023-01-26T00:00:00Z",
            "timeTo": "2023-01-26T23:59:59Z"
        }

If I try to set this time range I get this error:

"errorCode": "ANL-305",
            "message": "Interval must be less than time range"


I can pass things like this:

"grouping": {
        "groupBy": "Users",
        "keys": []
    },
    "timeSettings": {
        "timeRange": {
            "timeFrom": "2023-03-23T00:00:00.000Z",
            "timeTo": "2023-03-24T11:59:01.000Z"
        },
        "timeZone": "US/Eastern"
    }

and multiple variations in changing the timeFrom and timeTo -- so long the same Day is not selected...


However, none of the results I get match even close to the Performance Reports, by day, by user, in the admin analytics portal.


This is driving me crazy.
What am I doing wrong?


1 Answer
answered on Apr 28, 2023 at 9:17am  

Thanks for the response..
I have tried both the timeline and aggregate.
My goal is to get calls data at the end of each day by user.

I still cannot get the response to match with the totals/call details from the performance reports.


 0
answered on Apr 28, 2023 at 8:18am  

I am sure that you tried reading the timeline analytics data, right? If so, check the query params and set the interval accordingly. The interval must be less than the time range. E.g. if the time range is within a day, the interval must be just the "Hour".

screen-shot-2023-04-28-at-81443-am.png


 0
on Apr 28, 2023 at 9:17am   •  0 likes

Thanks for the response..
I have tried both the timeline and aggregate.
My goal is to get calls data at the end of each day by user.

I still cannot get the response to match with the totals/call details from the performance reports.

on Apr 28, 2023 at 9:26am   •  0 likes

You mixed the problem and made me think that you could not read the data at all

"message": "Interval must be less than time range"

If you could not read, how could you see the mismatched data?

Any way, the report you read from the dashboard is your local time. In the API, the time you specify to read data will be UTC time. Try to get your local time and convert it to UTC time before specify the timeFrom and timeTo to read the data.

on Apr 28, 2023 at 9:40am   •  0 likes
--data '{"grouping":{"groupBy":"Users"},"timeSettings":{"timeRange":{"timeFrom":"2023-04-25T04:01:00.000Z","timeTo":"2023-04-26T03:59:00.000Z"},"timeZone":"US/Eastern"},"responseOptions":{"counters":{"allCalls":true}}}'

I've done that. I've also changed timezones from US/East and UTC while changing timeranges to try to get a match.
Is there some sort of calculation done on the performance reports for total calls that I am not understanding?
I have tried to make sense of it for multiple users and still just do not understand.

on Apr 28, 2023 at 11:44am   •  0 likes

I can't see your exact report and the differences. In this case, you should better submit a dev support ticket, provide them with details of what you get and what you expect so they can help you.



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