I appear to have solved it myself. For anyone else who has the same question you simply append the GET command URL as follows:
https://platform.devtest.ringcentral.com/restapi/v1.0/account/~/extension/~/call-log?dateFrom=2020-12-01&phoneNumber=44123456789
Hope this helps others.
Add the "recordingType=All" filter to read only call records with recording.
@Anirban or anyone else please can you tell me if you know if it is possible to query the call log with two telephone numbers at the same time? Something like the following example:
https://platform.devtest.ringcentral.com/restapi/v1.0/account/~/extension/~/call-log?dateFrom=2020-12-01&phoneNumber=44123456789&phoneNumber2=895687456
Thank you for any help. Much appreciated.
@Matthew Herbert If you see the call log API specification below:
https://developers.ringcentral.com/api-reference/Call-Log/readUserCallLog
I don't think you can pass phoneNumber multiple times that way
Is there any way to search the call log for multiple telephone numbers in one API Get request? Currently, I am only able to use one phoneNumber querystring parameter in the URL for each API request. I can solve this by writing code to perform multiple API requests with a Get request each with a different phoneNumber parameter. The problem with this is I am now hitting a usage limit on the number of API requests! I have contacted the developer support team to remove or reduce the 60sec penalty since this is all due to the limitation of the API not allowing me to search for multiple telephone numbers in one go. However they haven't replied.
Our use-case is our CRM has to display all call recordings for each company. Each company can have multiple contacts, each with a different contact telephone number. My code loops through each contact telephone number, performs an API Get request to see if that telephone number appears in the call log, before moving on to the next contact telephone number, so ultimately the displayed page shows all call recordings for the whole company. I have also created a search facility for a CRM user to search the call log for a particular telephone number. However, I am finding after each page load or refresh the API stops all requests because it says too many requests have occurred and the front-end CRM user has to wait 60 seconds which is unacceptable. This is all due to the fact the API is limited in the respect it can only allow one phoneNumber parameter.
Unfortunately, the API does not support search for multiple telephone numbers. The only option for you is to change your app logic. First read the company call log with dateFrom and dateTo range and recordingType=All. Then keep all call records in an array and do a local search from the array.
Hi thanks for your reply. The only way for me to read each company's call log is to look at the telephone numbers which belong to that company. There is no other way. My code loops through each telephone number for each contact which belongs to a company and puts it into a database so I can read it and search it as necessary. The only issue is compiling all the company's contacts' telephone numbers causes the API to hit a limit (which can easily happen when another user on our CRM is accessing the call log on another company record, which in turn will have multiple contacts. Hence why I need the usage limit "wait" or "retry_after" reduced from 60 seconds down to as close to zero as possible.
One option would be to pull off the entire call log in one API request. This might work. However I have just noticed another issue. When I attempt to see the entire call log (by omitting the phoneNumber parameter) I can only see calls relating to myself and not for all users. I hadn't previously realised this because I was always using the phoneNumber querystring parameter before. The credentials used to logon are my own but I am the administrator user however the API appears to only be showing records for my inbound and outbound calls. Is there another user extension I need to enter for the API in order to get the complete call log for everyone?
You know the purpose of the API rate limit (throttling), right? I don't think that increasing the limit is an option. Even in some special case, we can double the limit but it will not solve your problem as with your currently implementation, it is unpredictable and requires much more that that.
To read the entire company call log, you need to login as an admin user, or a user with the read company call log user's permission (defined in a role assigned to that user extension). And call the company call log endpoint.
https://developers.ringcentral.com/api-reference/Call-Log/readCompanyCallLog