@RequestMapping(method = RequestMethod.POST, value = "/{region}",
      consumes = APPLICATION_JSON_UTF8_VALUE, produces = {APPLICATION_JSON_UTF8_VALUE})
  @Operation(summary = "create entry", description = "Create (put-if-absent) data in region."
      + " The key is not decoded so if the key contains special characters use PUT/{region}?keys=EncodedKey&op=CREATE.")
  @ApiResponses({@ApiResponse(responseCode = "201", description = "Created."),
      @ApiResponse(responseCode = "400",
          description = "Data specified (JSON doc) in the request body is invalid."),
      @ApiResponse(responseCode = "401", description = "Invalid Username or Password."),
      @ApiResponse(responseCode = "403", description = "Insufficient privileges for operation."),
      @ApiResponse(responseCode = "404", description = "Region does not exist."),
      @ApiResponse(responseCode = "409", description = "Key already exist in region."),
      @ApiResponse(responseCode = "500", description = "GemFire throws an error or exception.")})
  @PreAuthorize("@securityService.authorize('DATA', 'WRITE', #region)")
  public ResponseEntity<?> create(@PathVariable("region") String region,
      @RequestParam(value = "key", required = false) String key, @RequestBody final String json) {
    key = generateKey(key);
    region = decode(region);
    return create(region, key, json, false);
  }
Creating entry into the region

@param region region name where data will be created
@param key gemfire region key
@param json JSON document that is stored against the key
@return JSON document
geode-web-api/src/main/java/org/apache/geode/rest/internal/web/controllers/PdxBasedCrudController.java