public bool Post(string sessionId, string detailed) { try { if (detailed == "downloadreports") { SessionController sessionController = new SessionController(); Session session = sessionController.GetSessionWithId(new SessionId(sessionId)); foreach (DiagnoserSession diagSession in session.GetDiagnoserSessions()) { diagSession.DownloadReportsToWebsite(); } } else if (detailed == "startanalysis") { SessionController sessionController = new SessionController(); Session session = sessionController.GetSessionWithId(new SessionId(sessionId)); sessionController.Analyze(session); } else if (detailed == "cancel") { SessionController sessionController = new SessionController(); Session session = sessionController.GetSessionWithId(new SessionId(sessionId)); sessionController.Cancel(session); } else { return(false); } return(true); } catch { return(false); } }