

def on_get(self, req, resp):
    user_id = req.get_header('X-User-ID')
    offset = (req.get_param_as_int('offset') or 0)
    limit = (req.get_param_as_int('limit') or 10)
    search = self.json_body(req)
    obj_list = self.db.search_session(user_id=user_id, offset=offset, limit=limit, search=search)
    resp.body = {
        'sessions': obj_list,
    }

dataset/ETHPy150Open openstack/freezer-api/freezer_api/api/v1/sessions.py SessionsCollectionResource.on_get/original