Class FormStatRestController

java.lang.Object
sk.iway.iwcm.components.multistep_form.rest.FormStatRestController

@RestController @RequestMapping("/rest/multistep-form-stat") @PreAuthorize("@WebjetSecurityService.hasPermission(\'cmp_form\')") public class FormStatRestController extends Object
  • Constructor Details

    • FormStatRestController

      public FormStatRestController()
  • Method Details

    • getFormStepHtml

      @GetMapping(value="/get-stat-data", params="form-name", produces="application/json") public org.springframework.http.ResponseEntity<String> getFormStepHtml(@RequestParam("form-name") String formName, jakarta.servlet.http.HttpServletRequest request)
      Returns the complete statistics payload for the selected multi-step form. The response contains summary metrics, chart data, bonus chart data, and validation error chart data filtered by the request date range parameters.
      Parameters:
      formName - the form name identifier from the form-name request parameter
      request - the current HTTP request used for localization and statistics filters
      Returns:
      HTTP 200 with serialized statistics JSON, or HTTP 400 when statistics cannot be generated
    • getFormStepHtml

      @GetMapping(value="/get-chart-data", params={"form-name","item-form-id"}, produces="application/json") public org.springframework.http.ResponseEntity<String> getFormStepHtml(@RequestParam("form-name") String formName, @RequestParam("item-form-id") String itemFormId, jakarta.servlet.http.HttpServletRequest request)
      Regenerates chart data for a single form item after chart display settings are changed. This endpoint is used when the selected chart type or item-specific settings require fresh chart data without reloading the complete statistics payload.
      Parameters:
      formName - the form name identifier from the form-name request parameter
      itemFormId - the form item identifier from the item-form-id request parameter
      request - the current HTTP request used for localization and statistics filters
      Returns:
      HTTP 200 with serialized chart data JSON, or HTTP 400 when chart data cannot be generated