# 说明
删除工时花费
# url
https://api.tapd.cn/timesheets/delete_timesheets
# 支持格式
JSON/XML(默认JSON格式)
# HTTP请求方式
POST
# 请求数限制
删除工时花费,一次最多支持删除一百条数据。
# 请求参数
字段名 | 必选 | 类型及范围 | 说明 |
---|---|---|---|
entity_type | 是 | string | 对象类型,如story、task、bug等 |
entity_id | 是 | integer | 对象ID |
workspace_id | 是 | integer | 项目ID |
cost_ids | 是 | array | 花费id集合 |
# 调用示例及返回结果
# 删除工时花费
# curl 使用 Basic Auth 鉴权调用示例
curl -u 'api_user:api_password' -d 'entity_type=story&entity_id=1148464494001000040&cost_ids[]=1148464494001000097&cost_ids[]=1148464494001000099&workspace_id=48464494' 'https://api.tapd.cn/timesheets/delete_timesheets'
# 返回结果
{
"status": 1,
"data": {
"msg": "delete completed",
"data": {
"success": {
"cost_ids": [
"1148464494001000111"
],
"msg": "delete success"
},
"failed": [
{
"cost_ids": [
"1148464494001000106"
],
"msg": "the record does not belong to the specified entity (entity_type:story, entity_id:1148464494001000137)"
},
{
"cost_ids": [
"1148464494001000110",
"1148464494001000076",
"1141659004001000035",
"1141659004001000037"
],
"msg": " the record does not exist in workspace 48464494"
}
]
}
},
"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
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
字段 | 说明 |
---|---|
success | 删除成功的记录 |
failed | 删除失败的记录 |
cost_ids | 花费id集合 |
msg | 具体的操作信息 |