# 说明

返回某个业务对象(需求、缺陷、任务)的GIT关联提交的信息

# url

https://api.tapd.cn/code_commit_infos

# 支持格式

JSON/XML(默认JSON格式)

# HTTP请求方式

GET

# 请求数限制

默认返回 30 条。可通过传 limit 参数设置,最大取 200。也可以传 page 参数翻页

# 请求参数

字段名 必选 类型及范围 说明
workspace_id integer 项目ID
type string TAPD业务对象类型(story,bug,task)
object_id int TAPD业务对象ID
commit_time string 提交时间(格式:>HH-mm-dd HH:ii:ss,<HH-mm-dd HH:ii:ss,HH-mm-dd HH:ii:ss~HH-mm-dd HH:ii:ss)
limt int 设置返回数量限制,默认为30
page int 返回当前数量限制下第N页的数据,默认为1(第一页)

# 调用示例及返回结果

# 获取TAPD业务对象(需求、缺陷、任务)的GIT关联提交的信息

# curl 使用 Basic Auth 鉴权调用示例

curl -u 'api_user:api_password' 'https://api.tapd.cn/code_commit_infos?workspace_id=20358374&type=story&object_id=1020358374854843133'

# 返回结果

{
    "status": 1,
    "data": [
        {
            "id": "1020358374000262989",
            "user_name": "jeffjffang",
            "user_id": "2071532707",
            "hook_user_name": "jeffjffang",
            "commit_id": "111",
            "workspace_id": "20358374",
            "message": "--story=1020358374854843133 SMARTCOMMIT #fix 111222",
            "path": "http://git.code.oa.com/TAPDG/tapd_test/commit/047e5764c392bef48fd0e4176c147c7c30a9f32a",
            "web_url": "http://git.code.oa.com/TAPDG/tapd_test",
            "hook_project_name": "tapd_test",
            "commit_time": "2019-08-26 15:57:04",
            "created": "2020-11-30 14:31:29",
            "ref": "refs/heads/master",
            "ref_status": "0",
            "git_env": "CodeGit",
            "file_commit":"{\"A\":[],\"M\":[\"tapd_interface_test\\/cases\\/\云\端_\公\司\设\置.jmx\"],\"R\":[]}",
            "repo_id": "20045801",
            "branch_id": "20045801/refs/heads/master",
            "file_sort": {
                "tapd_interface_test/cases/云端_公司设置.jmx": 0
            }
        },
        {
            "id": "1020358374000262991",
            "user_name": "jeffjffang",
            "user_id": "2071532707",
            "hook_user_name": "jeffjffang",
            "commit_id": "jeffjffang1231",
            "workspace_id": "20358374",
            "message": "--story=1020358374854843133 SMARTCOMMIT #fix 111222",
            "path": "http://git.code.oa.com/TAPDG/tapd_test/commit/047e5764c392bef48fd0e4176c147c7c30a9f32a",
            "web_url": "http://git.code.oa.com/TAPDG/tapd_test",
            "hook_project_name": "tapd_test",
            "commit_time": "2019-08-26 15:57:04",
            "created": "2020-11-30 14:31:53",
            "ref": "refs/heads/master",
            "ref_status": "0",
            "git_env": "CodeGit",
            "file_commit":"{\"A\":[],\"M\":[\"tapd_interface_test\\/cases\\/\云\端_\公\司\设\置.jmx\"],\"R\":[]}",
            "repo_id": "20045801",
            "branch_id": "20045801/refs/heads/master",
            "file_sort": {
                "tapd_interface_test/cases/云端_公司设置.jmx": 0
            }
        },
        {
            "id": "1020358374000263277",
            "user_name": "jeffjffang",
            "user_id": "2071532707",
            "hook_user_name": "jeffjffang",
            "commit_id": "047e5764c392bef48fd0e4176c147c7c30a9f32a",
            "workspace_id": "20358374",
            "message": "--story=1020358374854843133 SMARTCOMMIT #fix 0000",
            "path": "http://git.code.oa.com/TAPDG/tapd_test/commit/047e5764c392bef48fd0e4176c147c7c30a9f32a",
            "web_url": "http://git.code.oa.com/TAPDG/tapd_test",
            "hook_project_name": "tapd_test",
            "commit_time": "2019-08-26 15:57:04",
            "created": "2020-12-01 12:15:38",
            "ref": "refs/heads/master",
            "ref_status": "0",
            "git_env": "CodeGit",
            "file_commit":"{\"A\":[],\"M\":[\"tapd_interface_test\\/cases\\/\云\端_\公\司\设\置.jmx\"],\"R\":[]}",
            "repo_id": "20045801",
            "branch_id": "20045801/refs/heads/master",
            "file_sort": {
                "tapd_interface_test/cases/云端_公司设置.jmx": 0
            }
        }
    ],
    "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
上次更新: 2024-03-04 15:49:39