public async Task <IHttpActionResult> GetAlertsForDevice(string deviceid) { if (string.IsNullOrEmpty(deviceid)) { return(BadRequest()); } //deviceid = deviceid.ToLower(); return(Ok(await _statsService.GetActiveAlertsForDevice(deviceid).ConfigureAwait(false))); }