public IActionResult GetMetricsByPercentileFromAgent( [FromRoute] NetworkMetricGetByIntervalForAgentRequest request, [FromRoute] Percentile percentile) { _logger.LogDebug("Вызов метода. Параметры:" + $" {nameof(request.AgentId)} = {request.AgentId}" + $" {nameof(request.FromTime)} = {request.FromTime}" + $" {nameof(request.ToTime)} = {request.ToTime}" + $" {nameof(percentile)} = {percentile}"); var metrics = _repository.GetByTimeIntervalPercentile(request.AgentId, request.FromTime, request.ToTime, percentile); var response = new AllMetricsResponse <NetworkMetricDto>(); foreach (var metric in metrics.Metrics) { response.Metrics.Add(_mapper.Map <NetworkMetricDto>(metric)); } return(Ok(response)); }