Class SlaController

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

@RestController @RequestMapping("/api/services/{id}/sla") @Validated public class SlaController extends Object
REST controller for SLA threshold management and compliance reporting.

Allows callers to retrieve the SLA compliance report for a service over a chosen time window (DAY / WEEK / MONTH) and to update the SLA thresholds stored in SlaDefinitionEntity.

Author:
Nazar Montytskyi
See Also:
  • Constructor Details

    • SlaController

      public SlaController()
  • Method Details

    • getSlaReport

      @GetMapping public org.springframework.http.ResponseEntity<SlaReport> getSlaReport(@PathVariable Long id, @RequestParam(defaultValue="DAY") SlaWindow window)
    • updateSla

      @PutMapping public org.springframework.http.ResponseEntity<Void> updateSla(@PathVariable Long id, @RequestBody SlaUpdateRequest request)