public static String getRawSessionIdV2(HttpRequest request) {
        final String path = request.getUri().toString();
        BindingMatch<?> bm = Utils.getBindingMatch(request, "http://*/application/v2/tenant/*/session/*/*");
        if (bm.groupCount() < 4) {
            // This would mean the subtype of this doesn't have the correct binding
            throw new IllegalArgumentException("Can not get session id from request '" + path + "'");
        }
        return bm.group(3);
    }
Gets the raw session id from request (v2). Input request must have a valid path.

@param request a request
@return a session id
configserver/src/main/java/com/yahoo/vespa/config/server/http/SessionHandler.java