LogMeIn Rescue API User Guide

getSession_v2

Retrieves the current sessions of any hierarchy node (technician or channel). You can see the list of sessions on the Sessions tab of the Rescue Administration Center.

Changes in Version 2 of getSession

The following session properties have been introduced in the getSession_v2 method:
IsLead
Denotes whether the technician of the session is the lead technician.
HandingOff
Denotes whether the session was handed over to the technician.

Input Parameters

Element Description
node The sessions of this node are listed. Required.
noderef The reference of the node, which can be NODE or CHANNEL. Optional, default is NODE.
authcode The secret authentication code that is used to authenticate the user without logging in to Rescue. Optional.

Output

OK ID|Status|Entry ID|Entry|Technician ID|Technician|Start Time|Waiting Time|Custom Field 0|
Custom Field 1|Custom Field 2|Language|Transferred To|Transferred Comment|Is Lead Technician|
HandingOff|1663112|Waiting|0||337366|John Doe|2/16/2012 9:00 AM|13|Customer|||en|||yes|| 

The list that the getSession method retrieves contains information about a session in a table. This table has the following columns:

  • ID: Session ID
  • Status: Session status
    Possible values:
    • Aborted: technician was deleted or disabled
    • Active
    • Closed by active customer
    • Closed by customer
    • Closed by technician
    • Closed by waiting customer
    • Connecting
    • Disconnected
    • Not available
    • Offline
    • On Hold
    • Rebooted
    • Rebooting
    • Reconnecting
    • Timed out
    • Timed out: closed by technician
    • Transferred
    • Transferring
    • Waiting
  • Entry ID: Channel's ID
  • Entry: Channel's name
  • Technician ID: Technician's ID
  • Technician: Technician's name
  • Start Time: Start time of the session
  • Waiting Time: Time elapsed since the last session status change
  • Custom Field 0-2: Custom fields that the Technician fills in when he initiates a session
  • Language: The two-digit language code of the customer's operation system
  • Transferred To: The recipient Technician of a transferred session
  • Transferred Comment: Comment to the recipient Technician when a session transferred
  • Is Lead Technician: Denotes whether the technician of the session is the lead technician
  • HandingOff: Denotes whether the session was handed over to the technician

Return Values

Displayed Return Value Description
ERROR An unspecified error occurred, such as timeout.
OK Retrieving session information succeeded.
NOTLOGGEDIN Retrieving session information failed because the current is no longer logged in.
INVALIDPARAM_NODE The specified ID is not the ID of an existing node.
INVALID_SECRETAUTHCODE The secret authentication code for the user is invalid.
USER_DELETED_OR_DISABLED The user is deleted or disabled.

Sample Code

The following are examples for using the getSession_v2 method that you can call in your environment.

C# with SOAP

using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using apiSamples.WebServiceClients;

namespace apiSamples
{
    public partial class SOAP : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                //Set up proxy
                WebServiceClients.API proxy = new WebServiceClients.API();
                proxy.CookieContainer = new CookieContainer();

                string sEmail = "some@email.com";
                string sPwd = "secretPassword";
                string sAuthCode = "4ahx...80u0";
                int iNodeID = 337366;
                NODE_REF eNodeRef = NODE_REF.NODE;
                SESSION_V2[] aSessions;

                //Login
                WebServiceClients.loginRet oLogin = proxy.login(sEmail, sPwd);
                Response.Write(oLogin + "<br />");

                WebServiceClients.getSessionRet oGetSessionV2 = proxy.getSession_V2(iNodeID, eNodeRef, sAuthCode, out aSessions);
                Response.Write(oGetSessionV2 + "<br />");

                foreach (SESSION_V2 s in aSessions)
                {
                    Response.Write("Session ID: " + s.iID + " Technician: " + s.sTechnician);
                }
            }
            catch (Exception ex)
            {
                Response.Write(ex.Message);
            }
        }

    }

}