question

Insellerate Developer avatar image
Insellerate Developer asked Phong Vu commented

RingCentral APIs

Hi Team,


We are using this API (https://platform.devtest.ringcentral.com/restapi/v1.0/account/accountId/extension/extensionId/call-log-sync) to sync the phone records into our system. To sync the recording URL, we have to find it under the "legs" property.


We noticed that there is also this API (https://platform.devtest.ringcentral.com/restapi/v1.0/account/accountId/extension/extensionId/call-log/callRecordId), where recording URL is stored both as part of the call record and under the "legs" property.


Question 1:

Why there is this difference between these two APIs in terms of how/where recording URL is stored? For a given callsid, are the two APIs returning same result?


Question 2:

We also use call-log-sync (i.e. https://platform.ringcentral.com/restapi/v1.0/account/~/call-log-sync?view=Detailed&dateFrom=2023-09-06T17:10:00Z&recordCount=250) API to query the records. However, due to large data volume, a callsid once showed up in the query result does not show again if we execute the same query with same "dateFrom" parameter and no matter how we tweak the "dateFrom", we are not able to find data for same callsid. Is there an easier way to query a call record that can return same result as this API?

rest apicall logscall recording
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

A1: The recording object should be available in the main response object too. If you are so sure that the recording object exists in a leg and not present in the main object, then submit a dev support ticket with the full record payload so someone can have a look at it.

A2: The max record count is 250 records. If there are more than 250 call records, the API will ignore the dateFrom query param.

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

Insellerate Developer avatar image Insellerate Developer commented ·

Hi Phong,


Is RingCentral sending snapshot of the call record or the finalized call record? Because our database is showing some call records did not have recording URL saved, however when we queried RingCentral using postman for the same call record, the recording URL was there in the response. Is it possible that when our system synced one particular record, the recording URL was not available yet (maybe due to the call was still ongoing) at the moment, and at later point when we queried the same record from Postman again, the record was finalized (call was finished)? That's why we saw the discrepancies?

0 Likes 0 ·
Phong Vu avatar image Phong Vu ♦♦ Insellerate Developer commented ·

The sync API might handle syncing ongoing calls in a way that it would need to update a call record later when a call is completed. I don't know how to parse and update your db. But you can always rely on the call record id as a unique and primary key in your db, then when you sync and parse the sync data, if the record exists, simply update the other data fields of that record.

If syncing the data does not need to be near real-time. If it can be synced a few hours or a day from the current time, I would recommend to use the /call-log to read call records. You can set the the dateFrom = dateTo (minus ~10 millisecond) of a previous read.

1 Like 1 ·
Insellerate Developer avatar image Insellerate Developer Phong Vu ♦♦ commented ·

There is no difference between the two APIs right? For one call id, the result would be same for both?

https://platform.devtest.ringcentral.com/restapi/v1.0/account/accountId/extension/extensionId/call-log-sync

https://platform.devtest.ringcentral.com/restapi/v1.0/account/accountId/extension/extensionId/call-log/callRecordId


We are using first one now. We may need to switch to second one since it is more flexible and allows us to specify a time range.

0 Likes 0 ·
Show more comments

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