# 说明
返回符合查询条件的所有迭代(分页显示,默认一页30条)
# url
https://api.tapd.cn/iterations
# 支持格式
JSON/XML(默认JSON格式)
# HTTP请求方式
GET
# 请求数限制
默认返回 30 条。可通过传 limit 参数设置,最大取 200。也可以传 page 参数翻页
# 请求参数
字段名 | 必选 | 类型及范围 | 说明 | 特殊规则 |
---|---|---|---|---|
id | 否 | integer | ID | 支持多ID查询 |
name | 否 | string | 标题 | 支持模糊匹配 |
workspace_id | 是 | integer | 项目ID | |
description | 否 | string | 详细描述 | |
startdate | 否 | date | 开始时间 | 支持时间查询 |
enddate | 否 | date | 结束时间 | 支持时间查询 |
workitem_type_id | 否 | integer | 迭代类别 | |
plan_app_id | 否 | integer | 计划应用ID | |
status | 否 | string | 状态(系统状态open/done,自定义状态可传中文) | |
creator | 否 | string | 创建人 | |
created | 否 | datetime | 创建时间 | 支持时间查询 |
modified | 否 | datetime | 最后修改时间 | 支持时间查询 |
completed | 否 | datetime | 完成时间 | |
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/iterations?workspace_id=10158231'
# 返回结果
{
"status": 1,
"data": [
{
"Iteration": {
"id": "1010158231000388075",
"name": "迭代2",
"workspace_id": "10158231",
"startdate": "2017-06-26",
"enddate": "2017-07-07",
"status": "open",
"release_id": null,
"description": "熟悉敏捷迭代开发",
"creator": "anyechen",
"created": "2017-06-20 16:49:05",
"modified": "2017-06-20 16:49:05",
"completed": null,
"custom_field_1": null,
"custom_field_2": null,
"custom_field_3": null,
"custom_field_4": null,
"custom_field_5": null,
"custom_field_6": null,
"custom_field_7": null,
"custom_field_8": null,
"custom_field_9": null,
"custom_field_10": null,
"custom_field_11": null,
"custom_field_12": null,
"custom_field_13": null,
"custom_field_14": null,
"custom_field_15": null,
"custom_field_16": null,
"custom_field_17": null,
"custom_field_18": null,
"custom_field_19": null,
"custom_field_20": null,
"custom_field_21": null,
"custom_field_22": null,
"custom_field_23": null,
"custom_field_24": null,
"custom_field_25": null,
"custom_field_26": null,
"custom_field_27": null,
"custom_field_28": null,
"custom_field_29": null,
"custom_field_30": null,
"custom_field_31": null,
"custom_field_32": null,
"custom_field_33": null,
"custom_field_34": null,
"custom_field_35": null,
"custom_field_36": null,
"custom_field_37": null,
"custom_field_38": null,
"custom_field_39": null,
"custom_field_40": null,
"custom_field_41": null,
"custom_field_42": null,
"custom_field_43": null,
"custom_field_44": null,
"custom_field_45": null,
"custom_field_46": null,
"custom_field_47": null,
"custom_field_48": null,
"custom_field_49": null,
"custom_field_50": null
}
},
{
"Iteration": {
"id": "1010158231000388073",
"name": "迭代1",
"workspace_id": "10158231",
"startdate": "2017-06-12",
"enddate": "2017-06-23",
"status": "open",
"release_id": null,
"description": "熟悉敏捷迭代开发",
"creator": "anyechen",
"created": "2017-06-20 16:49:03",
"modified": "2017-06-20 16:49:03",
"completed": null,
"custom_field_1": null,
"custom_field_2": null,
"custom_field_3": null,
"custom_field_4": null,
"custom_field_5": null,
"custom_field_6": null,
"custom_field_7": null,
"custom_field_8": null,
"custom_field_9": null,
"custom_field_10": null,
"custom_field_11": null,
"custom_field_12": null,
"custom_field_13": null,
"custom_field_14": null,
"custom_field_15": null,
"custom_field_16": null,
"custom_field_17": null,
"custom_field_18": null,
"custom_field_19": null,
"custom_field_20": null,
"custom_field_21": null,
"custom_field_22": null,
"custom_field_23": null,
"custom_field_24": null,
"custom_field_25": null,
"custom_field_26": null,
"custom_field_27": null,
"custom_field_28": null,
"custom_field_29": null,
"custom_field_30": null,
"custom_field_31": null,
"custom_field_32": null,
"custom_field_33": null,
"custom_field_34": null,
"custom_field_35": null,
"custom_field_36": null,
"custom_field_37": null,
"custom_field_38": null,
"custom_field_39": null,
"custom_field_40": null,
"custom_field_41": null,
"custom_field_42": null,
"custom_field_43": null,
"custom_field_44": null,
"custom_field_45": null,
"custom_field_46": null,
"custom_field_47": null,
"custom_field_48": null,
"custom_field_49": null,
"custom_field_50": null
}
}
],
"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
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
# 迭代字段说明
# 迭代重要字段说明
字段 | 说明 |
---|---|
id | ID |
name | 标题 |
workspace_id | 项目ID |
description | 详细描述 |
startdate | 开始时间 |
enddate | 结束时间 |
status | 状态 |
creator | 创建人 |
created | 创建时间 |
modified | 最后修改时间 |
completed | 完成时间 |
workitem_type_id | 迭代类别 |
plan_app_id | 计划应用ID |
# 迭代状态(status)字段说明
# 注:自定义状态可以直接传中文字符
字段值 | 状态名 |
---|---|
open | 开启 |
done | 已关闭 |
← 获取迭代自定义字段配置 获取迭代数量 →