Apache

Airflow API

Airflow API. All endpoints located under /api/v2 can be used safely, are stable and backward compatible. Endpoints located under /ui are dedicated to the UI…

Data & analytics#openapi

Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.

Overview

Airflow API. All endpoints located under /api/v2 can be used safely, are stable and backward compatible. Endpoints located under /ui are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead.

Filtering with pattern parameters. Many list endpoints accept _pattern and _prefix_pattern query parameters. Unless a parameter's own description says otherwise, _pattern is a case-insensitive substring match (SQL ILIKE '%term%') where % matches any sequence and _ matches any single character (e.g. %customer_%) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. _prefix_pattern matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there % and _ are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. test_ matches values starting with test, and s3:// matches s3). In both, | means OR (e.g. dag1|dag2) and ~ matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter.

Endpoints 138

Asset

  • GETGet Assets/api/v2/assets?limit=50&offset=0&name_pattern=string&name_prefix_pattern=string&uri=string&uri_pattern=string&uri_prefix_pattern=string&dag_ids=string&only_active=true&order_by=idGet assets.
  • GETGet Asset Aliases/api/v2/assets/aliases?limit=50&offset=0&name_pattern=string&name_prefix_pattern=string&order_by=idGet asset aliases.
  • GETGet Asset Alias/api/v2/assets/aliases/:asset_alias_idGet an asset alias.
  • GETGet Asset Events/api/v2/assets/events?limit=50&offset=0&order_by=timestamp&asset_id=0&source_dag_id=string&source_task_id=string&source_task_instance_id=3fa85f64-5717-4562-b3fc-2c963f66afa6&source_run_id=string&source_map_index=0&partition_key=string&partition_key_regexp_pattern=string&name_pattern=string&name_prefix_pattern=string&extra=string&timestamp_gte=2024-01-01T00:00:00Z&timestamp_gt=2024-01-01T00:00:00Z&timestamp_lte=2024-01-01T00:00:00Z&timestamp_lt=2024-01-01T00:00:00ZGet asset events.
  • POSTCreate Asset Event/api/v2/assets/eventsCreate asset events.
  • POSTMaterialize Asset/api/v2/assets/:asset_id/materializeMaterialize an asset by triggering a Dag run that produces it.
  • GETGet Asset Queued Events/api/v2/assets/:asset_id/queuedEvents?before=stringGet queued asset events for an asset.
  • DELETEDelete Asset Queued Events/api/v2/assets/:asset_id/queuedEvents?before=string&partition_key=stringDelete queued asset events for an asset.
  • GETGet Asset/api/v2/assets/:asset_idGet an asset.
  • GETGet Dag Asset Queued Events/api/v2/dags/:dag_id/assets/queuedEvents?before=stringGet queued asset events for a Dag.
  • DELETEDelete Dag Asset Queued Events/api/v2/dags/:dag_id/assets/queuedEvents?before=string&partition_key=string
  • GETGet Dag Asset Queued Event/api/v2/dags/:dag_id/assets/:asset_id/queuedEvents?before=stringGet a queued asset event for a Dag.
  • DELETEDelete Dag Asset Queued Event/api/v2/dags/:dag_id/assets/:asset_id/queuedEvents?before=string&partition_key=stringDelete a queued asset event for a Dag.

Backfill

  • GETList Backfills/api/v2/backfills?dag_id=string&limit=50&offset=0&order_by=id
  • POSTCreate Backfill/api/v2/backfills
  • GETGet Backfill/api/v2/backfills/:backfill_id
  • GETList Backfill Dag Runs/api/v2/backfills/:backfill_id/dag_runs?limit=50&offset=0&order_by=sort_ordinalList Dag runs associated with a backfill, including skipped slots.
  • PUTPause Backfill/api/v2/backfills/:backfill_id/pause
  • PUTUnpause Backfill/api/v2/backfills/:backfill_id/unpause
  • PUTCancel Backfill/api/v2/backfills/:backfill_id/cancel
  • POSTCreate Backfill Dry Run/api/v2/backfills/dry_run

Connection

  • GETGet Connection/api/v2/connections/:connection_idGet a connection entry.
  • DELETEDelete Connection/api/v2/connections/:connection_idDelete a connection entry.
  • PATCHPatch Connection/api/v2/connections/:connection_id?update_mask=stringUpdate a connection entry.
  • GETGet Connection Test/api/v2/connections/enqueue-testPoll for the status of an enqueued connection test by its token (passed as a header).
  • POSTEnqueue Connection Test/api/v2/connections/enqueue-testEnqueue a connection test for deferred execution on a worker; returns a polling token.
  • GETGet Connections/api/v2/connections?limit=50&offset=0&order_by=id&connection_id_pattern=string&connection_id_prefix_pattern=stringGet all connection entries.
  • POSTPost Connection/api/v2/connectionsCreate connection entry.
  • PATCHBulk Connections/api/v2/connectionsBulk create, update, and delete connections.
  • POSTTest Connection/api/v2/connections/testTest an API connection. This method first creates an in-memory transient conn_id & exports that to an env var, as some hook classes tries to find out the conn…
  • POSTCreate Default Connections/api/v2/connections/defaultsCreate default connections.

