Skip to main content

Apache Airflow

v0.1.0

Governed Apache Airflow 3 operations over the stable REST API (/api/v2): scheduler/triggerer/dag-processor health and job heartbeats, DAG inventory and per-DAG detail, run and task-instance search across every DAG, task logs, import errors and DAG warnings, pools, asset events, connection and variable inventory (names and routing only — never values), and the incident controls an operator actually reaches for: pause and unpause a DAG, trigger a run, mark a run or task succeeded/failed, preview then perform a clear, retune a pool, and start, pause, or cancel a backfill. Authenticates with AIRFLOW_API_TOKEN, or mints a JWT from AIRFLOW_USERNAME/AIRFLOW_PASSWORD, on the runner host.

28 allowed by default 9 need approval by default
Pack ID
airflow
Vendor
emisar
OS
linux
Actions
37
Required binaries. Install these on the host before relying on the pack — an action that calls a missing one fails at run time.
curl jq bash

Install

emisar pack install fetches this pack, re-validates it, and verifies its content hash against the --hash below — the exact bytes this page was rendered against, so a tampered copy is rejected — before copying it into the runner's packs dir. The command reloads a running daemon itself; no manual restart.

on the runner host
sudo emisar pack install airflow --hash sha256:0db3e475d1046166699b13bc933851b4678460c1370f1c2900254c0c9c21b8a4

Actions 37 total

