Skip to content

Add has_import_errors filter to Core API GET /dags endpoint #53536

Description

@AryanK1511

Description

The core FastAPI GET /dags endpoint provides several query parameters to filter the list of DAGs returned. This allows users to find specific DAGs based on criteria like tags, owners, or paused status.

The Problem

Currently, there is no way to filter DAGs based on whether they have import errors. The DagModel has a has_import_errors property, but this is not exposed as a filter in the API.

Proposed Solution

I propose adding a new boolean query parameter, has_import_errors, to the GET /dags endpoint located at airflow-core/src/airflow/api_fastapi/core_api/routes/public/dags.py.

  • GET /api/v1/dags?has_import_errors=true should return only DAGs with import errors.
  • GET /api/v1/dags?has_import_errors=false should return only DAGs without import errors.

Use case/motivation

This functionality is crucial to fix #53041. Once this is implemented, the UI filter functionality will be built on top of this.

Related issues

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Activity

  1. AryanK1511 commented on Jul 19, 2025

    @AryanK1511
    ContributorAuthor

    Hello! I am working on #53041 and need someone to assign this issue to me, as it is a prerequisite for that task.

  2. AryanK1511 commented on Jul 25, 2025

    @AryanK1511
    ContributorAuthor

    Facing some issues here:

    #53041 (comment)

  3. AryanK1511 commented on Aug 9, 2025

    @AryanK1511
    ContributorAuthor

    Something came up, so I won’t be able to work on Airflow for the next couple of weeks. Could this issue be assigned to someone else?

  4. gyli commented on Aug 15, 2025

    @gyli
    Collaborator

    I can take this one. I left a comment in the parent issue #53041 mentioning why I think this field could still be helpful.

  5. self-assigned this
    on Aug 15, 2025
  6. removed
    needs-triagelabel for new issues that we didn't triage yet
    on Aug 15, 2025
  7. gyli commented on Aug 15, 2025

    @gyli
    Collaborator

    Draft PR submitted, @AryanK1511 could you plz review, as you seem have done similar changes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions