# 说明
批量创建TAPD业务对象与Git 业务对象(mr/cr/issue)的关联关系,返回关系数据
# url
https://api.tapd.cn/third_relations/batch_save_relations
# HTTP请求方式
POST
# 请求参数
字段名 | 必选 | 类型 | 说明 | 特殊规则 |
---|---|---|---|---|
relations | 是 | array | 关联关系数据数组 | 无 |
其中每个relation字段说明如下:
字段名 | 必选 | 类型 | 说明 | 特殊规则 |
---|---|---|---|---|
source_type | 是 | string | 资源类型 | 目前source_type可选值:mr,cr,issue |
source_project_id | 是 | int | Git 项目id | |
tgit_id | 否 | int | Git MR/CR/Issue的id | |
source_id | 是 | int | Git MR/CR/Issue 的iid | |
workspace_id | 是 | int | tapd项目id | |
tapd_ids | 是 | string | tapd业务对象id,用,隔开 | |
tapd_type | 是 | string | tapd业务对象类型 | 目前tapd_type可选值:task,story,bug |
operator | 是 | string | 操作人 | 英文名,如dobbyzhang |
scm_type | 否 | string | 指令类型,默认值tgit | 可选值:tgit,tsvn,p4,gitlab,github |
# 返回结果
{
"status": 1,
"data": [
[
{
"ThirdRelations": {
"id": "1169354332001000011",
"workspace_id": "69354332",
"source_app_id": "0",
"source_project_id": "1856233084283572224",
"source_id": "1",
"source_iid": "0",
"source_type": "mr",
"source_data": "",
"source_tag": "",
"tapd_id": "1169354332001000308",
"workitem_type_id": "0",
"tapd_type": "story",
"created": "2025-08-21 17:42:56",
"modified": "2025-08-21 17:43:15",
"status": "1",
"operator": "jinbaotian",
"type": ""
}
}
],
[
{
"ThirdRelations": {
"id": "1134776453001000012",
"workspace_id": "34776453",
"source_app_id": "0",
"source_project_id": "1856233084283572224",
"source_id": "1",
"source_iid": "0",
"source_type": "mr",
"source_data": "",
"source_tag": "",
"tapd_id": "1134776453001000247",
"workitem_type_id": "0",
"tapd_type": "story",
"created": "2025-08-21 17:43:15",
"modified": "2025-08-21 17:43:15",
"status": "1",
"operator": "jinbaotian",
"type": ""
}
}
]
],
"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
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
# 字段说明
# 关联关系字段说明
字段 | 说明 |
---|---|
id | 关联ID |
workspace_id | 项目ID |
source_project_id | Git 资源项目ID |
tgit_id | Git MR/CR/Issue的id |
source_id | Git MR/CR/Issue的iid |
source_type | Git 资源类型 |
tapd_id | tapd对象ID |
tapd_type | tapd对象类型 |
created | 创建时间 |
modified | 修改时间 |
status | 关联状态 |