# 说明
返回符合查询条件的所有缺陷模板字段
# url
https://api.tapd.cn/bugs/get_default_bug_template
# 支持格式
JSON/XML(默认JSON格式)
# HTTP请求方式
GET
# 请求数限制
默认返回所有缺陷模板字段
# 请求参数
字段名 | 必选 | 类型及范围 | 说明 | 特殊规则 |
---|---|---|---|---|
workspace_id | 是 | integer | 项目ID | |
template_id | 是 | integer | 模板ID |
# 调用示例及返回结果
curl -u 'api_user:api_password' 'https://api.tapd.cn/bugs/get_default_bug_template?template_id=1010104801000068639&workspace_id=10104801'
# 返回结果
{
"status": 1,
"data": [
{
"WorkitemTemplateField": {
"id": "1010104801000778831",
"workspace_id": "10104801",
"type": "bug",
"template_id": "1010104801000068639",
"field": "title",
"value": "",
"required": "1",
"sort": "0"
}
},
{
"WorkitemTemplateField": {
"id": "1010104801000778833",
"workspace_id": "10104801",
"type": "bug",
"template_id": "1010104801000068639",
"field": "description",
"value": "",
"required": "1",
"sort": "0"
}
},
{
"WorkitemTemplateField": {
"id": "1010104801000778835",
"workspace_id": "10104801",
"type": "bug",
"template_id": "1010104801000068639",
"field": "current_owner",
"value": "",
"required": "1",
"sort": "1"
}
},
{
"WorkitemTemplateField": {
"id": "1010104801000778837",
"workspace_id": "10104801",
"type": "bug",
"template_id": "1010104801000068639",
"field": "module",
"value": "test2",
"required": "0",
"sort": "2"
}
},
{
"WorkitemTemplateField": {
"id": "1010104801000778839",
"workspace_id": "10104801",
"type": "bug",
"template_id": "1010104801000068639",
"field": "priority",
"value": "",
"required": "1",
"sort": "3"
}
},
{
"WorkitemTemplateField": {
"id": "1010104801000778841",
"workspace_id": "10104801",
"type": "bug",
"template_id": "1010104801000068639",
"field": "severity",
"value": "",
"required": "0",
"sort": "4"
}
},
{
"WorkitemTemplateField": {
"id": "1010104801000778847",
"workspace_id": "10104801",
"type": "bug",
"template_id": "1010104801000068639",
"field": "version_report",
"value": "",
"required": "0",
"sort": "5"
}
},
{
"WorkitemTemplateField": {
"id": "1010104801000778843",
"workspace_id": "10104801",
"type": "bug",
"template_id": "1010104801000068639",
"field": "begin",
"value": "",
"required": "0",
"sort": "6"
}
},
{
"WorkitemTemplateField": {
"id": "1010104801000778845",
"workspace_id": "10104801",
"type": "bug",
"template_id": "1010104801000068639",
"field": "due",
"value": "",
"required": "0",
"sort": "7"
}
}
],
"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
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
# 模板字段说明
# 模板重要字段说明
字段 | 说明 |
---|---|
workspace_id | 项目ID |
id | 模板字段ID |
type | 类型 |
template_id | 模板ID |
field | 字段名称 |
value | 默认值 |
required | 是否必填 |
sort | 计数 |
← 获取缺陷模板列表 获取视图对应的缺陷列表 →