airflow icon indicating copy to clipboard operation
airflow copied to clipboard

Adding Task name in DAG details API endpoint for Efficiency

Open msoni1369 opened this issue 1 year ago • 2 comments

Description

The absence of task names in the DAG details API necessitates separate calls for task and DAG information, hindering process efficiency.

Use case/motivation

Currently, task names are not included in the DAG details API endpoint. Tasks represent the execution component of a DAG also various API endpoints require task names. Therefore, to retrieve task names, one must query the "/dags/{dag_id}/tasks" endpoint. Additionally, to obtain basic DAG details, the "/dags/{dag_id}/details" endpoint is utilized. In my use case, automation of certain processes necessitates both DAG information and task names. Consequently, the need to utilize two separate API endpoints slows down the overall process, particularly considering the multitude of DAGs. It would be advantageous to consolidate this information into a single API call, considering that tasks are integral part of a DAG.

Related issues

No relevant issue found

Are you willing to submit a PR?

  • [X] Yes I am willing to submit a PR!

Code of Conduct

msoni1369 avatar Feb 20 '24 15:02 msoni1369

Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.

boring-cyborg[bot] avatar Feb 20 '24 15:02 boring-cyborg[bot]

According to the documentation, the endpoint details should return a simplified representation of DAG, but IMHO it's a good idea to add an argument to include the tasks in this response, and keep it false by default.

hussein-awala avatar Feb 20 '24 20:02 hussein-awala