def __api_reverse_suffix(path):
    """Return the normalized suffix of a url without any api information so that the correct version can be added."""
    if path.startswith('/api/'):
        components = path.split('/', 3)
        if len(components) >= 4 and components[2].isdigit():
            return '/' + components[3]
        else:
            return path[4:]
    else:
        return path