# 说明

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

# url

https://api.tapd.cn/mini_items

# 支持格式

JSON/XML(默认JSON格式)

# HTTP请求方式

GET

# 请求数限制

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

# 请求参数

字段名 必选 类型及范围 说明 特殊规则
id integer ID 支持多ID查询
name string 标题 支持模糊匹配
priority string 优先级 支持枚举查询
status string 状态 支持枚举查询
label string 标签查询 支持枚举查询
owner string 处理人 支持模糊匹配
is_archived boolean 是否归档
creator string 创建人 支持多人员查询
begin date 预计开始 支持时间查询
due date 预计结束 支持时间查询
created datetime 创建时间 支持时间查询
modified datetime 最后修改时间 支持时间查询
completed datetime 完成时间 支持时间查询
progress_manual integer 进度
category_id integer 分组 支持枚举查询
parent_id integer 父工作项
children_id string 子工作项 为空查询传:丨
description string 详细描述 支持模糊匹配
workspace_id integer 空间ID
cus_{$自定义字段别名} string 缺陷自定义字段值,参数名会由后台自动转义为 custom_field_*,如:cus_自定义字段的名称
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/mini_items?workspace_id=10158231'

# curl 使用 OAuth Access Token 鉴权调用示例

curl -H 'Authorization: Bearer ACCESS_TOKEN' 'https://api.tapd.cn/mini_items?workspace_id=10158231'

# 返回结果

{
    "status": 1,
    "data": [
        {
            "MiniItem": {
                "id": "1069993260856110919",
                "name": "mini_item_created_by_api",
                "workspace_id": "69993260",
                "category_id": "-1",
                "status": "open",
                "owner": "",
                "begin": null,
                "due": null,
                "priority": "",
                "label": "",
                "description_type": "1",
                "description": null,
                "markdown_description": null,
                "ancestor_id": "1069993260856110919",
                "parent_id": "0",
                "children_id": "|",
                "level": "0",
                "creator": "api_doc_oauth",
                "created": "2023-07-17 20:30:40",
                "modifier": "",
                "modified": "2023-07-17 20:30:40",
                "completed": null,
                "has_attachment": "0",
                "sort": "85546902200000",
                "is_archived": "0",
                "progress_manual": "0",
                "participator": "",
                "custom_field_one": "",
                "custom_field_two": "",
                "custom_field_three": "",
                "custom_field_four": "",
                "custom_field_five": "",
                "custom_field_six": "",
                "custom_field_seven": "",
                "custom_field_eight": "",
                "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": "",
                "custom_field_51": "",
                "custom_field_52": "",
                "custom_field_53": "",
                "custom_field_54": "",
                "custom_field_55": "",
                "custom_field_56": "",
                "custom_field_57": "",
                "custom_field_58": "",
                "custom_field_59": "",
                "custom_field_60": "",
                "custom_field_61": "",
                "custom_field_62": "",
                "custom_field_63": "",
                "custom_field_64": "",
                "custom_field_65": "",
                "custom_field_66": "",
                "custom_field_67": "",
                "custom_field_68": "",
                "custom_field_69": "",
                "custom_field_70": "",
                "custom_field_71": "",
                "custom_field_72": "",
                "custom_field_73": "",
                "custom_field_74": "",
                "custom_field_75": "",
                "custom_field_76": "",
                "custom_field_77": "",
                "custom_field_78": "",
                "custom_field_79": "",
                "custom_field_80": "",
                "custom_field_81": "",
                "custom_field_82": "",
                "custom_field_83": "",
                "custom_field_84": "",
                "custom_field_85": "",
                "custom_field_86": "",
                "custom_field_87": "",
                "custom_field_88": "",
                "custom_field_89": "",
                "custom_field_90": "",
                "custom_field_91": "",
                "custom_field_92": "",
                "custom_field_93": "",
                "custom_field_94": "",
                "custom_field_95": "",
                "custom_field_96": "",
                "custom_field_97": "",
                "custom_field_98": "",
                "custom_field_99": "",
                "custom_field_100": ""
            }
        }
    ],
    "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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137

# 获取工作项ID为 1069993260856097281 的工作项 id,name,status,owner 字段

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

curl -u 'api_user:api_password' 'https://api.tapd.cn/mini_items?workspace_id=69993260&id=1069993260856097281&fields=id,name,status,owner'

# curl 使用 OAuth Access Token 鉴权调用示例

curl -H 'Authorization: Bearer ACCESS_TOKEN' 'https://api.tapd.cn/mini_items?workspace_id=69993260&id=1069993260856097281&fields=id,name,status,owner'

# 返回结果

{
    "status": 1,
    "data": [
        {
            "MiniItem": {
                "id": "1069993260856097281",
                "name": "test",
                "status": "open",
                "owner": ""
            }
        }
    ],
    "info": "success"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14

# 工作项字段说明

# 工作项重要字段说明

字段 说明
id ID
name 标题
priority 优先级
label 标签
status 状态(open:未完成,done:已完成)
owner 处理人
creator 创建人
begin 预计开始
due 预计结束
created 创建时间
modified 最后修改时间
completed 完成时间
description_type 详细描述类型
level 距离根节点的深度
ancestor_id 层级
progress_manual 进度
category_id 分组(取 -1 时,为未分组)
is_archived 是否归档
parent_id 父工作项
children_id 子工作项
description 详细描述
workspace_id 空间ID
level 层级
上次更新: 2024-04-16 16:33:47