forked from TencentBlueKing/bk-repo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: API文档问题修复和对外暴露接口梳理调整 TencentBlueKing#2657
- Loading branch information
Showing
32 changed files
with
5,492 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# 蓝盾制品库文档 | ||
|
||
[部署文档](/install/) | ||
[接口文档](/apidoc/) | ||
[接口文档](/apidoc-user/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
- [部署文档](/install/) | ||
- [接口文档](/apidoc/) | ||
- [接口文档](/apidoc-user/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# 蓝鲸制品库接口文档 | ||
- **接口公共说明** | ||
- [通用接口协议](common/common.md) | ||
- [自定义搜索协议](common/search.md) | ||
- [事件类型](common/event.md) | ||
- **项目/仓库** | ||
- [项目接口](repo/project.md) | ||
- [仓库接口](repo/repository.md) | ||
- [代理源接口](repo/proxy-channel.md) | ||
- **节点** | ||
- [节点操作接口](node/node.md) | ||
- [分享链接接口](node/share.md) | ||
- **制品包/版本** | ||
- [制品包版本接口](package/package.md) | ||
- **元数据** | ||
- [系统元数据说明](metadata/system-metadata.md) | ||
- [节点元数据](metadata/node-metadata.md) | ||
- [元数据搜索](metadata/search.md) | ||
- **Generic通用制品仓库** | ||
- [简单文件操作](generic/simple.md) | ||
- [分块文件操作](generic/block.md) | ||
- [临时访问凭证](generic/temporary-access.md) | ||
- **认证服务** | ||
- [用户相关](auth/user.md) | ||
- [用户token相关](auth/token.md) | ||
- **制品分析** | ||
- [扫描器管理](scanner/scanner.md) | ||
- [扫描](scanner/scan.md) | ||
- [扫描报告](scanner/report.md) | ||
- **WebHook** | ||
- [webhook接口](webhook/webhook.md) | ||
- [webhook消息](webhook/payload.md) | ||
- **审计日志** | ||
- [审计日志接口](log/log.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
- **接口公共说明** | ||
- [通用接口协议](/apidoc-user/common/common.md) | ||
- [自定义搜索协议](/apidoc-user/common/search.md) | ||
- [事件类型](/apidoc-user/common/event.md) | ||
- **项目/仓库** | ||
- [项目接口](/apidoc-user/repo/project.md) | ||
- [仓库接口](/apidoc-user/repo/repository.md) | ||
- [代理源接口](/apidoc-user/repo/proxy-channel.md) | ||
- **节点** | ||
- [节点操作接口](/apidoc-user/node/node.md) | ||
- [分享链接接口](/apidoc-user/node/share.md) | ||
- **制品包/版本** | ||
- [制品包版本接口](/apidoc-user/package/package.md) | ||
- **元数据** | ||
- [系统元数据说明](/apidoc-user/metadata/system-metadata.md) | ||
- [节点元数据](/apidoc-user/metadata/node-metadata.md) | ||
- [元数据搜索](/apidoc-user/metadata/search.md) | ||
- **Generic通用制品仓库** | ||
- [简单文件操作](/apidoc-user/generic/simple.md) | ||
- [分块文件操作](/apidoc-user/generic/block.md) | ||
- [临时访问凭证](/apidoc-user/generic/temporary-access.md) | ||
- **认证服务** | ||
- [用户相关](/apidoc-user/auth/user.md) | ||
- [用户token相关](/apidoc-user/auth/token.md) | ||
- **制品分析** | ||
- [扫描器管理](/apidoc-user/scanner/scanner.md) | ||
- [扫描](/apidoc-user/scanner/scan.md) | ||
- [扫描报告](/apidoc-user/scanner/report.md) | ||
- **WebHook** | ||
- [webhook接口](/apidoc-user/webhook/webhook.md) | ||
- [webhook消息](/apidoc-user/webhook/payload.md) | ||
- **审计日志** | ||
- [审计日志接口](/apidoc-user/log/log.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,179 @@ | ||
## bkrepo token相关接口 | ||
|
||
### 新增用户token | ||
|
||
- API:POST /auth/api/user/token/{uid}/{name}?expiredAt=2019-12-21T09:46:37.877Z&projectId=aaa | ||
- API 名称: add_user_token | ||
- 功能说明: | ||
- 中文:新增用户token | ||
- English:add user token | ||
|
||
- input body: | ||
|
||
``` json | ||
|
||
``` | ||
|
||
- input 字段说明 | ||
|
||
|字段|类型|是否必须|默认值|说明|Description| | ||
|---|---|---|---|---|---| | ||
|name|string|是|无|token名|the token name| | ||
|uid|string|是|无|用户id|the user id| | ||
|expiredAt|datetime|否|无|过期时间|expiredAt| | ||
|projectId|aaa|否|无|项目ID|projectId| | ||
|
||
- output: | ||
|
||
``` | ||
{ | ||
"code":0, | ||
"data":{ | ||
"createdAt":"2019-12-21T09:46:37.877Z", | ||
"expiredAt":"2019-12-21T09:46:37.877Z", | ||
"id":"abcd", | ||
"name":"abcd" | ||
}, | ||
"message":"string", | ||
"traceId":"string" | ||
} | ||
``` | ||
|
||
- output 字段说明 | ||
|
||
| 字段|类型|说明|Description| | ||
|---|---|---|---| | ||
|code|bool|错误编码。 0表示success,>0表示失败错误 |0:success, other: failure| | ||
|message|result message|错误消息 |the failure message | | ||
|data | bool | result data |the data for response| | ||
|traceId|string|请求跟踪id|the trace id| | ||
|
||
|
||
- data 字段说明 | ||
|
||
| 字段|类型|说明|Description| | ||
|---|---|---|---| | ||
|createdAt|time|创建时间|create time| | ||
|expiredAt|time|过期时间,null标识永久 |expired time | | ||
|name | string | token name|the name of token| | ||
|id|string|token id |the id of token| | ||
|
||
### 用户token列表 | ||
|
||
- API:GET /auth/api/user/list/token/{uid} | ||
- API 名称: list_user_token | ||
- 功能说明: | ||
- 中文:新增用户token | ||
- English:add user token | ||
|
||
- input body: | ||
|
||
``` json | ||
|
||
``` | ||
|
||
- input 字段说明 | ||
|
||
|字段|类型|是否必须|默认值|说明|Description| | ||
|---|---|---|---|---|---| | ||
|uid|string|是|无|用户id|the user id| | ||
|
||
- output: | ||
|
||
``` | ||
{ | ||
"code":0, | ||
"data":[ | ||
{ | ||
"createdAt":"2019-12-21T09:46:37.877Z", | ||
"expiredAt":"2019-12-21T09:46:37.877Z", | ||
"name":"token1" | ||
}, | ||
{ | ||
"createdAt":"2019-12-21T09:46:37.877Z", | ||
"expiredAt":null, | ||
"name":"token2" | ||
} | ||
], | ||
"message":"string", | ||
"traceId":"string" | ||
} | ||
``` | ||
|
||
- output 字段说明 | ||
|
||
| 字段|类型|说明|Description| | ||
|---|---|---|---| | ||
|code|bool|错误编码。 0表示success,>0表示失败错误 |0:success, other: failure| | ||
|message|result message|错误消息 |the failure message | | ||
|data | bool | result data |the data for response| | ||
|traceId|string|请求跟踪id|the trace id| | ||
|
||
|
||
- data 字段说明 | ||
|
||
| 字段|类型|说明|Description| | ||
|---|---|---|---| | ||
|createdAt|time|创建时间|create time| | ||
|expiredAt|time|过期时间 |expired time | | ||
|name | string | token name|the name of token| | ||
|id|string|token id |the id of token| | ||
|
||
### 删除用户token | ||
|
||
- API:DELETE /auth/api/user/token/{uid}/{name} | ||
- API 名称: delete_user_token | ||
- 功能说明: | ||
- 中文:删除用户token | ||
- English:delete user token | ||
|
||
- input body: | ||
|
||
``` json | ||
|
||
``` | ||
|
||
- input 字段说明 | ||
|
||
|字段|类型|是否必须|默认值|说明|Description| | ||
|---|---|---|---|---|---| | ||
|uid|string|是|无|用户id|the user id| | ||
|name|string|是|无|用户token|the user token| | ||
|
||
- output: | ||
|
||
``` | ||
{ | ||
"code":0, | ||
"data":{ | ||
"admin":true, | ||
"locked":true, | ||
"name":"string", | ||
"pwd":"string", | ||
"roles":[ | ||
"string" | ||
], | ||
"tokens":[ | ||
{ | ||
"createdAt":"2019-12-21T09:46:37.877Z", | ||
"expiredAt":"2019-12-21T09:46:37.877Z", | ||
"name":"string" | ||
} | ||
], | ||
"uid":"string" | ||
}, | ||
"message":"string", | ||
"traceId":"string" | ||
} | ||
``` | ||
|
||
- output 字段说明 | ||
|
||
| 字段|类型|说明|Description| | ||
|---|---|---|---| | ||
|code|bool|错误编码。 0表示success,>0表示失败错误 |0:success, other: failure| | ||
|message|result message|错误消息 |the failure message | | ||
|data | bool | result data |the data for response| | ||
|traceId|string|请求跟踪id|the trace id| |
Oops, something went wrong.