Skip to content

Commit

Permalink
Merge pull request #582 from alex-smile/update_esb_apis_1008
Browse files Browse the repository at this point in the history
esb update monitor_v3/jobv3/itsm/iam/cc confapis
  • Loading branch information
MrLYC authored Oct 9, 2021
2 parents 8ed5be7 + 0e14dcb commit 8ce20b7
Show file tree
Hide file tree
Showing 31 changed files with 1,957 additions and 76 deletions.
2 changes: 1 addition & 1 deletion paas2/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.12.25
2.12.26
1 change: 1 addition & 0 deletions paas2/esb/components/confapis/cc/cc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -866,6 +866,7 @@
comp_codename: generic.v2.cc.cc_component
dest_path: /api/v3/identifier/host/search
dest_http_method: POST
is_hidden: true

- path: /v2/cc/host_install_bk/
name: host_install_bk
Expand Down
34 changes: 34 additions & 0 deletions paas2/esb/components/confapis/iam/admin_api.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---

- path: /v2/iam/admin/groups/
name: admin_api_list_group
label: 查询(全局)用户组列表
label_en: admin api list group
method: GET
api_type: query
comp_codename: generic.v2.iam.iam_component
dest_path: /o/bk_iam/api/v1/open/admin/groups/
dest_http_method: GET
is_hidden: true

- path: /v2/iam/admin/groups/{group_id}/members/
name: admin_api_list_group_member
label: 查询用户组的成员列表
label_en: admin api list group member
method: GET
api_type: query
comp_codename: generic.v2.iam.iam_component
dest_path: /o/bk_iam/api/v1/open/admin/groups/{group_id}/members/
dest_http_method: GET
is_hidden: true

- path: /v2/iam/admin/subjects/{subject_type}/{subject_id}/groups/
name: admin_api_list_group_of_subject_join
label: 查询Subject加入的用户组列表
label_en: admin api list group of subject join
method: GET
api_type: query
comp_codename: generic.v2.iam.iam_component
dest_path: /o/bk_iam/api/v1/open/admin/subjects/{subject_type}/{subject_id}/groups/
dest_http_method: GET
is_hidden: true
12 changes: 6 additions & 6 deletions paas2/esb/components/confapis/iam/apidocs/en/application.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ application for access system

| Field | Type | Required | Description |
|-----------|------------|--------|------------|
| system | string | Yes | system id |
| system_id | string | Yes | system id |
| actions | array | Yes | permission actions |

#### actions
Expand All @@ -24,7 +24,7 @@ application for access system

| Field | Type | Required | Description |
|-----------|------------|--------|------------|
| system | string | Yes | resource type system id |
| system_id | string | Yes | resource type system id |
| type | string | Yes | resource type id |
| instances | array[array] | Yes | resource instance |
| attributes | array | No | attribute |
Expand Down Expand Up @@ -56,13 +56,13 @@ application for access system

