Reputation: 165
I would like to download the call logs of all my account's users. As I only have one user in my sandbox account, I cannot test it yet.
In production mode, if I call /account/~/extension/~/call-log
while logged in as the admin of my account, would I get the full list directly?
Alternatively, I have read in a post that I could achieve what I want by calling /account/~/extension
and then the url above for each extensions, but I wanted to know if there was a more straightforward way of doing it.
Have a great day!
Upvotes: 1
Views: 773
Reputation: 16354
There are two APIs to retrieve call logs for all users:
Account Call Log API
/account/~/call-log
The account call-log API can be used to retrieve call logs for all users in one API call. Access to this account-level API requires Super Admin privileges. This API is currently in beta and available by creating a support case from the developer portal or emailing RingCentral dev support at [email protected] .
Extension Call Log API
/account/~/extension/~/call-log
If you were to extension call-log endpoint in an account with multiple users, you would only receive the CDRs for your authorized extension. To retrieve call logs for all users using the extension call-log API, you would need to retrieve all the extensionIds from the /account/~/extension
endpoint and then call each user's extension endpoint using /account/~/extension/{extensionId}/call-log
. This approach also lets you limit who you want to retrieve records for.
Upvotes: 1