# 说明
返回符合查询条件的所有需求类别(分页显示,默认一页30条)
# url
https://api.tapd.cn/workitem_types
# 支持格式
JSON/XML(默认JSON格式)
# HTTP请求方式
GET
# 请求数限制
默认返回 30 条。可通过传 limit 参数设置,最大取 200。也可以传 page 参数翻页
# 请求参数
字段名 | 必选 | 类型及范围 | 说明 | 特殊规则 |
---|---|---|---|---|
id | 否 | integer | id | 支持多ID查询 |
workspace_id | 是 | integer | 项目ID | |
name | 否 | string | 需求类别名称 | 支持模糊匹配 |
entity_type | 否 | string | 类别别名 | |
english_name | 否 | string | 英文名称 | |
workflow_id | 否 | integer | 工作流ID | |
status | 否 | integer | 状态 | |
created | 否 | datetime | 创建时间 | |
creator | 否 | datetime | 创建人 | |
modified_by | 否 | datetime | 最后修改人 | |
modified | 否 | datetime | 最后修改时间 | |
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/workitem_types?workspace_id=10104801'
# 返回结果
{
"status": 1,
"data": [
{
"WorkitemType": {
"id": "1010104801000061611",
"workspace_id": "10104801",
"entity_type": "story",
"name": "技术需求",
"english_name": "TSTORY",
"status": "3",
"color": "#5c88c5",
"workflow_id": "1010104801001087491",
"icon": "10104801/icon/1010104801508225789",
"icon_small": "10104801/icon/1010104801508225791",
"creator": "v_xuanfang",
"created": "2020-12-02 15:47:02",
"modified_by": "v_xuanfang",
"modified": "2021-01-21 10:49:57",
"icon_viper": "http://viper.tapd.oa.com/icon/files/10104801/icon/1010104801508225789.png?token=8710838cc6ed9d349eb9578b18699b9f87087debc7b4b5bd9830214cc262cb8b&version=1611197397",
"icon_small_viper": "http://viper.tapd.oa.com/icon/files/10104801/icon/1010104801508225791.png?token=4888f38aedfabee2e6438814748fe3e504d5e86aece755cd412fd7bbfb1a3dac&version=1611197397"
}
},
{
"WorkitemType": {
"id": "1010104801000022091",
"workspace_id": "10104801",
"entity_type": "story",
"name": "需求",
"english_name": "story",
"status": "3",
"color": "#3582fb",
"workflow_id": "1010104801000007469",
"icon": "",
"icon_small": "",
"creator": "TAPD system",
"created": "2020-11-12 22:47:27",
"modified_by": "",
"modified": "2020-11-12 22:47:27",
"icon_viper": "http://tapd.oa.com//img/workitem_type/default_icon/@2/story.png",
"icon_small_viper": "http://tapd.oa.com//img/workitem_type/default_icon/@2/story_small.png"
}
}
],
"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
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
# 需求类别字段说明
# 需求类别重要字段说明
字段 | 说明 |
---|---|
id | id |
workspace_id | 项目ID |
name | 需求类别名称 |
entity_type | 类别别名 |
english_name | 英文名称 |
workflow_id | 工作流ID |
created | 创建时间 |
creator | 创建人 |
modified_by | 最后修改人 |
modified | 最后修改时间 |
status | 状态 |
# 状态说明
~字段 | ~说明 |
---|---|
1 | 未完成 |
2 | 未启用 |
3 | 已启用 |