@RequestMapping(method = RequestMethod.PUT, value = "/{query}")
  @Operation(summary = "update parametrized query",
      description = "Update named, parametrized query by ID")
  @ApiResponses({@ApiResponse(responseCode = "200", description = "Updated successfully."),
      @ApiResponse(responseCode = "401", description = "Invalid Username or Password."),
      @ApiResponse(responseCode = "403", description = "Insufficient privileges for operation."),
      @ApiResponse(responseCode = "404", description = "queryId does not exist."),
      @ApiResponse(responseCode = "500", description = "GemFire throws an error or exception.")})
  @PreAuthorize("@securityService.authorize('DATA', 'READ')")
  public ResponseEntity<?> update(@PathVariable("query") final String queryId,
      @RequestParam(value = "q", required = false) String oqlInUrl,
      @RequestBody(required = false) final String oqlInBody) {
    final String oqlStatement = validateQuery(oqlInUrl, oqlInBody);

    logger.debug("Updating a named, parametrized Query ({}) with ID ({})...", oqlStatement,
        queryId);

    // update the OQL statement with 'queryId' as the Key into the hidden, Parametrized Queries
    // Region...
    checkForQueryIdExist(PARAMETERIZED_QUERIES_REGION, queryId);
    updateNamedQuery(PARAMETERIZED_QUERIES_REGION, queryId, oqlStatement);
    compiledQueries.remove(queryId);

    return new ResponseEntity<>(HttpStatus.OK);
  }
Update named, parametrized Query

@param queryId uniquely identify the query
@param oqlInUrl OQL query string specified in a request URL
@param oqlInBody OQL query string specified in a request body
geode-web-api/src/main/java/org/apache/geode/rest/internal/web/controllers/QueryAccessController.java