@no_auto_transaction
@collect_auth
@must_be_valid_project(retractions_valid=True)
def get_logs(auth, node, **kwargs):
    """

    """
    try:
        page = int(request.args.get('page', 0))
    except __HOLE__:
        raise HTTPError(http.BAD_REQUEST, data=dict(
            message_long='Invalid value for "page".'
        ))

    if not node.can_view(auth):
        raise HTTPError(http.FORBIDDEN)

    if 'count' in request.args:
        count = int(request.args['count'])
    elif 'count' in kwargs:
        count = kwargs['count']
    elif request.json and 'count' in request.json.keys():
        count = request.json['count']
    else:
        count = 10

    # Serialize up to `count` logs in reverse chronological order; skip
    # logs that the current user / API key cannot access
    logs, total, pages = _get_logs(node, count, auth, page)
    return {'logs': logs, 'total': total, 'pages': pages, 'page': page}
dataset/ETHPy150Open CenterForOpenScience/osf.io/website/project/views/log.py/get_logs