public IActionResult PutMessageReply( [FromRoute][Required] string device, [FromBody][Required] MessageReply reply) { try { var deviceId = new DeviceId(device); if (reply == null) { return(BadRequest("No Body provided")); } if (reply.Action != null) { Logger.DebugLogMessage($"Received MessageReply from \"{deviceId}\" with Action \"{reply.Action}\":", reply); switch (reply.Action) { case "StartJob": _actionModel.StartNewJob(deviceId, reply); break; default: break; } } return(FormattedOk()); } catch (FormatException e) { Logger.Error(e); return(BadRequest("DeviceId fehlerhaft.")); } catch (Exception e) { Logger.Error(e); return(FormattedInternalServerError()); } }