Hi, I was trying to ask this question on Stackoverflow, but I don't think
anybody monitors it.
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?