code: @Override
      @Path("/{cuid}/rel/{relId}")
      @ApiOperation(value="Create a user or add existing user to a workgroup or role",
          notes="If rel/{relId} is present, user is added to workgroup or role.", response=StatusMessage.class)
      @ApiImplicitParams({
          @ApiImplicitParam(name="Workgroup", paramType="body", dataType="com.centurylink.mdw.model.user.User")})
      public JSONObject post(String path, JSONObject content, Map<String, String> headers)
      throws ServiceException, JSONException {
          String cuid = getSegment(path, 1);
          String rel = getSegment(path, 2);
  
          UserServices userServices = ServiceLocator.getUserServices();
          try {
              if (rel == null) {
                  User existing = userServices.getUsers().get(cuid);
                  if (existing != null)
                      throw new ServiceException(HTTP_409_CONFLICT, "User ID already exists: " + cuid);
                  User user = new User(content);
                  userServices.createUser(user);
              }
              else if (rel.equals("workgroups")) {
                  String group = getSegment(path, 3);
                  userServices.addUserToWorkgroup(cuid, group);
              }
              else if (rel.equals("roles")) {
                  String role = getSegment(path, 3);
                  userServices.addUserToRole(cuid, role);
              }
              else {
                  String msg = "Unsupported relationship for user " + cuid + ": " + rel;
                  throw new ServiceException(HTTP_400_BAD_REQUEST, msg);
              }
              return null;
          }
          catch (DataAccessException ex) {
              if (ex.getCode() >= HTTP_400_BAD_REQUEST)
                  throw new ServiceException(ex.getCode(), ex.getMessage(), ex);
              else
                  throw new ServiceException(HTTP_500_INTERNAL_ERROR, ex.getMessage(), ex);
          }
      }
docs: For create (creating a new user, or creating a new user/workgroup or user/role relationship).