DagRun

  • GETGet Dag Run/api/v2/dags/:dag_id/dagRuns/:dag_run_id
  • DELETEDelete Dag Run/api/v2/dags/:dag_id/dagRuns/:dag_run_idDelete a Dag Run entry.
  • PATCHPatch Dag Run/api/v2/dags/:dag_id/dagRuns/:dag_run_id?update_mask=stringModify a Dag Run.
  • GETGet Dag Runs/api/v2/dags/:dag_id/dagRuns?partition_date_gte=2024-01-01&partition_date_lte=2024-01-01&cursor=string&limit=50&offset=0&run_after_gte=2024-01-01T00:00:00Z&run_after_gt=2024-01-01T00:00:00Z&run_after_lte=2024-01-01T00:00:00Z&run_after_lt=2024-01-01T00:00:00Z&logical_date_gte=2024-01-01T00:00:00Z&logical_date_gt=2024-01-01T00:00:00Z&logical_date_lte=2024-01-01T00:00:00Z&logical_date_lt=2024-01-01T00:00:00Z&start_date_gte=2024-01-01T00:00:00Z&start_date_gt=2024-01-01T00:00:00Z&start_date_lte=2024-01-01T00:00:00Z&start_date_lt=2024-01-01T00:00:00Z&end_date_gte=2024-01-01T00:00:00Z&end_date_gt=2024-01-01T00:00:00Z&end_date_lte=2024-01-01T00:00:00Z&end_date_lt=2024-01-01T00:00:00Z&duration_gte=0.0&duration_gt=0.0&duration_lte=0.0&duration_lt=0.0&updated_at_gte=2024-01-01T00:00:00Z&updated_at_gt=2024-01-01T00:00:00Z&updated_at_lte=2024-01-01T00:00:00Z&updated_at_lt=2024-01-01T00:00:00Z&conf_contains=string&run_type=string&state=string&dag_version=0&bundle_version=string&teams=string&tags=string&tags_match_mode=any&order_by=id&run_id_pattern=string&run_id_prefix_pattern=string&triggering_user_name_pattern=string&triggering_user_name_prefix_pattern=string&dag_id_pattern=string&dag_id_prefix_pattern=string&partition_key_pattern=string&partition_key_prefix_pattern=string&consuming_asset_pattern=stringGet all Dag Runs. This endpoint allows specifying ~ as the dag_id to retrieve Dag Runs for all Dags. Supports two pagination modes: Offset (default): use…
  • POSTTrigger Dag Run/api/v2/dags/:dag_id/dagRunsTrigger a Dag.
  • PATCHBulk Dag Runs/api/v2/dags/:dag_id/dagRunsBulk update or delete Dag Runs.
  • GETGet Upstream Asset Events/api/v2/dags/:dag_id/dagRuns/:dag_run_id/upstreamAssetEventsIf dag run is asset-triggered, return the asset events that triggered it.
  • POSTClear Dag Run/api/v2/dags/:dag_id/dagRuns/:dag_run_id/clear
  • GETExperimental: Wait for a dag run to complete, and return task results if requested./api/v2/dags/:dag_id/dagRuns/:dag_run_id/wait?interval=0.0&result=string🚧 This is an experimental endpoint and may change or be removed without notice.Successful response are streamed as newline-delimited JSON (NDJSON). Each line…
  • POSTGet List Dag Runs Batch/api/v2/dags/:dag_id/dagRuns/listGet a list of Dag Runs.
  • POSTClear Dag Runs/api/v2/dags/:dag_id/clearDagRunsClear multiple Dag Runs in a single request.
  • POSTClear Dag Run Partitions/api/v2/dags/:dag_id/clearPartitionsReset partition_key and partition_date fields on matching Dag Runs.

DagSource

  • GETGet Dag Source/api/v2/dagSources/:dag_id?version_number=0Get source code using file token.

