Interface IAlertRestService

All Known Implementing Classes:
AlertRestServiceController

@RequestMapping("/activeviam/sentinel/rest/v8/alerts") public interface IAlertRestService
The alerts rest service.
Author:
ActiveViam
  • Field Details Link icon

  • Method Details Link icon

    • getAlerts Link icon

      @GetMapping List<AlertDto> getAlerts(@RequestParam(value="active",required=false) String active, @RequestParam(value="from",required=false) String from, @RequestParam(value="to",required=false) String to) throws ServiceException
      Gets all alerts.
      Parameters:
      active - the status of the alert Use true to get active alerts only, false for stopped alerts. If not specified, no filter is applied.
      from - optional 'from' time boundary, used to get changes on the point values since that date This accepts a timestamp in ms or TimePeriodDto.NOW for the current server time.
      to - optional 'to' time boundary, used to get changes on the point values until that date This accepts a timestamp in ms or TimePeriodDto.NOW for the current server time.
      Returns:
      Array of alerts
      Throws:
      ServiceException - when an error occurs. It is dependent of the implementation to detail the possible causes of errors.
    • getAlert Link icon

      @GetMapping("{id:\\d+}") AlertDto getAlert(@PathVariable("id") long id) throws ServiceException
      Gets an alert by id.
      Parameters:
      id - The alert id
      Returns:
      The alert found
      Throws:
      ServiceException - when an error occurs. It is dependent of the implementation to detail the possible causes of errors.
    • startAlert Link icon

      @PostMapping AlertDto startAlert(@RequestBody AlertDto alert) throws ServiceException
      Starts an alert.
      Parameters:
      alert - definition of the alert to create
      Returns:
      the started alert
      Throws:
      ServiceException - when an error occurs. It is dependent of the implementation to detail the possible causes of errors.
    • updateAlert Link icon

      @PutMapping("/{id:\\d+}") AlertDto updateAlert(@PathVariable("id") long id, @RequestBody AlertDto alert) throws ServiceException
      Updates an alert.

      So far, only attribute 'content' can be modified.

      It is possible not to define the alert id in the DTO and it will be infered from the path.

      Parameters:
      id - id of the alert to udpate
      alert - alert to update
      Returns:
      the update alert
      Throws:
      ServiceException - when an error occurs. It is dependent of the implementation to detail the possible causes of errors.
    • stopAlert Link icon

      @DeleteMapping("/{id:\\d+}") AlertDto stopAlert(@PathVariable("id") long id) throws ServiceException
      Stop an alert.
      Parameters:
      id - of the alert
      Returns:
      the stopped alert
      Throws:
      ServiceException - when an error occurs. It is dependent of the implementation to detail the possible causes of errors.