Reputation: 61
I'm trying to execute a dag within airflow by using a curl command. I am trying to do this via the Experimental Rest API documented here:
https://airflow.apache.org/api.html
Here is my curl command that I am trying to execute:
curl -X POST -v -u [email protected]:somepassword -d '' 'https://airflow.somedomain.com/api/experimental/dags/my_dag_id/dag_runs'
When I run this command, I get a 400 Bad Request -- The browser (or proxy) sent a request that this server could not understand
The call I am attempting appears to conform with the api documentation, so I am confused on what I'm doing wrong.
Upvotes: 3
Views: 5253
Reputation: 5302
I also discovered that in the latest version, simply making a POST against the dag_runs endpoint will not work. I had to send a empty JSON string in the body of the request to get it to work.
Upvotes: 3
Reputation: 61
Ok after doing a little bit of digging this week, it turns out that auth_backend is commented out in our airflow config file. Once that is uncommented, any request to the rest api should work.
Upvotes: 3