Dag Bundle

  • GETGet Dag Bundles/api/v2/dagBundles?limit=50&offset=0&order_by=nameList the Dag bundles Airflow knows about. Reports the version of each bundle Airflow currently holds and when a Dag processor last refreshed it, so whoever…
  • GETGet Dag Bundle/api/v2/dagBundles/:bundle_nameGet a Dag bundle.
  • GETGet Dag Bundle Files/api/v2/dagBundles/:bundle_name/files?limit=50&offset=0List the files in a Dag bundle, ordered by path. Every file the bundle holds is listed, with counts covering the whole file: the bundle is authorized as a…

DagStats

  • GETGet Dag Stats/api/v2/dagStats?dag_ids=stringGet Dag statistics.

Config

  • GETGet Config/api/v2/config?section=string
  • GETGet Config Value/api/v2/config/section/:section/option/:option

DagWarning

  • GETList Dag Warnings/api/v2/dagWarnings?dag_id=string&warning_type=asset conflict&limit=50&offset=0&order_by=dag_idGet a list of Dag warnings.

DAG

  • GETGet Dags/api/v2/dags?is_scheduled=true&limit=50&offset=0&tags=string&tags_match_mode=any&owners=string&dag_id_pattern=string&dag_id_prefix_pattern=string&dag_display_name_pattern=string&dag_display_name_prefix_pattern=string&exclude_stale=true&paused=true&has_import_errors=true&last_dag_run_state=queued&bundle_name=string&bundle_version=string&has_asset_schedule=true&asset_dependency=string&dag_run_start_date_gte=2024-01-01T00:00:00Z&dag_run_start_date_gt=2024-01-01T00:00:00Z&dag_run_start_date_lte=2024-01-01T00:00:00Z&dag_run_start_date_lt=2024-01-01T00:00:00Z&dag_run_end_date_gte=2024-01-01T00:00:00Z&dag_run_end_date_gt=2024-01-01T00:00:00Z&dag_run_end_date_lte=2024-01-01T00:00:00Z&dag_run_end_date_lt=2024-01-01T00:00:00Z&dag_run_state=string&order_by=dag_id&is_favorite=true&timetable_type=stringGet all Dags.
  • PATCHPatch Dags/api/v2/dags?update_mask=string&limit=50&offset=0&tags=string&tags_match_mode=any&owners=string&dag_id_pattern=string&dag_id_prefix_pattern=string&exclude_stale=true&paused=truePatch multiple Dags. If neither dag_id_pattern nor dag_id_prefix_pattern is provided, no Dags will be matched regardless of other filters. To match all Dags,…
  • GETGet Dag/api/v2/dags/:dag_idGet basic information about a Dag.
  • DELETEDelete Dag/api/v2/dags/:dag_idDelete the specific Dag.
  • PATCHPatch Dag/api/v2/dags/:dag_id?update_mask=stringPatch the specific Dag.
  • GETGet Dag Details/api/v2/dags/:dag_id/detailsGet details of Dag.
  • PATCHBulk Dags/api/v2/dags/bulkBulk pause, resume, or drain Dags by id.
  • POSTFavorite Dag/api/v2/dags/:dag_id/favoriteMark the Dag as favorite.
  • POSTUnfavorite Dag/api/v2/dags/:dag_id/unfavoriteUnmark the Dag as favorite.
  • GETGet Dag Tags/api/v2/dagTags?limit=50&offset=0&order_by=name&tag_name_pattern=string&tag_name_prefix_pattern=stringGet all Dag tags.

Event Log

  • GETGet Event Log/api/v2/eventLogs/:event_log_id
  • GETGet Event Logs/api/v2/eventLogs?region_id=3fa85f64-5717-4562-b3fc-2c963f66afa6&region_index=0&limit=50&offset=0&order_by=id&dag_id=string&task_id=string&task_instance_id=3fa85f64-5717-4562-b3fc-2c963f66afa6&run_id=string&map_index=0&try_number=0&owner=string&event=string&excluded_events=string&included_events=string&before=2024-01-01T00:00:00Z&after=2024-01-01T00:00:00Z&dag_id_pattern=string&task_id_pattern=string&run_id_pattern=string&owner_pattern=string&owner_display_name_pattern=string&event_pattern=string&dag_id_prefix_pattern=string&task_id_prefix_pattern=string&run_id_prefix_pattern=string&owner_prefix_pattern=string&owner_display_name_prefix_pattern=string&event_prefix_pattern=string&teams=stringGet all Event Logs.

Extra Links

  • GETGet Extra Links/api/v2/dags/:dag_id/dagRuns/:dag_run_id/taskInstances/:task_id/links?map_index=-1&region_id=3fa85f64-5717-4562-b3fc-2c963f66afa6&region_index=0&try_number=0Get extra links for task instance.

