# 说明
根据项目ID和应用标识获取项目关联的第三方应用信息.
# url
https://apiv2.tapd.tencent.com/workspaces/relate_third_projects
# 支持格式
JSON/XML(默认JSON格式)
# HTTP请求方式
GET
# 请求参数
字段名 | 必选 | 类型及范围 | 说明 | 特殊规则 |
---|---|---|---|---|
workspace_id | 是 | integer | 项目ID | 无 |
third_type | 是 | string | 应用标识,取值为:zhiyan、bk、tgit、tsvn | 无 |
# 调用示例及返回结果
# 1、获取项目关联智研应用信息
# curl 使用 Basic Auth 鉴权调用示例
curl -u 'api_user:api_password' 'https://apiv2.tapd.tencent.com/workspaces/relate_third_projects?workspace_id=10104801&third_type=zhiyan'
# curl 使用 OAuth Access Token 鉴权调用示例
curl -H 'Authorization: Bearer ACCESS_TOKEN' 'https://apiv2.tapd.tencent.com/workspaces/relate_third_projects?workspace_id=10104801&third_type=zhiyan'
# 返回结果
{
"status": 1,
"data": [
{
"third_project_id": 12345,
"mode": "cooperate"
}
],
"info": "success"
}
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
# 2、获取项目关联工蜂Git应用信息
# curl 使用 Basic Auth 鉴权调用示例
curl -u 'api_user:api_password' 'https://apiv2.tapd.tencent.com/workspaces/relate_third_projects?workspace_id=10104801&third_type=tgit'
# curl 使用 OAuth Access Token 鉴权调用示例
curl -H 'Authorization: Bearer ACCESS_TOKEN' 'https://apiv2.tapd.tencent.com/workspaces/relate_third_projects?workspace_id=10104801&third_type=tgit'
# 返回结果
{
"status": 1,
"data": [
{
"id": "1000000755000100014",
"workspace_id": "755",
"git_project_id": "12617341",
"git_app_id": "3",
"path_with_namespace": "hello/222222",
"creator": "zhaooding",
"created": "2025-04-10 15:03:24",
"name": "222222",
"modified": "2025-04-10 15:03:24",
"status": "2",
"url_token": "d0893e8a089f51a83c1a8c1abd47ccaf",
"modifier": "zhaooding",
"instance_name": "内网版"
},
{
"id": "1000000755000000245",
"workspace_id": "755",
"git_app_id": "3",
"group_id": "230994",
"name": "CHEN1",
"is_deleted": "0",
"creator": "v_haohechen",
"created": "2020-08-04 16:21:45",
"path": "CHEN111111111111111111",
"full_path": "CHEN111111111111111111",
"modified": "2020-08-04 16:21:45",
"full_name": "CHEN1",
"modifier": "",
"instance_name": "内网版",
"is_group": true // 标识是否为Group, tsvn也有相同字段标识
},
],
"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
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
# 返回字段说明
字段 | 说明 |
---|---|
data | 数组格式,包含应用的信息、不同应用间略有区别 |