Skip to content

Commit

Permalink
Merge pull request #1023 from alex-smile/esb_update_apis_20220809
Browse files Browse the repository at this point in the history
update: esb update monitor_v3, bk_log, itsm, gsekit confapis
  • Loading branch information
MrLYC authored Aug 9, 2022
2 parents 872346a + cb96752 commit 22e1df2
Show file tree
Hide file tree
Showing 18 changed files with 587 additions and 152 deletions.
2 changes: 1 addition & 1 deletion paas2/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.12.54
2.12.55

This file was deleted.

This file was deleted.

11 changes: 11 additions & 0 deletions paas2/esb/components/confapis/bk_log/bk_log.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,17 @@
dest_http_method: POST
is_hidden: True

- path: /v2/bk_log/databus_collectors/pre_check/
name: databus_collector_pre_check
label: 日志平台-预检查采集项英文名
label_en: bk_log collector pre check
method: GET
api_type: query
comp_codename: generic.v2.bk_log.bk_log_component
dest_path: /api/v1/databus/collectors/pre_check/
dest_http_method: GET
is_hidden: True

- path: /v2/bk_log/databus_collectors/{collector_config_id}/subscription_status/
name: databus_collector_subscription_status
label: 日志平台-获取采集项订阅任务
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
### 请求地址

/v2/gsekit/api/meta/access_overview/

### 请求方式

GET

### 功能描述

业务接入情况概览

### 请求参数

{{ common_args_desc }}

#### 接口参数

| 字段 | 类型 | 必选 | 描述 |
| --------- | ---- | ---- | ------ |
| bk_biz_id | int || 业务ID |

### 请求参数示例

``` json
{
"bk_biz_id": 2
}
```

### 返回结果示例

```json
{
"result": true,
"data": {
"is_access": true,
"process": true,
"configfile": true
},
"code": 0,
"message": ""
}
```

### 返回结果参数说明

| 字段 | 类型 | 描述 |
| ------- | ------ | --------------------------------- |
| result | bool | 返回结果,true为成功,false为失败 |
| code | int | 返回码,0表示成功,其他值表示失败 |
| message | string | 返回信息 |
| data | dict | 详细结果,详见data定义 |


#### data

| 字段 | 类型 | 描述 |
|------------|------|------------------------------------|
| is_access | bool | 是否已接入本系统,以下模块其中一个为 `true` 视为已接入本系统 |
| process | bool | 是否已接入进程相关功能 |
| configfile | bool | 是否已接入配置相关功能 |
10 changes: 10 additions & 0 deletions paas2/esb/components/confapis/gsekit/gsekit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,13 @@
path: /v2/gsekit/api/job/job_status/
dest_http_method: POST
suggest_method: POST

- api_type: query
comp_codename: generic.v2.gsekit.gsekit_component
name: access_overview
label: 业务接入情况概览
label_en: null
dest_path: /o/bk_gsekit/api/{bk_biz_id}/meta/access_overview/
path: /v2/gsekit/api/meta/access_overview/
dest_http_method: GET
suggest_method: GET
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
### Functional description

ticket comment interface

### Request Parameters

{{ common_args_desc }}

#### Interface Parameters

| Field | Type | Required | Description |
| --------- | ------ | --- | -------------------------- |
| parent__id | int | YES | The parent catalog id |
| name | string | YES | catalog name |
| desc | string | NO | catalog desc |
| project_key | string | YES | project_id, default "0" |


### Request Parameters Example

```json
{
"parent__id": 2,
"name": "test",
"desc": "123",
"project_key": "0"
}
```

### Return Result Example

```json
{
"result": true,
"code": 0,
"message": "success",
"data": {
"id": 38,
"key": "4018b68b7987b5b0fdafcde492715ea1",
"level": 2,
"parent": 2,
"parent_name": "root>xxxx",
"parent_key": "FUWUFANKUI",
"parent__id": "2",
"parent__name": "xxxx",
"name": "test",
"desc": "",
"project_key": "0"
}
}
```

### Return Result Description

| Field | Type | Description |
| ------- | --------- | ----------------------- |
| result | bool | true/false, indicate success or failure |
| code | int | return code. 0 indicates success, other values indicate failure |
| message | string | error message returned when result is false |
| data | object | return data |
78 changes: 78 additions & 0 deletions paas2/esb/components/confapis/itsm/apidocs/en/import_service.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
### Functional description

Import the service. Obtain the metadata from the service list and export the service.

### Request Parameters

{{ common_args_desc }}

#### Interface Parameters

| Field | Type | Required | Description |
|-----------|------------|--------|------------|
| key | string | YES | Service type |
| name | string | YES | service_name |
| catalog_id | int | YES | catalog id |
| desc | string | NO | service desc|
| owners | string | NO | service owners |
| can_ticket_agency | bool | YES | Could you replace the BILL of lading |
| is_valid | bool | YES | Whether to enable or disable the default value is false |
| display_type | string | YES | display type |
| display_role | string | YES | display role,Display_type is open and the value is null|
| source | string | YES | source|
| project_key | string | YES | project key|
| workflow | json | YES | workflow data|



### Request Parameters Example

``` json
{
"key": "request",
"name": "测试服务",
"catalog_id":38,
"desc": "",
"owners": "admin",
"can_ticket_agency": false,
"is_valid": true,
"display_type": "OPEN",
"display_role": "",
"source": "custom",
"project_key": "0",
"workflow":{}
}
```
### Return Result Example

```json
{
"result": true,
"code": 0,
"message": "success",
"data": {
"id": 94,
"name": "测试服务",
"service_type": "request",
"desc": ""
}
}
```

### Return Result Description

| 字段 | 类型 | 描述 |
|-----------|-----------|-----------|
|result| bool | 返回结果,true为成功,false为失败 |
|code|int|返回码,0表示成功,其他值表示失败|
|message|string|错误信息
|data| object| 返回数据 |

### data

| 字段 | 类型 | 描述 |
|-----------|-----------|-----------|
|id| int | 服务id |
|name|string|服务名|
|service_type|string|服务类型|
|desc| string| 服务描述 |
Loading

0 comments on commit 22e1df2

Please sign in to comment.