setDateFormat
Sets the date format for reporting. You can set the report date format in the Reports tab of the Rescue Administration Center. For information on reports, see Generating Reports in the LogMeIn Rescue Administration Center User Guide.
Input Parameters
Element | Description |
---|---|
dateformat: "MMDDYY" || "DDMMYY" | Defines the date format that can be MMDDYY or DDMMYY. 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 | Setting the date format succeeded. |
NOTLOGGEDIN | Setting the date format failed because the current user is no longer logged in. |
INVALIDPARAM_DATEFORMAT | The specified date format is incorrect. |
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 setDateFormat method that you can call in your environment.
HTTP GET
https://secure.logmeinrescue.com/API/setDateFormat.aspx?dateformat=MMDDYY
&authcode=4ahx...80u0
HTTP POST
<form method="post" action="https://secure.logmeinrescue.com/API/setDateFormat.aspx">
<input name="dateformat" value="MMDDYY">
<input name="authcode" value="4ahx...80u0">
</form>
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";
//Login
WebServiceClients.loginRet loginResult = proxy.login(sEmail, sPwd);
Response.Write(loginResult + "<br />");
DATEFORMAT dateformat = DATEFORMAT.DDMMYY;
//Get result
WebServiceClients.setDateFormatRet setDateFormatResult = proxy.setDateFormat(dateformat, sAuthCode);
Response.Write(setDateFormatResult);
}
catch (Exception ex)
{
lblError.Text = ex.Message;
}
}
}
}