View on GitHub
  • airflow.asset_events script low

    List asset events (GET /api/v2/assets/events)

    List asset update events with their timestamp and the DAG, task, and run that emitted each one. Pair with airflow.assets to answer "when did this asset last update, and what produced it" — the timeline behind a consumer DAG that has not triggered.

    View source on GitHub
  • airflow.assets script low

    List assets (GET /api/v2/assets)

    List the assets Airflow schedules on, with the tasks that produce them, the DAGs that consume them, and each asset's last event. In an asset-driven deployment a consumer DAG that never runs is usually waiting on a producer that stopped emitting — this read shows which one.

    View source on GitHub
  • airflow.backfill_cancel script high

    Cancel a backfill (PUT /api/v2/backfills/{backfill_id}/cancel)

    Cancel a backfill. Its queued runs are dropped and running task instances are stopped, so a partially reprocessed date range is left partially reprocessed — which downstream consumers may read as complete. Prefer airflow.backfill_pause when the goal is only to free capacity.

    View source on GitHub
  • airflow.backfill_create script high

    Start a backfill (POST /api/v2/backfills)

    Start a backfill of one DAG over a date range. Airflow creates one run per interval in the range and executes them for real, so a wide range is a large, sustained production load: every task writes what it normally writes and competes for the same pools as scheduled work. Bound it with max_active_runs and check airflow.backfills first.

    View source on GitHub
  • airflow.backfill_pause script medium

    Pause a backfill (PUT /api/v2/backfills/{backfill_id}/pause)

    Pause a running backfill so it stops creating further runs. Runs already in flight finish. This is how to give scheduled work its pool slots back without losing the backfill's progress — resume it in the Airflow UI, or cancel it with airflow.backfill_cancel.

    View source on GitHub
  • airflow.backfills script low

    List backfills (GET /api/v2/backfills)

    List backfills for one DAG with their date range, reprocess behavior, max_active_runs, and whether each is running, paused, or completed. Read it before starting another backfill — an already-running one is a common source of a saturated pool.

    View source on GitHub
  • airflow.connections script low

    List connection inventory (GET /api/v2/connections)

    List Airflow connections by id, type, host, port, schema, and login, plus whether each one carries a password and an extra document. Secrets never leave the runner: the password and the whole extra field — where service account JSON, tokens, and TLS keys live — are dropped before the result is returned, so this answers "does this connection exist and where does it point", never "what is the credential".

    View source on GitHub
  • airflow.dag script low

    GET /api/v2/dags/{dag_id}

    Show one DAG's summary — paused state, schedule, owners, tags, next run, concurrency limits, and last parse time. Use when you already know the dag_id; airflow.dag_details adds the parsed DAG-level parameters.

    View source on GitHub
  • airflow.dag_details script low

    GET /api/v2/dags/{dag_id}/details

    Show one DAG's full parsed definition — the summary fields plus timetable, catchup, start and end dates, default arguments, doc_md, params, dataset or asset schedule, and the file it was parsed from. This is what to read before unpausing a DAG, because it says whether catchup will backfill.

    View source on GitHub
  • airflow.dag_pause script medium

    Pause a DAG (PATCH /api/v2/dags/{dag_id})

    Pause one DAG so the scheduler stops creating new runs for it. Runs already in flight keep going. This is the standard containment step for a DAG that is failing in a loop or hammering a downstream system, and airflow.dag_unpause reverses it exactly.

    View source on GitHub
  • airflow.dag_run script low

    GET /api/v2/dags/{dag_id}/dagRuns/{dag_run_id}

    Show one DAG run — state, run type, logical date, queued/start/end times, duration, the conf it was triggered with, and its note. Use after airflow.dag_runs narrows to the run you care about.

    View source on GitHub
  • airflow.dag_run_clear script high

    Clear and re-run a DAG run (POST .../dagRuns/{dag_run_id}/clear)

    Clear task instances in one DAG run and let the scheduler run them again. This is the standard "retry last night's failure" action, and the cleared tasks execute for real with all their side effects. Run airflow.dag_run_clear_preview first to see exactly what it will touch.

    View source on GitHub
  • airflow.dag_run_clear_preview script low

    Preview clearing a DAG run (POST .../dagRuns/{dag_run_id}/clear, dry run)

    Show which task instances airflow.dag_run_clear would reset, without changing anything. Airflow's clear is a dry run by default, and this action fixes it that way: read the list, confirm the blast radius, then run the real clear.

    View source on GitHub
  • airflow.dag_run_delete script high

    Delete a DAG run (DELETE .../dagRuns/{dag_run_id})

    Delete one DAG run and its task-instance records from the metadata database. Irreversible: the run's history, durations, and notes are gone, and the log files it left behind are orphaned. Use it to clear a run created with a wrong logical date or conf, not to hide a failure — airflow.dag_run_set_state retires a run and keeps the record.

    View source on GitHub
  • airflow.dag_run_set_state script high

    Set a DAG run's state (PATCH .../dagRuns/{dag_run_id})

    Set one DAG run to queued, success, or failed. Marking a run failed stops the scheduler from starting further tasks in it; marking it success closes it out without running the remaining tasks, which is how a stuck run is retired — and also how work gets silently skipped, so state the reason in the note. Setting it queued makes the scheduler re-examine the run.

    View source on GitHub
  • airflow.dag_run_trigger script high

    Trigger a DAG run (POST /api/v2/dags/{dag_id}/dagRuns)

    Trigger a new run of one DAG. Every task in the DAG executes for real — writes to warehouses, calls to third parties, notifications — so this is a production change, not a test. Supply conf as a JSON object when the DAG reads dag_run.conf.

    View source on GitHub
  • airflow.dag_runs script low

    List DAG runs (GET /api/v2/dags/{dag_id}/dagRuns)

    List DAG runs with their state, run type, queued/start/end times, duration, and who triggered them. Pass `dag_id: "~"` to search across every DAG at once — combined with `state: failed` that is the one call that answers "what failed in the last hour".

    View source on GitHub
  • airflow.dag_stats script low

    Count DAG runs by state (GET /api/v2/dagStats)

    Count each DAG's runs by state — queued, running, success, failed — in one call. The cheap triage read: it turns "is anything wrong" into a number per DAG without walking run lists.

    View source on GitHub
  • airflow.dag_tasks script low

    List a DAG's tasks (GET /api/v2/dags/{dag_id}/tasks)

    List the tasks a DAG defines, with operator class, pool, queue, retries, trigger rule, and upstream/downstream ids. Read it to learn a DAG's shape before clearing a task or reasoning about which downstream work a failure blocks.

    View source on GitHub
  • airflow.dag_unpause script high

    Unpause a DAG (PATCH /api/v2/dags/{dag_id})

    Unpause one DAG so the scheduler resumes creating runs. Higher risk than the pause it reverses: a DAG with catchup enabled and an old start date creates one run per missed interval the moment it is unpaused, which can be hundreds of runs and can saturate every pool. Read airflow.dag_details first and check catchup and max_active_runs.

    View source on GitHub
  • airflow.dag_warnings script low

    List DAG warnings (GET /api/v2/dagWarnings)

    List non-fatal DAG warnings the scheduler recorded — a task referencing a pool that does not exist, an asset conflict, a value that varies between parses. These do not break parsing, so they are invisible until a task queues forever against a missing pool.

    View source on GitHub
  • airflow.dags script low

    List DAGs (GET /api/v2/dags)

    List DAGs with their paused state, schedule, owners, tags, last parse time, and whether they currently have import errors. Filter by name pattern, tag, paused state, or the state of the most recent run — `last_dag_run_state: failed` is the fastest way to see everything that is broken right now.

    View source on GitHub
  • airflow.event_logs script low

    List Airflow event log entries (GET /api/v2/eventLogs)

    List Airflow's own audit trail — who paused a DAG, triggered a run, cleared a task, or edited a variable, with the owner and timestamp. Read it to answer "who changed this and when" after an unexplained state change.

    View source on GitHub
  • airflow.health script low

    GET /api/v2/monitor/health

    Check Airflow control-plane health — whether the metadata database is reachable and when the scheduler, triggerer, and DAG processor last sent a heartbeat. Start here when DAGs stopped running: a scheduler reporting "unhealthy" explains an entire fleet of queued-but-never-started runs. Needs no credentials.

    View source on GitHub
  • airflow.import_errors script low

    List DAG import errors (GET /api/v2/importErrors)

    List DAG files that failed to parse, with the filename, the timestamp, and the Python traceback. This is the answer to "my DAG disappeared from the UI" and to a deploy that silently stopped scheduling: a file with an import error contributes no DAGs at all.

    View source on GitHub
  • airflow.jobs script low

    List Airflow jobs (GET /api/v2/jobs)

    List Airflow's own scheduler, triggerer, and DAG-processor jobs with their state, hostname, executor class, and last heartbeat. Where airflow.health answers "is the scheduler healthy", this answers "which hosts are running one and which one went quiet" — the read for a multi-scheduler deployment.

    View source on GitHub
  • airflow.pool_set_slots script medium

    Set a pool's slot count (PATCH /api/v2/pools/{pool_name})

    Set how many slots a pool has. This is the throttle: lower it to shed load from a database that is struggling, raise it when the bottleneck is gone. Bounded and reversible — the change applies to scheduling decisions from now on and never touches tasks already running.

    View source on GitHub
  • airflow.pools script low

    List pools (GET /api/v2/pools)

    List Airflow pools with total slots and how many are occupied, running, queued, scheduled, deferred, and open. A pool with zero open slots is the usual reason tasks sit queued while the scheduler looks healthy.

    View source on GitHub
  • airflow.providers script low

    List installed providers (GET /api/v2/providers)

    List the Airflow provider packages installed on the API server with their versions and descriptions. Read it when an operator or a hook behaves differently than the docs say — a provider version mismatch across a fleet is a common cause.

    View source on GitHub
  • airflow.task_instance script low

    GET .../taskInstances/{task_id}

    Show one task instance — state, try number against max_tries, start and end times, duration, hostname, pool, queue, executor, and the trigger it is deferred on. Read it before clearing a task, to see whether retries are already exhausted.

    View source on GitHub
  • airflow.task_instance_set_state script high

    Set a task instance's state (PATCH .../taskInstances/{task_id})

    Set one task instance to success, failed, or skipped without running it. Marking a stuck task success unblocks its downstream work — and asserts that the work happened when it did not, so use it only when you have confirmed the effect by other means. failed stops the branch; skipped passes it over.

    View source on GitHub
  • airflow.task_instances script low

    List task instances (GET .../dagRuns/{dag_run_id}/taskInstances)

    List task instances with state, try number, duration, hostname, operator, pool, and queue. Pass `~` for dag_id and dag_run_id to search across every DAG and run: `state: failed` finds every failing task in the deployment, `state: queued` with a pool filter shows what a saturated pool is holding up.

    View source on GitHub
  • airflow.task_instances_clear script high

    Clear and re-run task instances (POST /api/v2/dags/{dag_id}/clearTaskInstances)

    Clear selected task instances of one DAG and let the scheduler run them again. Narrower than clearing a whole run: name the task ids, optionally one run, and optionally everything downstream. The cleared tasks execute for real. Run airflow.task_instances_clear_preview first.

    View source on GitHub
  • airflow.task_instances_clear_preview script low

    Preview clearing task instances (POST .../clearTaskInstances, dry run)

    Show which task instances airflow.task_instances_clear would reset, without changing anything. Use it to check the reach of include_downstream before clearing a task in the middle of a DAG.

    View source on GitHub
  • airflow.task_log script low

    Get a task instance log (GET .../logs/{try_number})

    Get the log for one attempt of one task instance, as plain text. This is the read that explains a failure: pick the try number from the task instance's try_number and read the traceback. Airflow's secrets masker hides connection and variable values it knows about; anything else the task printed is returned as written.

    View source on GitHub
  • airflow.variables script low

    List variable inventory (GET /api/v2/variables)

    List Airflow variable keys with their description, whether they are encrypted, and how many bytes the value holds. Values never leave the runner — an Airflow variable routinely holds an API key or a DSN, and no redaction pattern can be trusted to catch every shape — so this answers "does this variable exist and is it set", never "what is it".

    View source on GitHub
  • airflow.version script low

    GET /api/v2/version

    Show the Airflow version and git commit the API server is running. Use it to confirm which release a host is on before reading a version-specific field or filing an upgrade. Needs no credentials.

    View source on GitHub