# 说明

获取任务所有字段及候选值。

# url

https://api.tapd.cn/tasks/get_fields_info

# 支持格式

JSON/XML(默认JSON格式)

# HTTP请求方式

GET

# 请求数限制

默认返回所有数据

# 请求参数

字段名 必选 类型及范围 说明 特殊规则
workspace_id integer 项目ID

# 调用示例及返回结果

# 获取项目下的任务字段

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

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

# 返回结果

{
    "status": 1,
    "data": {
        "id": {
            "name": "id",
            "html_type": "input",
            "label": "ID",
            "options": [],
            "color_options": [],
            "pure_options": []
        },
        "name": {
            "name": "name",
            "label": "标题",
            "options": [],
            "color_options": [],
            "pure_options": [],
            "html_type": "input"
        },
        "status": {
            "name": "status",
            "html_type": "select",
            "label": "状态",
            "options": {
                "open": "未开始",
                "progressing": "进行中",
                "done": "已完成"
            },
            "color_options": [],
            "pure_options": []
        },
        "description": {
            "name": "description",
            "label": "详细描述",
            "options": [],
            "color_options": [],
            "pure_options": [],
            "html_type": "rich_edit"
        },
        "owner": {
            "name": "owner",
            "html_type": "user_chooser",
            "label": "处理人",
            "options": [],
            "color_options": [],
            "pure_options": []
        },
        "creator": {
            "name": "creator",
            "html_type": "user_chooser",
            "label": "创建人",
            "options": [],
            "color_options": [],
            "pure_options": []
        },
        "created": {
            "name": "created",
            "label": "创建时间",
            "options": [],
            "color_options": [],
            "pure_options": [],
            "html_type": "datetime"
        },
        "iteration_id": {
            "name": "iteration_id",
            "html_type": "select",
            "label": "迭代",
            "options": {
                "1010104801000723571": "迭代模板1111",
                "1010104801000720875": "2023Q1计划"
            },
            "color_options": [],
            "pure_options": [
                {
                    "parent_id": "1010104801000720875",
                    "workspace_id": "10104801",
                    "sort": "70759500000",
                    "value": "1010104801000723571",
                    "label": "迭代模板1111",
                    "panel": 0
                },
                {
                    "parent_id": "0",
                    "workspace_id": "10104801",
                    "sort": "70759500000",
                    "value": "1010104801000720875",
                    "label": "2023Q1计划",
                    "panel": 0
                }
            ],
            "lock_info": []
        },
        "effort": {
            "name": "effort",
            "html_type": "float",
            "label": "预估工时",
            "options": [],
            "color_options": [],
            "pure_options": []
        },
        "effort_completed": {
            "name": "effort_completed",
            "label": "完成工时",
            "options": [],
            "color_options": [],
            "pure_options": [],
            "html_type": "float"
        },
        "remain": {
            "name": "remain",
            "html_type": "float",
            "label": "剩余工时",
            "options": [],
            "color_options": [],
            "pure_options": []
        },
        "exceed": {
            "name": "exceed",
            "html_type": "float",
            "label": "超出工时",
            "options": [],
            "color_options": [],
            "pure_options": []
        },
        "progress": {
            "name": "progress",
            "html_type": "input",
            "label": "进度",
            "options": [],
            "color_options": [],
            "pure_options": []
        },
        "modified": {
            "name": "modified",
            "label": "最后修改时间",
            "options": [],
            "color_options": [],
            "pure_options": [],
            "html_type": "datetime"
        },
        "priority": {
            "name": "priority",
            "html_type": "select",
            "label": "优先级",
            "options": {
                "High": "High",
                "Middle": "Middle",
                "Low": "Low",
                "Nice To Have": "Nice To Have"
            },
            "color_options": [
                {
                    "value": "High",
                    "label": "High",
                    "color": "#FF6770"
                },
                {
                    "value": "Middle",
                    "label": "Middle",
                    "color": "#28AB80"
                },
                {
                    "value": "Low",
                    "label": "Low",
                    "color": "#7C8597"
                },
                {
                    "value": "Nice To Have",
                    "label": "Nice To Have",
                    "color": "#7C8597"
                }
            ],
            "pure_options": []
        },
        "cc": {
            "name": "cc",
            "html_type": "mix_chooser",
            "label": "抄送人",
            "options": [],
            "color_options": [],
            "pure_options": []
        },
        "begin": {
            "name": "begin",
            "html_type": "dateinput",
            "label": "预计开始",
            "options": [],
            "color_options": [],
            "pure_options": []
        },
        "due": {
            "name": "due",
            "html_type": "dateinput",
            "label": "预计结束",
            "options": [],
            "color_options": [],
            "pure_options": []
        },
        "story_id": {
            "name": "story_id",
            "label": "需求",
            "options": [],
            "color_options": [],
            "pure_options": [],
            "html_type": "input"
        },
        "completed": {
            "name": "completed",
            "label": "完成时间",
            "options": [],
            "color_options": [],
            "pure_options": [],
            "html_type": "datetime"
        },
        "workspace_id": {
            "name": "workspace_id",
            "label": "所属项目",
            "options": {
                "10104801": "TAPD1乌云xx",
            },
            "color_options": [],
            "pure_options": [],
            "html_type": "select"
        },
        "release_id": {
            "name": "release_id",
            "html_type": "select",
            "label": "发布计划",
            "options": {
                "1010104801100025499": "ahahaha1",
                "1010104801100003081": "test2",
                "1010104801100003035": "test1",
                "1010104801100000943": "adfadf"
            },
            "color_options": [],
            "pure_options": []
        },
        "has_attachment": {
            "name": "has_attachment",
            "label": "Has attachment",
            "options": {
                "0": "is null",
                "1": "is not null"
            },
            "color_options": [],
            "pure_options": [],
            "html_type": "checkbox"
        },
        "label": {
            "name": "label",
            "html_type": "multi_select",
            "label": "标签",
            "options": {
                "阻塞": "阻塞",
                "开发受阻": "开发受阻",
                "有风险": "有风险",
                "等待设计走查": "等待设计走查",
                "方案已沟通": "方案已沟通",
                "等待转测": "等待转测"
            },
            "color_options": [],
            "pure_options": []
        }
    },
    "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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266

# 返回说明

# 格式说明

字段 说明
name name
options 候选值
html_type 类型
label 中文名称
上次更新: 2024-01-04 10:32:07