question

ak avatar image
ak asked ak commented

A question on retrieving call logs using the API

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



sdk
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

circuit-board-medics42 avatar image
circuit-board-medics42 answered
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
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

ak avatar image
ak answered ak commented

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

circuit-board-medics42 avatar image circuit-board-medics42 commented ·
I'm getting the same result with your api-explorer.  Can you kindly provide more information in your responses for instance, the parameters you are supplying in all of your request so I can troubleshoot this without having to wait 24 hours for another response?  I've yet to see any evidence that the requests I am sending are incorrectly formed.  I have reviewed time and again all your documentation and can find no reason that I would not be able to retrieve our Sandbox call logs other than a permission issue.

My intention is to retrieve all call logs so once again here is the GET URI that I am using as documented in your Documentation after being Authenticated.
https://platform.devtest.ringcentral.com/restapi/v1.0/account/~/extension/~/call-log

Thank you

{ "uri": " https://platform.devtest.ringcentral.com/restapi/v1.0/account/131330004/extension/131330004/call-log?view=Simple&type=Voice&dateFrom=2015-07-16T00: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/131330004/extension/131330004/call-log?view=Simple&type=Voice&dateFrom=2015-07-16T00:00:00.000Z&page=1&perPage=100" } } 

}
0 Likes 0 ·
ak avatar image ak commented ·
There has been no Inbound / Outbound calls associated with your extension ( 101 ). If you login to service portal (  https://service.devtest.ringcentral.com ) and click on My Extension you would not see any call logs and that is the reason you are unable to retrieve the call logs associated with the main extension number. 

We did try a sample ring-out to your main extension number and you should now be able to see the call logs associated with your main extension number (101) . 

We suggest you set up your extension in service web portal as currently the inbound calls to your extension are being missed.

Thanks.

0 Likes 0 ·

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