Import Error

  • GETGet Import Error/api/v2/importErrors/:import_error_idGet an import error.
  • GETGet Import Errors/api/v2/importErrors?limit=50&offset=0&order_by=id&filename_pattern=string&filename_prefix_pattern=string&filename=string&bundle_name=stringGet all import errors.

Job

  • GETGet Jobs/api/v2/jobs?start_date_gte=2024-01-01T00:00:00Z&start_date_gt=2024-01-01T00:00:00Z&start_date_lte=2024-01-01T00:00:00Z&start_date_lt=2024-01-01T00:00:00Z&end_date_gte=2024-01-01T00:00:00Z&end_date_gt=2024-01-01T00:00:00Z&end_date_lte=2024-01-01T00:00:00Z&end_date_lt=2024-01-01T00:00:00Z&limit=50&offset=0&order_by=id&job_state=string&dag_id=string&job_type=string&hostname=string&executor_class=string&teams=string&is_alive=trueGet all jobs.

Plugin

  • GETGet Plugins/api/v2/plugins?limit=50&offset=0
  • GETImport Errors/api/v2/plugins/importErrors

Pool

  • GETGet Pool/api/v2/pools/:pool_nameGet a pool.
  • DELETEDelete Pool/api/v2/pools/:pool_nameDelete a pool entry.
  • PATCHPatch Pool/api/v2/pools/:pool_name?update_mask=stringUpdate a Pool.
  • GETGet Pools/api/v2/pools?limit=50&offset=0&order_by=id&pool_name_pattern=string&pool_name_prefix_pattern=stringGet all pools entries.
  • POSTPost Pool/api/v2/poolsCreate a Pool.
  • PATCHBulk Pools/api/v2/poolsBulk create, update, and delete pools.

Provider

  • GETGet Providers/api/v2/providers?limit=50&offset=0Get providers.
  • GETGet Provider/api/v2/providers/:provider_nameGet detailed information about an installed provider.

Asset State Store

  • GETList Asset State Store/api/v2/assets/:asset_id/state-store?limit=50&offset=0List all state store entries for an asset.
  • DELETEClear Asset State Store/api/v2/assets/:asset_id/state-storeDelete all state store keys for an asset.
  • GETGet Asset State Store/api/v2/assets/:asset_id/state-store/:keyGet a single asset state store entry.
  • PUTSet Asset State Store/api/v2/assets/:asset_id/state-store/:keySet an asset state store value. Creates or overwrites the key.
  • DELETEDelete Asset State Store/api/v2/assets/:asset_id/state-store/:keyDelete a single asset state store key. No-op if the key does not exist.

Task State Store

  • GETList Task State Store/api/v2/dags/:dag_id/dagRuns/:dag_run_id/taskInstances/:task_id/state-store?map_index=-1&region_id=3fa85f64-5717-4562-b3fc-2c963f66afa6&region_index=0&limit=50&offset=0List all task state store entries for a task instance.
  • DELETEClear Task State Store/api/v2/dags/:dag_id/dagRuns/:dag_run_id/taskInstances/:task_id/state-store?map_index=-1&region_id=3fa85f64-5717-4562-b3fc-2c963f66afa6&region_index=0&all_map_indices=falseDelete all task state store keys for a task instance. When all_map_indices=true, state store is cleared for every map index of the task and the map_index…
  • GETGet Task State Store/api/v2/dags/:dag_id/dagRuns/:dag_run_id/taskInstances/:task_id/state-store/:key?map_index=-1&region_id=3fa85f64-5717-4562-b3fc-2c963f66afa6&region_index=0Get a single task state store entry.
  • PUTSet Task State Store/api/v2/dags/:dag_id/dagRuns/:dag_run_id/taskInstances/:task_id/state-store/:key?map_index=-1&region_id=3fa85f64-5717-4562-b3fc-2c963f66afa6&region_index=0Set a task state store value. Creates or overwrites the key.
  • DELETEDelete Task State Store/api/v2/dags/:dag_id/dagRuns/:dag_run_id/taskInstances/:task_id/state-store/:key?map_index=-1&region_id=3fa85f64-5717-4562-b3fc-2c963f66afa6&region_index=0Delete a single task state store key. No-op if the key does not exist.
  • PATCHPatch Task State Store/api/v2/dags/:dag_id/dagRuns/:dag_run_id/taskInstances/:task_id/state-store/:key?map_index=-1&region_id=3fa85f64-5717-4562-b3fc-2c963f66afa6&region_index=0Update the value of an existing task state store key.