```python
{
"system": "bk_job",
"system_id": "bk_job",
"actions": [
{
"id": "execute_job",
"related_resource_types": [
{
"system": "bk_job",
"system_id": "bk_job",
"type": "job",
"instances": [
[
Expand All @@ -75,7 +75,7 @@ application for access system
]
},
{
"system": "bk_cmdb",
"system_id": "bk_cmdb",
"type": "host",
"instances": [
[
Expand Down Expand Up @@ -136,4 +136,4 @@ application for access system

| Field | Type | Description |
|-----------|-----------|-----------|
| url | str | permission request redirect url |
| url | str | permission request redirect url |
12 changes: 6 additions & 6 deletions paas2/esb/components/confapis/iam/apidocs/zh_hans/application.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

| 字段 | 类型 | 必选 | 描述 |
|-----------|------------|--------|------------|
| system | 字符串 || 系统id |
| system_id | 字符串 || 系统id |
| actions | 数组 || 申请权限的操作 |

#### actions
Expand All @@ -24,7 +24,7 @@

| 字段 | 类型 | 必选 | 描述 |
|-----------|------------|--------|------------|
| system | 字符串 || 资源类型的系统id |
| system_id | 字符串 || 资源类型的系统id |
| type | 字符串 || 资源类型 |
| instances | 数组[数组] || 资源实例 |
| attributes | 数组 || 属性 |
Expand Down Expand Up @@ -56,13 +56,13 @@

```python
{
"system": "bk_job", # 权限的系统
"system_id": "bk_job", # 权限的系统
"actions": [
{
"id": "execute_job", # 操作id
"related_resource_types": [ # 关联的资源类型, 无关联资源类型的操作, 可以为空
{
"system": "bk_job", # 资源类型所属的系统id
"system_id": "bk_job", # 资源类型所属的系统id
"type": "job", # 资源类型
"instances": [ # 申请权限的资源实例
[ # 带层级的实例表示
Expand All @@ -75,7 +75,7 @@
]
},
{
"system": "bk_cmdb", # 资源类型所属的系统id
"system_id": "bk_cmdb", # 资源类型所属的系统id
"type": "host", # 操作依赖的另外一个资源类型
"instances": [
[
Expand Down Expand Up @@ -136,4 +136,4 @@

| 字段 | 类型 | 描述 |
|-----------|-----------|-----------|
| url | 字符串 | 权限申请重定向URL |
| url | 字符串 | 权限申请重定向URL |
166 changes: 166 additions & 0 deletions paas2/esb/components/confapis/iam/mgmt_api.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
---

- path: /v2/iam/management/grade_managers/
name: mgmt_api_create_grade_manager
label: 创建分级管理员
label_en: mgmt api create grade manager
method: POST
api_type: operate
comp_codename: generic.v2.iam.iam_component
dest_path: /o/bk_iam/api/v1/open/management/grade_managers/
dest_http_method: POST
is_hidden: true

- path: /v2/iam/management/grade_managers/{grade_manager_id}/members/
name: mgmt_api_list_grade_manager_member
label: 查询分级管理员成员列表
label_en: mgmt api list grade manager member
method: GET
api_type: query
comp_codename: generic.v2.iam.iam_component
dest_path: /o/bk_iam/api/v1/open/management/grade_managers/{grade_manager_id}/members/
dest_http_method: GET
is_hidden: true

- path: /v2/iam/management/grade_managers/{grade_manager_id}/members/
name: mgmt_api_add_grade_manager_member
label: 添加分级管理员成员
label_en: mgmt api add grade manager member
method: POST
api_type: operate
comp_codename: generic.v2.iam.iam_component
dest_path: /o/bk_iam/api/v1/open/management/grade_managers/{grade_manager_id}/members/
dest_http_method: POST
is_hidden: true

- path: /v2/iam/management/grade_managers/{grade_manager_id}/members/
name: mgmt_api_delete_grade_manager_member
label: 删除分级管理员成员
label_en: mgmt api delete grade manager member
method: DELETE
api_type: operate
comp_codename: generic.v2.iam.iam_component
dest_path: /o/bk_iam/api/v1/open/management/grade_managers/{grade_manager_id}/members/
dest_http_method: DELETE
is_hidden: true

- path: /v2/iam/management/grade_managers/{grade_manager_id}/groups/
name: mgmt_api_list_grade_manager_groups
label: 查询用户组列表
label_en: mgmt api list grade manager groups
method: GET
api_type: query
comp_codename: generic.v2.iam.iam_component
dest_path: /o/bk_iam/api/v1/open/management/grade_managers/{grade_manager_id}/groups/
dest_http_method: GET
is_hidden: true

- path: /v2/iam/management/grade_managers/{grade_manager_id}/groups/
name: mgmt_api_create_group
label: 创建用户组
label_en: mgmt api create group
method: POST
api_type: operate
comp_codename: generic.v2.iam.iam_component
dest_path: /o/bk_iam/api/v1/open/management/grade_managers/{grade_manager_id}/groups/
dest_http_method: POST
is_hidden: true

- path: /v2/iam/management/groups/{group_id}/
name: mgmt_api_update_group_base_info
label: 更新用户组名称和描述
label_en: mgmt api update group base info
method: PUT
api_type: operate
comp_codename: generic.v2.iam.iam_component
dest_path: /o/bk_iam/api/v1/open/management/groups/{group_id}/
dest_http_method: PUT
is_hidden: true

- path: /v2/iam/management/groups/{group_id}/
name: mgmt_api_delete_group
label: 删除用户组
label_en: mgmt api delete group
method: DELETE
api_type: operate
comp_codename: generic.v2.iam.iam_component
dest_path: /o/bk_iam/api/v1/open/management/groups/{group_id}/
dest_http_method: DELETE
is_hidden: true

- path: /v2/iam/management/groups/{group_id}/members/
name: mgmt_api_list_group_member
label: 查询用户组成员列表
label_en: mgmt api list group member
method: GET
api_type: query
comp_codename: generic.v2.iam.iam_component
dest_path: /o/bk_iam/api/v1/open/management/groups/{group_id}/members/
dest_http_method: GET
is_hidden: true

- path: /v2/iam/management/groups/{group_id}/members/
name: mgmt_api_add_group_member
label: 添加用户组成员
label_en: mgmt api add group member
method: POST
api_type: operate
comp_codename: generic.v2.iam.iam_component
dest_path: /o/bk_iam/api/v1/open/management/groups/{group_id}/members/
dest_http_method: POST
is_hidden: true

- path: /v2/iam/management/groups/{group_id}/members/
name: mgmt_api_delete_group_member
label: 删除用户组成员
label_en: mgmt api delete group member
method: DELETE
api_type: operate
comp_codename: generic.v2.iam.iam_component
dest_path: /o/bk_iam/api/v1/open/management/groups/{group_id}/members/
dest_http_method: DELETE
is_hidden: true

- path: /v2/iam/management/groups/{group_id}/policies/
name: mgmt_api_grant_group_policy
label: 用户组授权
label_en: mgmt api grant group policy
method: POST
api_type: operate
comp_codename: generic.v2.iam.iam_component
dest_path: /o/bk_iam/api/v1/open/management/groups/{group_id}/policies/
dest_http_method: POST
is_hidden: true

- path: /v2/iam/management/users/grade_managers/
name: mgmt_api_list_user_grade_manager
label: 查询用户的分级管理员列表
label_en: mgmt api list user grade manager
method: GET
api_type: query
comp_codename: generic.v2.iam.iam_component
dest_path: /o/bk_iam/api/v1/open/management/users/grade_managers/
dest_http_method: GET
is_hidden: true

- path: /v2/iam/management/users/grade_managers/{grade_manager_id}/groups/
name: mgmt_api_list_user_join_group
label: 查询用户在某个分级管理员下的加入的用户组列表
label_en: mgmt api list user join group
method: GET
api_type: query
comp_codename: generic.v2.iam.iam_component
dest_path: /o/bk_iam/api/v1/open/management/users/grade_managers/{grade_manager_id}/groups/
dest_http_method: GET
is_hidden: true

- path: /v2/iam/management/groups/applications/
name: mgmt_api_create_group_application
label: 创建用户组申请单据
label_en: mgmt api create group application
method: POST
api_type: operate
comp_codename: generic.v2.iam.iam_component
dest_path: /o/bk_iam/api/v1/open/management/groups/applications/
dest_http_method: POST
is_hidden: true
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
### 功能描述

服务流程详情查询,支持根据指定的服务流程ID查询服务流程详情(暂不发布)
服务流程详情查询,支持根据指定的服务流程ID查询服务流程详情

### 请求参数

Expand Down
10 changes: 10 additions & 0 deletions paas2/esb/components/confapis/itsm/itsm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -140,3 +140,13 @@
comp_codename: generic.v2.itsm.itsm_component
dest_path: /o/bk_itsm/openapi/service/get_service_roles/
dest_http_method: GET

- path: /v2/itsm/get_workflow_detail/
name: get_workflow_detail
label: 服务流程详情
label_en: get workflow detail
suggest_method: GET
api_type: query
comp_codename: generic.v2.itsm.itsm_component
dest_path: /openapi/workflow/get_workflow_detail/
dest_http_method: GET
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@

#### 接口参数

| 字段 | 类型 | 必选 | 描述 |
|-----------------|------------|--------|------------|
| bk_biz_id | long || 业务 ID |
| name | string || 凭据名称 |
| type | string || 凭据类型,取值可为ACCESS_KEY_SECRET_KEY,PASSWORD,USERNAME_PASSWORD,SECRET_KEY |
| description | string || 凭据描述 |
| access_key | string || 凭据类型为ACCESS_KEY_SECRET_KEY时填写 |
| secret_key | string || 凭据类型为ACCESS_KEY_SECRET_KEY/SECRET_KEY时填写 |
| username | string || 凭据类型为USERNAME_PASSWORD时填写 |
| password | string || 凭据类型为USERNAME_PASSWORD/PASSWORD时填写 |
| 字段 | 类型 | 必选 | 描述 |
|----------------------------|------------|--------|------------|
| bk_biz_id | long || 业务 ID |
| name | string || 凭据名称 |
| type | string || 凭据类型,取值可为ACCESS_KEY_SECRET_KEY,PASSWORD,USERNAME_PASSWORD,SECRET_KEY |
| description | string || 凭据描述 |
| credential_access_key | string || 凭据类型为ACCESS_KEY_SECRET_KEY时填写 |
| credential_secret_key | string || 凭据类型为ACCESS_KEY_SECRET_KEY/SECRET_KEY时填写 |
| credential_username | string || 凭据类型为USERNAME_PASSWORD时填写 |
| credential_password | string || 凭据类型为USERNAME_PASSWORD/PASSWORD时填写 |


### 请求参数示例
Expand All @@ -31,8 +31,8 @@
"name": "testCredential",
"type": "USERNAME_PASSWORD",
"description": "This is a test credential",
"username": "admin",
"password": "password"
"credential_username": "admin",
"credential_password": "password"
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,20 @@
| bk_biz_id | long || 业务ID |
| job_instance_id | long || 作业实例ID |
| step_instance_id | long || 步骤实例ID |
| operation_code | int || 操作类型:2、失败IP重做,3、忽略错误,4、执行,5、跳过,6、确认继续 8、全部重试,9、终止确认流程,10-重新发起确认 |
| operation_code | int || 操作类型:2、失败IP重做,3、忽略错误 6、确认继续 8、全部重试,9、终止确认流程,10-重新发起确认,11、进入下一步,12、强制跳过 |


##### operation_code 详细说明
| operation_code | 操作类型 | 适用步骤 | 描述 |
|-----------|------------|--------|------------|
| 2 | 失败IP重做 | 脚本执行,文件分发步骤 | 对失败的IP重新下发任务 |
| 3 | 忽略错误 | 脚本执行,文件分发步骤 | 忽略错误,继续执行 |
| 6 | 确认继续 | 人工确认步骤 | 确认继续执行 |
| 8 | 全部重试 | 脚本执行,文件分发步骤 | 对所有的IP重新下发任务 |
| 9 | 终止确认流程 | 人工确认步骤 | 确认终止执行 |
| 10 | 重新发起确认 | 人工确认步骤 | 重新发起确认 |
| 11 | 进入下一步 | 脚本执行,文件分发步骤 | 当步骤状态为终止成功,用于继续执行后续步骤 |
| 12 | 强制跳过 | 脚本执行,文件分发步骤 | 当步骤状态为终止中,用于强制跳过当前步骤,执行后续步骤|

### 请求参数示例

Expand Down
Loading

0 comments on commit 8ce20b7

Please sign in to comment.