How do I get a list of all unpaused(running) dags using airflow API?
I tried GET /dags
endpoints but I did not find a query string to filter paused dags, isn't there something like is_paused
query parameter or body parameter perhaps?
P.S I'm currently using airflow version 2.2.3 +
Asked
Active
Viewed 303 times
0

Sannix19
- 75
- 1
- 6
2 Answers
0
Currently Airflow API doesn't support this filter, you should get all the dags and filter them locally.
If you really need this filter, you can create an Airflow plugin which exposes a simple API to fetch the unpaused dags and return them.
Update: this filter will be available in Airflow API from 2.6.0 (PR)

Hussein Awala
- 4,285
- 2
- 9
- 23
0
Actually there is plugin made for this. You can fetch the dags along with status. Please explore this plugin. May be this is what you are looking for.
Or else you can write your custom python script/API to fill the dagbag and then filter the list to get the list of dags with status which you want.

Nikhil Sawant
- 367
- 2
- 6