XCom

  • GETGet Xcom Entry/api/v2/dags/:dag_id/dagRuns/:dag_run_id/taskInstances/:task_id/xcomEntries/:xcom_key?map_index=-1&region_id=3fa85f64-5717-4562-b3fc-2c963f66afa6&region_index=0&deserialize=false&stringify=falseGet an XCom entry.
  • DELETEDelete Xcom Entry/api/v2/dags/:dag_id/dagRuns/:dag_run_id/taskInstances/:task_id/xcomEntries/:xcom_key?map_index=-1&region_id=3fa85f64-5717-4562-b3fc-2c963f66afa6&region_index=0Delete an XCom entry.
  • PATCHUpdate Xcom Entry/api/v2/dags/:dag_id/dagRuns/:dag_run_id/taskInstances/:task_id/xcomEntries/:xcom_keyUpdate an existing XCom entry.
  • GETGet Xcom Entries/api/v2/dags/:dag_id/dagRuns/:dag_run_id/taskInstances/:task_id/xcomEntries?xcom_key=string&map_index=0&region_id=3fa85f64-5717-4562-b3fc-2c963f66afa6&region_index=0&exclude_internal_keys=false&limit=50&offset=0&xcom_key_pattern=string&xcom_key_prefix_pattern=string&dag_display_name_pattern=string&dag_display_name_prefix_pattern=string&run_id_pattern=string&run_id_prefix_pattern=string&task_id_pattern=string&task_id_prefix_pattern=string&map_index_filter=0&logical_date_gte=2024-01-01T00:00:00Z&logical_date_gt=2024-01-01T00:00:00Z&logical_date_lte=2024-01-01T00:00:00Z&logical_date_lt=2024-01-01T00:00:00Z&run_after_gte=2024-01-01T00:00:00Z&run_after_gt=2024-01-01T00:00:00Z&run_after_lte=2024-01-01T00:00:00Z&run_after_lt=2024-01-01T00:00:00Z&teams=string&order_by=dag_id,task_id,run_id,region_id,region_index,keyGet all XCom entries. This endpoint allows specifying ~ as the dag_id, dag_run_id, task_id to retrieve XCom entries for all Dags.
  • POSTCreate Xcom Entry/api/v2/dags/:dag_id/dagRuns/:dag_run_id/taskInstances/:task_id/xcomEntriesCreate an XCom entry.

