-
Notifications
You must be signed in to change notification settings - Fork 201
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2870 from liuliaozhong/master_issue_2830
feat: 增加查询文件源与凭证详情的ApiGW接口 #2830
- Loading branch information
Showing
54 changed files
with
1,480 additions
and
74 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 |
---|---|---|
@@ -0,0 +1,77 @@ | ||
### 功能描述 | ||
|
||
查询凭证详情 | ||
|
||
### 请求参数 | ||
|
||
{{ bkapi_authorization_description }} | ||
|
||
#### Header参数 | ||
|
||
| 字段 | 类型 | 必选 | 描述 | | ||
|-----------|------------|--------|------------| | ||
| X-Bkapi-Authorization | string | 是 | 认证信息。详情参考[调用网关 API](https://github.com/TencentBlueKing/BKDocs/blob/master/ZH/7.0/APIGateway/apigateway/use-api/use-apigw-api.md) | | ||
| Accept | string | 是 | 固定值。application/json| | ||
| Content-Type | string | 是 | 固定值。application/json| | ||
|
||
#### Query参数 | ||
|
||
| 字段 | 类型 | 必选 | 描述 | | ||
|------------------------|------------|--------|------------| | ||
| bk_scope_type | string | 是 | 资源范围类型。可选值: biz - 业务,biz_set - 业务集 | | ||
| bk_scope_id | string | 是 | 资源范围ID, 与bk_scope_type对应, 表示业务ID或者业务集ID | | ||
| bk_biz_id | long | 是 | *已弃用*。业务ID。此字段已被弃用并由字段bk_scope_type+bk_scope_id替换 | | ||
| id | String | 是 | 凭证ID | | ||
|
||
### 请求参数示例 | ||
|
||
- GET | ||
```json | ||
/api/v3/get_credential_detail?bk_scope_type=biz&bk_scope_id=2&id=xxx | ||
``` | ||
|
||
### 返回结果示例 | ||
|
||
```json | ||
{ | ||
"result": true, | ||
"code": 0, | ||
"message": "", | ||
"data": { | ||
"bk_scope_type": "biz", | ||
"bk_scope_id": "2", | ||
"id": "xxx", | ||
"name": "xxx", | ||
"type": "xxx", | ||
"description": "xxx", | ||
"creator": "admin", | ||
"create_time": 1712049204719, | ||
"last_modify_user": "admin", | ||
"last_modify_time": 1712049204719 | ||
} | ||
} | ||
``` | ||
|
||
### 返回结果参数说明 | ||
|
||
| 字段 | 类型 | 描述 | | ||
|-----------|-----------|-----------| | ||
| result | bool | 请求成功与否。true:请求成功;false请求失败 | | ||
| code | int | 错误编码。 0表示success,>0表示失败错误 | | ||
| message | string | 请求失败返回的错误信息| | ||
| data | object | 请求返回的数据| | ||
| permission | object | 权限信息| | ||
|
||
##### data | ||
| 字段 | 类型 | 描述 | | ||
| ---------------- | ------ | ------------------------------------------------------------ | | ||
| bk_scope_type | string | 资源范围类型。可选值: biz - 业务,biz_set - 业务集 | | ||
| bk_scope_id | string | 资源范围ID, 与bk_scope_type对应, 表示业务ID或者业务集ID | | ||
| id | string | 凭证ID | | ||
| name | string | 凭证名称 | | ||
| type | string | 类型。可选值:APP_ID_SECRET_KEY,PASSWORD,USERNAME_PASSWORD,SECRET_KEY| | ||
| description | string | 描述 | | ||
| creator | string | 作业创建人账号 | | ||
| create_time | long | 创建时间,Unix时间戳(ms) | | ||
| last_modify_user | string | 作业修改人账号 | | ||
| last_modify_time | long | 最后修改时间,Unix时间戳(ms) | |
85 changes: 85 additions & 0 deletions
85
docs/apidoc/bk-api-gateway/v3/zh/get_file_source_detail.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,85 @@ | ||
### 功能描述 | ||
|
||
查询文件源详情 | ||
|
||
### 请求参数 | ||
|
||
{{ bkapi_authorization_description }} | ||
|
||
#### Header参数 | ||
|
||
| 字段 | 类型 | 必选 | 描述 | | ||
|-----------|------------|--------|------------| | ||
| X-Bkapi-Authorization | string | 是 | 认证信息。详情参考[调用网关 API](https://github.com/TencentBlueKing/BKDocs/blob/master/ZH/7.0/APIGateway/apigateway/use-api/use-apigw-api.md) | | ||
| Accept | string | 是 | 固定值。application/json| | ||
| Content-Type | string | 是 | 固定值。application/json| | ||
|
||
#### Query参数 | ||
|
||
| 字段 | 类型 | 必选 | 描述 | | ||
|------------------------|------------|--------|------------| | ||
| bk_scope_type | string | 是 | 资源范围类型。可选值: biz - 业务,biz_set - 业务集 | | ||
| bk_scope_id | string | 是 | 资源范围ID, 与bk_scope_type对应, 表示业务ID或者业务集ID | | ||
| bk_biz_id | long | 是 | *已弃用*。业务ID。此字段已被弃用并由字段bk_scope_type+bk_scope_id替换 | | ||
| code | String | 是 | 文件源code | | ||
|
||
### 请求参数示例 | ||
|
||
- GET | ||
```json | ||
/api/v3/get_file_source_detail?bk_scope_type=biz&bk_scope_id=2&code=bkrepo-1 | ||
``` | ||
|
||
### 返回结果示例 | ||
|
||
```json | ||
{ | ||
"result": true, | ||
"code": 0, | ||
"message": "", | ||
"data": { | ||
"bk_scope_type": "biz", | ||
"bk_scope_id": "2", | ||
"id": 10001, | ||
"code": "bkrepo-1", | ||
"alias": "xxx", | ||
"status": 0, | ||
"file_source_type_code": "BLUEKING_ARTIFACTORY", | ||
"is_public": false, | ||
"credential_id": "xxx", | ||
"enable": true, | ||
"creator": "admin", | ||
"create_time": 1712050614742, | ||
"last_modify_user": "admin", | ||
"last_modify_time": 1712050614742 | ||
} | ||
} | ||
``` | ||
|
||
### 返回结果参数说明 | ||
|
||
| 字段 | 类型 | 描述 | | ||
|-----------|-----------|-----------| | ||
| result | bool | 请求成功与否。true:请求成功;false请求失败 | | ||
| code | int | 错误编码。 0表示success,>0表示失败错误 | | ||
| message | string | 请求失败返回的错误信息| | ||
| data | object | 请求返回的数据| | ||
| permission | object | 权限信息| | ||
|
||
##### data | ||
| 字段 | 类型 | 描述 | | ||
| ---------------- | ------ | ------------------------------------------------------------ | | ||
| bk_scope_type | string | 资源范围类型。可选值: biz - 业务,biz_set - 业务集 | | ||
| bk_scope_id | string | 资源范围ID, 与bk_scope_type对应, 表示业务ID或者业务集ID | | ||
| id | int | 文件源ID | | ||
| code | string | 文件源code | | ||
| alias | string | 文件源别名 | | ||
| status | int | 状态 | | ||
| file_source_type_code | string | 文件源类型code。可选值:BLUEKING_ARTIFACTORY | | ||
| is_public | bool | 是否为公用文件源 | | ||
| credential_id | string | 凭证ID | | ||
| enable | bool | 是否启用 | | ||
| creator | string | 作业创建人账号 | | ||
| create_time | long | 创建时间,Unix时间戳(ms) | | ||
| last_modify_user | string | 作业修改人账号 | | ||
| last_modify_time | long | 最后修改时间,Unix时间戳(ms) | |
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
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
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
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
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
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
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
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
21 changes: 21 additions & 0 deletions
21
...in/java/com/tencent/bk/job/file_gateway/model/req/esb/v3/EsbGetFileSourceDetailV3Req.java
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,21 @@ | ||
package com.tencent.bk.job.file_gateway.model.req.esb.v3; | ||
|
||
import com.tencent.bk.job.common.esb.model.EsbAppScopeReq; | ||
import com.tencent.bk.job.common.validation.NotBlankField; | ||
import com.tencent.bk.job.common.validation.NotContainSpecialChar; | ||
import io.swagger.annotations.ApiModelProperty; | ||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
|
||
@EqualsAndHashCode(callSuper = true) | ||
@Data | ||
public class EsbGetFileSourceDetailV3Req extends EsbAppScopeReq { | ||
|
||
/** | ||
* 文件源Code | ||
*/ | ||
@ApiModelProperty(value = "文件源Code") | ||
@NotBlankField(fieldName = "code") | ||
@NotContainSpecialChar(fieldName = "code") | ||
private String code; | ||
} |
Oops, something went wrong.