# 说明

返回符合查询条件的所有业务对象(需求、缺陷、任务)的SVN关联提交的信息

# url

http://apiv2.tapd.oa.com/svn_commits

# 支持格式

JSON/XML(默认JSON格式)

# HTTP请求方式

GET

# 请求数限制

会返回一个业务对象下所有的SVN关联提交数据

# 请求参数

字段名 必选 类型及范围 说明 特殊规则
workspace_id integer 项目ID
type string 业务对象类型(story,bug,task)
object_id integer 业务对象ID

# 调用示例及返回结果

curl -u 'api_user:api_password' 'http://apiv2.tapd.oa.com/svn_commits?workspace_id=20355972&type=story&object_id=1020355972500646877'

# curl 使用 OAuth Access Token 鉴权调用示例

curl -H 'Authorization: Bearer ACCESS_TOKEN' 'http://apiv2.tapd.oa.com/svn_commits?workspace_id=20355972&type=story&object_id=1020355972500646877'

# 返回结果

{
    "status": 1,
    "data": [
        {
            "repository": "tapd",
            "user": "lincolnzhou",
            "comment": "--story=500646877 需求2 --bug=500637153 迭代一测试 --bug=500637155 321321 --task=500596233 321 --task=500596233 321",
            "file_count": "1",
            "commit_at": "2018-10-31 20:01:38",
            "revision": "119",
            "detail": {
                "files": [
                    "/tapd_webhook_test_proj/trunk/rui.txt"
                ],
                "operation_type": [
                    "M"
                ],
                "path_url": [
                    "http://code.oa.com/v2/websvn/codereading/code-directory-file-reading?svnPath=http%3A%2F%2Ftc-svn.tencent.com%2Ftapd%2Ftapd_webhook_test_proj%2Ftrunk%2Frui.txt&codeRevision=119"
                ],
                "diff_url": [
                    "http://code.oa.com/v2/websvn/codereading/code-directory-diff-reading?svnPath=http%3A%2F%2Ftc-svn.tencent.com%2Ftapd%2Ftapd_webhook_test_proj%2Ftrunk%2Frui.txt&rightRevision=119"
                ]
            }
        },
        {
            "repository": "tapd",
            "user": "lincolnzhou",
            "comment": "--story=500646877 需求2",
            "file_count": "1",
            "commit_at": "2018-10-29 15:46:47",
            "revision": "109",
            "detail": {
                "files": [
                    "/tapd_webhook_test_proj/trunk/index.txt"
                ],
                "operation_type": [
                    "M"
                ],
                "path_url": [
                    "http://code.oa.com/v2/websvn/codereading/code-directory-file-reading?svnPath=http%3A%2F%2Ftc-svn.tencent.com%2Ftapd%2Ftapd_webhook_test_proj%2Ftrunk%2Findex.txt&codeRevision=109"
                ],
                "diff_url": [
                    "http://code.oa.com/v2/websvn/codereading/code-directory-diff-reading?svnPath=http%3A%2F%2Ftc-svn.tencent.com%2Ftapd%2Ftapd_webhook_test_proj%2Ftrunk%2Findex.txt&rightRevision=109"
                ]
            }
        },
        {
            "repository": "tapd",
            "user": "lincolnzhou",
            "comment": "--story=500646877 需求2 --bug=500635765 【示例】缺陷2",
            "file_count": "1",
            "commit_at": "2018-08-07 20:48:31",
            "revision": "9",
            "detail": {
                "files": [
                    "/tapd_webhook_test_proj/trunk/index.txt"
                ],
                "operation_type": [
                    "M"
                ],
                "path_url": [
                    "http://code.oa.com/v2/websvn/codereading/code-directory-file-reading?svnPath=http%3A%2F%2Ftc-svn.tencent.com%2Ftapd%2Ftapd_webhook_test_proj%2Ftrunk%2Findex.txt&codeRevision=9"
                ],
                "diff_url": [
                    "http://code.oa.com/v2/websvn/codereading/code-directory-diff-reading?svnPath=http%3A%2F%2Ftc-svn.tencent.com%2Ftapd%2Ftapd_webhook_test_proj%2Ftrunk%2Findex.txt&rightRevision=9"
                ]
            }
        },
        {
            "repository": "tapd",
            "user": "lincolnzhou",
            "comment": "--story=500646877 需求2 --bug=500635765 【示例】缺陷2",
            "file_count": "1",
            "commit_at": "2018-08-07 20:16:40",
            "revision": "8",
            "detail": {
                "files": [
                    "/tapd_webhook_test_proj/trunk/index.txt"
                ],
                "operation_type": [
                    "M"
                ],
                "path_url": [
                    "http://code.oa.com/v2/websvn/codereading/code-directory-file-reading?svnPath=http%3A%2F%2Ftc-svn.tencent.com%2Ftapd%2Ftapd_webhook_test_proj%2Ftrunk%2Findex.txt&codeRevision=8"
                ],
                "diff_url": [
                    "http://code.oa.com/v2/websvn/codereading/code-directory-diff-reading?svnPath=http%3A%2F%2Ftc-svn.tencent.com%2Ftapd%2Ftapd_webhook_test_proj%2Ftrunk%2Findex.txt&rightRevision=8"
                ]
            }
        },
        {
            "repository": "tapd",
            "user": "lincolnzhou",
            "comment": "--bug=500635767 【示例】缺陷1 --story=500646883 需求3",
            "file_count": "1",
            "commit_at": "2018-08-07 20:08:43",
            "revision": "7",
            "detail": {
                "files": [
                    "/tapd_webhook_test_proj/trunk/index.txt"
                ],
                "operation_type": [
                    "M"
                ],
                "path_url": [
                    "http://code.oa.com/v2/websvn/codereading/code-directory-file-reading?svnPath=http%3A%2F%2Ftc-svn.tencent.com%2Ftapd%2Ftapd_webhook_test_proj%2Ftrunk%2Findex.txt&codeRevision=7"
                ],
                "diff_url": [
                    "http://code.oa.com/v2/websvn/codereading/code-directory-diff-reading?svnPath=http%3A%2F%2Ftc-svn.tencent.com%2Ftapd%2Ftapd_webhook_test_proj%2Ftrunk%2Findex.txt&rightRevision=7"
                ]
            }
        }
    ],
    "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

# 重要字段说明

字段 说明
repository 版本库名字
comment SVN提交时填的message信息
file_count 本次提交的文件数
commit_at SVN提交关联时间
revision 版本信息
detail 本次SVN提交的文件信息

# 特殊字段(detail)

字段 说明
files 提交的文件SVN地址组成的数组
operation_type 提交时各个文件的操作类型组成的数组,有A(增)、D(删)、M(改)三种值
path_url SVN提交的文件对应的查看地址组成的数组
diff_url SVN提交的文件对应的本次SVN提交的diff查看地址组成的数组
上次更新: 2023-05-19 17:15:19