You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Saumya Saxena Gupta (JIRA)" <ji...@apache.org> on 2018/12/03 11:17:00 UTC

[jira] [Updated] (AIRFLOW-3437) Formatted json should be returned when dag_run is triggered with experimental api

     [ https://issues.apache.org/jira/browse/AIRFLOW-3437?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Saumya Saxena Gupta updated AIRFLOW-3437:
-----------------------------------------
    Description: 
*Scenario* -> Developer wants to trigger DAG_RUN through API

*Issue* -> Current rest API "/api/experimental/dags/<dag_id>dag_runs"returns message like below, which makes difficult for developer to figure out execution date/run_id and execution date/run_id extract logic has to be written  
{quote}
 { *"message": "Created <DagRun example_bash_operator @ 2018-12-03 11:08:17+00:00: manual__2018-12-03T11:08:17+00:00, externally triggered: True>"}*


{quote}
*Improvement Suggestion* -> rest API "/api/experimental/dags/<dag_id>dag_runs" should return json representing dag_run object , something like below

 
{quote}{
 "dag_id": "example_bash_operator",
 "dag_run_url": "/admin/airflow/graph?execution_date=2018-12-03+11%3A11%3A18%2B00%3A00&dag_id=example_bash_operator",
 "execution_date": "2018-12-03T11:11:18+00:00",
 "id": 142,
 "run_id": "manual__2018-12-03T11:11:18+00:00",
 "start_date": "2018-12-03T11:11:18.267197+00:00",
 "state": "running"
} 
{quote}
With the Json returned as shown above , picking dag_run details becomes easy.

  was:
*Scenario* -> Developer wants to trigger DAG_RUN through API

*Issue* -> Current rest API "/api/experimental/dags/<dag_id>dag_runs"returns message like below, which makes difficult for developer to figure out execution date/run_id and execution date/run_id extract logic has to be written  

{{*"{*}}
{{ *"message": "Created <DagRun example_bash_operator @ 2018-12-03 11:08:17+00:00: manual__2018-12-03T11:08:17+00:00, externally triggered: True>"*}}
{{*}"*}}

*Improvement Suggestion* -> rest API "/api/experimental/dags/<dag_id>dag_runs" should return json representing dag_run object , something like below

 

{{*{*}}
{{ *"dag_id": "example_bash_operator",*}}
{{ *"dag_run_url": "/admin/airflow/graph?execution_date=2018-12-03+11%3A11%3A18%2B00%3A00&dag_id=example_bash_operator",*}}
{{ *"execution_date": "2018-12-03T11:11:18+00:00",*}}
{{ *"id": 142,*}}
{{ *"run_id": "manual__2018-12-03T11:11:18+00:00",*}}
{{ *"start_date": "2018-12-03T11:11:18.267197+00:00",*}}
{{ *"state": "running"*}}
{{*}*}}

 

With the Json returned as shown above , picking dag_run details becomes easy.


> Formatted json should be returned when dag_run is triggered with experimental api
> ---------------------------------------------------------------------------------
>
>                 Key: AIRFLOW-3437
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-3437
>             Project: Apache Airflow
>          Issue Type: Improvement
>          Components: api
>    Affects Versions: 1.10.0, 2.0.0
>            Reporter: Saumya Saxena Gupta
>            Assignee: Saumya Saxena Gupta
>            Priority: Major
>
> *Scenario* -> Developer wants to trigger DAG_RUN through API
> *Issue* -> Current rest API "/api/experimental/dags/<dag_id>dag_runs"returns message like below, which makes difficult for developer to figure out execution date/run_id and execution date/run_id extract logic has to be written  
> {quote}
>  { *"message": "Created <DagRun example_bash_operator @ 2018-12-03 11:08:17+00:00: manual__2018-12-03T11:08:17+00:00, externally triggered: True>"}*
> {quote}
> *Improvement Suggestion* -> rest API "/api/experimental/dags/<dag_id>dag_runs" should return json representing dag_run object , something like below
>  
> {quote}{
>  "dag_id": "example_bash_operator",
>  "dag_run_url": "/admin/airflow/graph?execution_date=2018-12-03+11%3A11%3A18%2B00%3A00&dag_id=example_bash_operator",
>  "execution_date": "2018-12-03T11:11:18+00:00",
>  "id": 142,
>  "run_id": "manual__2018-12-03T11:11:18+00:00",
>  "start_date": "2018-12-03T11:11:18.267197+00:00",
>  "state": "running"
> } 
> {quote}
> With the Json returned as shown above , picking dag_run details becomes easy.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)