Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for dag_stats in REST API #40594

Open
1 of 2 tasks
reganbaum opened this issue Jul 3, 2024 · 5 comments
Open
1 of 2 tasks

Add support for dag_stats in REST API #40594

reganbaum opened this issue Jul 3, 2024 · 5 comments
Assignees
Labels
area:API Airflow's REST/HTTP API good first issue kind:feature Feature Requests

Comments

@reganbaum
Copy link

reganbaum commented Jul 3, 2024

Description

  1. Today, there is no REST API available to get the stats of a DAG (# success/failed/running/queued runs) via API. However, the UI uses an endpoint dag_stats to display this information. The goal is to have a REST API endpoint available that gets the DAG stats at /api/v1/dag_stats.
  2. Moved over to Add support for dagrun_failed in REST API #40600

Use case/motivation

I would like to programmatically (1) get the stats for all my DAGs and (2) programmatically stop a running workflow, which actually stops the execution (not just changes the state in the database).

Related issues

#40600

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@reganbaum reganbaum added kind:feature Feature Requests needs-triage label for new issues that we didn't triage yet labels Jul 3, 2024
@dosubot dosubot bot added the area:API Airflow's REST/HTTP API label Jul 3, 2024
@potiuk
Copy link
Member

potiuk commented Jul 3, 2024

(1) - sure if someone implements it
(2) - impossible until we change architecture (possibly might be doable in Airlfow 3 - I heartily invite you to subscribe to devlist discussions on that and take part in those discussions and advocate and possibly offer contributions to make it happen

@potiuk
Copy link
Member

potiuk commented Jul 3, 2024

Marked it for (1) as "good first issue" and if someone would like to implement such endpoint. Also @reganbaum you are welcome to try it if you want to have it faster rather than wait for someone to pick it up and implement.

@potiuk potiuk removed the needs-triage label for new issues that we didn't triage yet label Jul 3, 2024
@reganbaum
Copy link
Author

Thanks, Jarek. I moved the dagrun_failed issue (2) over to its own issue for easier tracking: #40600

@reganbaum reganbaum changed the title Add support for dag_stats and dagrun_failed in REST API Add support for dag_stats in REST API Jul 4, 2024
@dondaum
Copy link
Contributor

dondaum commented Jul 4, 2024

Happy to take this over. Would be a good chance to get to know the Airflow REST API.

@potiuk
Copy link
Member

potiuk commented Jul 4, 2024

Assigned you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:API Airflow's REST/HTTP API good first issue kind:feature Feature Requests
Projects
None yet
Development

No branches or pull requests

3 participants