@RequestMapping(method = RequestMethod.PUT, value = "/{region}/{keys}",
      consumes = {APPLICATION_JSON_UTF8_VALUE}, produces = {
          APPLICATION_JSON_UTF8_VALUE})
  @Operation(summary = "update data for key",
      description = "Update or insert (put) data for keys in a region."
          + " Deprecated in favor of /{region}?keys=."
          + " If op=REPLACE, update (replace) data with key if and only if the key exists in the region."
          + " If op=CAS update (compare-and-set) value having key with a new value if and only if the \"@old\" value sent matches the current value for the key in the region.")
  @ApiResponses({@ApiResponse(responseCode = "200", description = "OK."),
      @ApiResponse(responseCode = "400", description = "Bad Request."),
      @ApiResponse(responseCode = "401", description = "Invalid Username or Password."),
      @ApiResponse(responseCode = "403", description = "Insufficient privileges for operation."),
      @ApiResponse(responseCode = "404",
          description = "Region does not exist or if key is not mapped to some value for REPLACE or CAS."),
      @ApiResponse(responseCode = "409",
          description = "For CAS, @old value does not match to the current value in region"),
      @ApiResponse(responseCode = "500", description = "GemFire throws an error or exception.")})
  @PreAuthorize("@securityService.authorize('WRITE', #region, #keys)")
  public ResponseEntity<?> update(@PathVariable("region") String region,
      @PathVariable("keys") String[] keys,
      @RequestParam(value = "op", defaultValue = "PUT") final String opValue,
      @RequestBody final String json, HttpServletRequest request) {
    logger.debug("updating key(s) for region ({}) ", region);

    region = decode(region);
    if (!validOp(opValue)) {
      String errorMessage = String.format(
          "The op parameter (%1$s) is not valid. Valid values are PUT, REPLACE, or CAS.",
          opValue);
      return new ResponseEntity<>(convertErrorAsJson(errorMessage), HttpStatus.BAD_REQUEST);
    }
    if (keys.length > 1) {
      updateMultipleKeys(region, keys, json);
      HttpHeaders headers = new HttpHeaders();
      headers.setLocation(toUri(region, StringUtils.arrayToCommaDelimitedString(keys)));
      return new ResponseEntity<>(headers, HttpStatus.OK);
    } else {
      // put case
      Object existingValue = updateSingleKey(region, keys[0], json, opValue);
      final HttpHeaders headers = new HttpHeaders();
      headers.setLocation(toUri(region, keys[0]));
      return new ResponseEntity<>(existingValue, headers,
          (existingValue == null ? HttpStatus.OK : HttpStatus.CONFLICT));
    }
  }
Update data for a key or set of keys

@param region gemfire data region
@param keys comma seperated list of keys
@param opValue type of update (put, replace, cas etc)
@param json new data for the key(s)
@return JSON document
geode-web-api/src/main/java/org/apache/geode/rest/internal/web/controllers/PdxBasedCrudController.java