想知道是否有人可以解释这个问题:
我正在尝试找到Airflow REST API URL以启动从AWS Lambda函数运行的DAG.
到目前为止,从查看Apache孵化器站点提供的所有相关文档,解决问题的唯一指导是在Lambda(python 3.6)代码中使用此URL结构:
Apache Experimental API:https: //airflow.apache.org/api.html#endpoints
基于该链接的语法应为:
http://airflow_hostname/api/experimental/dags/<DAG_ID>/
Run Code Online (Sandbox Code Playgroud)
但是,这无法从我的AWS Lambda函数启动特定DAG,任何帮助/指导或指针都会很棒.
在 Airflow 1.10 中,以下 post 请求将起作用:
curl -X POST http://localhost:8080/api/experimental/dags/<dag_id>/dag_runs -H 'Cache-Control: no-cache' -H 'Content-Type: application/json' -d '{"conf":"{\"key\":\"value\"}"}'
Run Code Online (Sandbox Code Playgroud)
您需要传递一个空的 JSON 字符串,否则 post 请求将失败。
归档时间: |
|
查看次数: |
2869 次 |
最近记录: |