// GET: api/CpuMonitoring/5 public HttpResponseMessage Get(string sessionId) { var monitoringController = new MonitoringSessionController(); try { var session = monitoringController.GetSession(sessionId); return(Request.CreateResponse(HttpStatusCode.OK, session)); } catch (Exception ex) { Logger.LogCpuMonitoringErrorEvent("Controller API Failure - GetSessionId", ex, string.Empty); return(Request.CreateErrorResponse(HttpStatusCode.NotFound, ex.Message)); } }
public HttpResponseMessage Analyze(string sessionId) { var monitoringController = new MonitoringSessionController(); var session = monitoringController.GetSession(sessionId); try { var result = monitoringController.AnalyzeSession(sessionId, session.BlobSasUri); return(Request.CreateResponse(HttpStatusCode.OK, result)); } catch (Exception ex) { Logger.LogCpuMonitoringErrorEvent("Controller API Failure - Analyze", ex, string.Empty); return(Request.CreateErrorResponse(HttpStatusCode.NotFound, ex.Message)); } }