API: /reports/connections >> "devicename":"",
I'm using this request:
And I get this:
....,"deviceid":"9x3xxx3x4","devicename":"","start_date".....
I need to get all "devicename":""
I know I can get entire list, and iterate each JSON element to get the requested list .
But the question is how to get this via API ?
I was trying for example like this:
https://webapi.teamviewer.com/api/v1/reports/connections?from_date=2016-........&devicename=""
.... and few other variation but with no success.
I will be grateful for your help.
Regards,
mLipok
mLipok , AutoIt MVP
Best Answers
-
Hi,
That kind of information is available only to requests made by using a user's access token.
The last example of your request empty devicename parameter is used: based on what you have requested is not the correct path. If you want all the names (provided that your access has privileges to request it) not to use that parameter in the request. If you need all the connections made by unnamed device you have to set it to "unamed_device". If you need a specific name, set it according to your needs.
You can check the privileges granted to your account via TeamViewer Management Console, these ones will be assigned when you withdraw the access token via OAuth.
If access to the API via APP Token script, this token created by you or your company (type of user and assigned to you) should have the same privileges needed to read the detail that request. Check this always via TV MC.You can find more and more precise details in the manual. Section 2 "OAuth 2.0 Authorization" is the one that can help you; specifically section 2.3 and 2.4 should allow you to understand if indeed your access allows the reading of this information via API.
Also note that, but I'm not sure of this, that all devices should have at least two names: one assigned by the owner and one assigned by those who have contacted the device via TeamViewer saving devices in the phone book. You must read this value.Regards
Domenico Langone
7 -
If you need all the connections made by unnamed device you have to set it to "unamed_device". If you need a specific name, set it according to your needs.this was "unnamed_device" a little typo here
But thanks. You pointed me in to the right way.Regards,
mLipok , AutoIt MVP5
Answers
-
Hi,
That kind of information is available only to requests made by using a user's access token.
The last example of your request empty devicename parameter is used: based on what you have requested is not the correct path. If you want all the names (provided that your access has privileges to request it) not to use that parameter in the request. If you need all the connections made by unnamed device you have to set it to "unamed_device". If you need a specific name, set it according to your needs.
You can check the privileges granted to your account via TeamViewer Management Console, these ones will be assigned when you withdraw the access token via OAuth.
If access to the API via APP Token script, this token created by you or your company (type of user and assigned to you) should have the same privileges needed to read the detail that request. Check this always via TV MC.You can find more and more precise details in the manual. Section 2 "OAuth 2.0 Authorization" is the one that can help you; specifically section 2.3 and 2.4 should allow you to understand if indeed your access allows the reading of this information via API.
Also note that, but I'm not sure of this, that all devices should have at least two names: one assigned by the owner and one assigned by those who have contacted the device via TeamViewer saving devices in the phone book. You must read this value.Regards
Domenico Langone
7 -
When I try this:
https://webapi.teamviewer.com/api/v1/reports/connections?from_date=201......&devicename=unamed_deviceThen I get empty records.
So I try to use this:
https://webapi.teamviewer.com/api/v1/reports/connections?from_date=20....&devicename=Bez nazwyI even try this:
https://webapi.teamviewer.com/api/v1/reports/connections?from_date=20.....&devicename=Bez%20nazwyUnfortunately each attempts without success.
Remark:
"Bez nazwy" is the device name in Polish which is displayed in Managment Console.Regards,
mLipok , AutoIt MVP0 -
If you need all the connections made by unnamed device you have to set it to "unamed_device". If you need a specific name, set it according to your needs.this was "unnamed_device" a little typo here
But thanks. You pointed me in to the right way.Regards,
mLipok , AutoIt MVP5 -
<snip> an mistake....
Regards,
mLipok , AutoIt MVP0