apache-airflow-api
Execute Apache Airflow Stable REST API queries, manage DAGs, backfills, connections, variables, and assets. You MUST load this skill when interacting with the Airflow API.
Works with
---
name: apache-airflow-api
description: Execute Apache Airflow Stable REST API queries, manage DAGs, backfills, connections, variables, and assets. You MUST load this skill when interacting with the Airflow API.
license: MIT
---
# apache-airflow-api
<!-- markdownlint-disable MD013 MD023 MD031 MD032 -->
## WHEN TO USE
- Querying, triggering, or managing DAGs and DAG Runs via the Airflow REST API.
- Managing Airflow Variables, Connections, Pools, or Assets autonomously.
- Extracting Task Instance logs, XCom entries, or execution statistics.
- Handling backfill operations (pause, unpause, cancel) programmatically.
## WHEN NOT TO USE
- When interacting with Airflow internal database directly (use standard SQL queries instead).
- When modifying DAG source files locally (use `python` or standard editing skills instead).
- When using Airflow UI-only endpoints (endpoints under `/ui` are subject to breaking changes).
## Core Process
1. **Authentication**: Determine the authentication method configured for the Airflow API (e.g., Basic Auth, OAuth2). For Basic Auth, use `--user <username>:<password>`.
2. **Endpoint Identification**: Identify the appropriate `/api/v2/` endpoint from the API mindmap or documentation.
3. **Payload Construction**: For `POST`, `PUT`, or `PATCH` requests, construct the correct JSON payload (e.g., `{"is_paused": true}`).
4. **Execution**: Use `curl` or a scripting tool (like Python's `requests`) to execute the API call. Include appropriate headers (e.g., `-H "Content-Type: application/json"`).
5. **Response Validation**: Ensure the response is HTTP `200`, `201`, or `204`. If `401` or `403`, verify credentials. If `422`, verify payload format.
## Best Practices
- **Stable Endpoints**: Always use the `/api/v2/` (or `/api/v1/` depending on the Airflow environment version) stable endpoints, avoiding `/ui` endpoints.
- **Filtering and Pagination**: Use `limit`, `offset`, and `order_by` query parameters when querying large collections like Task Instances or DAG Runs.
- **Dry Runs**: Use the `dry_run` endpoints (e.g., `/api/v2/backfills/dry_run`, `/api/v2/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/dry_run`) to validate operations before committing them.
## Mindmap of API Paths
The following mindmap outlines the structure of the Apache Airflow Stable REST API endpoints:
```mermaid
mindmap
root(("Airflow API"))
/api
/v2
/assets
/aliases
/{asset_alias_id}
/events
/{asset_id}
/materialize
/queuedEvents
/auth
/login
/logout
/backfills
/dry_run
/{backfill_id}
/cancel
/pause
/unpause
/config
/section
/{section}
/option
/{option}
/connections
/defaults
/test
/{connection_id}
/dagSources
/{dag_id}
/dagStats
/dagTags
/dagWarnings
/dags
/{dag_id}
/assets
/queuedEvents
/{asset_id}
/queuedEvents
/clearTaskInstances
/dagRuns
/list
/{dag_run_id}
/clear
/hitlDetails
/taskInstances
/list
/{task_id}
/dependencies
/dry_run
/externalLogUrl
/{try_number}
/links
/listMapped
/logs
/{try_number}
/tries
/{task_try_number}
/xcomEntries
/{xcom_key}
/{map_index}
/dependencies
/dry_run
/hitlDetails
/tries
/{try_number}
/tries
/{task_try_number}
/upstreamAssetEvents
/wait
/dagVersions
/{version_number}
/details
/favorite
/tasks
/{task_id}
/unfavorite
/eventLogs
/{event_log_id}
/importErrors
/{import_error_id}
/jobs
/monitor
/health
/parseDagFile
/{file_token}
/plugins
/importErrors
/pools
/{pool_name}
/providers
/variables
/{variable_key}
/version
```
## Common Pitfalls
- **Authentication Missing**: Forgetting to pass the bearer token or basic auth credentials, resulting in a `401 Unauthorized` response.
- **Incorrect Content Type**: Omitting `-H "Content-Type: application/json"` when executing `POST` or `PATCH` requests, which Airflow will reject.
- **URL Encoding Paths**: Forgetting to URL-encode variables, connection IDs, or DAG IDs that contain special characters.
- **Timezone Mismatches**: Airflow expects timestamps in strict ISO-8601 format (e.g., `2026-05-20T12:00:00Z`). Passing timezone-naive strings can cause validation errors.
## References
- [Apache Airflow Stable REST API Reference](https://airflow.apache.org/docs/apache-airflow/stable/stable-rest-api-ref.html)More API Design skills
lark-event
larksuite/cli
Lark/Feishu real-time event listening / subscribing / consuming: stream events as NDJSON via `lark-cli event consume <EventKey>` (covers IM messages/reactions/chat changes, Approval status changes, Task updates, VC meeting started/joined/ended, Minutes generated, Whiteboard updated, etc.). Use for Lark bots, real-time message processing, long-running subscribers, streaming webhook/push handlers. Supports `--max-events` / `--timeout` bounded runs and a stderr ready-marker contract — designed for AI agents running as subprocesses.
lark-contact
larksuite/cli
飞书 / Lark 通讯录:按姓名 / 邮箱解析成 open_id,或按 open_id 反查姓名 / 部门 / 邮箱 / 联系方式 / 个人状态 / 签名,以及按关键词搜索当前用户可见的机器人 / 智能体(agent)。当用户提到一个名字要下一步发消息 / 排日程,或拿到 open_id 想查具体信息时使用。不负责部门树遍历、按部门列员工、组织架构图,这类需求走原生 OpenAPI。
lark-openapi-explorer
larksuite/cli
飞书/Lark 原生 OpenAPI 探索:从官方文档库中挖掘未经 CLI 封装的原生 OpenAPI 接口。当用户的需求无法被现有 lark-* skill 或 lark-cli 已注册命令满足,需要查找并调用原生飞书 OpenAPI 时使用。

