'List all pending entries'

@etag
@api.response(NotFoundError)
@api.response(200, model=pending_entry_list_schema)
@api.doc(parser=pending_parser)
def get(self, session=None):

    args = pending_parser.parse_args()
    task_name = args.get(u'task_name')
    approved = args.get(u'approved')
    page = args[u'page']
    per_page = args[u'per_page']
    sort_by = args[u'sort_by']
    sort_order = args[u'order']
    if (per_page > 100):
        per_page = 100
    descending = (sort_order == u'desc')
    if (per_page > 100):
        per_page = 100
    start = (per_page * (page - 1))
    stop = (start + per_page)
    kwargs = {u'task_name': task_name, u'approved': approved, u'start': start, u'stop': stop, u'descending': descending, u'sort_by': sort_by, u'session': session}
    total_items = session.query(PendingEntry).count()
    if (not total_items):
        return jsonify([])
    pending_entries = [pending.to_dict() for pending in list_pending_entries(**kwargs)]
    total_pages = int(ceil((total_items / float(per_page))))
    if (page > total_pages):
        raise NotFoundError((u'page    %s    does    not    exist' % page))
    actual_size = min(per_page, len(pending_entries))
    pagination = pagination_headers(total_pages, total_items, actual_size, request)
    rsp = jsonify(pending_entries)
    rsp.headers.extend(pagination)
    return rsp
