Pause And Unpause DAG
For Airflow version 1.10.0 and older:
- GET /airflow-webserver-<cluster-id>/api/experimental/dags/<DAG_ID>/paused/<string:paused>
For Airflow 1.10.2 and later:
- GET /airflow-rbacwebserver-<cluster-id>/api/experimental/dags/<DAG_ID>/paused/<string:paused>
You can use this API to pause and unpause a DAG. You must specify the value of `<string:paused>`
as
`true`
to pause and `false`
to unpause a DAG.
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/paused/true \
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-5456/api/experimental/dags/dag_test/paused/true \
-H "Accept: application/json"
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-H 'X-AUTH-TOKEN: <AUTH_TOKEN>'\
-d '{}'
Sample Response
{
"response": "ok"
}