@POST
  @Produces("text/plain")
  @ApiOperation(value = "Creates an alert target")
  @ApiImplicitParams({
          @ApiImplicitParam(dataType = ALERT_TARGET_REQUEST_TYPE, paramType = PARAM_TYPE_BODY),
          @ApiImplicitParam(name = AlertTargetResourceDefinition.VALIDATE_CONFIG_DIRECTIVE, dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
          @ApiImplicitParam(name = AlertTargetResourceDefinition.OVERWRITE_DIRECTIVE, dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY)
  })
  @ApiResponses({
          @ApiResponse(code = HttpStatus.SC_CREATED, message = MSG_SUCCESSFUL_OPERATION),
          @ApiResponse(code = HttpStatus.SC_BAD_REQUEST, message = MSG_INVALID_ARGUMENTS),
          @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
          @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR),
  })
  public Response createTarget(String body, @Context HttpHeaders headers,
      @Context UriInfo ui) {
    return handleRequest(headers, body, ui, Request.Type.POST,
        createAlertTargetResource(null));
  }
Handles POST /alert_targets
Create a specific alert target.

@param body     http body
@param headers  http headers
@param ui       uri info

@return alert target resource representation
ambari-server/src/main/java/org/apache/ambari/server/api/services/AlertTargetService.java