logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
blakes  
#1 Posted : Monday, August 20, 2018 6:05:36 PM(UTC)
blakes


Rank: Guest

Joined: 8/20/2018(UTC)
Posts: 1
United States
Location: Florida

Hi all,
I would like to retrieve the session status of each computer remotely and import it a DB running on my in house server. Our ScreenConnect implementation is web based. I am used to just running API calls to retrieve data, just very new at the idea of building an extension for this type of information. I have looked over the developer documents and honestly do not understand how to do a remote API call to our ScreenConnect URL to retrieve the info I am looking for.

Oh and I am not asking anyone to write this for me, just for some guidance on how to retrieve the data remotely.

Any help is very much appreciated.

Thanks!

-Blake

Edited by user Tuesday, August 21, 2018 12:59:42 PM(UTC)  | Reason: Not specified

Scott  
#2 Posted : Friday, September 7, 2018 12:34:50 PM(UTC)
Scott


Rank: Administration

Medals: Level 4: Wise Old Owl! Received 100 Thanks!

Joined: 3/28/2014(UTC)
Posts: 2,764
United States

Thanks: 3 times
Was thanked: 338 time(s) in 292 post(s)
So from your explanation it looks like the Extension you want to make should be pretty simple. I see it having a WebServiceReference class that implements method(s) to gather, format, and return the information you want. The way our Extension framework operates is that you make a request to a WebService method which then interacts with the SessionManager to retrieve the data and return it.

So, for a walkthrough, let's say you create an Extension (with ExtensionID 625c7187-1de7-471b-b21f-fbe3a008cc81) and a WebServiceReference component called Service.ashx. The Service.ashx class would look similar to:

Code:

<%@ WebHandler Language="C#" Class="Service" %>

using System;
using ScreenConnect;

public class Service : WebServiceBase
{
	public object GetSessionDetails(Guid sessionID)
	{
		return SessionManagerPool.Demux.GetSessionDetails(sessionID);
	}
}


This class contains a single method, GetSessionDetails, that accepts a SessionID and returns the relevant information. To invoke this method, you have to call it directly (thus why it was important to be aware of the Extension's ExtensionID previously). You do this by making a POST web request to the following url:

Code:

https://my.screenconnect.com/App_Extensions/625c7187-1de7-471b-b21f-fbe3a008cc81/Service.ashx/GetSessionDetails


Now the request has to have a Content-Type header set to application/json and you want to pass the SessionID as a raw payload like:
Code:

["d1d68c7c-07b5-49e2-8844-a66edd6f72ec"]


To get started creating Extensions take a look at the KB doc found here.
ScreenConnect Team
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.