def _get_all(self, exclude_fields=None, sort=None, offset=0, limit=None, query_options=None,
                 **kwargs):
        kwargs = copy.deepcopy(kwargs)

        exclude_fields = exclude_fields or []
        query_options = query_options if query_options else self.query_options

        # TODO: Why do we use comma delimited string, user can just specify
        # multiple values using ?sort=foo&sort=bar and we get a list back
        sort = sort.split(',') if sort else []

        db_sort_values = []
        for sort_key in sort:
            if sort_key.startswith('-'):
                direction = '-'
                sort_key = sort_key[1:]
            elif sort_key.startswith('+'):
                direction = '+'
                sort_key = sort_key[1:]
            else:
                direction = ''

            if sort_key not in self.supported_filters:
                # Skip unsupported sort key
                continue

            sort_value = direction + self.supported_filters[sort_key]
            db_sort_values.append(sort_value)

        default_sort_values = copy.copy(query_options.get('sort'))
        kwargs['sort'] = db_sort_values if db_sort_values else default_sort_values

        # TODO: To protect us from DoS, we need to make max_limit mandatory
        offset = int(offset)

        if limit and int(limit) > self.max_limit:
            limit = self.max_limit
        eop = offset + int(limit) if limit else None

        filters = {}

        for k, v in six.iteritems(self.supported_filters):
            filter_value = kwargs.get(k, None)

            if not filter_value:
                continue

            value_transform_function = self.filter_transform_functions.get(k, None)
            value_transform_function = value_transform_function or (lambda value: value)
            filter_value = value_transform_function(value=filter_value)

            filters['__'.join(v.split('.'))] = filter_value

        extra = {
            'filters': filters,
            'sort': sort,
            'offset': offset,
            'limit': limit
        }
        LOG.info('GET all %s with filters=%s' % (pecan.request.path, filters), extra=extra)

        instances = self.access.query(exclude_fields=exclude_fields, **filters)
        if limit == 1:
            # Perform the filtering on the DB side
            instances = instances.limit(limit)

        if limit:
            pecan.response.headers['X-Limit'] = str(limit)
        pecan.response.headers['X-Total-Count'] = str(instances.count())

        from_model_kwargs = self._get_from_model_kwargs_for_request(request=pecan.request)

        result = []
        for instance in instances[offset:eop]:
            item = self.model.from_model(instance, **from_model_kwargs)
            result.append(item)

        return result
:param exclude_fields: A list of object fields to exclude.
dataset/ETHPy150Open StackStorm/st2/st2api/st2api/controllers/resource.py/ResourceController._get_all