Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add asset-based filtering support to DAG API endpoint#54263

Merged
bbovenzi merged 21 commits intoapache:mainfrom
astronomer:add-assets-filter-to-dag-endpoint
Aug 25, 2025
Merged

Add asset-based filtering support to DAG API endpoint#54263
bbovenzi merged 21 commits intoapache:mainfrom
astronomer:add-assets-filter-to-dag-endpoint

Conversation

Copy link
Contributor

vatsrahul1001 commented Aug 8, 2025 *
edited
Loading

Implements two new filter parameters for the DAG API: has_asset_schedule (boolean) to filter DAGs by asset-based scheduling and asset_dependency (string) to filter by asset name/URI using ILIKE pattern matching.

closes: #53740
related: #53041
Testing

Filter with asset name

Filter with dags with assets

Filter with dags with no assets

^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in airflow-core/newsfragments.

boring-cyborg bot added area:API Airflow's REST/HTTP API area:UI Related to UI/UX. For Frontend Developers. labels Aug 8, 2025
Copy link
Member

pierrejeambrun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, looks good overall, just a few suggestion, and maybe one thing to test or fix. (join duplicating dags entries)

vatsrahul1001 added 2 commits August 12, 2025 11:09
vatsrahul1001 requested a review from pierrejeambrun August 12, 2025 05:43
Copy link
Member

pierrejeambrun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for addressing the comments, just a couple of comments and we should be good to merge.

vatsrahul1001 requested a review from pierrejeambrun August 13, 2025 14:53
Copy link
Contributor Author

vatsrahul1001 commented Aug 18, 2025

@bbovenzi, can you merge this if it looks good to you?

Copy link
Member

pierrejeambrun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one comment otherwise looking good.

vatsrahul1001 requested a review from pierrejeambrun August 21, 2025 09:24
jason810496 approved these changes Aug 25, 2025
bbovenzi approved these changes Aug 25, 2025
bbovenzi merged commit 4c194fd into apache:main Aug 25, 2025
298 of 301 checks passed
bbovenzi deleted the add-assets-filter-to-dag-endpoint branch August 25, 2025 15:20
mangal-vairalkar pushed a commit to mangal-vairalkar/airflow that referenced this pull request Aug 30, 2025
* add asset query param to dag endpoint

* implement review comments

* fix tests

* fix review comments

* add filters to UI endpoint
nothingmin pushed a commit to nothingmin/airflow that referenced this pull request Sep 2, 2025
* add asset query param to dag endpoint

* implement review comments

* fix tests

* fix review comments

