unassignChannel
Unassigns a technician or Technician Group from a channel. For information about unassigning channels in the Rescue Administration Center, see How to Assign a Channel to a Technician Group in the LogMeIn Rescue Administration Center User Guide.
Input Parameters
Element | Description |
---|---|
node | The ID of the technician or Technician Group. Required. |
entry | The ID of the channel. Required. |
authcode | The secret authentication code that is used to authenticate the user without logging in to Rescue. Optional. |
Return Values
Displayed Return Value | Description |
---|---|
ERROR | An unspecified error occurred, such as timeout. |
OK | Unassigning a technician or Technician Group succeeded. |
NOTLOGGEDIN | Unassigning a technician or Technician Group failed because the current user is no longer logged in. |
INVALIDPARAM_NODE | The ID of a technician or a Technician Group is not defined. |
INVALIDPARAM_ENTRY | The ID of a channel is not defined. |
INVALID_DEASSIGN | The channel cannot be unassigned from a technician or Technician Group. |
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 unassignChannel method that you can call in your environment.
HTTP GET
https://secure.logmeinrescue.com/API/unassignChannel.aspx?node=337364
&entry=1902861082&authcode=4ahx...80u0
HTTP POST
<form method="post" action="https://secure.logmeinrescue.com/API/unassignChannel.aspx">
<input name="node" value="337364">
<input name="entry" value="1902861082">
<input name="authcode" value="4ahx...80u0">
</form>
SOAP
For sample SOAP 1.1 and SOAP 1.2 request and response messages, visit https://secure.logmeinrescue.com/api/API.asmx?op=unassignChannel.
PHP with SOAP
The example values shown must be replaced with actual values.
<?php
$soapclient = new SoapClient("https://secure.logmeinrescue.com/api/api.asmx?wsdl");
$loginparams = array (
'sEmail' => 'some@email.com',
'sPassword' => 'secretPassword'
);
$iNodeID = 337364;
$iEntryID = 1902861082;
$sAuthCode = "4ahx...80u0";
$unassignchannelparams = array (
'iNodeID' => $iNodeID,
'iEntryID' => $iEntryID,
'sAuthCode' => $sAuthCode
);
$loginResult = $soapclient->login($loginparams);
print_r($loginResult);
$unassignChannelResult = $soapclient->unassignChannel($unassignchannelparams);
print_r($unassignChannelResult);
?>
C# with HttpWebRequest
The example values shown must be replaced with actual values.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Net;
using System.IO;
namespace assignChannel
{
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
try
{
string sEndpoint = "https://secure.logmeinrescue.com/api/";
string sEmail = "some@email.com";
string sPwd = "secretpassword";
int iNode = 337364;
int iEntry = 1902861082;
string sAuthCode = "4ahx...80u0";
HttpWebRequest oReqLogin = (HttpWebRequest)WebRequest.Create(sEndpoint
+ "login.aspx" + "?email=" + sEmail + "&pwd=" + sPwd);
oReqLogin.CookieContainer = new CookieContainer();
CookieContainer sessioncookie = oReqLogin.CookieContainer;
HttpWebResponse oLoginResp = (HttpWebResponse)oReqLogin.GetResponse();
string sLoginResp = new StreamReader(oLoginResp.GetResponseStream())
.ReadToEnd();
Response.Write(sLoginResp + "<br />");
HttpWebRequest oUnassign = (HttpWebRequest)WebRequest.Create(sEndpoint
+ "unassignChannel.aspx" + "?node=" + iNode + "&entry=" + iEntry + "&authcode="
+ sAuthCode);
oUnassign.CookieContainer = sessioncookie;
HttpWebResponse oUnnasignResp = (HttpWebResponse)oUnassign.GetResponse();
string sUnnasignResp = new StreamReader(oUnnasignResp.GetResponseStream())
.ReadToEnd();
Response.Write(sUnnasignResp);
}
catch (Exception ex)
{
lblError.Text = ex.Message;
}
}
}
}
C# with SOAP
The example values shown must be replaced with actual values.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Net;
using System.IO;
namespace assignChannel
{
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
try
{
string sEmail = "some@email.com";
string sPwd = "secretPassword";
int iNode = 337364;
int iEntry = 1902861082;
string sAuthCode = "4ahx...80u0";
WebServiceClients.API proxy = new WebServiceClients.API();
proxy.CookieContainer = new CookieContainer();
WebServiceClients.loginRet loginResult = proxy.login(sEmail, sPwd);
Response.Write(loginResult + "<br />");
WebServiceClients.unassignChannelRet oUnassign = proxy.unassignChannel
(iEntry, iNode, sAuthCode);
Response.Write(oUnassign);
}
catch (Exception ex)
{
lblError.Text = ex.Message;
}
}
}
}