Task Instance

  • GETGet Task Instance/api/v2/dags/:dag_id/dagRuns/:dag_run_id/taskInstances/:task_id?region_id=3fa85f64-5717-4562-b3fc-2c963f66afa6&region_index=0Get task instance.
  • DELETEDelete Task Instance/api/v2/dags/:dag_id/dagRuns/:dag_run_id/taskInstances/:task_id?map_index=-1&region_id=3fa85f64-5717-4562-b3fc-2c963f66afa6&region_index=0Delete a task instance.
  • PATCHPatch Task Instance/api/v2/dags/:dag_id/dagRuns/:dag_run_id/taskInstances/:task_id?map_index=0&update_mask=string&region_id=3fa85f64-5717-4562-b3fc-2c963f66afa6&region_index=0Update a task instance.
  • GETGet Mapped Task Instances/api/v2/dags/:dag_id/dagRuns/:dag_run_id/taskInstances/:task_id/listMapped?region_id=3fa85f64-5717-4562-b3fc-2c963f66afa6&region_index=0&run_after_gte=2024-01-01T00:00:00Z&run_after_gt=2024-01-01T00:00:00Z&run_after_lte=2024-01-01T00:00:00Z&run_after_lt=2024-01-01T00:00:00Z&logical_date_gte=2024-01-01T00:00:00Z&logical_date_gt=2024-01-01T00:00:00Z&logical_date_lte=2024-01-01T00:00:00Z&logical_date_lt=2024-01-01T00:00:00Z&start_date_gte=2024-01-01T00:00:00Z&start_date_gt=2024-01-01T00:00:00Z&start_date_lte=2024-01-01T00:00:00Z&start_date_lt=2024-01-01T00:00:00Z&end_date_gte=2024-01-01T00:00:00Z&end_date_gt=2024-01-01T00:00:00Z&end_date_lte=2024-01-01T00:00:00Z&end_date_lt=2024-01-01T00:00:00Z&updated_at_gte=2024-01-01T00:00:00Z&updated_at_gt=2024-01-01T00:00:00Z&updated_at_lte=2024-01-01T00:00:00Z&updated_at_lt=2024-01-01T00:00:00Z&duration_gte=0.0&duration_gt=0.0&duration_lte=0.0&duration_lt=0.0&state=string&pool=string&pool_name_pattern=string&pool_name_prefix_pattern=string&queue=string&queue_name_pattern=string&queue_name_prefix_pattern=string&executor=string&version_number=0&try_number=0&operator=string&operator_name_pattern=string&operator_name_prefix_pattern=string&map_index=0&rendered_map_index_pattern=string&rendered_map_index_prefix_pattern=string&limit=50&offset=0&order_by=map_indexGet list of mapped task instances.
  • GETGet Task Instance Dependencies/api/v2/dags/:dag_id/dagRuns/:dag_run_id/taskInstances/:task_id/:map_index/dependencies?region_id=3fa85f64-5717-4562-b3fc-2c963f66afa6&region_index=0Get dependencies blocking task from getting scheduled.
  • GETGet Task Instance Dependencies/api/v2/dags/:dag_id/dagRuns/:dag_run_id/taskInstances/:task_id/dependencies?map_index=-1&region_id=3fa85f64-5717-4562-b3fc-2c963f66afa6&region_index=0Get dependencies blocking task from getting scheduled.
  • GETGet Task Instance Tries/api/v2/dags/:dag_id/dagRuns/:dag_run_id/taskInstances/:task_id/tries?map_index=-1&region_id=3fa85f64-5717-4562-b3fc-2c963f66afa6&region_index=0Get list of task instances history. Tries recorded before the task had regions are not included once it has them.
  • GETGet Mapped Task Instance Tries/api/v2/dags/:dag_id/dagRuns/:dag_run_id/taskInstances/:task_id/:map_index/tries?region_id=3fa85f64-5717-4562-b3fc-2c963f66afa6&region_index=0Get list of task instances history for a mapped task instance. Tries recorded before the task had regions are not included once it has them.
  • GETGet Mapped Task Instance/api/v2/dags/:dag_id/dagRuns/:dag_run_id/taskInstances/:task_id/:map_index?region_id=3fa85f64-5717-4562-b3fc-2c963f66afa6&region_index=0Get task instance.
  • PATCHPatch Task Instance/api/v2/dags/:dag_id/dagRuns/:dag_run_id/taskInstances/:task_id/:map_index?update_mask=string&region_id=3fa85f64-5717-4562-b3fc-2c963f66afa6&region_index=0Update a task instance.
  • GETGet Task Instances/api/v2/dags/:dag_id/dagRuns/:dag_run_id/taskInstances?region_id=3fa85f64-5717-4562-b3fc-2c963f66afa6&region_index=0&loop_id=string&iteration=1&cursor=string&task_id=string&run_after_gte=2024-01-01T00:00:00Z&run_after_gt=2024-01-01T00:00:00Z&run_after_lte=2024-01-01T00:00:00Z&run_after_lt=2024-01-01T00:00:00Z&logical_date_gte=2024-01-01T00:00:00Z&logical_date_gt=2024-01-01T00:00:00Z&logical_date_lte=2024-01-01T00:00:00Z&logical_date_lt=2024-01-01T00:00:00Z&start_date_gte=2024-01-01T00:00:00Z&start_date_gt=2024-01-01T00:00:00Z&start_date_lte=2024-01-01T00:00:00Z&start_date_lt=2024-01-01T00:00:00Z&end_date_gte=2024-01-01T00:00:00Z&end_date_gt=2024-01-01T00:00:00Z&end_date_lte=2024-01-01T00:00:00Z&end_date_lt=2024-01-01T00:00:00Z&updated_at_gte=2024-01-01T00:00:00Z&updated_at_gt=2024-01-01T00:00:00Z&updated_at_lte=2024-01-01T00:00:00Z&updated_at_lt=2024-01-01T00:00:00Z&duration_gte=0.0&duration_gt=0.0&duration_lte=0.0&duration_lt=0.0&task_display_name_pattern=string&task_display_name_prefix_pattern=string&task_group_id=string&dag_id_pattern=string&dag_id_prefix_pattern=string&run_id_pattern=string&run_id_prefix_pattern=string&state=string&pool=string&pool_name_pattern=string&pool_name_prefix_pattern=string&queue=string&queue_name_pattern=string&queue_name_prefix_pattern=string&executor=string&version_number=0&teams=string&try_number=0&operator=string&operator_name_pattern=string&operator_name_prefix_pattern=string&map_index=0&rendered_map_index_pattern=string&rendered_map_index_prefix_pattern=string&limit=50&offset=0&order_by=map_indexGet list of task instances. This endpoint allows specifying ~ as the dag_id, dag_run_id to retrieve task instances for all Dags and Dag runs. Supports two…
  • PATCHBulk Task Instances/api/v2/dags/:dag_id/dagRuns/:dag_run_id/taskInstancesBulk update, and delete task instances.
  • POSTGet Task Instances Batch/api/v2/dags/:dag_id/dagRuns/:dag_run_id/taskInstances/listGet list of task instances.
  • GETGet Task Instance Try Details/api/v2/dags/:dag_id/dagRuns/:dag_run_id/taskInstances/:task_id/tries/:task_try_number?map_index=-1&region_id=3fa85f64-5717-4562-b3fc-2c963f66afa6&region_index=0Get task instance details by try number.
  • GETGet Mapped Task Instance Try Details/api/v2/dags/:dag_id/dagRuns/:dag_run_id/taskInstances/:task_id/:map_index/tries/:task_try_number?region_id=3fa85f64-5717-4562-b3fc-2c963f66afa6&region_index=0
  • POSTPost Clear Task Instances/api/v2/dags/:dag_id/clearTaskInstancesClear task instances.
  • PATCHPatch Task Group Instances/api/v2/dags/:dag_id/dagRuns/:dag_run_id/taskGroupInstances/:group_id?update_mask=string&region_id=3fa85f64-5717-4562-b3fc-2c963f66afa6&region_index=0Update the state of all task instances in a task group.
  • PATCHPatch Task Group Instances Dry Run/api/v2/dags/:dag_id/dagRuns/:dag_run_id/taskGroupInstances/:group_id/dry_run?region_id=3fa85f64-5717-4562-b3fc-2c963f66afa6&region_index=0Dry-run of updating the state of all task instances in a task group.
  • PATCHPatch Task Instance Dry Run/api/v2/dags/:dag_id/dagRuns/:dag_run_id/taskInstances/:task_id/:map_index/dry_run?update_mask=string&region_id=3fa85f64-5717-4562-b3fc-2c963f66afa6&region_index=0Update a task instance dry_run mode.
  • PATCHPatch Task Instance Dry Run/api/v2/dags/:dag_id/dagRuns/:dag_run_id/taskInstances/:task_id/dry_run?map_index=0&update_mask=string&region_id=3fa85f64-5717-4562-b3fc-2c963f66afa6&region_index=0Update a task instance dry_run mode.
  • GETGet Log/api/v2/dags/:dag_id/dagRuns/:dag_run_id/taskInstances/:task_id/logs/:try_number?full_content=false&token=string&map_index=-1&region_id=3fa85f64-5717-4562-b3fc-2c963f66afa6&region_index=0Get logs for a specific task instance.
  • GETGet External Log Url/api/v2/dags/:dag_id/dagRuns/:dag_run_id/taskInstances/:task_id/externalLogUrl/:try_number?map_index=-1&region_id=3fa85f64-5717-4562-b3fc-2c963f66afa6&region_index=0Get external log URL for a specific task instance.
  • GETGet Hitl Detail/api/v2/dags/:dag_id/dagRuns/:dag_run_id/taskInstances/:task_id/:map_index/hitlDetails?region_id=3fa85f64-5717-4562-b3fc-2c963f66afa6&region_index=0Get a Human-in-the-loop detail of a specific task instance.
  • PATCHUpdate Hitl Detail/api/v2/dags/:dag_id/dagRuns/:dag_run_id/taskInstances/:task_id/:map_index/hitlDetails?region_id=3fa85f64-5717-4562-b3fc-2c963f66afa6&region_index=0Update a Human-in-the-loop detail.
  • GETGet Hitl Detail Try Detail/api/v2/dags/:dag_id/dagRuns/:dag_run_id/taskInstances/:task_id/:map_index/hitlDetails/tries/:try_number?region_id=3fa85f64-5717-4562-b3fc-2c963f66afa6&region_index=0Get a Human-in-the-loop detail of a specific task instance.
  • GETGet Hitl Details/api/v2/dags/:dag_id/dagRuns/:dag_run_id/hitlDetails?region_id=3fa85f64-5717-4562-b3fc-2c963f66afa6&region_index=0&limit=50&offset=0&order_by=ti_id&dag_id_pattern=string&dag_id_prefix_pattern=string&task_id=string&task_id_pattern=string&task_id_prefix_pattern=string&map_index=0&state=string&teams=string&response_received=true&responded_by_user_id=string&responded_by_user_name=string&subject_search=string&body_search=string&created_at_gte=2024-01-01T00:00:00Z&created_at_gt=2024-01-01T00:00:00Z&created_at_lte=2024-01-01T00:00:00Z&created_at_lt=2024-01-01T00:00:00ZGet Human-in-the-loop details.

