Highlighted
Posted by TeamViewer Star
TeamViewer Star

API: /reports/connections >> "devicename":"",

I'm using this request:

https://webapi.teamviewer.com/api/v1/reports/connections?from_date=2016-12-01T00:00:01Z&to_date=2016...

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

 

Regards,
mLipok , AutoIt MVP

Did my reply answer your question? Accept it as a solution to help others.
Find this helpful? Say thanks by clicking on the Thumbs Up button.

4 Replies
2 Accepted Solutions

Accepted Solutions
Highlighted
Posted by TeamViewer Star
TeamViewer Star
Solution

Re: API: /reports/connections >> "devicename":"",

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
MCSD: App Builder
Did my reply answer your question? Accept it as a solution to help others.
Find this helpful? Say thanks by clicking on the Thumbs Up button.

View solution in original post

Highlighted
Posted by TeamViewer Star
TeamViewer Star
Solution

Re: API: /reports/connections >> "devicename":"",



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 MVP

Did my reply answer your question? Accept it as a solution to help others.
Find this helpful? Say thanks by clicking on the Thumbs Up button.

View solution in original post

4 Replies
Highlighted
Posted by TeamViewer Star
TeamViewer Star
Solution

Re: API: /reports/connections >> "devicename":"",

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
MCSD: App Builder
Did my reply answer your question? Accept it as a solution to help others.
Find this helpful? Say thanks by clicking on the Thumbs Up button.

View solution in original post

Highlighted
Posted by TeamViewer Star
TeamViewer Star

Re: API: /reports/connections >> "devicename":"",

When I try this:
https://webapi.teamviewer.com/api/v1/reports/connections?from_date=201......&devicename=unamed_device

Then I get empty records.

So I try to use this:

https://webapi.teamviewer.com/api/v1/reports/connections?from_date=20....&devicename=Bez nazwy

I even try this:
https://webapi.teamviewer.com/api/v1/reports/connections?from_date=20.....&devicename=Bez%20nazwy

Unfortunately each attempts without success.

Remark:
"Bez nazwy" is the device name in Polish which is displayed in Managment Console.

 

Regards,
mLipok , AutoIt MVP

Did my reply answer your question? Accept it as a solution to help others.
Find this helpful? Say thanks by clicking on the Thumbs Up button.

Highlighted
Posted by TeamViewer Star
TeamViewer Star
Solution

Re: API: /reports/connections >> "devicename":"",



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 MVP

Did my reply answer your question? Accept it as a solution to help others.
Find this helpful? Say thanks by clicking on the Thumbs Up button.

View solution in original post

Highlighted
Posted by TeamViewer Star
TeamViewer Star

Re: API: /reports/connections >> "devicename":"",

<snip> an mistake....

Regards,
mLipok , AutoIt MVP

Did my reply answer your question? Accept it as a solution to help others.
Find this helpful? Say thanks by clicking on the Thumbs Up button.