API - Information Fetching

General conversation about our product. Get help with your 'How To' questions.
Post Reply
strajk
Posts: 13
Joined: Wed Apr 12, 2017 1:00 pm

API - Information Fetching

Post by strajk » Wed Apr 12, 2017 1:09 pm

Hello,

are there some kind of entry-points provided by TSPLUS to fetch information using Applications we wrote ourselves?
The end goal is to fetch information such as:
- What IPs or Hostnames are currently connected to the server
- Fetch if the connected device is mobile or not and if it's currently using Portrait or Landscape view

There are a couple other points in our interest, but having the knowledge if there is an API and Documentation to play around with it would be sufficient for now.

Thanks you in advance :)

User avatar
admin
Site Admin
Posts: 1649
Joined: Wed Sep 05, 2012 6:38 am

Re: API - Information Fetching

Post by admin » Wed Apr 12, 2017 4:35 pm

Hello,

IP's and hostname of the client are displayed in the session manager located in the server tile of the admin tool. For more information about your server and user environment I recommend you to try out "Monitoring and reporting for RDP" : http://www.terminalserviceplus.com/repo ... toring.php
Olivier
TSplus support team administrator
Image

strajk
Posts: 13
Joined: Wed Apr 12, 2017 1:00 pm

Re: API - Information Fetching

Post by strajk » Wed Aug 30, 2017 7:43 am

Hello,

thanks for the info, I checked out the Addon you mentioned but I can't find anything in the server.db that provides me an IP Address for my application to look into.
Where is the session data of TSPLUS being managed so I can look into it and fetch the IPs of the current active sessions?

Thanks in advance!

strajk
Posts: 13
Joined: Wed Apr 12, 2017 1:00 pm

Re: API - Information Fetching

Post by strajk » Wed Aug 30, 2017 9:34 am

I just found out that it might be in the encrypted bin file sessionmanage, so I guess I'm off for that one.

How about the scripts that I can execute with W.customerScripts?
Are they Javascript only?
Or can I use json or even Node.JS with it?

My idea would be to write the IP into a text file in the server, I'm not that great when it comes to webdev, but if I'm not mistaken I will be forced to use an AJAX call from within the Javascript in order to execute server side php to store the data.

The main reason that I want to know the IP Address, is to implement Whitelisting, to either block certain Addresses, or to allow certain Addresses.

adrien
Posts: 43
Joined: Thu Sep 10, 2015 10:39 am

Re: API - Information Fetching

Post by adrien » Sat Sep 02, 2017 12:00 pm

Hello,

On the server-side you can use Windows standard API to get a list of user sessions, including their client IP adresses: https://msdn.microsoft.com/en-us/librar ... s.85).aspx

Also, if you want to have blacklisting/whitelisting of client IP adresses as well as a lot of other security features for remotely accessible servers, I would advise you to have a look at our security product RDS-Knight: http://www.rds-tools.com/rds-knight
Adrien
TSplus CTO

Post Reply