def get_common_path(paths):
    """
    Find common path.
    For example, [/api/test, /api/hello] => /api

    :param paths: list of path
    :return: string of common path
    """
    if len(paths) == 0:
        return '/'
    mini_paths = [path.strip('/').split('/') for path in paths]
    common_mini_paths = min(mini_paths)
    common_path = []
    for common_mini_path in common_mini_paths:
        check_path = '/'.join(common_path) + common_mini_path
        exist_flag = True
        for path in paths:
            if not path.strip('/').startswith(check_path):
                exist_flag = False
                break
        if exist_flag:
            common_path.append(common_mini_path)
        else:
            break
    return '/' + '/'.join(common_path)