Skip to content
Tutorials Center
My learning

Topics

Lesson 4 of 37 ยท Getting Started

The Airflow UI and Command Line: A Guided Tour

Tour the Apache Airflow web UI (DAG list, grid, graph, logs, triggers) and the most useful CLI commands for listing, testing, triggering and pausing DAGs.

You will spend a lot of time in two places: the web UI, where you watch runs and read logs, and the command line, where you test, trigger and debug. This lesson gives you a map of both so later lessons can say "open the grid view" or "run airflow tasks test" without explanation.

The UI and CLI need a running Airflow, so descriptions and commands here are read-only. The stand-ins at the end build a small text version of the grid view and a filter like airflow dags list so you can play with the same ideas.

The web UI

Open http://localhost:8080 after starting Airflow. The main areas are:

Dashboard and DAG list

The home page shows recent run health. The DAGs page lists every DAG with its schedule, next run time, latest run state, tags and a pause toggle. Typical actions:

  • Search and filter by name, tag, state (active, paused, failed).
  • Pause/unpause a DAG. A paused DAG creates no new runs.
  • Trigger a run manually, optionally with a configuration JSON.

The DAG detail page

Click a DAG and you get several views of the same data:

  • Grid view. Columns are DAG runs (newest on the right), rows are tasks. A coloured square is one task instance. This is where you spot patterns, such as "task X fails every Monday".
  • Graph view. The DAG drawn as boxes and arrows with the colours of the selected run. Best for understanding structure.
  • Calendar view. One cell per day, coloured by outcome, good for long histories.
  • Code view. The source of the DAG file as Airflow last parsed it. Useful to confirm which version is live.
  • Task duration, Gantt and landing times. Performance views: how long each task takes, which ran in parallel, and where time went.

Task instance details

Click a square to see:

  • Logs, one tab per try. The first place to look when something fails.
  • Rendered template, the values after Jinja templating (see Templating).
  • XCom, the small values the task returned or pushed.
  • Task actions: Clear (re-run this task), Mark success, Mark failed.

Admin pages

Under Admin you find Connections, Variables, Pools, Providers, Plugins and Configuration (read-only). Several of these appear in later chapters.

Task state colours

Colour (typical) State Meaning
Green success Finished without error
Red failed Failed after all retries
Dark yellow up_for_retry Failed, will try again
Light green running Executing now
Grey queued / scheduled Waiting for a slot
Orange skipped Intentionally not run (branching)
Dark orange upstream_failed A parent failed so this one cannot run

The exact colours can differ between versions; the legend is always visible in the UI.

The command line

The airflow command groups its tools by topic.

Terminal
# DAGs
airflow dags list                           # all DAGs the system knows about
airflow dags list-import-errors             # files that failed to import
airflow dags show hello_pipeline            # print the graph (needs graphviz for images)
airflow dags pause  hello_pipeline
airflow dags unpause hello_pipeline
airflow dags trigger hello_pipeline         # create a manual run
airflow dags trigger hello_pipeline --conf '{"city": "Oslo"}'
airflow dags test hello_pipeline            # run all tasks in-process, no scheduler

# Tasks
airflow tasks list hello_pipeline
airflow tasks test hello_pipeline fetch 2025-01-01   # run one task, print its log
airflow tasks states-for-dag-run hello_pipeline <run_id>

# Housekeeping
airflow config get-value core dags_folder
airflow connections list
airflow variables list
airflow db migrate                          # apply database migrations
airflow version

A few important notes:

  • airflow dags test and airflow tasks test do not need the scheduler and do not record a normal scheduled run. That makes them perfect for development. In Airflow 2 tasks test ignored dependencies by design; it runs just that one task.
  • airflow dags trigger creates a real DAG run that the scheduler then executes. This is the command-line twin of the UI Trigger button.
  • --help works on every level: airflow dags --help, airflow dags trigger --help.

When a DAG is missing from the UI, run airflow dags list-import-errors first. It prints the traceback that the UI hides in a small banner.

The REST API

Airflow 3 ships a versioned REST API (served by the API server, under /api/v2). The UI itself is a client of that API. You can use it to trigger DAGs from other systems:

Terminal
curl -X POST "http://localhost:8080/api/v2/dags/hello_pipeline/dagRuns" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"logical_date": null, "conf": {"city": "Oslo"}}'

The details of authentication depend on the configured auth manager, so treat the snippet as a shape, not a copy-paste recipe.

Stand-in: a text grid view

This program prints a grid like the UI does: rows are tasks, columns are runs, and each cell is a one-letter state.

Python Stand-in: text grid view

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Stand-in: filtering a DAG list

airflow dags list can be filtered by tag in the UI. This stand-in does the same over a list of dictionaries.

Python Stand-in: filter DAGs by tag and state

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Which UI view shows task instances as coloured squares, one column per DAG run?

    The grid view has runs as columns and tasks as rows, which makes failure patterns easy to see.
  2. 2. A DAG you just wrote is not in the UI. What is the best first command to run?

    An import error hides the DAG. The command prints the full traceback.
  3. 3. What is true about airflow dags test?

    It is a development tool that executes the DAG locally without scheduler involvement.
  4. 4. What does the orange 'skipped' state usually come from?

    Skipped means the task was deliberately bypassed, typically by branching or a skip condition.

Summary

  • The UI offers a DAG list, grid, graph, calendar, code and performance views, plus per-task logs and XComs.
  • State colours tell you at a glance what happened; the grid view reveals patterns across runs.
  • The CLI covers listing, testing, triggering, pausing and housekeeping; dags test and tasks test are your development loop.
  • Airflow 3 also exposes a versioned REST API that the UI itself uses.

Next: Airflow architecture: the components