Skip to content

Commit 5569fa2

Browse files
yyyangwcremeywang
authored and
cremeywang
committed
增加“API调用操作指引文档”
1 parent 67e8ed1 commit 5569fa2

26 files changed

+0
-68
lines changed
-63.7 KB
Binary file not shown.
-406 KB
Binary file not shown.
-77.7 KB
Binary file not shown.
-136 KB
Binary file not shown.

doc/images/api_create_scans_cons.png

-58.7 KB
Binary file not shown.
-90.1 KB
Binary file not shown.

doc/images/api_get_ccissues_cons.png

-34 KB
Binary file not shown.
-1.03 MB
Binary file not shown.

doc/images/api_get_dupfiles_cons.png

-19.6 KB
Binary file not shown.
-29.9 KB
Binary file not shown.
-315 KB
Binary file not shown.
-965 KB
Binary file not shown.

doc/images/api_get_issues_cons.png

-453 KB
Binary file not shown.
-1.72 MB
Binary file not shown.

doc/images/api_get_overview_1.png

-838 KB
Binary file not shown.

doc/images/api_get_overview_2.png

-215 KB
Binary file not shown.

doc/images/api_get_overview_3.png

-243 KB
Binary file not shown.

doc/images/api_get_overview_4.png

-263 KB
Binary file not shown.

doc/images/api_get_scan_cons_1.png

-924 KB
Binary file not shown.

doc/images/api_get_scan_cons_2.png

-84.2 KB
Binary file not shown.

doc/images/api_get_scan_cons_3.png

-371 KB
Binary file not shown.

doc/images/api_get_scan_cons_4.png

-84.4 KB
Binary file not shown.

doc/images/api_get_scan_cons_5.png

-86.8 KB
Binary file not shown.
-29.5 KB
Binary file not shown.
Binary file not shown.

doc/zh/guide/服务端/ScriptAPI_guide.md

Lines changed: 0 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,6 @@ POST /server/main/api/orgs/<org_sid>/teams/<team_name>/repos/
5757
python ScriptsAPI.py --base_url=http://<my_ip>/ --method=create_repository --org_sid=E5BbtAHm2Bh --team_name=project --scm_url=https://github.com/Tencent/CodeAnalysis.git --scm_type=git
5858
```
5959

60-
#### 4. 结果展示
61-
![create_repository](../../../images/api_create_repository_response.png)
62-
63-
64-
![create_repository](../../../images/api_create_repository_cons.png)
65-
6660

6761
### 二、设置指定代码库的指定方案的代码度量配置
6862
#### 1. url请求
@@ -91,12 +85,6 @@ PUT /server/main/api/orgs/<org_sid>/teams/<team_name>/repos/<repo_id>/schemes/<s
9185
python ScriptsAPI.py --base_url=http://<my_ip>/ --method=update_scheme_settings --org_sid=E5BbtAHm2Bh --team_name=project --repo_id=47 --scheme_id=9
9286
```
9387

94-
#### 4. 结果展示
95-
![create_repository](../../../images/api_update_scheme_settings_response.png)
96-
97-
98-
![create_repository](../../../images/api_update_scheme_settings_cons.png)
99-
10088

10189

10290
### 三、创建分析项目
@@ -129,12 +117,6 @@ POST /server/main/api/orgs/<org_sid>/teams/<team_name>/repos/<repo_id>/projects/
129117
python ScriptsAPI.py --base_url=http://<my_ip>/ --method=create_project --org_sid=E5BbtAHm2Bh --team_name=project --repo_id=47 --scan_scheme_id=42 --branch=main
130118
```
131119

132-
#### 4. 结果展示
133-
![create_repository](../../../images/api_create_project_response.png)
134-
135-
136-
![create_repository](../../../images/api_create_project_cons.png)
137-
138120

139121
### 四、启动任务
140122
#### 1. url请求
@@ -164,11 +146,6 @@ POST /server/main/api/orgs/<org_sid>/teams/<team_name>/repos/<repo_id>/projects/
164146
python ScriptsAPI.py --base_url=http://<my_ip>/ --method=create_scans --org_sid=E5BbtAHm2Bh --team_name=project --repo_id=47 --project_id=48
165147
```
166148

167-
#### 4. 结果展示
168-
![create_repository](../../../images/api_create_scans_response.png)
169-
170-
171-
![create_repository](../../../images/api_create_scans_cons.png)
172149

173150

