资源模型清晰:workspace → project → task → subtask
免费版 workspace 部分高级 API 受限(如 portfolios、goals 需付费版)
到 app.asana.com 创建一个 Personal Access Token(自用最简)或注册 OAuth App。所有请求 Authorization: Bearer <token>。SDK 在 Python/JS 等主流语言都有官方包。
可用率 · 30 天窗口
关于这个 API
Asana API 是企业团队协作工具中 API 设计较干净的一家。资源模型层级清晰:workspace 是顶级容器,project 是子单元,task 是基本工作单位,subtask 让任务再分解。custom fields 让企业按自己业务定义额外属性(如"客户名"、"优先级"、"截止日期 2.0"),既在 UI 可见又通过 API 可读写。
webhook 是集成关键能力——订阅资源(如某 project 的 task 变化),Asana 把变更事件 POST 到你的端点。结合 PATCH 接口可以做双向同步:外部工具改 Linear issue,自动同步到 Asana task;Asana 任务完成,反向更新外部状态。
速率限制按 token 双层计算:每分钟约 150 次、每小时约 1500 次。批量初始化(如把几千个外部 issue 一次性导入)需引入指数退避或分批跑。
你可以做什么
- 1把外部 issue / 工单同步成 Asana task
- 2基于 Asana 数据生成进度报表
- 3触发 webhook 把任务变更同步到其他工具
- 4搭建定时创建任务的自动化
- 5为团队的内部工具读取项目状态
优劣对比
优点
- 资源模型清晰:workspace → project → task → subtask
- webhook 可订阅任务级变更
- Custom fields API 让企业自定义数据持久化
注意事项
- 免费版 workspace 部分高级 API 受限(如 portfolios、goals 需付费版)
- 速率限制按 minute / hour 双层,批量同步需 backoff
示例请求
curl https://asana.com/support/<endpoint> \
-H "Authorization: Bearer $ACCESS_TOKEN"快速开始
到 app.asana.com 创建一个 Personal Access Token(自用最简)或注册 OAuth App。所有请求 Authorization: Bearer <token>。SDK 在 Python/JS 等主流语言都有官方包。
常见问题
API 调用免费吗?+
API 本身免费;workspace 必须是付费 plan 才能用某些高级资源(portfolios、goals)。
怎么订阅任务变更?+
调 webhooks.create 注册到某个 resource(如 project gid)。Asana 会先发握手请求验证 endpoint。
token 怎么管理?+
PAT 适合个人脚本;要发布给团队用 OAuth App,权限可被用户撤销且 token 自动 refresh。
技术细节
- 认证方式
- oauth
- 计费
- freemium
- 协议
- REST
- SDK
- python, javascript, ruby, go, java
- 响应时间
- 693 ms
- 上次巡检
- 2026/5/12 07:36:56
接口端点
从 OpenAPI spec 自动解析。显示 12 / 167 个未弃用端点。
/attachmentsAttachmentsGet attachments from an object
/attachmentsAttachmentsUpload an attachment
/attachments/{attachment_gid}AttachmentsDelete an attachment
/attachments/{attachment_gid}AttachmentsGet an attachment
/batchBatch APISubmit parallel requests
/custom_fieldsCustom fieldsCreate a custom field
/custom_fields/{custom_field_gid}Custom fieldsDelete a custom field
/custom_fields/{custom_field_gid}Custom fieldsGet a custom field
/custom_fields/{custom_field_gid}Custom fieldsUpdate a custom field
/custom_fields/{custom_field_gid}/enum_optionsCustom fieldsCreate an enum option
/custom_fields/{custom_field_gid}/enum_options/insertCustom fieldsReorder a custom field's enum
/enum_options/{enum_option_gid}Custom fieldsUpdate an enum option
另有 155 个端点未显示,详见 OpenAPI spec。
可以替代的选择
不同公司、解决相似问题的备选。按分类、认证、计费档位与标签重合度匹配。