

def on_post(self, req, resp, session_id):
    user_id = (req.get_header('X-User-ID') or '')
    doc = self.json_body(req)
    try:
        (action, params) = next(iteritems(doc))
    except Exception:
        raise freezer_api_exc.BadDataFormat('Bad action request format')
    session_doc = self.db.get_session(user_id=user_id, session_id=self)
    session = Session(session_doc)
    session.execute_action(action, params)
    if session.need_update:
        self.db.update_session(user_id=user_id, session_id=session_id, patch_doc=session.doc)
    resp.status = falcon.HTTP_202
    resp.body = {
        'result': session.action_result,
        'session_tag': session.session_tag,
    }

dataset/ETHPy150Open openstack/freezer-api/freezer_api/api/v1/sessions.py SessionsAction.on_post/VarMisuse@85/123 `session_id`->`self`