Task

  • GETGet Tasks/api/v2/dags/:dag_id/tasks?order_by=task_idGet tasks for Dag.
  • GETGet Task/api/v2/dags/:dag_id/tasks/:task_id?version_number=0Get simplified representation of a task. Pass version_number (e.g. a task instance's dag_version.version_number) to get the task as defined in that Dag…

Trigger

  • GETGet Triggers/api/v2/triggers?limit=50&offset=0&order_by=id&kind=task&status=pending&triggerer_hostname=string&dag_id=string&asset_id=0&teams=stringGet the triggers the caller can see, of every kind, and how each is doing. A trigger is visible to whoever can see its owner: the task instance or Dag run of…
  • GETGet Trigger/api/v2/triggers/:trigger_idGet a trigger, who it runs for, and how it is doing.

Variable

  • GETGet Variable/api/v2/variables/:variable_keyGet a variable entry.
  • DELETEDelete Variable/api/v2/variables/:variable_keyDelete a variable entry.
  • PATCHPatch Variable/api/v2/variables/:variable_key?update_mask=stringUpdate a variable by key.
  • GETGet Variables/api/v2/variables?limit=50&offset=0&order_by=id&variable_key_pattern=string&variable_key_prefix_pattern=stringGet all Variables entries.
  • POSTPost Variable/api/v2/variablesCreate a variable.
  • PATCHBulk Variables/api/v2/variablesBulk create, update, and delete variables.

DAG Parsing

  • PUTReparse Dag File/api/v2/parseDagFile/:file_tokenRequest re-parsing a Dag file.

DagVersion

  • GETExperimental: Compare what two stored versions of a Dag currently hold./api/v2/dags/:dag_id/dagVersions/diff?base_version_number=0&target_version_number=0&max_changes=500🚧 This is an experimental endpoint and may change or be removed without notice. Reports observed state — what the two stored versions currently hold — not why…
  • GETGet Dag Version/api/v2/dags/:dag_id/dagVersions/:version_numberGet one Dag Version.
  • GETGet Dag Versions/api/v2/dags/:dag_id/dagVersions?limit=50&offset=0&version_number=0&bundle_name=string&bundle_version=string&order_by=idGet all Dag Versions. This endpoint allows specifying ~ as the dag_id to retrieve Dag Versions for all Dags.

Monitor

  • GETGet Health/api/v2/monitor/health

Version

  • GETGet Version/api/v2/versionGet version information.

Login

  • GETLogin/api/v2/auth/login?next=stringRedirect to the login URL depending on the AuthManager configured.
  • GETGet Cli Login Metadata/api/v2/auth/cli/metadataReturn the login methods the AuthManager configured offers to command-line clients.
  • GETLogout/api/v2/auth/logoutLogout the user.

API details

Authentication
OAuth 2.0 (password flow)
A bearer token in the Authorization header
Operations
138 operations on 98 pathsGET 77PATCH 21POST 20DELETE 14PUT 6
Main resources
Task Instance 27Asset 13DagRun 12Connection 10DAG 10Backfill 8Pool 6Task State Store 6Variable 6Asset State Store 5
Response formats
application/json text/plain application/x-ndjson
Description format
OpenAPI 3.1.0, API version 2

How to test the Airflow API in Swastik Codes

  1. Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
  2. Fork it into your workspaceChoose a workspace. You get your own copy of the Airflow API collection, without the publisher's secrets.
  3. Add your credentialsThis API uses OAuth 2.0 (password flow). Add yours in the collection's variables or an environment; the requests already reference it.
  4. Send a requestPick an endpoint, for example “Get Assets” (GET /api/v2/assets?limit=50&offset=0&name_pattern=string&name_prefix_pattern=string&uri=string&uri_pattern=string&uri_prefix_pattern=string&dag_ids=string&only_active=true&order_by=id), and press Send. Check the response, add tests and run the whole collection with the runner.

Frequently asked questions

What is the Airflow API?

Airflow API. All endpoints located under /api/v2 can be used safely, are stable and backward compatible. Endpoints located under /ui are dedicated to the UI… It is listed under Data & analytics and has 138 endpoints.

Who publishes the Airflow API?

It is listed from Apache's public API description (an OpenAPI document), not published by Apache on Swastik Codes. Anyone who controls apache.org can claim the profile by adding a DNS TXT record.

How do I authenticate with the Airflow API?

It accepts 2 methods: OAuth 2.0 (password flow); A bearer token in the Authorization header.

How many endpoints does the Airflow API have?

138 operations on 98 paths (77 GET, 21 PATCH, 20 POST, 14 DELETE, 6 PUT). The largest groups are Task Instance, Asset, DagRun, Connection.

Is forking the Airflow API free?

Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.

Suggest an API

Tell us which public API is missing. We check it, then add it here with its endpoints when it has an OpenAPI (Swagger) description.