def METHOD_NAME(resource_id):
    data, errors = dict_fns.validate(request.args.to_dict(), dump_schema())
    if errors:
        abort(
            400, u'\n'.join(
                u'{0}: {1}'.format(k, u' '.join(e)) for k, e in errors.items()
            )
        )
    response = make_response()
    response.headers[u'content-type'] = u'application/octet-stream'
    try:
        dump_to(
            resource_id,
            response,
            fmt=data[u'format'],
            offset=data[u'offset'],
            limit=data.get(u'limit'),
            options={u'bom': data[u'bom']},
            sort=data[u'sort'],
            search_params={
                k: v
                for k, v in data.items()
                if k in [
                    u'filters', u'q', u'distinct', u'plain', u'language',
                    u'fields'
                ]
            },
        )
    except ObjectNotFound:
        abort(404, _(u'DataStore resource not found'))
    return response