Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

airflow experimental api dagrun give 400 error: what should be the input parameter

A POST request from postman to http://host:8080/api/experimental/dags/test_flow/dag_runs gives "400 Bad Request: The browser (or proxy) sent a request that this server could not understand." when it try to get_json from from request. ie at line data = request.get_json(force=True)

What should be the inputs to this API call ..?

like image 676
Sanjay Avatar asked Dec 11 '22 11:12

Sanjay


1 Answers

Had the same issue, solved it by POSTing an empty JSON

curl -X POST \
    http://localhost:8080/api/experimental/dags/<DAG_ID>/dag_runs \
    -H 'Cache-Control: no-cache' \
    -H 'Content-Type: application/json' \
    -d '{}'
like image 161
Leo Avatar answered Dec 25 '22 22:12

Leo