Class ReportController

java.lang.Object
com.nmontytskyi.monitoring.server.controller.ReportController

@RestController @RequestMapping("/api/reports") public class ReportController extends Object
REST controller that triggers PDF report generation and serves the resulting files as downloadable HTTP responses.

Delegates report generation to PdfReportService and streams the resulting PDF bytes with Content-Disposition: attachment. Also exposes an endpoint for retrieving the report generation history of a service.

Author:
Nazar Montytskyi
See Also:
  • Constructor Details

    • ReportController

      public ReportController()
  • Method Details

    • slaReport

      @GetMapping("/{serviceId}/sla") public org.springframework.http.ResponseEntity<byte[]> slaReport(@PathVariable Long serviceId, @RequestParam @DateTimeFormat(iso=DATE) LocalDate from, @RequestParam @DateTimeFormat(iso=DATE) LocalDate to)
    • fullReport

      @GetMapping("/{serviceId}/full") public org.springframework.http.ResponseEntity<byte[]> fullReport(@PathVariable Long serviceId, @RequestParam @DateTimeFormat(iso=DATE) LocalDate from, @RequestParam @DateTimeFormat(iso=DATE) LocalDate to)
    • systemReport

      @GetMapping("/system") public org.springframework.http.ResponseEntity<byte[]> systemReport(@RequestParam @DateTimeFormat(iso=DATE) LocalDate from, @RequestParam @DateTimeFormat(iso=DATE) LocalDate to)
    • history

      @GetMapping("/{serviceId}/history") public List<ReportHistoryResponse> history(@PathVariable Long serviceId)