First of all apologies if this is the second time. I sent it before I
officially joined the list. So I am not sure if it was posted or not.

 

I am trying to leverage plugins in airflow to implement REST calls to meta
database. I created new tables, but while GET works fine, the POST and PUT
generate CSRF token missing or incorrect error.

 

from airflow.plugins_manager import AirflowPlugin  

from flask import Blueprint

asset = Blueprint('turbine_plugin', __name__, url_prefix='/api/asset')

 

@asset.route('/', methods=['POST'])

def insert():

    """

    Inserts new Asset.

    :return: 200 on success.

    """

    pass

 

class TurbinePlugin(AirflowPlugin):

    name = "turbine_plugin"

    flask_blueprints = [asset]

 

what should I include or do to use POST in ariflow plugins, I see in code
that app is CSRF protected, but how you get token for REST calls?

 

Reply via email to