code: @POST
  	@Produces(MediaType.APPLICATION_JSON)
  	@Consumes(MediaType.APPLICATION_JSON)
  	@Description("Creates an alert.")
  	public AlertDto createAlert(@Context HttpServletRequest req, AlertDto alertDto) {
  		
  		if (alertDto == null) {
  			throw new WebApplicationException("Null alert object cannot be created.", Status.BAD_REQUEST);
  		}
  
  		PrincipalUser owner = validateAndGetOwner(req, alertDto.getOwnerName());
  		Alert alert = new Alert(getRemoteUser(req), owner, alertDto.getName(), alertDto.getExpression(), alertDto.getCronEntry());
  		alert.setShared(alertDto.isShared()); 
  		copyProperties(alert, alertDto);
  		return AlertDto.transformToDto(alertService.updateAlert(alert));
  	}
docs: Creates a new alert.
  
  @param   req       The HttpServlet request object. Cannot be null.
  @param   alertDto  The alert object. Cannot be null.
  
  @return  Created alert object.
  
  @throws  WebApplicationException  The exception with 400 status will be thrown if the alert object is null.