174151
### 五、轮询任务结果
@@ -199,17 +176,6 @@ GET /server/main/api/orgs/<org_sid>/teams/<team_name>/repos/<repo_id>/projects/<
199176
python ScriptsAPI.py --base_url=http://<my_ip>/ --method=get_scan_cons --org_sid=E5BbtAHm2Bh --team_name=project --repo_id=47 --project_id=48 --job_id=20
200177
```
201178

202-
#### 4. 结果展示
203-
![create_repository](../../../images/api_get_scan_cons_1.png)
204-
![create_repository](../../../images/api_get_scan_cons_2.png)
205-
此时分析项目正在执行中,调用访问任务结果的api接口后会不断进行轮询,直到项目执行完毕。
206-
207-
![create_repository](../../../images/api_get_scan_cons_3.png)
208-
![create_repository](../../../images/api_get_scan_cons_4.png)
209-
210-
如果参数填写出现错误,会给出提示。
211-
![create_repository](../../../images/api_get_scan_cons_5.png)
212-
213179

214180
### 六、获取分析概览
215181
#### 1. url请求
@@ -238,11 +204,6 @@ GET /server/analysis/api/orgs/<org_sid>/teams/<team_name>/repos/<repo_id>/projec
238204
python ScriptsAPI.py --base_url=http://<my_ip>/ --method=get_overview --org_sid=E5BbtAHm2Bh --team_name=project --repo_id=47 --project_id=48
239205
```
240206

241-
#### 4. 结果展示
242-
![create_repository](../../../images/api_get_overview_1.png)
243-
![create_repository](../../../images/api_get_overview_2.png)
244-
![create_repository](../../../images/api_get_overview_3.png)
245-
![create_repository](../../../images/api_get_overview_4.png)
246207

247208

248209
### 七、查看扫描问题列表
@@ -272,12 +233,6 @@ GET /server/analysis/api/orgs/<org_sid>/teams/<team_name>/repos/<repo_id>/projec
272233
python ScriptsAPI.py --base_url=http://<my_ip>/ --method=get_issues --org_sid=E5BbtAHm2Bh --team_name=project --repo_id=48 --project_id=49
273234
```
274235

275-
#### 4. 结果展示
276-
![create_repository](../../../images/api_get_issues_response.png)
277-
278-
279-
![create_repository](../../../images/api_get_issues_cons.png)
280-
281236

282237
### 八、查看问题详情
283238
#### 1. url请求
@@ -307,12 +262,6 @@ GET /server/analysis/api/orgs/<org_sid>/teams/<team_name>/repos/<repo_id>/projec
307262
python ScriptsAPI.py --base_url=http://<my_ip>/ --method=get_issue_detail --org_sid=E5BbtAHm2Bh --team_name=project --repo_id=48 --project_id=49 --issue_id=185
308263
```
309264

310-
#### 4. 结果展示
311-
![create_repository](../../../images/api_get_issue_detail_response.png)
312-
313-
314-
![create_repository](../../../images/api_get_issue_detail_cons.png)
315-
316265

317266
### 九、查看指定项目的圈复杂度问题列表
318267
#### 1. url请求
@@ -341,12 +290,6 @@ GET /server/analysis/api/orgs/<org_sid>/teams/<team_name>/repos/<repo_id>/projec
341290
python ScriptsAPI.py --base_url=http://<my_ip>/ --method=get_ccissues --org_sid=E5BbtAHm2Bh --team_name=project --repo_id=48 --project_id=49
342291
```
343292

344-
#### 4. 结果展示
345-
![create_repository](../../../images/api_get_ccissues_response.png)
346-
347-
348-
![create_repository](../../../images/api_get_ccissues_cons.png)
349-
350293

351294

352295
### 十、查看指定项目的重复文件列表
@@ -376,17 +319,6 @@ GET /server/analysis/api/orgs/<org_sid>/teams/<team_name>/repos/<repo_id>/projec
376319
python ScriptsAPI.py --base_url=http://<my_ip>/ --method=get_dupfiles --org_sid=E5BbtAHm2Bh --team_name=project --repo_id=48 --project_id=49
377320
```
378321

379-
#### 4. 结果展示
380-
![create_repository](../../../images/api_get_dupfiles_response.png)
381-
382-
383-
![create_repository](../../../images/api_get_dupfiles_cons.png)
384-
385-
386-
387-
388-
389-
390322

391323

392324

0 commit comments

Comments
 (0)