@app.route("<STR_LIT>", methods=["<STR_LIT:POST>"])<EOL>@crossdomain(origin="<STR_LIT:*>")<EOL>def info_post(node_id):
<EOL>contents = request_parameter(parameter="<STR_LIT>")<EOL>info_type = request_parameter(<EOL>parameter="<STR_LIT>", parameter_type="<STR_LIT>", default=models.Info<EOL>)<EOL>for x in [contents, info_type]:<EOL><INDENT>if type(x) == Response:<EOL><INDENT>return x<EOL><DEDENT><DEDENT>node = models.Node.query.get(node_id)<EOL>if node is None:<EOL><INDENT>return error_response(error_type="<STR_LIT>")<EOL><DEDENT>exp = Experiment(session)<EOL>try:<EOL><INDENT>info = info_type(origin=node, contents=contents)<EOL>assign_properties(info)<EOL>exp.info_post_request(node=node, info=info)<EOL>session.commit()<EOL><DEDENT>except Exception:<EOL><INDENT>return error_response(<EOL>error_type="<STR_LIT>",<EOL>status=<NUM_LIT>,<EOL>participant=node.participant,<EOL>)<EOL><DEDENT>return success_response(info=info.__json__())<EOL>
Create an info.

    The node id must be specified in the url.

    You must pass contents as an argument.
    info_type is an additional optional argument.
    If info_type is a custom subclass of Info it must be
    added to the known_classes of the experiment class.