code: public static String extractResourcePath(HttpServletRequest request) {
  		if (request == null || request.getRequestURI().length() <= 3) {
  			return "";
  		}
  		// get request path, strip first slash '/'
  		String uri = request.getRequestURI().substring(1);
  		// skip to the end of API version prefix '/v1/'
  		int start = uri.indexOf('/');
  
  		if (start >= 0 && start + 1 < uri.length()) {
  			return uri.substring(start + 1);
  		} else {
  			return "";
  		}
  	}
docs: Extracts the resource name, for example '/v1/_resource/path'
  returns '_resource/path'.
  @param request a request
  @return the resource path