Return A List Of DAG Runs
For Airflow version 1.10.0 and older:
- GET /airflow-webserver-<cluster-id>/api/experimental/dags/<DAG_ID>/dag_runs
For Airflow 1.10.2 and later:
- GET /airflow-rbacwebserver-<cluster-id>/api/experimental/dags/<DAG_ID>/dag_runs
You can now use this API to return a list of Dag Runs for a specific DAG ID.
Note
To run the experimental APIs, you require to have Airflow version 1.10.0 and above.
Required Role
A user with read permission to the cluster can make this API call.
Syntax
curl -X GET \ https://<ENV>.qubole.com/airflow-rbacwebserver-<Cluster-ID>/api/experimental/dags/dag_test/dag_runs \
Note
You need to specify the QDS environment in the above syntax. It works with all the environments described in Supported Qubole Endpoints on Different Cloud Providers.
Sample Query
curl -X GET \ https://api.qubole.com/airflow-rbacwebserver-94461/api/experimental/dags/dag_test/dag_runs \
-H "Accept: application/json"
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-H 'X-AUTH-TOKEN: <AUTH_TOKEN>' \
-d '{}'
Sample Response
[
{
"dag_id": "dag_test",
"dag_run_url": "/airflow-rbacwebserver-94461/graph?execution_date=2019-11-20+08%3A47%3A11.232757%2B00%3A00&dag_id=dag_test",
"execution_date": "2019-11-20T08:47:11.232757+00:00",
"id": 1,
"run_id": "manual__2019-11-20T08:47:11.232757+00:00",
"start_date": "2019-11-20T08:47:11.338336+00:00",
"state": "running"
}
]