# 说明
返回符合查询条件的所有状态流转时间(分页显示,默认一页30条)
# url
https://api.tapd.cn/life_times
# 支持格式
JSON/XML(默认JSON格式)
# HTTP请求方式
GET
# 请求数限制
默认返回 30 条。可通过传 limit 参数设置,最大取 200。也可以传 page 参数翻页
# 请求参数
字段名 | 必选 | 类型及范围 | 说明 | 特殊规则 |
---|---|---|---|---|
entity_id | 是 | integer | 业务对象ID | |
entity_type | 是 | string | 业务对象类型 | 目前type可选值:task,story,bug |
workspace_id | 是 | integer | 项目ID | |
created | 否 | 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/life_times?entity_id=1000000755854844301&entity_type=story&workspace_id=755'
# 返回结果
{
"status": 1,
"data": [
{
"LifeTime": {
"id": "1000000755025642521",
"workspace_id": "755",
"entity_type": "story",
"entity_id": "1000000755854844301",
"status": "status_23",
"owner": "peerxu",
"is_repeated": "0",
"begin_date": "2020-12-07 11:29:27",
"end_date": "2020-12-07 11:29:27",
"time_cost": "0",
"created": "2020-12-07 11:29:27",
"operator": null
}
},
{
"LifeTime": {
"id": "1000000755025642515",
"workspace_id": "755",
"entity_type": "story",
"entity_id": "1000000755854844301",
"status": "planning",
"owner": "peerxu",
"is_repeated": "0",
"begin_date": "2020-12-07 11:29:20",
"end_date": "2020-12-07 11:30:10",
"time_cost": "1",
"created": "2020-12-07 11:29:20",
"operator": "barryhu"
}
},
{
"LifeTime": {
"id": "1000000755025642237",
"workspace_id": "755",
"entity_type": "story",
"entity_id": "1000000755854844301",
"status": "status_23",
"owner": "peerxu",
"is_repeated": "0",
"begin_date": "2020-12-07 10:18:59",
"end_date": "2020-12-07 11:30:03",
"time_cost": "2",
"created": "2020-12-07 10:18:59",
"operator": "barryhu"
}
}
],
"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
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
# 状态流转时间字段说明
# 状态流转时间重要字段说明
字段 | 说明 |
---|---|
id | id |
workspace_id | 项目ID |
entity_type | 业务对象类型 |
entity_id | 业务对象ID |
begin_date | 开始时间 |
end_date | 结束时间 |
created | 创建时间(变更时间) |
operator | 操作人 |
is_repeated | 是否重复 |
time_cost | 停留时长,单位:小时 |
change_from | 变更来源(status或者owner) |
← 获取单个文档下载链接 创建工时花费 →