Trigger an Airflow 3 DAG run via the v2 REST API and retrieve the run status

domain: airflow.apache.org · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Authenticate against the Airflow API server using Basic Auth or a session token; in Airflow 3 the stable REST API is served at /api/v2 (the former /api/v1 was removed in the Airflow 3.0 upgrade)
  2. Send POST /api/v2/dags/{dag_id}/dagRuns with a JSON body containing at minimum {} (an empty object triggers with a generated run_id and current logical_date); add 'conf' key for runtime parameters
  3. Capture dag_run_id from the 202 response body; Airflow 3 defaults logical_date to null when not supplied, so do not assume a date-based run_id
  4. Poll GET /api/v2/dags/{dag_id}/dagRuns/{dag_run_id} in a loop until the 'state' field transitions to 'success', 'failed', or 'upstream_failed'; apply exponential backoff
  5. On failure, retrieve task-instance details from GET /api/v2/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances to identify which task failed and its log URL

Known gotchas

Related routes

Trigger Airflow DAG run via stable REST API
airflow.apache.org · 6 steps · unrated
Configure Airflow 2.x REST API authentication and use it to programmatically manage DAG pausing, unpausing, and triggering from an external system
airflow.apache.org · 6 steps · unrated
Fetch Airflow 3 DAG version history and pin a backfill to a specific DAG bundle version
airflow.apache.org · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans