import json


def getDefaultColumnsForScope(syn, scope):
    """ Fetches the columns which would be used in the creation
    of a file view with the given scope.

    Parameters
    ----------
    syn : synapseclient.Synapse
    scope : str, list
        The Synapse IDs of the entites to fetch columns for.

    Returns
    -------
    list of dict
    """
    scope = [scope] if isinstance(scope, str) else scope
    params = {'scope': scope, 'viewType': 'file'}
    cols = syn.restPOST('/column/view/scope',
                             json.dumps(params))['results']
    return cols