question

ed-smith5674 avatar image
ed-smith5674 asked ·

Question on Identifying the user in a call log

I have been able to successfully pull all calls from production using this call:  https://platform.ringcentral.com/restapi/v1.0/account/~/call-log?typeVoice&view=Detailed&perPage=1000&dateTo=2017-05-31T23:59:59.999Z&dateFrom=2017-05-01T00:00:00.000Z

But I can't figure out how to find the account that actually made the call in the response.  Which field should I be using?  I'm trying to tie back to the reports available on the website, but am unable to.

Where can I find the account/user that made/received the call?

aaa
1 |1000 characters needed characters left characters exceeded

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

Julio Toledo avatar image
Julio Toledo answered ·
The user's account id is actually called "extension", and it is in the uri for every record in your call log response. For example:
"uri" : "https://platform.ringcentral.com/restapi/v1.0/account/123887456789/extension/987654321/call-log/V3zJdJQ_ui1h0B1?view=Simple"

Share
1 |1000 characters needed characters left characters exceeded

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

Tyler Liu avatar image
Tyler Liu answered ·
Automation USA is correct. "account" is for organization, "extension" is for users in that organization.
Share
1 |1000 characters needed characters left characters exceeded

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

ed-smith5674 avatar image
ed-smith5674 answered ·
Hmm, must be something with the endpoint I used, here's the uri from the response using simple view:  https://platform.ringcentral.com/restapi/v1.0/account/589093020/call-log/Sx5oSBhV-5IA0w?view=Simple

No extension id. 

Thank you both for the help.
Share
1 |1000 characters needed characters left characters exceeded

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

ed-smith5674 avatar image
ed-smith5674 answered ·
I think I figured out my issue.  I used the account endpoint without the extension id.  I did this because when I used extension with ~ I only received my own calls and not all the users.  I believe this is because I did not request the account\extension resource.  Since it won't let me add additional resources, I'll start an app from scratch with the added resources, re submit the sandbox requirements, and request access to production again.

Then, I think I should be able to get a list of extension ids, and then submit individual requests for each of those extension ids.
Share
1 |1000 characters needed characters left characters exceeded

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

Tyler Liu avatar image
Tyler Liu answered ·
"~" is for current user only.

You can /restapi/v1.0/account/~/extension to list all the users, then fetch call logs for each user.
3 comments Share
1 |1000 characters needed characters left characters exceeded

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

Yep, I realized that.  Sadly my original app didn't have the read accounts permission, so I created a new app with the appropriate needed permissions as I could not edit the original.

0 Likes 0 · ·
Thanks, I submitted the sandbox requests last night have submitted the app for review.  I truly do appreciate all your help.
0 Likes 0 · ·
ed-smith5674 avatar image
ed-smith5674 answered ·
Follow up question: I was successfully able to get all my calls back and tie them back to the user, but I have some calls that show up in the data that I pulled from the api that do not show when I export a report from the web gui interface.

Is this normal?  I'm wondering if there are any default filters on those reports.

example: r=rc.get('/restapi/v1.0/account/589093020/extension/499273028/call-log/FXwWb0gHm0z2sq4?view=Detailed')

Share
1 |1000 characters needed characters left characters exceeded

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

Tyler Liu avatar image
Tyler Liu answered ·
I have no experience with the web gui. For the API, you can check the docs:  https://developer.ringcentral.com/api-docs/latest/index.html#!#RefGetExtensionCallLog The query parameters are the available filters.

It is possible that web gui has some default filers such as direction, dateFrom...etc. You can post a question here:  https://devcommunity.ringcentral.com/ringcentraldev/categories/ringcentraldev_admin_credentials
Share
1 |1000 characters needed characters left characters exceeded

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

ed-smith5674 avatar image
ed-smith5674 answered ·
Understood.  Yep, I read the whole api reference before asking the question.  From looking on the forum it seems like it is a known issue, so I'll move forward with just trusting the data from the api over the interface.
Share
1 |1000 characters needed characters left characters exceeded

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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