We have recently added our call records to the sandbox and are now trying to retrieve the call logs via the API; however, I am getting the following result saying there are 0 records. Can you tell me if call logs are available via API as soon as they are created?
Thank you,
{
"uri" : "https://platform.devtest.ringcentral.com/restapi/v1.0/account/~/extension/~/call-log?view=Simple&dateFrom=xxxx-xx-xxT00:00:00.000Z&page=1&perPage=100",
"records" : [ ],
"paging" : {
"page" : 1,
"perPage" : 100
},
"navigation" : {
"firstPage" : {
"uri" : "https://platform.devtest.ringcentral.com/restapi/v1.0/account/~/extension/~/call-log?view=Simple&dateFrom=xxxx-xx-xxT00:00:00.000Z&page=1&perPage=100"
}
}
}
--
Answer:
There is usually a delay of 30 seconds when you try to retrieve the call logs using the GET request. The service web populates all the call log information instantly but when you try to retreive this information through an API ( GET request ) :
/v1.0/account/{accountId}/extension/{extensionId}/call-log
due to this delay not all the active calls would be displayed. In order to retrieve all the active calls you could use the "Get Active Calls" API:
/v1.0/account/{accountId}/active-calls