@RequestMapping(method = RequestMethod.POST, value = "/indexes")
  public ResponseEntity<?> createIndex(@RequestParam(CliStrings.CREATE_INDEX__NAME) String name,
      @RequestParam(CliStrings.CREATE_INDEX__EXPRESSION) String expression,
      @RequestParam(CliStrings.CREATE_INDEX__REGION) String region,
      @RequestParam(value = CliStrings.CREATE_INDEX__TYPE,
          defaultValue = DEFAULT_INDEX_TYPE) String type)
      throws IOException {

    CommandStringBuilder command = new CommandStringBuilder(CliStrings.CREATE_INDEX);

    command.addOption(CliStrings.CREATE_INDEX__NAME, name);
    command.addOption(CliStrings.CREATE_INDEX__EXPRESSION, expression);
    command.addOption(CliStrings.CREATE_INDEX__REGION, region);
    command.addOption(CliStrings.CREATE_INDEX__TYPE, type);

    return command(command.toString(), DEFAULT_MULTIPART_FILE);
  }
The ShellCommandsController class implements GemFire REST API calls for Gfsh Shell Commands.

@see org.springframework.stereotype.Controller
@see org.springframework.web.bind.annotation.RequestBody
@see org.springframework.web.bind.annotation.RequestMapping
@see org.springframework.web.bind.annotation.RequestMethod
@see org.springframework.web.bind.annotation.RequestParam
@see org.springframework.web.bind.annotation.ResponseBody
@since GemFire 8.0
geode-web/src/main/java/org/apache/geode/management/internal/web/controllers/ShellCommandsController.java