# 说明

返回符合查询条件的所有任务(分页显示,默认一页30条)

# url

https://api.tapd.cn/tasks

# 支持格式

JSON/XML(默认JSON格式)

# HTTP请求方式

GET

# 请求数限制

默认返回 30 条。可通过传 limit 参数设置,最大取 200。也可以传 page 参数翻页

# 请求参数

字段名 必选 类型及范围 说明 特殊规则
id 否 integer id 支持多ID查询
name 否 string 任务标题 支持模糊匹配
description 否 string 任务详细描述
workspace_id 是 integer 项目ID
creator 否 string 创建人 支持多人员查询
created 否 datetime 创建时间 支持时间查询
modified 否 datetime 最后修改时间 支持时间查询
status 否 string 状态 支持枚举查询
label 否 string 标签查询 支持枚举查询
owner 否 string 任务当前处理人 支持模糊匹配
cc 否 string 抄送人
begin 否 date 预计开始 支持时间查询
due 否 date 预计结束 支持时间查询
story_id 否 integer 关联需求的ID 支持多ID查询
iteration_id 否 integer 所属迭代的ID 支持枚举查询
priority 否 string 优先级。为了兼容自定义优先级,请使用 priority_label 字段,详情参考:如何兼容自定义优先级
priority_label 否 string 优先级。推荐使用这个字段
progress 否 integer 进度
completed 否 datetime 完成时间 支持时间查询
effort_completed 否 string 完成工时
exceed 否 float 超出工时
remain 否 float 剩余工时
effort 否 string 预估工时
custom_field_* 否 string或者integer 自定义字段参数,具体字段名通过接口 获取任务自定义字段配置 获取 支持枚举查询
limit 否 integer 设置返回数量限制,默认为30
page 否 integer 返回当前数量限制下第N页的数据,默认为1(第一页)
order 否 string 排序规则,规则:字段名 ASC或者DESC,然后 urlencode 如按创建时间逆序:order=created%20desc
fields 否 string 设置获取的字段,多个字段间以','逗号隔开

# 调用示例及返回结果

# 获取项目下的任务数据

# curl 使用 Basic Auth 鉴权调用示例

curl -u 'api_user:api_password' 'https://api.tapd.cn/tasks?workspace_id=10158231'

# 返回结果

{
    "status": 1,
    "data": [
        "Task": {
            "id": "1020358627854792559",
            "name": "测试2",
            "description": " ",
            "workspace_id": "20358627",
            "creator": "v_xinyucao",
            "created": "2021-06-02 10:36:19",
            "modified": "2022-07-05 15:54:10",
            "status": "open",
            "owner": "",
            "cc": "",
            "begin": null,
            "due": null,
            "story_id": "0",
            "iteration_id": "0",
            "priority": "",
            "progress": "0",
            "completed": null,
            "effort_completed": "0",
            "exceed": "0",
            "remain": "0",
            "effort": "0",
            "has_attachment": "0",
            "release_id": "1020358627100003283",
            "label": null,
            "custom_field_one": null,
            "custom_field_two": null,
            "custom_field_three": null,
            "custom_field_four": null,
            "custom_field_five": null,
            "custom_field_six": null,
            "custom_field_seven": null,
            "custom_field_eight": null,
            "custom_field_9": "",
            "custom_field_10": "",
            "custom_field_11": "",
            "custom_field_12": "",
            "custom_field_13": "",
            "custom_field_14": "",
            "custom_field_15": "",
            "custom_field_16": "",
            "custom_field_17": "",
            "custom_field_18": "",
            "custom_field_19": "",
            "custom_field_20": "",
            "custom_field_21": "",
            "custom_field_22": "",
            "custom_field_23": "",
            "custom_field_24": "",
            "custom_field_25": "",
            "custom_field_26": "",
            "custom_field_27": "",
            "custom_field_28": "",
            "custom_field_29": "",
            "custom_field_30": "",
            "custom_field_31": "",
            "custom_field_32": "",
            "custom_field_33": "",
            "custom_field_34": "",
            "custom_field_35": "",
            "custom_field_36": "",
            "custom_field_37": "",
            "custom_field_38": "",
            "custom_field_39": "",
            "custom_field_40": "",
            "custom_field_41": "",
            "custom_field_42": "",
            "custom_field_43": "",
            "custom_field_44": "",
            "custom_field_45": "",
            "custom_field_46": "",
            "custom_field_47": "",
            "custom_field_48": "",
            "custom_field_49": "",
            "custom_field_50": ""
        }
    ],
    "info": "success"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82

# 任务字段说明

# 任务重要字段说明

字段 说明
id id
name 任务标题
description 任务详细描述
workspace_id 项目ID
creator 创建人
created 创建时间
modified 最后修改时间
status 状态
owner 任务当前处理人
cc 抄送人
begin 预计开始
due 预计结束
release_id 发布计划ID
story_id 关联需求的ID
iteration_id 所属迭代的ID
priority 优先级
priority_label 优先级
progress 进度
completed 完成时间
effort_completed 完成工时
exceed 超出工时
remain 剩余工时
effort 预估工时

# 任务状态(status)取值字段说明

取值 字面值
open 未开始
progressing 进行中
done 已完成

# 任务优先级(priority)取值字段说明

为了兼容自定义优先级,请使用 priority_label 字段,详情参考:如何兼容自定义优先级 。下面取值将不再使用。

取值 字面值
4 High
3 Middle
2 Low
1 Nice To Have
上次更新: 2025-04-17 19:58:41