我正在使用Airflow v1.10.2并引用experimental REST API documentation。当我尝试为API调用时
GET /api/experimental/dags/<DAG_ID>/dag_runs
或
POST /api/experimental/dags/<DAG_ID>/dag_runs
我得到405错误。具体来说,API调用的响应是,
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>405 Method Not Allowed</title>
<h1>Method Not Allowed</h1>
<p>The method is not allowed for the requested URL.</p>
在某处我读到RBAC UI必须启用但我完全没有意识到这一点。请求Airflow大师在此提出建议。
这是1.10.2
中的一个错误,将在本周将发布的1.10.3
中修复。
直到那时你可以使用以下方法修复它:
通过修改airflow.cfg
文件启用RBAC UI。
在[webserver]
部分下,将rbac = False
更改为rbac = True
请注意,您必须根据https://airflow.apache.org/security.html?highlight=rbac#password创建用户