* add filters to UI endpoint
kaxil added a commit to apache/airflow-client-python that referenced this pull request Oct 22, 2025
(from https://github.com/apache/airflow/tree/python-client/3.1.0rc1)

## New Features:

- Add `map_index` filter to TaskInstance API queries ([#55614](apache/airflow#55614))
- Add `has_import_errors` filter to Core API GET /dags endpoint ([#54563](apache/airflow#54563))
- Add `dag_version` filter to get_dag_runs endpoint ([#54882](apache/airflow#54882))
- Implement pattern search for event log endpoint ([#55114](apache/airflow#55114))
- Add asset-based filtering support to DAG API endpoint ([#54263](apache/airflow#54263))
- Add Greater Than and Less Than range filters to DagRuns and Task Instance list ([#54302](apache/airflow#54302))
- Add `try_number` as filter to task instances ([#54695](apache/airflow#54695))
- Add filters to Browse XComs endpoint ([#54049](apache/airflow#54049))
- Add Filtering by DAG Bundle Name and Version to API routes ([#54004](apache/airflow#54004))
- Add search filter for DAG runs by triggering user name ([#53652](apache/airflow#53652))
- Enable multi sorting (AIP-84) ([#53408](apache/airflow#53408))
- Add `run_on_latest_version` support for backfill and clear operations ([#52177](apache/airflow#52177))
- Add `run_id_pattern` search for Dag Run API ([#52437](apache/airflow#52437))
- Add tracking of triggering user to Dag runs ([#51738](apache/airflow#51738))
- Expose DAG parsing duration in the API ([#54752](apache/airflow#54752))

## New API Endpoints:

- Add Human-in-the-Loop (HITL) endpoints for approval workflows ([#52868](apache/airflow#52868), [#53373](apache/airflow#53373), [#53376](apache/airflow#53376), [#53885](apache/airflow#53885), [#53923](apache/airflow#53923), [#54308](apache/airflow#54308), [#54310](apache/airflow#54310), [#54723](apache/airflow#54723), [#54773](apache/airflow#54773), [#55019](apache/airflow#55019), [#55463](apache/airflow#55463), [#55525](apache/airflow#55525), [#55535](apache/airflow#55535), [#55603](apache/airflow#55603), [#55776](apache/airflow#55776))
- Add endpoint to watch dag run until finish ([#51920](apache/airflow#51920))
- Add TI bulk actions endpoint ([#50443](apache/airflow#50443))
- Add Keycloak Refresh Token Endpoint ([#51657](apache/airflow#51657))

## Deprecations:

- Mark `DagDetailsResponse.concurrency` as deprecated ([#55150](apache/airflow#55150))

## Bug Fixes:

- Fix dag import error modal pagination ([#55719](apache/airflow#55719))
kaxil mentioned this pull request Oct 22, 2025
kaxil added a commit to apache/airflow-client-python that referenced this pull request Oct 23, 2025
(from https://github.com/apache/airflow/tree/python-client/3.1.0rc1)

## New Features:

- Add `map_index` filter to TaskInstance API queries ([#55614](apache/airflow#55614))
- Add `has_import_errors` filter to Core API GET /dags endpoint ([#54563](apache/airflow#54563))
- Add `dag_version` filter to get_dag_runs endpoint ([#54882](apache/airflow#54882))
- Implement pattern search for event log endpoint ([#55114](apache/airflow#55114))
- Add asset-based filtering support to DAG API endpoint ([#54263](apache/airflow#54263))
- Add Greater Than and Less Than range filters to DagRuns and Task Instance list ([#54302](apache/airflow#54302))
- Add `try_number` as filter to task instances ([#54695](apache/airflow#54695))
- Add filters to Browse XComs endpoint ([#54049](apache/airflow#54049))
- Add Filtering by DAG Bundle Name and Version to API routes ([#54004](apache/airflow#54004))
- Add search filter for DAG runs by triggering user name ([#53652](apache/airflow#53652))
- Enable multi sorting (AIP-84) ([#53408](apache/airflow#53408))
- Add `run_on_latest_version` support for backfill and clear operations ([#52177](apache/airflow#52177))
- Add `run_id_pattern` search for Dag Run API ([#52437](apache/airflow#52437))
- Add tracking of triggering user to Dag runs ([#51738](apache/airflow#51738))
- Expose DAG parsing duration in the API ([#54752](apache/airflow#54752))

## New API Endpoints:

- Add Human-in-the-Loop (HITL) endpoints for approval workflows ([#52868](apache/airflow#52868), [#53373](apache/airflow#53373), [#53376](apache/airflow#53376), [#53885](apache/airflow#53885), [#53923](apache/airflow#53923), [#54308](apache/airflow#54308), [#54310](apache/airflow#54310), [#54723](apache/airflow#54723), [#54773](apache/airflow#54773), [#55019](apache/airflow#55019), [#55463](apache/airflow#55463), [#55525](apache/airflow#55525), [#55535](apache/airflow#55535), [#55603](apache/airflow#55603), [#55776](apache/airflow#55776))
- Add endpoint to watch dag run until finish ([#51920](apache/airflow#51920))
- Add TI bulk actions endpoint ([#50443](apache/airflow#50443))
- Add Keycloak Refresh Token Endpoint ([#51657](apache/airflow#51657))

## Deprecations:

- Mark `DagDetailsResponse.concurrency` as deprecated ([#55150](apache/airflow#55150))

## Bug Fixes:

- Fix dag import error modal pagination ([#55719](apache/airflow#55719))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

bbovenzi bbovenzi approved these changes

jason810496 jason810496 approved these changes

ryanahamilton Awaiting requested review from ryanahamilton ryanahamilton is a code owner

jscheffl Awaiting requested review from jscheffl

shubhamraj-git Awaiting requested review from shubhamraj-git shubhamraj-git is a code owner

ephraimbuddy Awaiting requested review from ephraimbuddy ephraimbuddy is a code owner

rawwar Awaiting requested review from rawwar rawwar is a code owner

bugraoz93 Awaiting requested review from bugraoz93 bugraoz93 is a code owner

pierrejeambrun Awaiting requested review from pierrejeambrun pierrejeambrun is a code owner

Assignees

No one assigned

Labels

area:API Airflow's REST/HTTP API area:UI Related to UI/UX. For Frontend Developers.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Enhance API Support for Filtering DAGs with Asset-Based Schedules

4 participants