action apache_post_clear_task_instances { label: "Clear a set of task instances" description: "Clears a set of task instances associated with the DAG for a specified date range.\n" provider: apache method: POST path: "/dags/{dag_id}/clearTaskInstances" encoding: json input: { type: "object" properties: { dag_run_id: { type: "string" description: "The DagRun ID for this task instance" } dry_run: { type: "boolean" description: "If set, don't actually run this operation. The response will contain a list of task instances\nplanned to be cleaned, but not modified in any way.\n" } end_date: { type: "string" format: "datetime" description: "The maximum execution date to clear." } include_downstream: { type: "boolean" description: "If set to true, downstream tasks are also affected." } include_future: { type: "boolean" description: "If set to True, also tasks from future DAG Runs are affected." } include_parentdag: { type: "boolean" description: "Clear tasks in the parent dag of the subdag." } include_past: { type: "boolean" description: "If set to True, also tasks from past DAG Runs are affected." } include_subdags: { type: "boolean" description: "Clear tasks in subdags and clear external tasks indicated by ExternalTaskMarker." } include_upstream: { type: "boolean" description: "If set to true, upstream tasks are also affected." } only_failed: { type: "boolean" description: "Only clear failed tasks." } only_running: { type: "boolean" description: "Only clear running tasks." } reset_dag_runs: { type: "boolean" description: "Set state of DAG runs to RUNNING." } start_date: { type: "string" format: "datetime" description: "The minimum execution date to clear." } task_ids: { type: "array" description: "A list of task ids to clear.\n\n*New in version 2.1.0*\n" items: { type: "string" } } } } output: { type: "object" properties: { task_instances: { type: "array" items: { type: "object" properties: { dag_id: { type: "string" description: "The DAG ID." } dag_run_id: { type: "string" description: "The DAG run ID." } execution_date: { type: "string" format: "datetime" } task_id: { type: "string" description: "The task ID." } } } } } } }