Skip to main content

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



Okay, so why are we not seeing call logs returned still?  According to your "Retrieving Call Logs" tutorial, https://developer.ringcentral.com/library/tutorials/get-call-log.html, I can use the following GET command after authentication to retrieve call logs. When I use this URI, I receive a 200 okay status, but no call logs using the following URI:
https://platform.devtest.ringcentral.com/restapi/v1.0/account/~/extension/~/call-log

That URI returns:

200 okay status:

{
uri: "https://platform.devtest.ringcentral.com/restapi/v1.0/account/131330004/extension/131330004/call-log?view=Simple&dateFrom=2015-07-15T00:00:00.000Z&page=1&perPage=100"
records: [
0]
paging: {
page: 1
perPage: 100
}
-

navigation: {
firstPage: {
uri: "https://platform.devtest.ringcentral.com/restapi/v1.0/account/131330004/extension/131330004/call-log?view=Simple&dateFrom=2015-07-15T00:00:00.000Z&page=1&perPage=100"
}
-

}
-

}

However, when I try and retrieve account extension information everything works fine and the Sandbox account information is returned properly using the following GET URI.
https://platform.ringcentral.com/restapi/v1.0/account/~/extension/~

All call logs were added yesterday so I am not sure why I am unable to retrieve the information as documented in your Call Log tutorial.  Can you please help explain what the issue might be?

Thank you

We tried emulating the issue but we were able to populate the call logs. I would suggest you to try our API explorer :

http://ringcentral.github.io/api-explorer/


Kindly authenticate your sandbox credentials 

Get Token

and then try to retrieve the call logs using the API:

Get Call Log Records by Filter

Reply