Getting Call Log History

  • 1
  • Question
  • Updated 2 years ago
Using the following request url I can get the most recent 1000 calls from the call log. This is about 3 days of calls.
https://platform.ringcentral.com/restapi/v1.0/account/~/call-log?view=Detailed&perPage=1000

If I wanted to get call logs starting in January 2017 how would I go about doing that?
Photo of Nick Lagerquist

Nick Lagerquist

  • 160 Points 100 badge 2x thumb

Posted 2 years ago

  • 1
Photo of Automation USA

Automation USA

  • 1,040 Points 1k badge 2x thumb
Hi Nick,

Use the 'dateTo' and 'dateFrom' filters to set the staring and ending points for your call log request:

https://platform.ringcentral.com/restapi/v1.0/account/~/extension/~/call-log?view=Detailed&perPage=1000&dateTo=2017-03-31&dateFrom=2017-01-01
Source:
https://developer.ringcentral.com/api-docs/latest/index.html#!#RefExtensionCallLog.html

P.S. You can use only 'dateFrom', or only 'dateTo', or both.
Photo of Tyler Long

Tyler Long, Official Rep

  • 5,190 Points 5k badge 2x thumb
According to documentation, date format is  ISO 8601 format including timezone, for example 2016-03-10T18:07:52.534Z.
Photo of Nick Lagerquist

Nick Lagerquist

  • 160 Points 100 badge 2x thumb
Thanks for these responses!

Is there a parameter to sort the records?

For example, if I use dateFrom=2017-01-01 and dateTo=2017-01-31 and there are more then 1000 records I get the last 1000 starting from 2017-01-31. Is there a sort parameter so I could get the first 1000 records starting from 2017-01-01?
Photo of Tyler Long

Tyler Long, Official Rep

  • 6,858 Points 5k badge 2x thumb
There isn't such a parameter. You have to fetch the data then do sorting in your code.