docs: @RequestMapping(value = "/api/path/{pathIdentifier}", method = RequestMethod.POST)
      @ResponseBody
      public String setPath(Model model, @PathVariable String pathIdentifier,
                            @RequestParam(value = "profileIdentifier", required = false) String profileIdentifier,
                            @RequestParam(value = "clientUUID", defaultValue = Constants.PROFILE_CLIENT_DEFAULT_ID) String clientUUID,
                            @RequestParam(required = false) Boolean responseEnabled,
                            @RequestParam(required = false) Boolean requestEnabled,
                            @RequestParam(value = "addOverride", required = false) Integer addOverride,
                            @RequestParam(value = "enabledMoveUp", required = false) String enabledMoveUp,
                            @RequestParam(value = "enabledMoveDown", required = false) String enabledMoveDown,
                            @RequestParam(required = false) String pathName,
                            @RequestParam(required = false) String path,
                            @RequestParam(required = false) String bodyFilter,
                            @RequestParam(required = false) String customResponse,
                            @RequestParam(required = false) String customRequest,
                            @RequestParam(required = false) Boolean resetResponse,
                            @RequestParam(required = false) Boolean resetRequest,
                            @RequestParam(required = false) String contentType,
                            @RequestParam(required = false) Integer repeatNumber,
                            @RequestParam(required = false) Boolean global,
                            @RequestParam(required = false) Integer requestType,
                            @RequestParam(value = "groups[]", required = false) Integer[] groups,
                            HttpServletResponse response
      ) throws Exception {
          String decodedProfileIdentifier = null;
          if (profileIdentifier != null) {
              decodedProfileIdentifier = URLDecoder.decode(profileIdentifier, "UTF-8");
          }
          Identifiers identifiers = ControllerUtils.convertProfileAndPathIdentifier(decodedProfileIdentifier, pathIdentifier);
          Integer pathId = identifiers.getPathId();
  
          // update the enabled value
          if (responseEnabled != null) {
              PathOverrideService.getInstance().setResponseEnabled(pathId, responseEnabled, clientUUID);
          }
  
          // update the enabled value
          if (requestEnabled != null) {
              PathOverrideService.getInstance().setRequestEnabled(pathId, requestEnabled, clientUUID);
          }
  
          // add an override
          if (addOverride != null) {
              OverrideService.getInstance().enableOverride(addOverride, pathId, clientUUID);
          }
  
          // move priority of an enabled override up
          if (enabledMoveUp != null) {
              String[] parts = enabledMoveUp.split(",");
              OverrideService.getInstance().increasePriority(Integer.parseInt(parts[0]), Integer.parseInt(parts[1]), pathId, clientUUID);
          }
  
          // move priority of an enabled override down
          if (enabledMoveDown != null) {
              String[] parts = enabledMoveDown.split(",");
              OverrideService.getInstance().decreasePriority(Integer.parseInt(parts[0]), Integer.parseInt(parts[1]), pathId, clientUUID);
          }
  
          // update the name of the path
          if (pathName != null) {
              // TODO: Update UI to display the appropriate error message for this
              if (pathName.equals("test")) {
                  response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
                  return "Cannot update path.  \"test\" is a reserved path name.";
              }
  
              if (pathName.contains("/")) {
                  response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
                  return "Cannot update path.  Path names cannot contain \"/\"";
              }
  
              PathOverrideService.getInstance().setName(pathId, pathName);
          }
  
          // update the actual path
          if (path != null) {
              // test regex parsing of the path
              try {
                  Pattern.compile(path);
              } catch (PatternSyntaxException pse) {
                  response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
                  return "Cannot add path.  Path regular expression is not valid.";
              }
  
              PathOverrideService.getInstance().setPath(pathId, path);
          }
  
          // update the bodyFilter
          if (bodyFilter != null) {
              PathOverrideService.getInstance().setBodyFilter(pathId, bodyFilter);
          }
  
          // update the custom response
          if (customResponse != null) {
              PathOverrideService.getInstance().setCustomResponse(pathId, customResponse, clientUUID);
          }
  
          // update the custom request
          if (customRequest != null) {
              PathOverrideService.getInstance().setCustomRequest(pathId, customRequest, clientUUID);
          }
  
          // clears all response settings for the specified path
          if (resetResponse != null) {
              PathOverrideService.getInstance().clearResponseSettings(pathId, clientUUID);
          }
  
          // clears all request settings for the specified path
          if (resetRequest != null) {
              PathOverrideService.getInstance().clearRequestSettings(pathId, clientUUID);
          }
  
          // sets content type
          if (contentType != null) {
              PathOverrideService.getInstance().setContentType(pathId, contentType);
          }
  
          // sets global
          if (global != null) {
              PathOverrideService.getInstance().setGlobal(pathId, global);
          }
  
          // sets repeat number
          if (repeatNumber != null) {
              EditService.getInstance().updateRepeatNumber(repeatNumber, pathId, clientUUID);
          }
  
          // sets request type
          if (requestType != null) {
              PathOverrideService.getInstance().setRequestType(pathId, requestType);
          }
  
          // sets groups
          if (groups != null) {
              pathOverrideService.setGroupsForPath(groups, pathId);
          }
  
          ObjectMapper objectMapper = new ObjectMapper();
          ObjectWriter writer = objectMapper.writer();
  
          return writer.writeValueAsString(PathOverrideService.getInstance().getPath(pathId, clientUUID, null));
      }