From d0ee9a6ddffa900bd90d56f5a38f74ac5f1ffca7 Mon Sep 17 00:00:00 2001 From: alex-smile <443677891@qq.com> Date: Wed, 31 Mar 2021 18:25:01 +0800 Subject: [PATCH 1/3] update cc/bscp/bk_log/usermanage apis --- paas2/VERSION | 2 +- .../cc/apidocs/en/create_custom_query.md | 68 ----- .../apisv2/cc/apidocs/en/delete_business.md | 38 --- .../cc/apidocs/en/get_custom_query_data.md | 86 ------ .../cc/apidocs/en/get_custom_query_detail.md | 80 ----- .../cc/apidocs/en/search_custom_query.md | 98 ------ .../bk/apisv2/cc/apidocs/en/search_host.md | 230 --------------- .../cc/apidocs/en/update_custom_query.md | 60 ---- .../apidocs/en/update_object_topo_graphics.md | 74 ----- .../cc/apidocs/zh_hans/create_custom_query.md | 68 ----- .../cc/apidocs/zh_hans/delete_business.md | 38 --- .../apidocs/zh_hans/get_custom_query_data.md | 86 ------ .../zh_hans/get_custom_query_detail.md | 80 ----- .../cc/apidocs/zh_hans/search_custom_query.md | 98 ------ .../apisv2/cc/apidocs/zh_hans/search_host.md | 230 --------------- .../cc/apidocs/zh_hans/update_custom_query.md | 60 ---- .../zh_hans/update_object_topo_graphics.md | 74 ----- .../components/confapis/bk_log/bk_log.yaml | 36 ++- .../en/create_multi_commit_with_content.md | 2 +- .../bscp/apidocs/en/create_procattr.md | 2 +- .../bscp/apidocs/en/create_procattr_batch.md | 104 +++++++ .../bscp/apidocs/en/create_template.md | 8 +- .../apidocs/en/create_template_version.md | 2 +- .../bscp/apidocs/en/create_variable.md | 52 ++++ .../bscp/apidocs/en/create_variable_group.md | 49 +++ .../bscp/apidocs/en/delete_variable.md | 36 +++ .../bscp/apidocs/en/delete_variable_group.md | 36 +++ .../en/get_history_app_instance_list.md | 49 ++- .../en/get_reachable_app_instance_list.md | 49 ++- .../confapis/bscp/apidocs/en/get_template.md | 8 +- .../bscp/apidocs/en/get_template_list.md | 8 +- .../confapis/bscp/apidocs/en/get_variable.md | 67 +++++ .../bscp/apidocs/en/get_variable_group.md | 64 ++++ .../apidocs/en/get_variable_group_list.md | 86 ++++++ .../bscp/apidocs/en/get_variable_list.md | 89 ++++++ .../bscp/apidocs/en/render_template.md | 3 +- .../bscp/apidocs/en/update_template.md | 8 +- .../apidocs/en/update_template_version.md | 2 +- .../bscp/apidocs/en/update_variable.md | 38 +++ .../create_multi_commit_with_content.md | 2 +- .../bscp/apidocs/zh_hans/create_procattr.md | 2 +- .../apidocs/zh_hans/create_procattr_batch.md | 104 +++++++ .../bscp/apidocs/zh_hans/create_template.md | 8 +- .../zh_hans/create_template_version.md | 2 +- .../bscp/apidocs/zh_hans/create_variable.md | 52 ++++ .../apidocs/zh_hans/create_variable_group.md | 49 +++ .../bscp/apidocs/zh_hans/delete_variable.md | 36 +++ .../apidocs/zh_hans/delete_variable_group.md | 36 +++ .../zh_hans/get_history_app_instance_list.md | 49 ++- .../get_reachable_app_instance_list.md | 49 ++- .../bscp/apidocs/zh_hans/get_template.md | 8 +- .../bscp/apidocs/zh_hans/get_template_list.md | 8 +- .../bscp/apidocs/zh_hans/get_variable.md | 67 +++++ .../apidocs/zh_hans/get_variable_group.md | 64 ++++ .../zh_hans/get_variable_group_list.md | 86 ++++++ .../bscp/apidocs/zh_hans/get_variable_list.md | 89 ++++++ .../bscp/apidocs/zh_hans/render_template.md | 3 +- .../bscp/apidocs/zh_hans/update_template.md | 8 +- .../zh_hans/update_template_version.md | 2 +- .../bscp/apidocs/zh_hans/update_variable.md | 38 +++ paas2/esb/components/confapis/bscp/bscp.yaml | 100 +++++++ .../apidocs/en/batch_create_proc_template.md | 35 ++- .../cc/apidocs/en/clone_host_property.md | 22 +- .../cc/apidocs/en/create_process_instance.md | 19 +- .../cc/apidocs/en/create_service_instance.md | 13 +- .../cc/apidocs/en/delete_cloud_area.md | 8 +- .../en/find_host_relations_with_topo.md | 73 +++++ .../apidocs/en/find_instance_association.md | 2 +- .../cc/apidocs/en/get_proc_template.md | 164 +++++++---- .../en/list_biz_host_process_relation.md | 91 ------ .../cc/apidocs/en/list_biz_hosts_topo.md | 2 +- .../apidocs/en/list_host_detail_topology.md | 273 +++++++++++++++++ .../apidocs/en/list_process_related_info.md | 4 +- .../en/list_service_instance_detail.md | 21 +- .../cc/apidocs/en/list_service_template.md | 73 +++-- .../en/list_service_template_difference.md | 184 ++++++++++++ .../confapis/cc/apidocs/en/resource_watch.md | 2 +- .../en/transfer_host_to_recyclemodule.md} | 17 +- .../cc/apidocs/en/update_cloud_area.md | 6 +- .../cc/apidocs/en/update_process_instance.md | 7 +- .../zh_hans/batch_create_proc_template.md | 35 ++- .../cc/apidocs/zh_hans/clone_host_property.md | 20 +- .../zh_hans/create_process_instance.md | 19 +- .../zh_hans/create_service_instance.md | 13 +- .../cc/apidocs/zh_hans/delete_cloud_area.md | 9 +- .../zh_hans/find_host_relations_with_topo.md | 74 +++++ .../zh_hans/find_instance_association.md | 2 +- .../cc/apidocs/zh_hans/get_proc_template.md | 164 +++++++---- .../cc/apidocs/zh_hans/host_install_bk.md | 4 +- .../zh_hans/list_biz_host_process_relation.md | 92 ------ .../zh_hans/list_host_detail_topology.md | 278 ++++++++++++++++++ .../zh_hans/list_process_related_info.md | 4 +- .../zh_hans/list_service_instance_detail.md | 22 +- .../apidocs/zh_hans/list_service_template.md | 73 +++-- .../zh_hans/list_service_template_detail.md | 156 ---------- .../list_service_template_difference.md | 190 ++++++++++++ .../cc/apidocs/zh_hans/resource_watch.md | 4 +- .../transfer_host_to_recyclemodule.md} | 17 +- .../cc/apidocs/zh_hans/update_cloud_area.md | 6 +- .../apidocs/zh_hans/update_proc_template.md | 14 +- paas2/esb/components/confapis/cc/cc.yaml | 52 +++- .../usermanage/apidocs/en/list_departments.md | 5 +- .../usermanage/apidocs/en/list_users.md | 5 +- .../apidocs/en/retrieve_department.md | 3 +- .../usermanage/apidocs/en/retrieve_user.md | 5 +- .../zh_hans/list_department_profiles.md | 3 +- .../apidocs/zh_hans/list_departments.md | 5 +- .../zh_hans/list_profile_departments.md | 1 + .../usermanage/apidocs/zh_hans/list_users.md | 5 +- .../apidocs/zh_hans/retrieve_department.md | 8 +- .../apidocs/zh_hans/retrieve_user.md | 13 +- .../confapis/usermanage/usermanage.yaml | 2 +- paas2/release.md | 3 + 113 files changed, 3230 insertions(+), 2222 deletions(-) delete mode 100644 paas2/esb/components/bk/apisv2/cc/apidocs/en/create_custom_query.md delete mode 100644 paas2/esb/components/bk/apisv2/cc/apidocs/en/delete_business.md delete mode 100644 paas2/esb/components/bk/apisv2/cc/apidocs/en/get_custom_query_data.md delete mode 100644 paas2/esb/components/bk/apisv2/cc/apidocs/en/get_custom_query_detail.md delete mode 100644 paas2/esb/components/bk/apisv2/cc/apidocs/en/search_custom_query.md delete mode 100644 paas2/esb/components/bk/apisv2/cc/apidocs/en/search_host.md delete mode 100644 paas2/esb/components/bk/apisv2/cc/apidocs/en/update_custom_query.md delete mode 100644 paas2/esb/components/bk/apisv2/cc/apidocs/en/update_object_topo_graphics.md delete mode 100644 paas2/esb/components/bk/apisv2/cc/apidocs/zh_hans/create_custom_query.md delete mode 100644 paas2/esb/components/bk/apisv2/cc/apidocs/zh_hans/delete_business.md delete mode 100644 paas2/esb/components/bk/apisv2/cc/apidocs/zh_hans/get_custom_query_data.md delete mode 100644 paas2/esb/components/bk/apisv2/cc/apidocs/zh_hans/get_custom_query_detail.md delete mode 100644 paas2/esb/components/bk/apisv2/cc/apidocs/zh_hans/search_custom_query.md delete mode 100644 paas2/esb/components/bk/apisv2/cc/apidocs/zh_hans/search_host.md delete mode 100644 paas2/esb/components/bk/apisv2/cc/apidocs/zh_hans/update_custom_query.md delete mode 100644 paas2/esb/components/bk/apisv2/cc/apidocs/zh_hans/update_object_topo_graphics.md create mode 100644 paas2/esb/components/confapis/bscp/apidocs/en/create_procattr_batch.md create mode 100644 paas2/esb/components/confapis/bscp/apidocs/en/create_variable.md create mode 100644 paas2/esb/components/confapis/bscp/apidocs/en/create_variable_group.md create mode 100644 paas2/esb/components/confapis/bscp/apidocs/en/delete_variable.md create mode 100644 paas2/esb/components/confapis/bscp/apidocs/en/delete_variable_group.md create mode 100644 paas2/esb/components/confapis/bscp/apidocs/en/get_variable.md create mode 100644 paas2/esb/components/confapis/bscp/apidocs/en/get_variable_group.md create mode 100644 paas2/esb/components/confapis/bscp/apidocs/en/get_variable_group_list.md create mode 100644 paas2/esb/components/confapis/bscp/apidocs/en/get_variable_list.md create mode 100644 paas2/esb/components/confapis/bscp/apidocs/en/update_variable.md create mode 100644 paas2/esb/components/confapis/bscp/apidocs/zh_hans/create_procattr_batch.md create mode 100644 paas2/esb/components/confapis/bscp/apidocs/zh_hans/create_variable.md create mode 100644 paas2/esb/components/confapis/bscp/apidocs/zh_hans/create_variable_group.md create mode 100644 paas2/esb/components/confapis/bscp/apidocs/zh_hans/delete_variable.md create mode 100644 paas2/esb/components/confapis/bscp/apidocs/zh_hans/delete_variable_group.md create mode 100644 paas2/esb/components/confapis/bscp/apidocs/zh_hans/get_variable.md create mode 100644 paas2/esb/components/confapis/bscp/apidocs/zh_hans/get_variable_group.md create mode 100644 paas2/esb/components/confapis/bscp/apidocs/zh_hans/get_variable_group_list.md create mode 100644 paas2/esb/components/confapis/bscp/apidocs/zh_hans/get_variable_list.md create mode 100644 paas2/esb/components/confapis/bscp/apidocs/zh_hans/update_variable.md create mode 100644 paas2/esb/components/confapis/cc/apidocs/en/find_host_relations_with_topo.md delete mode 100644 paas2/esb/components/confapis/cc/apidocs/en/list_biz_host_process_relation.md create mode 100644 paas2/esb/components/confapis/cc/apidocs/en/list_host_detail_topology.md create mode 100644 paas2/esb/components/confapis/cc/apidocs/en/list_service_template_difference.md rename paas2/esb/components/{bk/apisv2/cc/apidocs/en/delete_custom_query.md => confapis/cc/apidocs/en/transfer_host_to_recyclemodule.md} (66%) create mode 100644 paas2/esb/components/confapis/cc/apidocs/zh_hans/find_host_relations_with_topo.md delete mode 100644 paas2/esb/components/confapis/cc/apidocs/zh_hans/list_biz_host_process_relation.md create mode 100644 paas2/esb/components/confapis/cc/apidocs/zh_hans/list_host_detail_topology.md delete mode 100644 paas2/esb/components/confapis/cc/apidocs/zh_hans/list_service_template_detail.md create mode 100644 paas2/esb/components/confapis/cc/apidocs/zh_hans/list_service_template_difference.md rename paas2/esb/components/{bk/apisv2/cc/apidocs/zh_hans/delete_custom_query.md => confapis/cc/apidocs/zh_hans/transfer_host_to_recyclemodule.md} (64%) diff --git a/paas2/VERSION b/paas2/VERSION index ffbe9e227..420fbec6f 100644 --- a/paas2/VERSION +++ b/paas2/VERSION @@ -1 +1 @@ -2.12.9 +2.12.10 diff --git a/paas2/esb/components/bk/apisv2/cc/apidocs/en/create_custom_query.md b/paas2/esb/components/bk/apisv2/cc/apidocs/en/create_custom_query.md deleted file mode 100644 index 297beffc8..000000000 --- a/paas2/esb/components/bk/apisv2/cc/apidocs/en/create_custom_query.md +++ /dev/null @@ -1,68 +0,0 @@ -### Functional description - -create customize query - -### Request Parameters - -{{ common_args_desc }} - -#### Interface Parameters - -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_supplier_account | string | No | supplier account code | -| bk_biz_id | int | Yes | Business ID | -| info | string | Yes | common search query parameters | -| name | string | Yes | the name of user api | - -#### info - -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_obj_id | string | No | object name, it can be biz,set,module,host,object | -| fields | array | No | fields output | -| condition | array | No | search condition | - -#### info.condition.condition - -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| field | string | No | field of object | -| operator | string | No | $eq is equal,$in is belongs, $nin is not belong,$neq is not equal | -| value | string | No | the value of field | - -### Request Parameters Example - -```python -{ - "bk_app_code": "esb_test", - "bk_app_secret": "xxx", - "bk_token": "xxx", - "bk_supplier_account": "123456789", - "bk_biz_id": 1, - "info": "{\"condition\":[{\"bk_obj_id\":\"biz\",\"condition\":[{\"field\":\"default\",\"operator\":\"$ne\",\"value\":1}],\"fields\":[]},{\"bk_obj_id\":\"set\",\"condition\":[],\"fields\":[]},{\"bk_obj_id\":\"module\",\"condition\":[],\"fields\":[]},{\"bk_obj_id\":\"host\",\"condition\":[{\"field\":\"bk_host_innerip\",\"operator\":\"$eq\",\"value\":\"127.0.0.1\"}],\"fields\":[\"bk_host_innerip\",\"bk_host_outerip\",\"bk_agent_status\"]}]}", - "name": "api1" -} -``` - -### Return Result Example - -```python - -{ - "result": true, - "code": 0, - "message": "", - "data": { - "id": "b80nu3dmjrccd9i5r1eg" - } -} -``` - -### Return Result Parameters Description - -#### data - -| Field | Type | Description | -|-----------|-----------|-----------| -| id | string | Primary key ID | diff --git a/paas2/esb/components/bk/apisv2/cc/apidocs/en/delete_business.md b/paas2/esb/components/bk/apisv2/cc/apidocs/en/delete_business.md deleted file mode 100644 index d789a537c..000000000 --- a/paas2/esb/components/bk/apisv2/cc/apidocs/en/delete_business.md +++ /dev/null @@ -1,38 +0,0 @@ -### Functional description - -Delete business - -### Request Parameters - -{{ common_args_desc }} - -#### Interface Parameters - -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_supplier_account | string | No | supplier account code | -| bk_biz_id | int | Yes | the business id | - -### Request Parameters Example - -```python -{ - "bk_app_code": "esb_test", - "bk_app_secret": "xxx", - "bk_token": "xxx", - "bk_supplier_account": "123456789", - "bk_biz_id": 1 -} -``` - -### Return Result Example - -```python - -{ - "result": true, - "code": 0, - "message": "", - "data": {} -} -``` diff --git a/paas2/esb/components/bk/apisv2/cc/apidocs/en/get_custom_query_data.md b/paas2/esb/components/bk/apisv2/cc/apidocs/en/get_custom_query_data.md deleted file mode 100644 index 4afc5d425..000000000 --- a/paas2/esb/components/bk/apisv2/cc/apidocs/en/get_custom_query_data.md +++ /dev/null @@ -1,86 +0,0 @@ -### Functional description - -get customize query data - -### Request Parameters - -{{ common_args_desc }} - -#### Interface Parameters - -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_supplier_account | string | No | supplier account code | -| bk_biz_id | int | Yes | Business ID | -| id | string | Yes | Primary key ID | -| start | int | Yes | start record | -| limit | int | Yes | page limit, max is 200 | - -### Request Parameters Example - -```python -{ - "bk_app_code": "esb_test", - "bk_app_secret": "xxx", - "bk_token": "xxx", - "bk_supplier_account": "123456789", - "bk_biz_id": 1, - "id": "xxx", - "start": 0, - "limit": 10 -} -``` - -### Return Result Example - -```python - -{ - "result": true, - "code": 0, - "message": "", - "data": { - "count": 1, - "info": [ - { - "biz": { - "bk_biz_id": 1, - "bk_biz_name": "test", - "bk_biz_maintainer": "admin", - "bk_biz_productor": "admin" - }, - "host": { - "bk_host_id": 1, - "bk_host_name": "nginx-1", - "bk_host_innerip": "10.0.0.1", - "bk_cloud_id": 0 - }, - "module": { - "bk_module_name": "module-test" - }, - "set": { - "bk_set_name": "set-test" - } - } - ] - } -} -``` - -### Return Result Parameters Description - -#### data - -| Field | Type | Description | -|-----------|-----------|-----------| -| count | int | the num of record | -| info | array | host data | - -#### data.info - -| Field | Type | Description | -|-----------|-----------|-----------| -| biz | dict | host biz info | -| set | dict | host set info | -| module | dict | host module info | -| host | dict | host attr info | diff --git a/paas2/esb/components/bk/apisv2/cc/apidocs/en/get_custom_query_detail.md b/paas2/esb/components/bk/apisv2/cc/apidocs/en/get_custom_query_detail.md deleted file mode 100644 index 862253263..000000000 --- a/paas2/esb/components/bk/apisv2/cc/apidocs/en/get_custom_query_detail.md +++ /dev/null @@ -1,80 +0,0 @@ -### Functional description - -get customize query detail - -### Request Parameters - -{{ common_args_desc }} - -#### Interface Parameters - -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_supplier_account | string | No | supplier account code | -| bk_biz_id | int | Yes | Business ID | -| id | string | Yes | Primary key ID | - -### Request Parameters Example - -```python -{ - "bk_app_code": "esb_test", - "bk_app_secret": "xxx", - "bk_token": "xxx", - "bk_supplier_account": "123456789", - "bk_biz_id": 1, - "id": "xxx" -} -``` - -### Return Result Example - -```python - -{ - "result": true, - "code": 0, - "message": "", - "data": { - "bk_biz_id": 1, - "name": "api1", - "id": "bacfet4kd42325venmcg", - "info": "{\"condition\":[{\"bk_obj_id\":\"biz\",\"condition\":[{\"field\":\"default\",\"operator\":\"$ne\",\"value\":1}],\"fields\":[]},{\"bk_obj_id\":\"set\",\"condition\":[],\"fields\":[]},{\"bk_obj_id\":\"module\",\"condition\":[],\"fields\":[]},{\"bk_obj_id\":\"host\",\"condition\":[{\"field\":\"bk_host_innerip\",\"operator\":\"$eq\",\"value\":\"127.0.0.1\"}],\"fields\":[\"bk_host_innerip\",\"bk_host_outerip\",\"bk_agent_status\"]}]}", - "create_user": "admin", - "create_time": "2018-03-27T16:22:43.271+08:00", - "modify_user": "admin", - "last_time": "2018-03-27T16:29:26.428+08:00" - } -} -``` - -### Return Result Parameters Description - -#### data - -| Field | Type | Description | -|-----------|-----------|-----------| -| bk_biz_id | int | Business ID | -| create_time | string | create time | -| create_user | string | creator | -| id | string | Primary key ID | -| info | string | the query info | -| last_time | string | last update time | -| modify_user | string | modify user | -| name | string | the name of api | - -#### data.info - -| Field | Type | Description | -|-----------|------------|--------|------------| -| bk_obj_id | string | object name, it can be biz,set,module,host,object | -| fields | array | fields output | -| condition | array | search condition | - -#### data.info.condition - -| Field | Type | Description | -|-----------|------------|--------|------------| -| field | string | field of object | -| operator | string | $eq is equal,$in is belongs, $nin is not belong,$neq is not equal | -| value | string | the value of field | diff --git a/paas2/esb/components/bk/apisv2/cc/apidocs/en/search_custom_query.md b/paas2/esb/components/bk/apisv2/cc/apidocs/en/search_custom_query.md deleted file mode 100644 index cfbe7b361..000000000 --- a/paas2/esb/components/bk/apisv2/cc/apidocs/en/search_custom_query.md +++ /dev/null @@ -1,98 +0,0 @@ -### Functional description - -search customize query - -### Request Parameters - -{{ common_args_desc }} - -#### Interface Parameters - -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_supplier_account | string | No | supplier account code | -| bk_biz_id | int | Yes | Business ID | -| condition | dict | No | search condition | -| start | int | Yes | start record | -| limit | int | Yes | page limit, max is 200 | - -### Request Parameters Example - -```python -{ - "bk_app_code": "esb_test", - "bk_app_secret": "xxx", - "bk_token": "xxx", - "bk_supplier_account": "123456789", - "bk_biz_id": 1, - "condition": { - "name": "api1" - }, - "start": 0, - "limit": 200 -} -``` - -### Return Result Example - -```python - -{ - "result": true, - "code": 0, - "message": "", - "data": { - "count": 1, - "info": [ - { - "bk_biz_id": 1, - "id": "bacfet4kd42325venmcg", - "name": "api1", - "info": "{\"condition\":[{\"bk_obj_id\":\"biz\",\"condition\":[{\"field\":\"default\",\"operator\":\"$ne\",\"value\":1}],\"fields\":[]},{\"bk_obj_id\":\"set\",\"condition\":[],\"fields\":[]},{\"bk_obj_id\":\"module\",\"condition\":[],\"fields\":[]},{\"bk_obj_id\":\"host\",\"condition\":[{\"field\":\"bk_host_innerip\",\"operator\":\"$eq\",\"value\":\"127.0.0.1\"}],\"fields\":[\"bk_host_innerip\",\"bk_host_outerip\",\"bk_agent_status\"]}]}", - "create_user": "admin", - "create_time": "2018-03-27T16:22:43.271+08:00", - "modify_user": "admin", - "last_time": "2018-03-27T16:29:26.428+08:00" - } - ] - } -} -``` - -### Return Result Parameters Description - -#### data - -| Field | Type | Description | -|-----------|-----------|-----------| -| count | int | the num of record | -| info | array | detail of record | - -#### data.info - -| Field | Type | Description | -|-----------|-----------|-----------| -| bk_biz_id | int | Business ID | -| create_time | string | create time | -| create_user | string | creator | -| id | string | Primary key ID | -| info | string | the query info | -| last_time | string | last update time | -| modify_user | string | modify user | -| name | string | the name of api | - -#### data.info.info - -| Field | Type | Description | -|-----------|------------|--------|------------| -| bk_obj_id | string | object name, it can be biz,set,module,host,object | -| fields | array | fields output | -| condition | array | search condition | - -#### data.info.info.condition - -| Field | Type | Description | -|-----------|------------|--------|------------| -| field | string | field of object | -| operator | string | $eq is equal,$in is belongs, $nin is not belong,$neq is not equal | -| value | string | the value of field | diff --git a/paas2/esb/components/bk/apisv2/cc/apidocs/en/search_host.md b/paas2/esb/components/bk/apisv2/cc/apidocs/en/search_host.md deleted file mode 100644 index 587bb9c8e..000000000 --- a/paas2/esb/components/bk/apisv2/cc/apidocs/en/search_host.md +++ /dev/null @@ -1,230 +0,0 @@ -### Functional description - -search host by condition, going offline, please do not use it - -### Request Parameters - -{{ common_args_desc }} - -#### Interface Parameters - -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_supplier_account | string | No | supplier account code | -| bk_biz_id | int | No | Business ID | -| ip | dict | No | ip condition | -| condition | array | No | comb condition | -| page | dict | No | search condition | -| pattern | string | No | search by pattern condition | - -#### ip - -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| data | array | No | ip list for search | -| exact | int | No | is the exact query | -| flag | string | No | bk_host_innerip match lan ip, bk_host_outerip match wan ip | - -#### condition - -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_obj_id | string | No | object name, it can be biz,set,module,host,object | -| fields | array | No | fields output | -| condition | array | No | search condition | - -#### condition.condition - -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| field | string | No | field of object | -| operator | string | No | $eq is equal,$in is belongs, $nin is not belong,$ne is not equal | -| value | string | No | the value of field | - -#### page - -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| start | int | Yes | start record | -| limit | int | Yes | page limit, max is 200 | -| sort | string | No | the field for sort | - -### Request Parameters Example - -```python -{ - "bk_app_code": "esb_test", - "bk_app_secret": "xxx", - "bk_token": "xxx", - "bk_supplier_account": "123456789", - "ip": { - "data": [], - "exact": 1, - "flag": "bk_host_innerip|bk_host_outerip" - }, - "condition": [ - { - "bk_obj_id": "host", - "fields": [], - "condition": [] - }, - { - "bk_obj_id":"module", - "fields":[], - "condition":[] - }, - { - "bk_obj_id":"set", - "fields":[], - "condition":[] - }, - { - "bk_obj_id":"biz", - "fields":[], - "condition":[] - }, - { - "bk_obj_id": "object", - "fields": [], - "condition": [ - { - "field": "bk_inst_id", - "operator": "$eq", - "value": 76 - } - ] - } - ], - "page": { - "start": 0, - "limit": 10, - "sort": "bk_host_id" - }, - "pattern": "" -} -``` - -### Return Result Example - -```python - -{ - "result": true, - "code": 0, - "message": "success", - "data": { - "count": 1, - "info": [ - { - "host": { - "bk_cpu": 8, - "bk_os_name": "linux centos", - "bk_host_id": 11, - "import_from": "", - "bk_os_version": "7.2", - "bk_disk": 1789, - "operator": null, - "create_time": "2018-03-22T16:52:53.239+08:00", - "bk_mem": 7843, - "bk_host_name": "test-1", - "bk_host_innerip": "10.0.0.1", - "bk_comment": "", - "bk_os_bit": "64-bit", - "bk_outer_mac": "", - "bk_childid": null, - "bk_input_from": "agent", - "bk_asset_id": "", - "bk_service_term": null, - "bk_cloud_id": [ - { - "bk_obj_name": "", - "id": "0", - "bk_obj_id": "plat", - "bk_obj_icon": "", - "bk_inst_id": 0, - "bk_inst_name": "default area" - } - ], - "bk_sla": "", - "bk_cpu_mhz": 2534, - "bk_host_outerip": "", - "bk_os_type": "1", - "bk_mac": "00:00:00:00:00:00", - "bk_bak_operator": null, - "bk_sn": "", - "bk_cpu_module": "Intel(R)" - }, - "set": [ - { - "bk_biz_id": 2, - "bk_service_status": "1", - "description": "", - "bk_set_env": "1", - "default": 0, - "bk_parent_id": 35, - "bk_capacity": null, - "bk_set_id": 3, - "create_time": "2018-06-06T20:53:53.591+08:00", - "bk_supplier_account": "123456789", - "bk_set_name": "test", - "bk_set_desc": "", - "last_time": "2018-06-13T14:20:20.149+08:00" - } - ], - "biz": [ - { - "bk_biz_id": 2, - "language": "1", - "life_cycle": "1", - "bk_biz_developer": "", - "bk_biz_maintainer": "admin", - "bk_biz_tester": "admin", - "time_zone": "Asia/Shanghai", - "default": 0, - "create_time": "2018-03-22T15:49:57.319+08:00", - "bk_biz_productor": "admin", - "bk_supplier_account": "123456789", - "operator": "", - "bk_biz_name": "test", - "last_time": "2018-06-05T15:03:55.699+08:00" - } - ], - "module": [ - { - "bk_biz_id": 2, - "bk_module_id": 38, - "default": 0, - "bk_bak_operator": "", - "create_time": "2018-03-26T16:56:59.486+08:00", - "bk_module_name": "test_1", - "bk_supplier_account": "123456789", - "operator": "admin", - "bk_set_id": 3, - "bk_parent_id": 3, - "last_time": "2018-03-26T16:56:59.486+08:00", - "bk_module_type": "1" - } - ] - } - ] - } -} -``` - -### Return Result Parameters Description - -#### data - -| Field | Type | Description | -|-----------|-----------|-----------| -| count | int | the num of record | -| info | array | host data | - -#### data.info - -| Field | Type | Description | -|-----------|-----------|-----------| -| biz | array | host biz info | -| set | array | host set info | -| module | array | host module info | -| host | dict | host attr info | diff --git a/paas2/esb/components/bk/apisv2/cc/apidocs/en/update_custom_query.md b/paas2/esb/components/bk/apisv2/cc/apidocs/en/update_custom_query.md deleted file mode 100644 index 2152a8618..000000000 --- a/paas2/esb/components/bk/apisv2/cc/apidocs/en/update_custom_query.md +++ /dev/null @@ -1,60 +0,0 @@ -### Functional description - -update customize query - -### Request Parameters - -{{ common_args_desc }} - -#### Interface Parameters - -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_supplier_account | string | No | supplier account code | -| bk_biz_id | int | Yes | Business ID | -| id | string | Yes | Primary key ID | -| info | string | No | common search query parameters | -| name | string | No | the name of user api | - -#### info - -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_obj_id | string | No | object name, it can be biz,set,module,host,object | -| fields | array | No | fields output | -| condition | array | No | search condition | - -#### info.condition.condition - -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| field | string | No | field of object | -| operator | string | No | $eq is equal,$in is belongs, $nin is not belong,$neq is not equal | -| value | string | No | the value of field | - -### Request Parameters Example - -```python -{ - "bk_app_code": "esb_test", - "bk_app_secret": "xxx", - "bk_token": "xxx", - "bk_supplier_account": "123456789", - "bk_biz_id": 1, - "id": "xxx", - "info": "{\"condition\":[{\"bk_obj_id\":\"biz\",\"condition\":[{\"field\":\"default\",\"operator\":\"$ne\",\"value\":1}],\"fields\":[]},{\"bk_obj_id\":\"set\",\"condition\":[],\"fields\":[]},{\"bk_obj_id\":\"module\",\"condition\":[],\"fields\":[]},{\"bk_obj_id\":\"host\",\"condition\":[{\"field\":\"bk_host_innerip\",\"operator\":\"$eq\",\"value\":\"127.0.0.1\"}],\"fields\":[\"bk_host_innerip\",\"bk_host_outerip\",\"bk_agent_status\"]}]}", - "name": "api1" -} -``` - -### Return Result Example - -```python - -{ - "result": true, - "code": 0, - "message": "", - "data": {} -} -``` diff --git a/paas2/esb/components/bk/apisv2/cc/apidocs/en/update_object_topo_graphics.md b/paas2/esb/components/bk/apisv2/cc/apidocs/en/update_object_topo_graphics.md deleted file mode 100644 index d9a928d7b..000000000 --- a/paas2/esb/components/bk/apisv2/cc/apidocs/en/update_object_topo_graphics.md +++ /dev/null @@ -1,74 +0,0 @@ -### Functional description - -update a topo graphics - -### Request Parameters - -{{ common_args_desc }} - -#### Interface Parameters - -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_supplier_account | string | No | supplier account code | -| scope_type | string | Yes | the graphical scope type, could be global, biz, cls | -| scope_id | string | Yes | the id under the graphical scope, should be 0 when socope type is global | -| action | string | Yes | modify action, could be update--only update the specified node, override--override the graphics with the specified node | -| data | list | No | update data | - -#### data - -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| node_type | string | Yes | node type, could be obj, inst | -| bk_obj_id | string | Yes | the object identifier | -| bk_inst_id | int | Yes | the inst ID | -| position | dict | No | the node position in the graphics | -| ext | dict | No | the extention field for frondend | -| bk_obj_icon | string | No | the object icon | - - -**Note**: - -- scope_type,scope_id uniquely determined a graphics - -- node_type,bk_obj_id,bk_inst_id, the three uniquely determine one node of each graph, so it is required - -### Request Parameters Example - -```python -{ - "bk_app_code": "esb_test", - "bk_app_secret": "xxx", - "bk_token": "xxx", - "bk_supplier_account": "123456789", - "scope_type": "global", - "scope_id": 0, - "action": "update", - "data": [ - { - "node_type": "obj", - "bk_obj_id": "switch", - "bk_inst_id": 0, - "position": { - "x": 100, - "y": 100 - }, - "ext": {}, - "bk_obj_icon": "icon-cc-switch2" - } - ] -} -``` - -### Return Result Example - -```python - -{ - "result": true, - "code": 0, - "message": "success", - "data": "success" -} -``` diff --git a/paas2/esb/components/bk/apisv2/cc/apidocs/zh_hans/create_custom_query.md b/paas2/esb/components/bk/apisv2/cc/apidocs/zh_hans/create_custom_query.md deleted file mode 100644 index 7c65aea41..000000000 --- a/paas2/esb/components/bk/apisv2/cc/apidocs/zh_hans/create_custom_query.md +++ /dev/null @@ -1,68 +0,0 @@ -### 功能描述 - -添加自定义查询 - -### 请求参数 - -{{ common_args_desc }} - -#### 接口参数 - -| 字段 | 类型 | 必选 | 描述 | -|-----------|------------|--------|------------| -| bk_supplier_account | string | 否 | 开发商账号 | -| bk_biz_id | int | 是 | 业务ID | -| info | string | 是 | 通用查询条件 | -| name | string | 是 | 收藏的名称 | - -#### info - -| 字段 | 类型 | 必选 | 描述 | -|-----------|------------|--------|------------| -| bk_obj_id | string | 否 | 对象名,可以为biz,set,module,host,object | -| fields | array | 否 | 查询输出字段 | -| condition | array | 否 | 查询条件 | - -#### info.condition.condition - -| 字段 | 类型 | 必选 | 描述 | -|-----------|------------|--------|------------| -| field | string | 否 | 对象的字段 | -| operator | string | 否 | 操作符, $eq为相等,$ne为不等,$in为属于,$nin为不属于 | -| value | string | 否 | 字段对应的值 | - -### 请求参数示例 - -```python -{ - "bk_app_code": "esb_test", - "bk_app_secret": "xxx", - "bk_token": "xxx", - "bk_supplier_account": "123456789", - "bk_biz_id": 1, - "info": "{\"condition\":[{\"bk_obj_id\":\"biz\",\"condition\":[{\"field\":\"default\",\"operator\":\"$ne\",\"value\":1}],\"fields\":[]},{\"bk_obj_id\":\"set\",\"condition\":[],\"fields\":[]},{\"bk_obj_id\":\"module\",\"condition\":[],\"fields\":[]},{\"bk_obj_id\":\"host\",\"condition\":[{\"field\":\"bk_host_innerip\",\"operator\":\"$eq\",\"value\":\"127.0.0.1\"}],\"fields\":[\"bk_host_innerip\",\"bk_host_outerip\",\"bk_agent_status\"]}]}", - "name": "api1" -} -``` - -### 返回结果示例 - -```python - -{ - "result": true, - "code": 0, - "message": "", - "data": { - "id": "b80nu3dmjrccd9i5r1eg" - } -} -``` - -### 返回结果参数说明 - -#### data - -| 字段 | 类型 | 描述 | -|-----------|-----------|-----------| -| id | string | 自定义查询主键ID | diff --git a/paas2/esb/components/bk/apisv2/cc/apidocs/zh_hans/delete_business.md b/paas2/esb/components/bk/apisv2/cc/apidocs/zh_hans/delete_business.md deleted file mode 100644 index 0fe68c11e..000000000 --- a/paas2/esb/components/bk/apisv2/cc/apidocs/zh_hans/delete_business.md +++ /dev/null @@ -1,38 +0,0 @@ -### 功能描述 - -删除业务 - -### 请求参数 - -{{ common_args_desc }} - -#### 接口参数 - -| 字段 | 类型 | 必选 | 描述 | -|-----------|------------|--------|------------| -| bk_supplier_account | string | 否 | 开发商账号 | -| bk_biz_id | int | 是 | 业务id | - -### 请求参数示例 - -```python -{ - "bk_app_code": "esb_test", - "bk_app_secret": "xxx", - "bk_token": "xxx", - "bk_supplier_account": "123456789", - "bk_biz_id": 1 -} -``` - -### 返回结果示例 - -```python - -{ - "result": true, - "code": 0, - "message": "", - "data": {} -} -``` diff --git a/paas2/esb/components/bk/apisv2/cc/apidocs/zh_hans/get_custom_query_data.md b/paas2/esb/components/bk/apisv2/cc/apidocs/zh_hans/get_custom_query_data.md deleted file mode 100644 index 4c9a1a575..000000000 --- a/paas2/esb/components/bk/apisv2/cc/apidocs/zh_hans/get_custom_query_data.md +++ /dev/null @@ -1,86 +0,0 @@ -### 功能描述 - -根据自定义查询获取数据 - -### 请求参数 - -{{ common_args_desc }} - -#### 接口参数 - -| 字段 | 类型 | 必选 | 描述 | -|-----------|------------|--------|------------| -| bk_supplier_account | string | 否 | 开发商账号 | -| bk_biz_id | int | 是 | 业务ID | -| id | string | 是 | 主键ID | -| start | int | 是 | 记录开始位置 | -| limit | int | 是 | 每页限制条数,最大200 | - -### 请求参数示例 - -```python -{ - "bk_app_code": "esb_test", - "bk_app_secret": "xxx", - "bk_token": "xxx", - "bk_supplier_account": "123456789", - "bk_biz_id": 1, - "id": "xxx", - "start": 0, - "limit": 10 -} -``` - -### 返回结果示例 - -```python - -{ - "result": true, - "code": 0, - "message": "", - "data": { - "count": 1, - "info": [ - { - "biz": { - "bk_biz_id": 1, - "bk_biz_name": "test", - "bk_biz_maintainer": "admin", - "bk_biz_productor": "admin" - }, - "host": { - "bk_host_id": 1, - "bk_host_name": "nginx-1", - "bk_host_innerip": "10.0.0.1", - "bk_cloud_id": 0 - }, - "module": { - "bk_module_name": "module-test" - }, - "set": { - "bk_set_name": "set-test" - } - } - ] - } -} -``` - -### 返回结果参数说明 - -#### data - -| 字段 | 类型 | 描述 | -|-----------|-----------|-----------| -| count | int | 记录条数 | -| info | array | 主机实际数据 | - -#### data.info - -| 字段 | 类型 | 描述 | -|-----------|-----------|-----------| -| biz | dict | 主机所属的业务信息 | -| set | dict | 主机所属的集群信息 | -| module | dict | 主机所属的模块信息 | -| host | dict | 主机自身属性 | diff --git a/paas2/esb/components/bk/apisv2/cc/apidocs/zh_hans/get_custom_query_detail.md b/paas2/esb/components/bk/apisv2/cc/apidocs/zh_hans/get_custom_query_detail.md deleted file mode 100644 index 244bc2735..000000000 --- a/paas2/esb/components/bk/apisv2/cc/apidocs/zh_hans/get_custom_query_detail.md +++ /dev/null @@ -1,80 +0,0 @@ -### 功能描述 - -获取自定义查询详情 - -### 请求参数 - -{{ common_args_desc }} - -#### 接口参数 - -| 字段 | 类型 | 必选 | 描述 | -|-----------|------------|--------|------------| -| bk_supplier_account | string | 否 | 开发商账号 | -| bk_biz_id | int | 是 | 业务ID | -| id | string | 是 | 主键ID | - -### 请求参数示例 - -```python -{ - "bk_app_code": "esb_test", - "bk_app_secret": "xxx", - "bk_token": "xxx", - "bk_supplier_account": "123456789", - "bk_biz_id": 1, - "id": "xxx" -} -``` - -### 返回结果示例 - -```python - -{ - "result": true, - "code": 0, - "message": "", - "data": { - "bk_biz_id": 1, - "name": "api1", - "id": "bacfet4kd42325venmcg", - "info": "{\"condition\":[{\"bk_obj_id\":\"biz\",\"condition\":[{\"field\":\"default\",\"operator\":\"$ne\",\"value\":1}],\"fields\":[]},{\"bk_obj_id\":\"set\",\"condition\":[],\"fields\":[]},{\"bk_obj_id\":\"module\",\"condition\":[],\"fields\":[]},{\"bk_obj_id\":\"host\",\"condition\":[{\"field\":\"bk_host_innerip\",\"operator\":\"$eq\",\"value\":\"127.0.0.1\"}],\"fields\":[\"bk_host_innerip\",\"bk_host_outerip\",\"bk_agent_status\"]}]}", - "create_user": "admin", - "create_time": "2018-03-27T16:22:43.271+08:00", - "modify_user": "admin", - "last_time": "2018-03-27T16:29:26.428+08:00" - } -} -``` - -### 返回结果参数说明 - -#### data - -| 字段 | 类型 | 描述 | -|-----------|-----------|-----------| -| bk_biz_id | int | 业务ID | -| create_time | string | 创建时间 | -| create_user | string | 创建者 | -| id | string | 自定义查询主键ID | -| info | string | 自定义查询信息 | -| last_time | string | 更新时间 | -| modify_user | string | 修改者 | -| name | string | 自定义查询命名 | - -#### data.info - -| 字段 | 类型 | 描述 | -|-----------|------------|--------|------------| -| bk_obj_id | string | 对象名,可以为biz,set,module,host,object | -| fields | array | 查询输出字段 | -| condition | array | 查询条件 | - -#### data.info.condition - -| 字段 | 类型 | 描述 | -|-----------|------------|--------|------------| -| field | string | 对象的字段 | -| operator | string | 操作符, $eq为相等,$ne为不等,$in为属于,$nin为不属于 | -| value | string | 字段对应的值 | diff --git a/paas2/esb/components/bk/apisv2/cc/apidocs/zh_hans/search_custom_query.md b/paas2/esb/components/bk/apisv2/cc/apidocs/zh_hans/search_custom_query.md deleted file mode 100644 index e387e5397..000000000 --- a/paas2/esb/components/bk/apisv2/cc/apidocs/zh_hans/search_custom_query.md +++ /dev/null @@ -1,98 +0,0 @@ -### 功能描述 - -查询自定义查询 - -### 请求参数 - -{{ common_args_desc }} - -#### 接口参数 - -| 字段 | 类型 | 必选 | 描述 | -|-----------|------------|--------|------------| -| bk_supplier_account | string | 否 | 开发商账号 | -| bk_biz_id | int | 是 | 业务ID | -| condition | dict | 否 | 查询条件,condition 字段为自定义查询的属性字段, 可以是create_user,modify_user, name | -| start | int | 是 | 记录开始位置 | -| limit | int | 是 | 每页限制条数,最大200 | - -### 请求参数示例 - -```python -{ - "bk_app_code": "esb_test", - "bk_app_secret": "xxx", - "bk_token": "xxx", - "bk_supplier_account": "123456789", - "bk_biz_id": 1, - "condition": { - "name": "api1" - }, - "start": 0, - "limit": 200 -} -``` - -### 返回结果示例 - -```python - -{ - "result": true, - "code": 0, - "message": "", - "data": { - "count": 1, - "info": [ - { - "bk_biz_id": 1, - "id": "bacfet4kd42325venmcg", - "name": "api1", - "info": "{\"condition\":[{\"bk_obj_id\":\"biz\",\"condition\":[{\"field\":\"default\",\"operator\":\"$ne\",\"value\":1}],\"fields\":[]},{\"bk_obj_id\":\"set\",\"condition\":[],\"fields\":[]},{\"bk_obj_id\":\"module\",\"condition\":[],\"fields\":[]},{\"bk_obj_id\":\"host\",\"condition\":[{\"field\":\"bk_host_innerip\",\"operator\":\"$eq\",\"value\":\"127.0.0.1\"}],\"fields\":[\"bk_host_innerip\",\"bk_host_outerip\",\"bk_agent_status\"]}]}", - "create_user": "admin", - "create_time": "2018-03-27T16:22:43.271+08:00", - "modify_user": "admin", - "last_time": "2018-03-27T16:29:26.428+08:00" - } - ] - } -} -``` - -### 返回结果参数说明 - -#### data - -| 字段 | 类型 | 描述 | -|-----------|-----------|-----------| -| count | int | 记录条数 | -| info | array | 自定义查询数据 | - -#### data.info - -| 字段 | 类型 | 描述 | -|-----------|-----------|-----------| -| bk_biz_id | int | 业务ID | -| create_time | string | 创建时间 | -| create_user | string | 创建者 | -| id | string | 自定义查询主键ID | -| info | string | 自定义查询信息 | -| last_time | string | 更新时间 | -| modify_user | string | 修改者 | -| name | string | 自定义查询命名 | - -#### data.info.info - -| 字段 | 类型 | 描述 | -|-----------|------------|--------|------------| -| bk_obj_id | string | 对象名,可以为biz,set,module,host,object | -| fields | array | 查询输出字段 | -| condition | array | 查询条件 | - -#### data.info.info.condition - -| 字段 | 类型 | 描述 | -|-----------|------------|--------|------------| -| field | string | 对象的字段 | -| operator | string | 操作符, $eq为相等,$ne为不等,$in为属于,$nin为不属于 | -| value | string | 字段对应的值 | diff --git a/paas2/esb/components/bk/apisv2/cc/apidocs/zh_hans/search_host.md b/paas2/esb/components/bk/apisv2/cc/apidocs/zh_hans/search_host.md deleted file mode 100644 index 229b50a30..000000000 --- a/paas2/esb/components/bk/apisv2/cc/apidocs/zh_hans/search_host.md +++ /dev/null @@ -1,230 +0,0 @@ -### 功能描述 - -根据条件查询主机,即将下线,请勿使用 - -### 请求参数 - -{{ common_args_desc }} - -#### 接口参数 - -| 字段 | 类型 | 必选 | 描述 | -|-----------|------------|--------|------------| -| bk_supplier_account | string | 否 | 开发商账号 | -| bk_biz_id | int | 否 | 业务ID | -| ip | dict | 否 | 主机ip列表 | -| condition | array | 否 | 组合条件 | -| page | dict | 否 | 查询条件 | -| pattern | string | 否 | 按表达式搜索 | - -#### ip - -| 字段 | 类型 | 必选 | 描述 | -|-----------|------------|--------|------------| -| data | array | 否 | ip 数组 | -| exact | int | 否 | 是否根据ip精确搜索 | -| flag | string | 否 | bk_host_innerip只匹配内网ip,bk_host_outerip只匹配外网ip, bk_host_innerip,bk_host_outerip同时匹配 | - -#### condition - -| 字段 | 类型 | 必选 | 描述 | -|-----------|------------|--------|------------| -| bk_obj_id | string | 否 | 对象名,可以为biz,set,module,host,object | -| fields | array | 否 | 查询输出字段 | -| condition | array | 否 | 查询条件 | - -#### condition.condition - -| 字段 | 类型 | 必选 | 描述 | -|-----------|------------|--------|------------| -| field | string | 否 | 对象的字段 | -| operator | string | 否 | 操作符, $eq为相等,$ne为不等,$in为属于,$nin为不属于 | -| value | string | 否 | 字段对应的值 | - -#### page - -| 字段 | 类型 | 必选 | 描述 | -|-----------|------------|--------|------------| -| start | int | 是 | 记录开始位置 | -| limit | int | 是 | 每页限制条数,最大200 | -| sort | string | 否 | 排序字段 | - -### 请求参数示例 - -```python -{ - "bk_app_code": "esb_test", - "bk_app_secret": "xxx", - "bk_token": "xxx", - "bk_supplier_account": "123456789", - "ip": { - "data": [], - "exact": 1, - "flag": "bk_host_innerip|bk_host_outerip" - }, - "condition": [ - { - "bk_obj_id": "host", - "fields": [], - "condition": [] - }, - { - "bk_obj_id":"module", - "fields":[], - "condition":[] - }, - { - "bk_obj_id":"set", - "fields":[], - "condition":[] - }, - { - "bk_obj_id":"biz", - "fields":[], - "condition":[] - }, - { - "bk_obj_id": "object", - "fields": [], - "condition": [ - { - "field": "bk_inst_id", - "operator": "$eq", - "value": 76 - } - ] - } - ], - "page": { - "start": 0, - "limit": 10, - "sort": "bk_host_id" - }, - "pattern": "" -} -``` - -### 返回结果示例 - -```python - -{ - "result": true, - "code": 0, - "message": "success", - "data": { - "count": 1, - "info": [ - { - "host": { - "bk_cpu": 8, - "bk_os_name": "linux centos", - "bk_host_id": 11, - "import_from": "", - "bk_os_version": "7.2", - "bk_disk": 1789, - "operator": null, - "create_time": "2018-03-22T16:52:53.239+08:00", - "bk_mem": 7843, - "bk_host_name": "test-1", - "bk_host_innerip": "10.0.0.1", - "bk_comment": "", - "bk_os_bit": "64-bit", - "bk_outer_mac": "", - "bk_childid": null, - "bk_input_from": "agent", - "bk_asset_id": "", - "bk_service_term": null, - "bk_cloud_id": [ - { - "bk_obj_name": "", - "id": "0", - "bk_obj_id": "plat", - "bk_obj_icon": "", - "bk_inst_id": 0, - "bk_inst_name": "default area" - } - ], - "bk_sla": "", - "bk_cpu_mhz": 2534, - "bk_host_outerip": "", - "bk_os_type": "1", - "bk_mac": "00:00:00:00:00:00", - "bk_bak_operator": null, - "bk_sn": "", - "bk_cpu_module": "Intel(R)" - }, - "set": [ - { - "bk_biz_id": 2, - "bk_service_status": "1", - "description": "", - "bk_set_env": "1", - "default": 0, - "bk_parent_id": 35, - "bk_capacity": null, - "bk_set_id": 3, - "create_time": "2018-06-06T20:53:53.591+08:00", - "bk_supplier_account": "123456789", - "bk_set_name": "test", - "bk_set_desc": "", - "last_time": "2018-06-13T14:20:20.149+08:00" - } - ], - "biz": [ - { - "bk_biz_id": 2, - "language": "1", - "life_cycle": "1", - "bk_biz_developer": "", - "bk_biz_maintainer": "admin", - "bk_biz_tester": "admin", - "time_zone": "Asia/Shanghai", - "default": 0, - "create_time": "2018-03-22T15:49:57.319+08:00", - "bk_biz_productor": "admin", - "bk_supplier_account": "123456789", - "operator": "", - "bk_biz_name": "test", - "last_time": "2018-06-05T15:03:55.699+08:00" - } - ], - "module": [ - { - "bk_biz_id": 2, - "bk_module_id": 38, - "default": 0, - "bk_bak_operator": "", - "create_time": "2018-03-26T16:56:59.486+08:00", - "bk_module_name": "test_1", - "bk_supplier_account": "123456789", - "operator": "admin", - "bk_set_id": 3, - "bk_parent_id": 3, - "last_time": "2018-03-26T16:56:59.486+08:00", - "bk_module_type": "1" - } - ] - } - ] - } -} -``` - -### 返回结果参数说明 - -#### data - -| 字段 | 类型 | 描述 | -|-----------|-----------|-----------| -| count | int | 记录条数 | -| info | array | 主机实际数据 | - -#### data.info - -| 字段 | 类型 | 描述 | -|-----------|-----------|-----------| -| biz | array | 主机所属的业务信息 | -| set | array | 主机所属的集群信息 | -| module | array | 主机所属的模块信息 | -| host | dict | 主机自身属性 | diff --git a/paas2/esb/components/bk/apisv2/cc/apidocs/zh_hans/update_custom_query.md b/paas2/esb/components/bk/apisv2/cc/apidocs/zh_hans/update_custom_query.md deleted file mode 100644 index 92cb78606..000000000 --- a/paas2/esb/components/bk/apisv2/cc/apidocs/zh_hans/update_custom_query.md +++ /dev/null @@ -1,60 +0,0 @@ -### 功能描述 - -更新自定义查询 - -### 请求参数 - -{{ common_args_desc }} - -#### 接口参数 - -| 字段 | 类型 | 必选 | 描述 | -|-----------|------------|--------|------------| -| bk_supplier_account | string | 否 | 开发商账号 | -| bk_biz_id | int | 是 | 业务ID | -| id | string | 是 | 主键ID | -| info | string | 否 | 通用查询条件 | -| name | string | 否 | 收藏的名称 | - -#### info - -| 字段 | 类型 | 必选 | 描述 | -|-----------|------------|--------|------------| -| bk_obj_id | string | 否 | 对象名,可以为biz,set,module,host,object | -| fields | array | 否 | 查询输出字段 | -| condition | array | 否 | 查询条件 | - -#### info.condition.condition - -| 字段 | 类型 | 必选 | 描述 | -|-----------|------------|--------|------------| -| field | string | 否 | 对象的字段 | -| operator | string | 否 | 操作符, $eq为相等,$ne为不等,$in为属于,$nin为不属于 | -| value | string | 否 | 字段对应的值 | - -### 请求参数示例 - -```python -{ - "bk_app_code": "esb_test", - "bk_app_secret": "xxx", - "bk_token": "xxx", - "bk_supplier_account": "123456789", - "bk_biz_id": 1, - "id": "xxx", - "info": "{\"condition\":[{\"bk_obj_id\":\"biz\",\"condition\":[{\"field\":\"default\",\"operator\":\"$ne\",\"value\":1}],\"fields\":[]},{\"bk_obj_id\":\"set\",\"condition\":[],\"fields\":[]},{\"bk_obj_id\":\"module\",\"condition\":[],\"fields\":[]},{\"bk_obj_id\":\"host\",\"condition\":[{\"field\":\"bk_host_innerip\",\"operator\":\"$eq\",\"value\":\"127.0.0.1\"}],\"fields\":[\"bk_host_innerip\",\"bk_host_outerip\",\"bk_agent_status\"]}]}", - "name": "api1" -} -``` - -### 返回结果示例 - -```python - -{ - "result": true, - "code": 0, - "message": "", - "data": {} -} -``` diff --git a/paas2/esb/components/bk/apisv2/cc/apidocs/zh_hans/update_object_topo_graphics.md b/paas2/esb/components/bk/apisv2/cc/apidocs/zh_hans/update_object_topo_graphics.md deleted file mode 100644 index 7ab2697f1..000000000 --- a/paas2/esb/components/bk/apisv2/cc/apidocs/zh_hans/update_object_topo_graphics.md +++ /dev/null @@ -1,74 +0,0 @@ -### 功能描述 - -更新拓扑图 - -### 请求参数 - -{{ common_args_desc }} - -#### 接口参数 - -| 字段 | 类型 | 必选 | 描述 | -|-----------|------------|--------|------------| -| bk_supplier_account | string | 否 | 开发商账号 | -| scope_type | string | 是 | 图形范围类型,可选global,biz,cls(当前只有global) | -| scope_id | string | 是 | 图形范围类型下的ID,如果为global,则填0 | -| action | string | 是 | 更新方法,可选update,override | -| data | list | 否 | 更新数据 | - -#### data - -| 字段 | 类型 | 必选 | 描述 | -|-----------|------------|--------|------------| -| node_type | string | 是 | 节点类型,可选obj,inst | -| bk_obj_id | string | 是 | 对象模型的ID | -| bk_inst_id | int | 是 | 实例ID | -| position | dict | 否 | 节点在图中的位置 | -| ext | dict | 否 | 前端扩展字段 | -| bk_obj_icon | string | 否 | 对象模型的图标 | - - -**注意**: - -- scope_type,scope_id 唯一确定一张图 - -- node_type,bk_obj_id,bk_inst_id 三者唯一确定每张图的一个节点,故必填 - -### 请求参数示例 - -```python -{ - "bk_app_code": "esb_test", - "bk_app_secret": "xxx", - "bk_token": "xxx", - "bk_supplier_account": "123456789", - "scope_type": "global", - "scope_id": 0, - "action": "update", - "data": [ - { - "node_type": "obj", - "bk_obj_id": "switch", - "bk_inst_id": 0, - "position": { - "x": 100, - "y": 100 - }, - "ext": {}, - "bk_obj_icon": "icon-cc-switch2" - } - ] -} -``` - -### 返回结果示例 - -```python - -{ - "result": true, - "code": 0, - "message": "success", - "data": "success" -} -``` diff --git a/paas2/esb/components/confapis/bk_log/bk_log.yaml b/paas2/esb/components/confapis/bk_log/bk_log.yaml index 0ba7adc4a..08d8765b7 100644 --- a/paas2/esb/components/confapis/bk_log/bk_log.yaml +++ b/paas2/esb/components/confapis/bk_log/bk_log.yaml @@ -2,7 +2,7 @@ - path: /v2/bk_log/esquery_search/ name: esquery_search - label: 日志系统索引集查询接口 + label: 日志平台索引集查询接口 label_en: bk_log index-set search api method: POST api_type: query @@ -68,9 +68,20 @@ dest_http_method: GET is_hidden: True +- path: /v2/bk_log/esquery_es_route/ + name: esquery_es_route + label: ES-获取集群信息 + label_en: ES-ROUTE api + method: GET + api_type: query + comp_codename: generic.v2.bk_log.bk_log_component + dest_path: /api/v1/esquery/es_route/ + dest_http_method: GET + is_hidden: True + - path: /v2/bk_log/search_index_set/ name: search_index_set - label: 日志系统-索引集列表 + label: 日志平台-索引集列表 label_en: bk_log index-set list api method: GET api_type: query @@ -81,7 +92,7 @@ - path: /v2/bk_log/search_index_set/{index_set_id}/fields/ name: index_set_fields - label: 日志系统-索引集字段 + label: 日志平台-索引集字段 label_en: bk_log index-set fields method: GET api_type: query @@ -92,7 +103,7 @@ - path: /v2/bk_log/search_index_set/operators/ name: search_operators - label: 日志系统-检索条件 + label: 日志平台-检索条件 label_en: bk_log search operators method: GET api_type: query @@ -103,7 +114,7 @@ - path: /v2/bk_log/create_index_set/ name: create_index_set - label: 日志系统-创建索引集 + label: 日志平台-创建索引集 label_en: bk_log create index-set method: POST api_type: query @@ -114,7 +125,7 @@ - path: /v2/bk_log/update_index_set/ name: update_index_set - label: 日志系统-更新索引集 + label: 日志平台-更新索引集 label_en: bk_log update index-set method: PUT api_type: query @@ -125,7 +136,7 @@ - path: /v2/bk_log/replace_index_set/ name: replace_index_set - label: 日志系统-创建或更新索引集 + label: 日志平台-创建或更新索引集 label_en: bk_log update or create index-set method: POST api_type: query @@ -133,3 +144,14 @@ dest_path: /api/v1/search/index_set/replace/ dest_http_method: POST is_hidden: True + +- path: /v2/bk_log/databus_collectors/{collector_config_id}/tail/ + name: databus_collector_tail + label: 日志平台-获取kafka采样 + label_en: bk_log get kafka tail + method: GET + api_type: query + comp_codename: generic.v2.bk_log.bk_log_component + dest_path: /api/v1/databus/collectors/{collector_config_id}/tail/ + dest_http_method: GET + is_hidden: True diff --git a/paas2/esb/components/confapis/bscp/apidocs/en/create_multi_commit_with_content.md b/paas2/esb/components/confapis/bscp/apidocs/en/create_multi_commit_with_content.md index eb40e3068..fa1db711f 100644 --- a/paas2/esb/components/confapis/bscp/apidocs/en/create_multi_commit_with_content.md +++ b/paas2/esb/components/confapis/bscp/apidocs/en/create_multi_commit_with_content.md @@ -29,7 +29,7 @@ create new multi commit for N configs of one app with contents | Field | Type | Required | Description | |---------------|-----------|----------|-------------| | content_id | string | Y | content sha256 id (min_length: 64, max_length: 64) | -| content_size | string | N | content size (unit: byte) | +| content_size | integer | N | content size | | labels_or | array | N | content index labels OR list | | labels_and | array | N | content index labels AND list | diff --git a/paas2/esb/components/confapis/bscp/apidocs/en/create_procattr.md b/paas2/esb/components/confapis/bscp/apidocs/en/create_procattr.md index 50f24382a..7611fed99 100644 --- a/paas2/esb/components/confapis/bscp/apidocs/en/create_procattr.md +++ b/paas2/esb/components/confapis/bscp/apidocs/en/create_procattr.md @@ -43,6 +43,6 @@ create app instance process attribute { "result": true, "code": 0, - "message": "OK", + "message": "OK" } ``` diff --git a/paas2/esb/components/confapis/bscp/apidocs/en/create_procattr_batch.md b/paas2/esb/components/confapis/bscp/apidocs/en/create_procattr_batch.md new file mode 100644 index 000000000..b79ccdbf3 --- /dev/null +++ b/paas2/esb/components/confapis/bscp/apidocs/en/create_procattr_batch.md @@ -0,0 +1,104 @@ +### Functional description + +create app instance process attribute in batch mode + +NOTE: + max create num in one batch is 500, ignore already errors, and return failed error messages in result + +### Request Parameters + +{{ common_args_desc }} + +#### Interface Parameters + +| Field | Type | Required | Description | +|-----------|-----------|----------|--------------| +| biz_id | string | Y | business id | +| app_id | string | Y | application id | +| data | array | Y | process attribute infos | + +#### data[n] + +| Field | Type | Required | Description | +|-----------|-----------|----------|--------------| +| cloud_id | string | Y | cloud net id of instance | +| ip | string | Y | ip of instance | +| path | string | Y | configs cache path of instance (max_length: 256) | +| labels | map | Y | labels of instance(JSON raw string) | +| memo | string | N | memo description (max_length: 64) | + +### Request Parameters Example + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxx", + "bk_token": "xxx", + "biz_id": "xxx", + "app_id": "A-0b67a798-e9c1-11e9-8c23-525400f99278", + "data": [ + { + "cloud_id": "0", + "ip": "127.0.0.1", + "path": "/data/configs", + "labels": { + "version":"1.0" + }, + "memo": "one app instance on the host" + } + ] +} +``` + +### Return Result Example + +```json +{ + "result": true, + "code": 0, + "message": "OK", + "data": { + "failed": [ + { + "info": { + "cloud_id": "0", + "ip": "127.0.0.1", + "path": "/data/configs", + "labels": { + "version":"1.0" + }, + "memo": "one app instance on the host" + }, + "code": 4000000, + "message": "system error" + } + ] + } +} +``` + +### Return Result Parameters Description + +#### data + +| Field | Type | Description | +|--------|--------|-------------| +| failed | array | failed list | + +#### data.failed[n] + +| Field | Type | Description | +|---------|---------|-------------| +| info | object | failed process attribute info | +| code | integer | error code | +| message | string | error message | + +#### data.failed[n].info + +| Field | Type | Description | +|-----------|---------|-------------| +| cloud_id | string | cloud net id of instance | +| ip | string | ip of instance | +| path | string | configs cache path of instance| +| labels | map | labels of instance | +| memo | string | memo description | diff --git a/paas2/esb/components/confapis/bscp/apidocs/en/create_template.md b/paas2/esb/components/confapis/bscp/apidocs/en/create_template.md index ce149ada0..8cc657a5a 100644 --- a/paas2/esb/components/confapis/bscp/apidocs/en/create_template.md +++ b/paas2/esb/components/confapis/bscp/apidocs/en/create_template.md @@ -12,8 +12,8 @@ create template |----------------|-----------|----------|-------------| | biz_id | string | Y | business id | | name | string | Y | template name (max_length: 64) | -| file_name | string | Y | config file name, e.g. server.yaml (max_length: 64) | -| file_path | string | Y | config file path, e.g. /etc (max_length: 256) | +| cfg_name | string | Y | config file name, e.g. server.yaml (max_length: 64) | +| cfg_fpath | string | Y | config file path, e.g. /etc (max_length: 256) | | user | string | Y | file user in system, e.g. root (max_length: 64) | | user_group | string | Y | file user group in system, e.g. root (max_length: 64) | | file_privilege | string | Y | file privilege,e.g. 0755 (min_length: 4, max_length: 4) | @@ -31,8 +31,8 @@ create template "bk_token": "xxx", "biz_id": "xxx", "name": "server.yaml.template", - "file_name": "server.yaml", - "file_path": "/etc", + "cfg_name": "server.yaml", + "cfg_fpath": "/etc", "user": "root", "user_group": "root", "file_privilege": "0755", diff --git a/paas2/esb/components/confapis/bscp/apidocs/en/create_template_version.md b/paas2/esb/components/confapis/bscp/apidocs/en/create_template_version.md index 26b270d75..038da20dc 100644 --- a/paas2/esb/components/confapis/bscp/apidocs/en/create_template_version.md +++ b/paas2/esb/components/confapis/bscp/apidocs/en/create_template_version.md @@ -14,7 +14,7 @@ create template version | template_id | string | Y | template id | | version_tag | string | Y | version tag (max_length: 64) | | content_id | string | Y | content sha256 id (min_length: 64, max_length: 64) | -| content_size | string | Y | content size (unit: byte) | +| content_size | integer | Y | content size | | memo | string | N | memo description (max_length: 64) | ### Request Parameters Example diff --git a/paas2/esb/components/confapis/bscp/apidocs/en/create_variable.md b/paas2/esb/components/confapis/bscp/apidocs/en/create_variable.md new file mode 100644 index 000000000..e102de8ea --- /dev/null +++ b/paas2/esb/components/confapis/bscp/apidocs/en/create_variable.md @@ -0,0 +1,52 @@ +### Functional description + +create variable + +### Request Parameters + +{{ common_args_desc }} + +#### Interface Parameters + +| Field | Type | Required | Description | +|----------------|-----------|----------|-------------| +| biz_id | string | Y | business id | +| name | string | Y | variable name (max_length: 64) | +| value | string | Y | variable value (max_length: 2048) | +| var_group_id | string | N | option, add to target variable group id (max_length: 64) | +| memo | string | N | memo description (max_length: 64) | + +### Request Parameters Example + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxx", + "bk_token": "xxx", + "biz_id": "xxx", + "name": "var-xxxx", + "value": "xxxx", + "memo": "my variable" +} +``` + +### Return Result Example + +```json +{ + "result": true, + "code": 0, + "message": "OK", + "data": { + "var_id": "V-0b67a798-e9c1-11e9-8c23-525400f99278" + } +} +``` + +### Return Result Parameters Description + +#### data + +| Field | Type | Description | +|----------|--------|-----------------| +| var_id | string | new variable id | diff --git a/paas2/esb/components/confapis/bscp/apidocs/en/create_variable_group.md b/paas2/esb/components/confapis/bscp/apidocs/en/create_variable_group.md new file mode 100644 index 000000000..5745b9515 --- /dev/null +++ b/paas2/esb/components/confapis/bscp/apidocs/en/create_variable_group.md @@ -0,0 +1,49 @@ +### Functional description + +create variable group + +### Request Parameters + +{{ common_args_desc }} + +#### Interface Parameters + +| Field | Type | Required | Description | +|----------------|-----------|----------|-------------| +| biz_id | string | Y | business id | +| name | string | Y | group name (max_length: 64) | +| memo | string | N | memo description (max_length: 64) | + +### Request Parameters Example + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxx", + "bk_token": "xxx", + "biz_id": "xxx", + "name": "group-xxxx", + "memo": "my variable group" +} +``` + +### Return Result Example + +```json +{ + "result": true, + "code": 0, + "message": "OK", + "data": { + "var_group_id": "VG-0b67a798-e9c1-11e9-8c23-525400f99278" + } +} +``` + +### Return Result Parameters Description + +#### data + +| Field | Type | Description | +|--------------|--------|-----------------| +| var_group_id | string | new variable group id | diff --git a/paas2/esb/components/confapis/bscp/apidocs/en/delete_variable.md b/paas2/esb/components/confapis/bscp/apidocs/en/delete_variable.md new file mode 100644 index 000000000..271c170c6 --- /dev/null +++ b/paas2/esb/components/confapis/bscp/apidocs/en/delete_variable.md @@ -0,0 +1,36 @@ +### Functional description + +delete variable + +### Request Parameters + +{{ common_args_desc }} + +#### Interface Parameters + +| Field | Type | Required | Description | +|-------------|------------|----------|-------------| +| biz_id | string | Y | business id | +| var_id | string | Y | variable id | + +### Request Parameters Example + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxx", + "bk_token": "xxx", + "biz_id": "xxx", + "var_id": "V-0b67a798-e9c1-11e9-8c23-525400f99278" +} +``` + +### Return Result Example + +```json +{ + "result": true, + "code": 0, + "message": "OK" +} +``` diff --git a/paas2/esb/components/confapis/bscp/apidocs/en/delete_variable_group.md b/paas2/esb/components/confapis/bscp/apidocs/en/delete_variable_group.md new file mode 100644 index 000000000..d4e95748f --- /dev/null +++ b/paas2/esb/components/confapis/bscp/apidocs/en/delete_variable_group.md @@ -0,0 +1,36 @@ +### Functional description + +delete variable group + +### Request Parameters + +{{ common_args_desc }} + +#### Interface Parameters + +| Field | Type | Required | Description | +|--------------|------------|----------|-------------| +| biz_id | string | Y | business id | +| var_group_id | string | Y | variable group id | + +### Request Parameters Example + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxx", + "bk_token": "xxx", + "biz_id": "xxx", + "var_group_id": "VG-0b67a798-e9c1-11e9-8c23-525400f99278" +} +``` + +### Return Result Example + +```json +{ + "result": true, + "code": 0, + "message": "OK" +} +``` diff --git a/paas2/esb/components/confapis/bscp/apidocs/en/get_history_app_instance_list.md b/paas2/esb/components/confapis/bscp/apidocs/en/get_history_app_instance_list.md index 06766d602..26bf60d30 100644 --- a/paas2/esb/components/confapis/bscp/apidocs/en/get_history_app_instance_list.md +++ b/paas2/esb/components/confapis/bscp/apidocs/en/get_history_app_instance_list.md @@ -13,9 +13,35 @@ query history app instance list | biz_id | string | Y | business id | | app_id | string | Y | application id | | query_type | integer | N | query type, 0:all 1:online 2:offline | -| labels | map | N | KV labels of instance, e.g."version:1.0" | +| labels_or | array | N | labels OR list | +| labels_and | array | N | labels AND list | | page | object | Y | query page settings | +#### labels_or[n] + +| Field | Type | Required | Description | +|--------|---------|----------|-------------| +| labels | map | Y | labels OR | + +#### labels_and[m] + +| Field | Type | Required | Description | +|--------|---------|----------|-------------| +| labels | map | Y | labels AND | + +```json + + KV labels format: "KEY": "OP|VALUE" + + OP(Bash Shell Operators): + 1.=: empty or eq + 2.!=: ne + 3.>: gt + 4.<: lt + 5.>=: ge + 6.<=: le +``` + #### page | Field | Type | Required | Description | @@ -34,9 +60,24 @@ query history app instance list "biz_id": "xxx", "app_id": "A-0b67a798-e9c1-11e9-8c23-525400f99278", "query_type": 0, - "labels": { - "version":"1.0" - }, + "labels_or":[ + { + "labels": { + "k1": "v1", + "k2": "gt|v2", + "k3": "le|v3" + } + } + ], + "labels_and":[ + { + "labels": { + "k1": "ne|v1", + "k2": "lt|v2", + "k3": "ge|v3" + } + } + ], "page": { "start": 0, "limit": 100 diff --git a/paas2/esb/components/confapis/bscp/apidocs/en/get_reachable_app_instance_list.md b/paas2/esb/components/confapis/bscp/apidocs/en/get_reachable_app_instance_list.md index 653b2df4d..2ccd0ef86 100644 --- a/paas2/esb/components/confapis/bscp/apidocs/en/get_reachable_app_instance_list.md +++ b/paas2/esb/components/confapis/bscp/apidocs/en/get_reachable_app_instance_list.md @@ -12,9 +12,35 @@ query reachable app instance list |-------------|-----------|----------|-------------| | biz_id | string | Y | business id | | app_id | string | Y | application id | -| labels | map | N | KV labels of instance, e.g."version:1.0" | +| labels_or | array | N | labels OR list | +| labels_and | array | N | labels AND list | | page | object | Y | query page settings | +#### labels_or[n] + +| Field | Type | Required | Description | +|--------|---------|----------|-------------| +| labels | map | Y | labels OR | + +#### labels_and[m] + +| Field | Type | Required | Description | +|--------|---------|----------|-------------| +| labels | map | Y | labels AND | + +```json + + KV labels format: "KEY": "OP|VALUE" + + OP(Bash Shell Operators): + 1.=: empty or eq + 2.!=: ne + 3.>: gt + 4.<: lt + 5.>=: ge + 6.<=: le +``` + #### page | Field | Type | Required | Description | @@ -32,9 +58,24 @@ query reachable app instance list "bk_token": "xxx", "biz_id": "xxx", "app_id": "A-0b67a798-e9c1-11e9-8c23-525400f99278", - "labels": { - "version":"1.0" - }, + "labels_or":[ + { + "labels": { + "k1": "v1", + "k2": "gt|v2", + "k3": "le|v3" + } + } + ], + "labels_and":[ + { + "labels": { + "k1": "ne|v1", + "k2": "lt|v2", + "k3": "ge|v3" + } + } + ], "page": { "start": 0, "limit": 100 diff --git a/paas2/esb/components/confapis/bscp/apidocs/en/get_template.md b/paas2/esb/components/confapis/bscp/apidocs/en/get_template.md index 6acd72d50..1e1234dbb 100644 --- a/paas2/esb/components/confapis/bscp/apidocs/en/get_template.md +++ b/paas2/esb/components/confapis/bscp/apidocs/en/get_template.md @@ -36,8 +36,8 @@ query template information "biz_id": "XXX", "template_id": "T-0b67a798-e9c1-11e9-8c23-525400f99278", "name": "server.yaml.template", - "filt_name": "server.yaml", - "file_path": "/etc", + "cfg_name": "server.yaml", + "cfg_fpath": "/etc", "user": "root", "user_group": "root", "file_privilege": "0755", @@ -63,8 +63,8 @@ query template information | biz_id | string | business id | | template_id | string | template id | | name | string | template name | -| file_name | string | config file name, e.g. server.yaml | -| file_path | string | config file path, e.g. /etc | +| cfg_name | string | config file name, e.g. server.yaml | +| cfg_fpath | string | config file path, e.g. /etc | | user | string | file user in system, e.g. root | | user_group | string | file user group in system, e.g. root | | file_privilege | string | file privilege,e.g. 0755 | diff --git a/paas2/esb/components/confapis/bscp/apidocs/en/get_template_list.md b/paas2/esb/components/confapis/bscp/apidocs/en/get_template_list.md index 9692e3542..022d72fbb 100644 --- a/paas2/esb/components/confapis/bscp/apidocs/en/get_template_list.md +++ b/paas2/esb/components/confapis/bscp/apidocs/en/get_template_list.md @@ -50,8 +50,8 @@ query template list "biz_id": "XXX", "template_id": "T-0b67a798-e9c1-11e9-8c23-525400f99278", "name": "server.yaml.template", - "filt_name": "server.yaml", - "file_path": "/etc", + "cfg_name": "server.yaml", + "cfg_fpath": "/etc", "user": "root", "user_group": "root", "file_privilege": "0755", @@ -86,8 +86,8 @@ query template list | biz_id | string | business id | | template_id | string | template id | | name | string | template name | -| file_name | string | config file name, e.g. server.yaml | -| file_path | string | config file path, e.g. /etc | +| cfg_name | string | config file name, e.g. server.yaml | +| cfg_fpath | string | config file path, e.g. /etc | | user | string | file user in system, e.g. root | | user_group | string | file user group in system, e.g. root | | file_privilege | string | file privilege,e.g. 0755 | diff --git a/paas2/esb/components/confapis/bscp/apidocs/en/get_variable.md b/paas2/esb/components/confapis/bscp/apidocs/en/get_variable.md new file mode 100644 index 000000000..2ea1db1eb --- /dev/null +++ b/paas2/esb/components/confapis/bscp/apidocs/en/get_variable.md @@ -0,0 +1,67 @@ +### Functional description + +query variable information + +### Request Parameters + +{{ common_args_desc }} + +#### Interface Parameters + +| Field | Type | Required | Description | +|--------------|------------|----------|-------------| +| biz_id | string | Y | business id | +| var_id | string | N | variable id | +| var_group_id | string | N | option, query by target variable group id and variable name | +| name | string | N | option, query by target variable group id and variable name | + +### Request Parameters Example + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxx", + "bk_token": "xxx", + "biz_id": "xxx", + "var_id": "V-0b67a798-e9c1-11e9-8c23-525400f99278" +} +``` + +### Return Result Example + +```json +{ + "result": true, + "code": 0, + "message": "OK", + "data": { + "biz_id": "XXX", + "var_id": "V-0b67a798-e9c1-11e9-8c23-525400f99278", + "name": "var-xxxx", + "value": "xxxx" + "creator": "melo", + "last_modify_by": "melo", + "memo": "my first config", + "state": 0, + "created_at": "2019-07-29 11:57:20", + "updated_at": "2019-07-29 11:57:20" + } +} +``` + +### Return Result Parameters Description + +#### data + +| Field | Type | Description | +|----------------|-----------|---------------| +| biz_id | string | business id | +| var_id | string | variable id | +| name | string | variable name | +| value | string | variable value | +| memo | string | memo description | +| state | integer | state default 0:valid | +| creator | string | creator | +| last_modify_by | string | last modify operator | +| created_at | string | create time | +| updated_at | string | update time | diff --git a/paas2/esb/components/confapis/bscp/apidocs/en/get_variable_group.md b/paas2/esb/components/confapis/bscp/apidocs/en/get_variable_group.md new file mode 100644 index 000000000..d30d3b631 --- /dev/null +++ b/paas2/esb/components/confapis/bscp/apidocs/en/get_variable_group.md @@ -0,0 +1,64 @@ +### Functional description + +query variable group information + +### Request Parameters + +{{ common_args_desc }} + +#### Interface Parameters + +| Field | Type | Required | Description | +|--------------|------------|----------|-------------| +| biz_id | string | Y | business id | +| var_group_id | string | N | option, query by variable group id | +| name | string | N | option, query by variable group name | + +### Request Parameters Example + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxx", + "bk_token": "xxx", + "biz_id": "xxx", + "var_group_id": "VG-0b67a798-e9c1-11e9-8c23-525400f99278" +} +``` + +### Return Result Example + +```json +{ + "result": true, + "code": 0, + "message": "OK", + "data": { + "biz_id": "XXX", + "var_group_id": "VG-0b67a798-e9c1-11e9-8c23-525400f99278", + "name": "group-xxxx", + "creator": "melo", + "last_modify_by": "melo", + "memo": "my variable group", + "state": 0, + "created_at": "2019-07-29 11:57:20", + "updated_at": "2019-07-29 11:57:20" + } +} +``` + +### Return Result Parameters Description + +#### data + +| Field | Type | Description | +|----------------|-----------|---------------| +| biz_id | string | business id | +| var_group_id | string | variable group id | +| name | string | variable group name | +| memo | string | memo description | +| state | integer | state default 0:valid | +| creator | string | creator | +| last_modify_by | string | last modify operator | +| created_at | string | create time | +| updated_at | string | update time | diff --git a/paas2/esb/components/confapis/bscp/apidocs/en/get_variable_group_list.md b/paas2/esb/components/confapis/bscp/apidocs/en/get_variable_group_list.md new file mode 100644 index 000000000..6460e964c --- /dev/null +++ b/paas2/esb/components/confapis/bscp/apidocs/en/get_variable_group_list.md @@ -0,0 +1,86 @@ +### Functional description + +query variable group list + +### Request Parameters + +{{ common_args_desc }} + +#### Interface Parameters + +| Field | Type | Required | Description | +|-------------|------------|----------|-------------| +| biz_id | string | Y | business id | +| page | object | Y | query page settings | + +#### page + +| Field | Type | Required | Description | +|--------------|--------|----------|-------------| +| return_total | bool | N | return total num or not, not return as default | +| start | int | Y | start record | +| limit | int | Y | page limit, max is 100 | + +### Request Parameters Example + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxx", + "bk_token": "xxx", + "biz_id": "xxx", + "page": { + "start": 0, + "limit": 100 + } +} +``` + +### Return Result Parameters Description + +```json +{ + "result": true, + "code": 0, + "message": "OK", + "data": { + "total_count": 1, + "info": [ + { + "biz_id": "XXX", + "var_group_id": "VG-0b67a798-e9c1-11e9-8c23-525400f99278", + "name": "group-xxxx", + "creator": "melo", + "last_modify_by": "melo", + "memo": "my first config", + "state": 0, + "created_at": "2019-07-29 11:57:20", + "updated_at": "2019-07-29 11:57:20" + } + ] + } +} +``` + +### Return Result Parameters Description + +#### data + +| Field | Type | Description | +|-------------|-----------|-------------| +| total_count | int | total num | +| info | array | query data | + +#### data.info[n] + +| Field | Type | Description | +|----------------|-----------|---------------| +| biz_id | string | business id | +| var_group_id | string | variable group id | +| name | string | variable group name | +| memo | string | memo description | +| state | integer | state default 0:valid | +| creator | string | creator | +| last_modify_by | string | last modify operator | +| created_at | string | create time | +| updated_at | string | update time | diff --git a/paas2/esb/components/confapis/bscp/apidocs/en/get_variable_list.md b/paas2/esb/components/confapis/bscp/apidocs/en/get_variable_list.md new file mode 100644 index 000000000..d6d02b7ab --- /dev/null +++ b/paas2/esb/components/confapis/bscp/apidocs/en/get_variable_list.md @@ -0,0 +1,89 @@ +### Functional description + +query variable list + +### Request Parameters + +{{ common_args_desc }} + +#### Interface Parameters + +| Field | Type | Required | Description | +|--------------|------------|----------|-------------| +| biz_id | string | Y | business id | +| var_group_id | string | N | option, query variable list by group id | +| page | object | Y | query page settings | + +#### page + +| Field | Type | Required | Description | +|--------------|--------|----------|-------------| +| return_total | bool | N | return total num or not, not return as default | +| start | int | Y | start record | +| limit | int | Y | page limit, max is 100 | + +### Request Parameters Example + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxx", + "bk_token": "xxx", + "biz_id": "xxx", + "page": { + "start": 0, + "limit": 100 + } +} +``` + +### Return Result Parameters Description + +```json +{ + "result": true, + "code": 0, + "message": "OK", + "data": { + "total_count": 1, + "info": [ + { + "biz_id": "XXX", + "var_id": "V-0b67a798-e9c1-11e9-8c23-525400f99278", + "name": "var-xxxx", + "value": "xxxx", + "creator": "melo", + "last_modify_by": "melo", + "memo": "my variable", + "state": 0, + "created_at": "2019-07-29 11:57:20", + "updated_at": "2019-07-29 11:57:20" + } + ] + } +} +``` + +### Return Result Parameters Description + +#### data + +| Field | Type | Description | +|-------------|-----------|-------------| +| total_count | int | total num | +| info | array | query data | + +#### data.info[n] + +| Field | Type | Description | +|----------------|-----------|---------------| +| biz_id | string | business id | +| var_id | string | variable id | +| name | string | variable name | +| value | string | variable value | +| memo | string | memo description | +| state | integer | state default 0:valid | +| creator | string | creator | +| last_modify_by | string | last modify operator | +| created_at | string | create time | +| updated_at | string | update time | diff --git a/paas2/esb/components/confapis/bscp/apidocs/en/render_template.md b/paas2/esb/components/confapis/bscp/apidocs/en/render_template.md index add708b53..a6824738f 100644 --- a/paas2/esb/components/confapis/bscp/apidocs/en/render_template.md +++ b/paas2/esb/components/confapis/bscp/apidocs/en/render_template.md @@ -13,7 +13,8 @@ render template | biz_id | string | Y | business id | | template_id | string | Y | template id | | version_id | string | Y | version id | -| variables | string | Y | render variables (JSON raw string) | +| variables | string | N | render variables (JSON raw string) | +| var_group_id | string | N | inner variable group id | ### Request Parameters Example diff --git a/paas2/esb/components/confapis/bscp/apidocs/en/update_template.md b/paas2/esb/components/confapis/bscp/apidocs/en/update_template.md index 46cb20c94..a71b59112 100644 --- a/paas2/esb/components/confapis/bscp/apidocs/en/update_template.md +++ b/paas2/esb/components/confapis/bscp/apidocs/en/update_template.md @@ -13,8 +13,8 @@ update template information | biz_id | string | Y | business id | | template_id | string | Y | template id | | name | string | Y | template name (max_length: 64) | -| file_name | string | Y | config file name, e.g. server.yaml (max_length: 64) | -| file_path | string | Y | config file path, e.g. /etc (max_length: 256) | +| cfg_name | string | Y | config file name, e.g. server.yaml (max_length: 64) | +| cfg_fpath | string | Y | config file path, e.g. /etc (max_length: 256) | | user | string | Y | file user in system, e.g. root (max_length: 64) | | user_group | string | Y | file user group in system, e.g. root (max_length: 64) | | file_privilege | string | Y | file privilege,e.g. 0755 (min_length: 4, max_length: 4) | @@ -33,8 +33,8 @@ update template information "biz_id": "xxx", "template_id": "T-0b67a798-e9c1-11e9-8c23-525400f99278", "name": "server.yaml.template", - "file_name": "server.yaml", - "file_path": "/etc", + "cfg_name": "server.yaml", + "cfg_fpath": "/etc", "user": "root", "user_group": "root", "file_privilege": "0755", diff --git a/paas2/esb/components/confapis/bscp/apidocs/en/update_template_version.md b/paas2/esb/components/confapis/bscp/apidocs/en/update_template_version.md index 65b683eb0..0ee9312f9 100644 --- a/paas2/esb/components/confapis/bscp/apidocs/en/update_template_version.md +++ b/paas2/esb/components/confapis/bscp/apidocs/en/update_template_version.md @@ -14,7 +14,7 @@ update template version | template_id | string | Y | template id | | version_id | string | Y | version id | | content_id | string | Y | content sha256 id (min_length: 64, max_length: 64) | -| content_size | string | Y | content size (unit: byte) | +| content_size | integer | Y | content size | | memo | string | Y | memo description (max_length: 64) | ### Request Parameters Example diff --git a/paas2/esb/components/confapis/bscp/apidocs/en/update_variable.md b/paas2/esb/components/confapis/bscp/apidocs/en/update_variable.md new file mode 100644 index 000000000..a5dfc912b --- /dev/null +++ b/paas2/esb/components/confapis/bscp/apidocs/en/update_variable.md @@ -0,0 +1,38 @@ +### Functional description + +update variable information + +### Request Parameters + +{{ common_args_desc }} + +#### Interface Parameters + +| Field | Type | Required | Description | +|----------------|-----------|----------|-------------| +| biz_id | string | Y | business id | +| var_id | string | Y | variable id | +| value | string | Y | variable value (max_length: 2048) | + +### Request Parameters Example + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxx", + "bk_token": "xxx", + "biz_id": "xxx", + "var_id": "V-0b67a798-e9c1-11e9-8c23-525400f99278", + "value": "xxxx" +} +``` + +### Return Result Example + +```json +{ + "result": true, + "code": 0, + "message": "OK" +} +``` diff --git a/paas2/esb/components/confapis/bscp/apidocs/zh_hans/create_multi_commit_with_content.md b/paas2/esb/components/confapis/bscp/apidocs/zh_hans/create_multi_commit_with_content.md index f35a5d329..d61ded86a 100644 --- a/paas2/esb/components/confapis/bscp/apidocs/zh_hans/create_multi_commit_with_content.md +++ b/paas2/esb/components/confapis/bscp/apidocs/zh_hans/create_multi_commit_with_content.md @@ -29,7 +29,7 @@ | 字段 | 类型 | 必选 | 描述 | |--------------|-----------|--------|------------| | content_id | string | 是 | 内容ID,SHA256值(与上传内容时计算的资源ID一致)(min_length: 64, max_length: 64) | -| content_size | string | 否 | 内容大小 (单位: 字节) | +| content_size | integer | 否 | 内容大小 | | labels_or | array | 否 | 内容索引逻辑或KV列表 | | labels_and | array | 否 | 内容索引逻辑与KV列表 | diff --git a/paas2/esb/components/confapis/bscp/apidocs/zh_hans/create_procattr.md b/paas2/esb/components/confapis/bscp/apidocs/zh_hans/create_procattr.md index 9e8ed2720..e96aca5c8 100644 --- a/paas2/esb/components/confapis/bscp/apidocs/zh_hans/create_procattr.md +++ b/paas2/esb/components/confapis/bscp/apidocs/zh_hans/create_procattr.md @@ -43,6 +43,6 @@ { "result": true, "code": 0, - "message": "OK", + "message": "OK" } ``` diff --git a/paas2/esb/components/confapis/bscp/apidocs/zh_hans/create_procattr_batch.md b/paas2/esb/components/confapis/bscp/apidocs/zh_hans/create_procattr_batch.md new file mode 100644 index 000000000..7f8e754cd --- /dev/null +++ b/paas2/esb/components/confapis/bscp/apidocs/zh_hans/create_procattr_batch.md @@ -0,0 +1,104 @@ +### 功能描述 + +批量创建主机应用归属信息 + +注意: + 一次性批量创建最大支持数量500, 目标归属关系已存在则忽略,存在创建失败时返回错误信息 + +### 请求参数 + +{{ common_args_desc }} + +#### 接口参数 + +| 字段 | 类型 | 必选 | 描述 | +|-----------|-----------|--------|--------------| +| biz_id | string | 是 | 业务ID | +| app_id | string | 是 | 应用ID | +| data | array | 是 | 应用归属信息 | + +#### data[n] + +| 字段 | 类型 | 必选 | 描述 | +|-----------|-----------|--------|--------------| +| cloud_id | string | 是 | 云区域/网络ID | +| ip | string | 是 | 节点IP | +| path | string | 是 | 节点配置缓存路径 (max_length: 256) | +| labels | map | 是 | 节点标签KV集合, 例如"version:1.0" | +| memo | string | 否 | 备注 (max_length: 64) | + +### 请求参数示例 + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxx", + "bk_token": "xxx", + "biz_id": "xxx", + "app_id": "A-0b67a798-e9c1-11e9-8c23-525400f99278", + "data": [ + { + "cloud_id": "0", + "ip": "127.0.0.1", + "path": "/data/configs", + "labels": { + "version":"1.0" + }, + "memo": "one app instance on the host" + } + ] +} +``` + +### 返回结果示例 + +```json +{ + "result": true, + "code": 0, + "message": "OK", + "data": { + "failed": [ + { + "info": { + "cloud_id": "0", + "ip": "127.0.0.1", + "path": "/data/configs", + "labels": { + "version":"1.0" + }, + "memo": "one app instance on the host" + }, + "code": 4000000, + "message": "system error" + } + ] + } +} +``` + +### 返回结果参数 + +#### data + +| 字段 | 类型 | 描述 | +|--------|--------|-----------| +| failed | array | 创建失败的列表 | + +#### data.failed[n] + +| 字段 | 类型 | 描述 | +|---------|---------|-----------| +| info | object | 创建失败的绑定关系信息 | +| code | integer | 失败错误码 | +| message | string | 失败错误信息 | + +#### data.failed[n].info + +| 字段 | 类型 | 描述 | +|-----------|---------|-----------| +| cloud_id | string | 云区域/网络ID | +| ip | string | 节点IP | +| path | string | 节点配置缓存路径| +| labels | map | 节点标签KV集合, 例如"version:1.0" | +| memo | string | 备注 | diff --git a/paas2/esb/components/confapis/bscp/apidocs/zh_hans/create_template.md b/paas2/esb/components/confapis/bscp/apidocs/zh_hans/create_template.md index 5716a3459..888ab557b 100644 --- a/paas2/esb/components/confapis/bscp/apidocs/zh_hans/create_template.md +++ b/paas2/esb/components/confapis/bscp/apidocs/zh_hans/create_template.md @@ -12,8 +12,8 @@ |----------------|-----------|--------|------------| | biz_id | string | 是 | 业务ID | | name | string | 是 | 模板名称 (max_length: 64) | -| file_name | string | 是 | 配置名称, 例如server.yaml (max_length: 64) | -| file_path | string | 是 | 配置相对路径, 例如/etc (max_length: 256) | +| cfg_name | string | 是 | 配置名称, 例如server.yaml (max_length: 64) | +| cfg_fpath | string | 是 | 配置相对路径, 例如/etc (max_length: 256) | | user | string | 是 | 归属用户信息, 例如root (max_length: 64) | | user_group | string | 是 | 归属用户组信息, 例如root (max_length: 64) | | file_privilege | string | 是 | 文件权限,例如0755 (min_length: 4, max_length: 4) | @@ -31,8 +31,8 @@ "bk_token": "xxx", "biz_id": "xxx", "name": "server.yaml.template", - "file_name": "server.yaml", - "file_path": "/etc", + "cfg_name": "server.yaml", + "cfg_fpath": "/etc", "user": "root", "user_group": "root", "file_privilege": "0755", diff --git a/paas2/esb/components/confapis/bscp/apidocs/zh_hans/create_template_version.md b/paas2/esb/components/confapis/bscp/apidocs/zh_hans/create_template_version.md index b40514ffa..5fa09bc85 100644 --- a/paas2/esb/components/confapis/bscp/apidocs/zh_hans/create_template_version.md +++ b/paas2/esb/components/confapis/bscp/apidocs/zh_hans/create_template_version.md @@ -14,7 +14,7 @@ | template_id | string | 是 | 模板ID | | version_tag | string | 是 | 版本TAG (max_length: 64) | | content_id | string | 是 | 版本内容ID, SHA256值(与上传内容时计算的资源ID一致)(min_length: 64, max_length: 64) | -| content_size | string | 是 | 版本内容大小 (单位:字节) | +| content_size | integer | 是 | 版本内容大小 | | memo | string | 否 | 备注 (max_length: 64) | ### 请求参数示例 diff --git a/paas2/esb/components/confapis/bscp/apidocs/zh_hans/create_variable.md b/paas2/esb/components/confapis/bscp/apidocs/zh_hans/create_variable.md new file mode 100644 index 000000000..cb4eae5de --- /dev/null +++ b/paas2/esb/components/confapis/bscp/apidocs/zh_hans/create_variable.md @@ -0,0 +1,52 @@ +### 功能描述 + +创建变量 + +### 请求参数 + +{{ common_args_desc }} + +#### 接口参数 + +| 字段 | 类型 | 必选 | 描述 | +|----------------|-----------|--------|------------| +| biz_id | string | 是 | 业务ID | +| name | string | 是 | 变量名称 (max_length: 64) | +| value | string | 是 | 变量值 (max_length: 2048) | +| var_group_id | string | 否 | 可选, 变量分组ID, 可为指定分组创建变量,不指定则为空分组或默认分组 | +| memo | string | 否 | 备注 | + +### 请求参数示例 + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxx", + "bk_token": "xxx", + "biz_id": "xxx", + "name": "var-xxxx", + "value": "xxxx", + "memo": "my variable" +} +``` + +### 返回结果示例 + +```json +{ + "result": true, + "code": 0, + "message": "OK", + "data": { + "var_id": "V-0b67a798-e9c1-11e9-8c23-525400f99278" + } +} +``` + +### 返回结果参数 + +#### data + +| 字段 | 类型 | 描述 | +|--------|--------|----------| +| var_id | string | 新变量ID | diff --git a/paas2/esb/components/confapis/bscp/apidocs/zh_hans/create_variable_group.md b/paas2/esb/components/confapis/bscp/apidocs/zh_hans/create_variable_group.md new file mode 100644 index 000000000..e6866fe65 --- /dev/null +++ b/paas2/esb/components/confapis/bscp/apidocs/zh_hans/create_variable_group.md @@ -0,0 +1,49 @@ +### 功能描述 + +创建变量分组 + +### 请求参数 + +{{ common_args_desc }} + +#### 接口参数 + +| 字段 | 类型 | 必选 | 描述 | +|----------------|-----------|--------|------------| +| biz_id | string | 是 | 业务ID | +| name | string | 是 | 变量分组名称 (max_length: 64) | +| memo | string | 否 | 备注 | + +### 请求参数示例 + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxx", + "bk_token": "xxx", + "biz_id": "xxx", + "name": "group-xxxx", + "memo": "my variable group" +} +``` + +### 返回结果示例 + +```json +{ + "result": true, + "code": 0, + "message": "OK", + "data": { + "var_group_id": "VG-0b67a798-e9c1-11e9-8c23-525400f99278" + } +} +``` + +### 返回结果参数 + +#### data + +| 字段 | 类型 | 描述 | +|--------------|--------|--------------| +| var_group_id | string | 新变量分组ID | diff --git a/paas2/esb/components/confapis/bscp/apidocs/zh_hans/delete_variable.md b/paas2/esb/components/confapis/bscp/apidocs/zh_hans/delete_variable.md new file mode 100644 index 000000000..a3de98e57 --- /dev/null +++ b/paas2/esb/components/confapis/bscp/apidocs/zh_hans/delete_variable.md @@ -0,0 +1,36 @@ +### 功能描述 + +删除变量 + +### 请求参数 + +{{ common_args_desc }} + +#### 接口参数 + +| 字段 | 类型 | 必选 | 描述 | +|-------------|------------|--------|------------| +| biz_id | string | 是 | 业务ID | +| var_id | string | 是 | 变量ID | + +### 请求参数示例 + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxx", + "bk_token": "xxx", + "biz_id": "xxx", + "var_id": "V-0b67a798-e9c1-11e9-8c23-525400f99278" +} +``` + +### 返回结果示例 + +```json +{ + "result": true, + "code": 0, + "message": "OK" +} +``` diff --git a/paas2/esb/components/confapis/bscp/apidocs/zh_hans/delete_variable_group.md b/paas2/esb/components/confapis/bscp/apidocs/zh_hans/delete_variable_group.md new file mode 100644 index 000000000..52dd320e6 --- /dev/null +++ b/paas2/esb/components/confapis/bscp/apidocs/zh_hans/delete_variable_group.md @@ -0,0 +1,36 @@ +### 功能描述 + +删除变量分组 + +### 请求参数 + +{{ common_args_desc }} + +#### 接口参数 + +| 字段 | 类型 | 必选 | 描述 | +|--------------|------------|--------|------------| +| biz_id | string | 是 | 业务ID | +| var_group_id | string | 是 | 变量分组ID | + +### 请求参数示例 + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxx", + "bk_token": "xxx", + "biz_id": "xxx", + "var_group_id": "VG-0b67a798-e9c1-11e9-8c23-525400f99278" +} +``` + +### 返回结果示例 + +```json +{ + "result": true, + "code": 0, + "message": "OK" +} +``` diff --git a/paas2/esb/components/confapis/bscp/apidocs/zh_hans/get_history_app_instance_list.md b/paas2/esb/components/confapis/bscp/apidocs/zh_hans/get_history_app_instance_list.md index 8622b241f..f6e3634a2 100644 --- a/paas2/esb/components/confapis/bscp/apidocs/zh_hans/get_history_app_instance_list.md +++ b/paas2/esb/components/confapis/bscp/apidocs/zh_hans/get_history_app_instance_list.md @@ -13,9 +13,35 @@ | biz_id | string | 是 | 业务ID | | app_id | string | 是 | 应用ID | | query_type | integer | 否 | 查询类型, 0:全部状态 1:在线可触达 2:离线不可触达 | -| labels | map | 否 | 节点标签KV集合, 例如"version:1.0" | +| labels_or | array | 否 | 逻辑或KV列表 | +| labels_and | array | 否 | 逻辑与KV列表 | | page | object | 是 | 分页设置 | +#### labels_or[n] + +| 字段 | 类型 | 必选 | 描述 | +|--------|---------|--------|------------| +| labels | map | 是 | 任意一KV满足则命中匹配,Key为目标节点标签名称;Value为目标匹配的值,格式为"OP|Value", 例如"version:eq|1.0"表示匹配版本为1.0。OP支持的操作符:eq/ne/gt/lt/ge/le(遵循Bash Shell语义) | + +#### labels_and[n] + +| 字段 | 类型 | 必选 | 描述 | +|--------|---------|--------|------------| +| labels | map | 是 | 全部KV满足才命中匹配, Key为目标节点标签名称;Value为目标匹配的值,格式为"OP|Value", 例如"version:eq|1.0"表示匹配版本为1.0。OP支持的操作符:eq/ne/gt/lt/ge/le(遵循Bash Shell语义) | + +```json + + KV labels format: "KEY": "OP|VALUE" + + OP(Bash Shell Operators): + 1.=: empty or eq + 2.!=: ne + 3.>: gt + 4.<: lt + 5.>=: ge + 6.<=: le +``` + #### page | 字段 | 类型 | 必选 | 描述 | @@ -34,9 +60,24 @@ "biz_id": "xxx", "app_id": "A-0b67a798-e9c1-11e9-8c23-525400f99278", "query_type": 0, - "labels": { - "version":"1.0" - }, + "labels_or":[ + { + "labels": { + "k1": "v1", + "k2": "gt|v2", + "k3": "le|v3" + } + } + ], + "labels_and":[ + { + "labels": { + "k1": "ne|v1", + "k2": "lt|v2", + "k3": "ge|v3" + } + } + ], "page": { "start": 0, "limit": 100 diff --git a/paas2/esb/components/confapis/bscp/apidocs/zh_hans/get_reachable_app_instance_list.md b/paas2/esb/components/confapis/bscp/apidocs/zh_hans/get_reachable_app_instance_list.md index 04f0a28c5..6d91075d3 100644 --- a/paas2/esb/components/confapis/bscp/apidocs/zh_hans/get_reachable_app_instance_list.md +++ b/paas2/esb/components/confapis/bscp/apidocs/zh_hans/get_reachable_app_instance_list.md @@ -12,9 +12,35 @@ |-------------|-----------|--------|----------| | biz_id | string | 是 | 业务ID | | app_id | string | 是 | 应用ID | -| labels | map | 否 | 节点标签KV集合, 例如"version:1.0" | +| labels_or | array | 否 | 逻辑或KV列表 | +| labels_and | array | 否 | 逻辑与KV列表 | | page | object | 是 | 分页设置 | +#### labels_or[n] + +| 字段 | 类型 | 必选 | 描述 | +|--------|---------|--------|------------| +| labels | map | 是 | 任意一KV满足则命中匹配,Key为目标节点标签名称;Value为目标匹配的值,格式为"OP|Value", 例如"version:eq|1.0"表示匹配版本为1.0。OP支持的操作符:eq/ne/gt/lt/ge/le(遵循Bash Shell语义) | + +#### labels_and[n] + +| 字段 | 类型 | 必选 | 描述 | +|--------|---------|--------|------------| +| labels | map | 是 | 全部KV满足才命中匹配, Key为目标节点标签名称;Value为目标匹配的值,格式为"OP|Value", 例如"version:eq|1.0"表示匹配版本为1.0。OP支持的操作符:eq/ne/gt/lt/ge/le(遵循Bash Shell语义) | + +```json + + KV labels format: "KEY": "OP|VALUE" + + OP(Bash Shell Operators): + 1.=: empty or eq + 2.!=: ne + 3.>: gt + 4.<: lt + 5.>=: ge + 6.<=: le +``` + #### page | 字段 | 类型 | 必选 | 描述 | @@ -32,9 +58,24 @@ "bk_token": "xxx", "biz_id": "xxx", "app_id": "A-0b67a798-e9c1-11e9-8c23-525400f99278", - "labels": { - "version":"1.0" - }, + "labels_or":[ + { + "labels": { + "k1": "v1", + "k2": "gt|v2", + "k3": "le|v3" + } + } + ], + "labels_and":[ + { + "labels": { + "k1": "ne|v1", + "k2": "lt|v2", + "k3": "ge|v3" + } + } + ], "page": { "start": 0, "limit": 100 diff --git a/paas2/esb/components/confapis/bscp/apidocs/zh_hans/get_template.md b/paas2/esb/components/confapis/bscp/apidocs/zh_hans/get_template.md index bf2f2b109..900725ccd 100644 --- a/paas2/esb/components/confapis/bscp/apidocs/zh_hans/get_template.md +++ b/paas2/esb/components/confapis/bscp/apidocs/zh_hans/get_template.md @@ -36,8 +36,8 @@ "biz_id": "XXX", "template_id": "T-0b67a798-e9c1-11e9-8c23-525400f99278", "name": "server.yaml.template", - "filt_name": "server.yaml", - "file_path": "/etc", + "cfg_name": "server.yaml", + "cfg_fpath": "/etc", "user": "root", "user_group": "root", "file_privilege": "0755", @@ -63,8 +63,8 @@ | biz_id | string | 业务ID | | template_id | string | 模板ID | | name | string | 模板名称| -| file_name | string | 配置名称, 例如server.yaml | -| file_path | string | 配置相对路径, 例如/etc | +| cfg_name | string | 配置名称, 例如server.yaml | +| cfg_fpath | string | 配置相对路径, 例如/etc | | user | string | 归属用户信息, 例如root| | user_group | string | 归属用户组信息, 例如root | | file_privilege | string | 文件权限,例如0755 | diff --git a/paas2/esb/components/confapis/bscp/apidocs/zh_hans/get_template_list.md b/paas2/esb/components/confapis/bscp/apidocs/zh_hans/get_template_list.md index 459a836c6..6417cbf07 100644 --- a/paas2/esb/components/confapis/bscp/apidocs/zh_hans/get_template_list.md +++ b/paas2/esb/components/confapis/bscp/apidocs/zh_hans/get_template_list.md @@ -50,8 +50,8 @@ "biz_id": "XXX", "template_id": "T-0b67a798-e9c1-11e9-8c23-525400f99278", "name": "server.yaml.template", - "filt_name": "server.yaml", - "file_path": "/etc", + "cfg_name": "server.yaml", + "cfg_fpath": "/etc", "user": "root", "user_group": "root", "file_privilege": "0755", @@ -86,8 +86,8 @@ | biz_id | string | 业务ID | | template_id | string | 模板ID | | name | string | 模板名称| -| file_name | string | 配置名称, 例如server.yaml | -| file_path | string | 配置相对路径, 例如/etc | +| cfg_name | string | 配置名称, 例如server.yaml | +| cfg_fpath | string | 配置相对路径, 例如/etc | | user | string | 归属用户信息, 例如root| | user_group | string | 归属用户组信息, 例如root | | file_privilege | string | 文件权限,例如0755 | diff --git a/paas2/esb/components/confapis/bscp/apidocs/zh_hans/get_variable.md b/paas2/esb/components/confapis/bscp/apidocs/zh_hans/get_variable.md new file mode 100644 index 000000000..46103c102 --- /dev/null +++ b/paas2/esb/components/confapis/bscp/apidocs/zh_hans/get_variable.md @@ -0,0 +1,67 @@ +### 功能描述 + +获取变量信息 + +### 请求参数 + +{{ common_args_desc }} + +#### 接口参数 + +| 字段 | 类型 | 必选 | 描述 | +|--------------|-----------|--------|---------| +| biz_id | string | 是 | 业务ID | +| var_id | string | 否 | 可选, 根据变量ID查询 | +| var_group_id | string | 否 | 可选, 根据变量分组加变量名称查询 | +| name | string | 否 | 可选, 根据变量分组加变量名称查询 | + +### 请求参数示例 + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxx", + "bk_token": "xxx", + "biz_id": "xxx", + "var_id": "V-0b67a798-e9c1-11e9-8c23-525400f99278" +} +``` + +### 返回结果示例 + +```json +{ + "result": true, + "code": 0, + "message": "OK", + "data": { + "biz_id": "XXX", + "var_id": "V-0b67a798-e9c1-11e9-8c23-525400f99278", + "name": "var-xxxx", + "value": "xxxx" + "creator": "melo", + "last_modify_by": "melo", + "memo": "my variable", + "state": 0, + "created_at": "2019-07-29 11:57:20", + "updated_at": "2019-07-29 11:57:20" + } +} +``` + +### 返回结果参数 + +#### data + +| 字段 | 类型 | 描述 | +|----------------|-----------|---------| +| biz_id | string | 业务ID | +| var_id | string | 变量ID | +| name | string | 变量名称| +| value | string | 变量值 | +| memo | string | 备注 | +| state | integer | 状态 默认0: 正常 | +| creator | string | 创建者 | +| last_modify_by | string | 修改者 | +| created_at | string | 创建时间 | +| updated_at | string | 更新时间 | diff --git a/paas2/esb/components/confapis/bscp/apidocs/zh_hans/get_variable_group.md b/paas2/esb/components/confapis/bscp/apidocs/zh_hans/get_variable_group.md new file mode 100644 index 000000000..3eefd7cc9 --- /dev/null +++ b/paas2/esb/components/confapis/bscp/apidocs/zh_hans/get_variable_group.md @@ -0,0 +1,64 @@ +### 功能描述 + +获取变量分组信息 + +### 请求参数 + +{{ common_args_desc }} + +#### 接口参数 + +| 字段 | 类型 | 必选 | 描述 | +|--------------|-----------|--------|---------| +| biz_id | string | 是 | 业务ID | +| var_group_id | string | 否 | 可选, 基于变量分组ID查询 | +| name | string | 否 | 可选, 基于变量分组名称查询 | + +### 请求参数示例 + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxx", + "bk_token": "xxx", + "biz_id": "xxx", + "var_group_id": "VG-0b67a798-e9c1-11e9-8c23-525400f99278" +} +``` + +### 返回结果示例 + +```json +{ + "result": true, + "code": 0, + "message": "OK", + "data": { + "biz_id": "XXX", + "var_group_id": "VG-0b67a798-e9c1-11e9-8c23-525400f99278", + "name": "group-xxxx", + "creator": "melo", + "last_modify_by": "melo", + "memo": "my variable group", + "state": 0, + "created_at": "2019-07-29 11:57:20", + "updated_at": "2019-07-29 11:57:20" + } +} +``` + +### 返回结果参数 + +#### data + +| 字段 | 类型 | 描述 | +|----------------|-----------|---------| +| biz_id | string | 业务ID | +| var_group_id | string | 变量分组ID | +| name | string | 变量分组名称| +| memo | string | 备注 | +| state | integer | 状态 默认0: 正常 | +| creator | string | 创建者 | +| last_modify_by | string | 修改者 | +| created_at | string | 创建时间 | +| updated_at | string | 更新时间 | diff --git a/paas2/esb/components/confapis/bscp/apidocs/zh_hans/get_variable_group_list.md b/paas2/esb/components/confapis/bscp/apidocs/zh_hans/get_variable_group_list.md new file mode 100644 index 000000000..3de94f2d1 --- /dev/null +++ b/paas2/esb/components/confapis/bscp/apidocs/zh_hans/get_variable_group_list.md @@ -0,0 +1,86 @@ +### 功能描述 + +获取变量分组列表 + +### 请求参数 + +{{ common_args_desc }} + +#### 接口参数 + +| 字段 | 类型 | 必选 | 描述 | +|-------------|-----------|--------|----------| +| biz_id | string | 是 | 业务ID | +| page | object | 是 | 分页设置 | + +#### page + +| 字段 | 类型 | 必选 | 描述 | +|--------------|--------|--------|------------| +| return_total | bool | 否 | 是否返回总记录条数, 默认不返回 | +| start | int | 是 | 记录开始位置 | +| limit | int | 是 | 每页限制条数,最大100 | + +### 请求参数示例 + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxx", + "bk_token": "xxx", + "biz_id": "xxx", + "page": { + "start": 0, + "limit": 100 + } +} +``` + +### 返回结果示例 + +```json +{ + "result": true, + "code": 0, + "message": "OK", + "data": { + "total_count": 1, + "info": [ + { + "biz_id": "XXX", + "var_group_id": "VG-0b67a798-e9c1-11e9-8c23-525400f99278", + "name": "group-xxxx", + "creator": "melo", + "last_modify_by": "melo", + "memo": "my first config", + "state": 0, + "created_at": "2019-07-29 11:57:20", + "updated_at": "2019-07-29 11:57:20" + } + ] + } +} +``` + +### 返回结果参数 + +#### data + +| 字段 | 类型 | 描述 | +|-------------|-----------|-----------| +| total_count | int | 当前规则能匹配到的总记录条数 | +| info | array | 查询返回的数据 | + +#### data.info[n] + +| 字段 | 类型 | 描述 | +|----------------|-----------|---------| +| biz_id | string | 业务ID | +| var_group_id | string | 变量分组ID | +| name | string | 变量分组名称| +| memo | string | 备注 | +| state | integer | 状态 默认0: 正常 | +| creator | string | 创建者 | +| last_modify_by | string | 修改者 | +| created_at | string | 创建时间 | +| updated_at | string | 更新时间 | diff --git a/paas2/esb/components/confapis/bscp/apidocs/zh_hans/get_variable_list.md b/paas2/esb/components/confapis/bscp/apidocs/zh_hans/get_variable_list.md new file mode 100644 index 000000000..ab368a451 --- /dev/null +++ b/paas2/esb/components/confapis/bscp/apidocs/zh_hans/get_variable_list.md @@ -0,0 +1,89 @@ +### 功能描述 + +获取变量列表 + +### 请求参数 + +{{ common_args_desc }} + +#### 接口参数 + +| 字段 | 类型 | 必选 | 描述 | +|--------------|-----------|--------|----------| +| biz_id | string | 是 | 业务ID | +| var_group_id | string | 否 | 可选, 根据指定的分组ID查询变量 | +| page | object | 是 | 分页设置 | + +#### page + +| 字段 | 类型 | 必选 | 描述 | +|--------------|--------|--------|------------| +| return_total | bool | 否 | 是否返回总记录条数, 默认不返回 | +| start | int | 是 | 记录开始位置 | +| limit | int | 是 | 每页限制条数,最大100 | + +### 请求参数示例 + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxx", + "bk_token": "xxx", + "biz_id": "xxx", + "page": { + "start": 0, + "limit": 100 + } +} +``` + +### 返回结果示例 + +```json +{ + "result": true, + "code": 0, + "message": "OK", + "data": { + "total_count": 1, + "info": [ + { + "biz_id": "XXX", + "var_id": "V-0b67a798-e9c1-11e9-8c23-525400f99278", + "name": "var-xxxx", + "value": "xxxx", + "creator": "melo", + "last_modify_by": "melo", + "memo": "my variable", + "state": 0, + "created_at": "2019-07-29 11:57:20", + "updated_at": "2019-07-29 11:57:20" + } + ] + } +} +``` + +### 返回结果参数 + +#### data + +| 字段 | 类型 | 描述 | +|-------------|-----------|-----------| +| total_count | int | 当前规则能匹配到的总记录条数 | +| info | array | 查询返回的数据 | + +#### data.info[n] + +| 字段 | 类型 | 描述 | +|----------------|-----------|---------| +| biz_id | string | 业务ID | +| var_id | string | 变量ID | +| name | string | 模板名称| +| value | string | 变量值 | +| memo | string | 备注 | +| state | integer | 状态 默认0: 正常 | +| creator | string | 创建者 | +| last_modify_by | string | 修改者 | +| created_at | string | 创建时间 | +| updated_at | string | 更新时间 | diff --git a/paas2/esb/components/confapis/bscp/apidocs/zh_hans/render_template.md b/paas2/esb/components/confapis/bscp/apidocs/zh_hans/render_template.md index 3a5306b44..ecbf7e1b3 100644 --- a/paas2/esb/components/confapis/bscp/apidocs/zh_hans/render_template.md +++ b/paas2/esb/components/confapis/bscp/apidocs/zh_hans/render_template.md @@ -13,7 +13,8 @@ | biz_id | string | 是 | 业务ID | | template_id | string | 是 | 模板ID | | version_id | string | 是 | 版本ID | -| variables | string | 是 | 渲染变量JSON字符串 | +| variables | string | 否 | 可选,渲染变量JSON字符串 | +| var_group_id | string | 否 | 可选, 内置变量分组ID | ### 请求参数示例 diff --git a/paas2/esb/components/confapis/bscp/apidocs/zh_hans/update_template.md b/paas2/esb/components/confapis/bscp/apidocs/zh_hans/update_template.md index 92164cca0..01e538e05 100644 --- a/paas2/esb/components/confapis/bscp/apidocs/zh_hans/update_template.md +++ b/paas2/esb/components/confapis/bscp/apidocs/zh_hans/update_template.md @@ -13,8 +13,8 @@ | biz_id | string | 是 | 业务ID | | template_id | string | 是 | 模板ID | | name | string | 是 | 模板名称 (max_length: 64) | -| file_name | string | 是 | 配置名称, 例如server.yaml (max_length: 64) | -| file_path | string | 是 | 配置相对路径, 例如/etc (max_length: 256) | +| cfg_name | string | 是 | 配置名称, 例如server.yaml (max_length: 64) | +| cfg_fpath | string | 是 | 配置相对路径, 例如/etc (max_length: 256) | | user | string | 是 | 归属用户信息, 例如root (max_length: 64) | | user_group | string | 是 | 归属用户组信息, 例如root (max_length: 64) | | file_privilege | string | 是 | 文件权限,例如0755 (min_length: 4, max_length: 4) | @@ -33,8 +33,8 @@ "biz_id": "xxx", "template_id": "T-0b67a798-e9c1-11e9-8c23-525400f99278", "name": "server.yaml.template", - "file_name": "server.yaml", - "file_path": "/etc", + "cfg_name": "server.yaml", + "cfg_fpath": "/etc", "user": "root", "user_group": "root", "file_privilege": "0755", diff --git a/paas2/esb/components/confapis/bscp/apidocs/zh_hans/update_template_version.md b/paas2/esb/components/confapis/bscp/apidocs/zh_hans/update_template_version.md index 4794f002e..3074796f9 100644 --- a/paas2/esb/components/confapis/bscp/apidocs/zh_hans/update_template_version.md +++ b/paas2/esb/components/confapis/bscp/apidocs/zh_hans/update_template_version.md @@ -14,7 +14,7 @@ | template_id | string | 是 | 模板ID | | version_id | string | 是 | 版本ID | | content_id | string | 是 | 版本内容ID, SHA256值(与上传内容时计算的资源ID一致)(min_length: 64, max_length: 64) | -| content_size | string | 是 | 版本内容大小 (单位:字节) | +| content_size | integer | 是 | 版本内容大小 | | memo | string | 是 | 备注 (max_length: 64) | ### 请求参数示例 diff --git a/paas2/esb/components/confapis/bscp/apidocs/zh_hans/update_variable.md b/paas2/esb/components/confapis/bscp/apidocs/zh_hans/update_variable.md new file mode 100644 index 000000000..5b6fdcf4e --- /dev/null +++ b/paas2/esb/components/confapis/bscp/apidocs/zh_hans/update_variable.md @@ -0,0 +1,38 @@ +### 功能描述 + +更新变量信息 + +### 请求参数 + +{{ common_args_desc }} + +#### 接口参数 + +| 字段 | 类型 | 必选 | 描述 | +|----------------|------------|--------|------------| +| biz_id | string | 是 | 业务ID | +| var_id | string | 是 | 变量ID | +| value | string | 是 | 变量值 (max_length: 2048) | + +### 请求参数示例 + +```json +{ + "bk_app_code": "xxx", + "bk_app_secret": "xxx", + "bk_token": "xxx", + "biz_id": "xxx", + "var_id": "V-0b67a798-e9c1-11e9-8c23-525400f99278", + "value": "xxxx" +} +``` + +### 返回结果示例 + +```json +{ + "result": true, + "code": 0, + "message": "OK" +} +``` diff --git a/paas2/esb/components/confapis/bscp/bscp.yaml b/paas2/esb/components/confapis/bscp/bscp.yaml index 371ceff64..094b9de0e 100644 --- a/paas2/esb/components/confapis/bscp/bscp.yaml +++ b/paas2/esb/components/confapis/bscp/bscp.yaml @@ -408,6 +408,16 @@ dest_path: /api/v2/config/biz/{biz_id}/app/{app_id}/procattr dest_http_method: POST +- path: /v2/bscp/create_procattr_batch/ + name: create_procattr_batch + label: 批量创建主机应用归属信息 + label_en: create app process attribute in batch mode + suggest_method: POST + api_type: operate + comp_codename: generic.v2.bscp.bscp_component + dest_path: /api/v2/config/batch/biz/{biz_id}/app/{app_id}/procattr + dest_http_method: POST + - path: /v2/bscp/update_procattr/ name: update_procattr label: 更新主机应用绑定信息 @@ -607,3 +617,93 @@ comp_codename: generic.v2.bscp.bscp_component dest_path: /api/v2/template/biz/{biz_id}/template/{template_id}/version/{version_id} dest_http_method: DELETE + +- path: /v2/bscp/create_variable_group/ + name: create_variable_group + label: 创建变量分组 + label_en: create variable group + suggest_method: POST + api_type: operate + comp_codename: generic.v2.bscp.bscp_component + dest_path: /api/v2/template/biz/{biz_id}/var_group + dest_http_method: POST + +- path: /v2/bscp/get_variable_group/ + name: get_variable_group + label: 查询指定变量分组信息 + label_en: query target variable group info + suggest_method: POST + api_type: query + comp_codename: generic.v2.bscp.bscp_component + dest_path: /api/v2/template/biz/{biz_id}/var_group + dest_http_method: GET + +- path: /v2/bscp/get_variable_group_list/ + name: get_variable_group_list + label: 查询变量分组列表 + label_en: query variable group list + suggest_method: POST + api_type: query + comp_codename: generic.v2.bscp.bscp_component + dest_path: /api/v2/template/list/biz/{biz_id}/var_group + dest_http_method: POST + +- path: /v2/bscp/delete_variable_group/ + name: delete_variable_group + label: 删除变量分组 + label_en: delete variable group + suggest_method: POST + api_type: operate + comp_codename: generic.v2.bscp.bscp_component + dest_path: /api/v2/template/biz/{biz_id}/var_group/{var_group_id} + dest_http_method: DELETE + +- path: /v2/bscp/create_variable/ + name: create_variable + label: 创建变量 + label_en: create variable + suggest_method: POST + api_type: operate + comp_codename: generic.v2.bscp.bscp_component + dest_path: /api/v2/template/biz/{biz_id}/variable + dest_http_method: POST + +- path: /v2/bscp/update_variable/ + name: update_variable + label: 更新变量信息 + label_en: update variable + suggest_method: POST + api_type: operate + comp_codename: generic.v2.bscp.bscp_component + dest_path: /api/v2/template/biz/{biz_id}/variable/{var_id} + dest_http_method: PUT + +- path: /v2/bscp/get_variable/ + name: get_variable + label: 查询指定变量信息 + label_en: query target variable info + suggest_method: POST + api_type: query + comp_codename: generic.v2.bscp.bscp_component + dest_path: /api/v2/template/biz/{biz_id}/variable + dest_http_method: GET + +- path: /v2/bscp/get_variable_list/ + name: get_variable_list + label: 查询变量列表 + label_en: query variable list + suggest_method: POST + api_type: query + comp_codename: generic.v2.bscp.bscp_component + dest_path: /api/v2/template/list/biz/{biz_id}/variable + dest_http_method: POST + +- path: /v2/bscp/delete_variable/ + name: delete_variable + label: 删除变量 + label_en: delete variable + suggest_method: POST + api_type: operate + comp_codename: generic.v2.bscp.bscp_component + dest_path: /api/v2/template/biz/{biz_id}/variable/{var_id} + dest_http_method: DELETE diff --git a/paas2/esb/components/confapis/cc/apidocs/en/batch_create_proc_template.md b/paas2/esb/components/confapis/cc/apidocs/en/batch_create_proc_template.md index 138dc930d..2892229e3 100644 --- a/paas2/esb/components/confapis/cc/apidocs/en/batch_create_proc_template.md +++ b/paas2/esb/components/confapis/cc/apidocs/en/batch_create_proc_template.md @@ -18,7 +18,7 @@ batch create process templates ### Request Parameters Example -```python +```json { "bk_biz_id": 1, "service_template_id": 1, @@ -32,9 +32,28 @@ batch create process templates "auto_time_gap": { "as_default_value": false }, - "bind_ip": { - "as_default_value": true, - "value": "1" + "bind_info": { + "as_default_value": true, + "value": [ + { + "ip": { + "value": "2", + "as_default_value": true + }, + "port": { + "value": "1", + "as_default_value": false + }, + "protocol": { + "value": "2", + "as_default_value": false + }, + "enable": { + "value": false, + "as_default_value": false + } + } + ] }, "bk_biz_id": { "as_default_value": true, @@ -80,10 +99,6 @@ batch create process templates "as_default_value": true, "value": "" }, - "port": { - "as_default_value": true, - "value": "8000,8001,8003,8004" - }, "priority": { "as_default_value": true, "value": 1 @@ -92,10 +107,6 @@ batch create process templates "as_default_value": true, "value": 1 }, - "protocol": { - "as_default_value": true, - "value": "1" - }, "reload_cmd": { "as_default_value": true, "value": "" diff --git a/paas2/esb/components/confapis/cc/apidocs/en/clone_host_property.md b/paas2/esb/components/confapis/cc/apidocs/en/clone_host_property.md index 7b4237bf9..18d4eddb9 100644 --- a/paas2/esb/components/confapis/cc/apidocs/en/clone_host_property.md +++ b/paas2/esb/components/confapis/cc/apidocs/en/clone_host_property.md @@ -10,14 +10,19 @@ clone host property | Field | Type | Required | Description | |-------------|---------|--------|-----------------------------| -| bk_org_ip | string | Yes | Original host IP, support only by a simle ip | -| bk_dst_ip | string | Yes | Destination host IP, separate multiple IP with ',' | +| bk_org_ip | string | Yes | source host inner ip | +| bk_dst_ip | string | Yes | dest host inner ip | +| bk_org_id | int | Yes | souce host identify id | +| bk_dst_id | int | Yes | destination host identify id | | bk_biz_id | int | Yes | Business ID | | bk_cloud_id | int | No | Cloud ID | + +Note: use host inner ip clone or use host id to clone can only choose one, can not be used both at the same time. + ### Request Parameters Example -```python +```json { "bk_biz_id":2, "bk_org_ip":"127.0.0.1", @@ -26,6 +31,17 @@ clone host property } ``` +or + +```json +{ + "bk_biz_id":2, + "bk_org_id": 10, + "bk_dst_id": 11, + "bk_cloud_id":0 +} +``` + ### Return Result Example diff --git a/paas2/esb/components/confapis/cc/apidocs/en/create_process_instance.md b/paas2/esb/components/confapis/cc/apidocs/en/create_process_instance.md index db5dbb2fc..a4ef8dee0 100644 --- a/paas2/esb/components/confapis/cc/apidocs/en/create_process_instance.md +++ b/paas2/esb/components/confapis/cc/apidocs/en/create_process_instance.md @@ -16,7 +16,7 @@ create process instance ### Request Parameters Example -```python +```json { "bk_biz_id": 1, "service_instance_id": 48, @@ -24,28 +24,33 @@ create process instance { "process_info": { "bk_supplier_account": "0", - "bind_ip": "1", "description": "", "start_cmd": "", "restart_cmd": "", "pid_file": "", "auto_start": false, "timeout": 30, - "protocol": "1", - "auto_time_gap": 60, "reload_cmd": "", "bk_func_name": "java", "work_path": "/data/bkee", "stop_cmd": "", "face_stop_cmd": "", - "port": "8008,8443", "bk_process_name": "job_java", "user": "", "proc_num": 1, "priority": 1, "bk_biz_id": 2, - "bk_func_id": "", - "bk_process_id": 1 + "bk_start_param_regex": "", + "bk_process_id": 1, + "bind_info": [ + { + "enable": false, + "ip": "127.0.0.1", + "port": "80", + "protocol": "1", + "template_row_id": 1234 + } + ] } } ] diff --git a/paas2/esb/components/confapis/cc/apidocs/en/create_service_instance.md b/paas2/esb/components/confapis/cc/apidocs/en/create_service_instance.md index b10e53187..46bbe6a0a 100644 --- a/paas2/esb/components/confapis/cc/apidocs/en/create_service_instance.md +++ b/paas2/esb/components/confapis/cc/apidocs/en/create_service_instance.md @@ -24,7 +24,7 @@ batch create service instance ### Request Parameters Example -```python +```json { "bk_biz_id": 1, "name": "test1", @@ -37,14 +37,21 @@ batch create service instance "process_template_id": 1, "process_info": { "bk_supplier_account": "0", - "bind_ip": "1", + "bind_info": [ + { + "enable": false, + "ip": "127.0.0.1", + "port": "80", + "protocol": "1", + "template_row_id": 1234 + } + ], "description": "", "start_cmd": "", "restart_cmd": "", "pid_file": "", "auto_start": false, "timeout": 30, - "protocol": "1", "auto_time_gap": 60, "reload_cmd": "", "bk_func_name": "java", diff --git a/paas2/esb/components/confapis/cc/apidocs/en/delete_cloud_area.md b/paas2/esb/components/confapis/cc/apidocs/en/delete_cloud_area.md index 85d24e86b..162be1227 100644 --- a/paas2/esb/components/confapis/cc/apidocs/en/delete_cloud_area.md +++ b/paas2/esb/components/confapis/cc/apidocs/en/delete_cloud_area.md @@ -15,14 +15,16 @@ delete cloud area ### Request Parameters Example -``` python - +``` json +{ + "bk_cloud_id": 5 +} ``` ### Return Result Example -```python +```json { "result": true, diff --git a/paas2/esb/components/confapis/cc/apidocs/en/find_host_relations_with_topo.md b/paas2/esb/components/confapis/cc/apidocs/en/find_host_relations_with_topo.md new file mode 100644 index 000000000..1c2412099 --- /dev/null +++ b/paas2/esb/components/confapis/cc/apidocs/en/find_host_relations_with_topo.md @@ -0,0 +1,73 @@ +### Functional description + +find host relations with topology instance node + +### Request Parameters + +{{ common_args_desc }} + +#### General Parameters + +| Field | Type | Required | Description | +|----------------------|------------|--------|-----------------------------| +| page | dict | Yes | search condition | +| fields | array string | Yes | relation's attribute list need to return, can be: bk_biz_id,bk_host_id,bk_module_id,bk_set_id,bk_supplier_account | +| bk_obj_id | string | Yes | this object's model | +| bk_inst_ids | int array | Yes | this object's instance id list, max size is 50. | + +#### page + +| Field | Type | Required | Description | +|-----------|------------|--------|------------| +| start | int | Yes | start record | +| limit | int | Yes | page limit, maximum value is 500 | + + +### Request Parameters Example + +```json +{ + "bk_app_code": "esb_test", + "bk_app_secret": "xxx", + "bk_token": "xxx", + "page": { + "start": 0, + "limit": 10 + }, + "fields": [ + "bk_module_id", + "bk_host_id" + ], + "bk_obj_id": "province", + "bk_inst_ids": [10,11] +} +``` + +### Return Result Example + +```json +{ + "result":true, + "code":0, + "message":"success", + "data": { + "count": 1, + "info": [ + { + "bk_host_id": 2, + "bk_module_id": 51 + } + ] + } +} +``` + + +### Return Result Parameters Description + +#### data: + +| Field | Type | Description | +|------------|----------|--------------| +| count | int | the num of record | +| info | array | host data and topology information | diff --git a/paas2/esb/components/confapis/cc/apidocs/en/find_instance_association.md b/paas2/esb/components/confapis/cc/apidocs/en/find_instance_association.md index 88ae559b7..f3db0cfd1 100644 --- a/paas2/esb/components/confapis/cc/apidocs/en/find_instance_association.md +++ b/paas2/esb/components/confapis/cc/apidocs/en/find_instance_association.md @@ -33,7 +33,7 @@ condition params | bk_obj_asst_id | string | Yes | object's association unique id| | bk_asst_id | string | NO | object's association kind unique name| | bk_obj_id | string | NO | the association's source object's id| -| bk_asst_id | string | NO | the association's destination object's id| +| bk_asst_obj_id | string | NO | the association's destination object's id| ### Request Parameters Example diff --git a/paas2/esb/components/confapis/cc/apidocs/en/get_proc_template.md b/paas2/esb/components/confapis/cc/apidocs/en/get_proc_template.md index 7ba249724..22424d5af 100644 --- a/paas2/esb/components/confapis/cc/apidocs/en/get_proc_template.md +++ b/paas2/esb/components/confapis/cc/apidocs/en/get_proc_template.md @@ -26,72 +26,120 @@ get single process template info, process_template_id in url path ### Return Result Example -```python +```json { "result": true, "code": 0, "message": "success", "permission": null, "data": { - "count": 1, - "info": [ - { - "bk_biz_id": 1, - "id": 49, - "name": "10.27.0.9_p1_81", - "service_template_id": 50, - "bk_host_id": 11, - "bk_host_innerip": "10.27.0.9", - "bk_module_id": 56, - "creator": "admin", - "modifier": "admin", - "create_time": "2019-07-22T09:54:50.906+08:00", - "last_time": "2019-07-22T09:54:50.906+08:00", - "bk_supplier_account": "0", - "service_category_id": 22, - "process_instances": [ - { - "process": { - "bk_biz_id": 1, - "proc_num": 0, - "stop_cmd": "", - "restart_cmd": "", - "face_stop_cmd": "", - "bk_process_id": 43, - "bk_func_name": "p1", - "work_path": "", - "bind_ip": "0.0.0.0", - "priority": 0, - "reload_cmd": "", - "bk_process_name": "p1", - "port": "81", - "pid_file": "", - "auto_start": false, - "auto_time_gap": 0, - "last_time": "2019-07-22T09:54:50.927+08:00", - "create_time": "2019-07-22T09:54:50.927+08:00", - "bk_biz_id": 3, - "start_cmd": "", - "bk_func_id": "", - "user": "", - "timeout": 0, - "protocol": "1", - "description": "", - "bk_supplier_account": "0", - "bk_start_param_regex": "" - }, - "relation": { - "bk_biz_id": 1, - "bk_process_id": 43, - "service_instance_id": 49, - "process_template_id": 48, - "bk_host_id": 11, - "bk_supplier_account": "0" + "id": 50, + "bk_process_name": "p1", + "bk_biz_id": 1, + "service_template_id": 51, + "property": { + "proc_num": { + "value": 300, + "as_default_value": false + }, + "stop_cmd": { + "value": "", + "as_default_value": false + }, + "restart_cmd": { + "value": "", + "as_default_value": false + }, + "face_stop_cmd": { + "value": "", + "as_default_value": false + }, + "bk_func_name": { + "value": "p1", + "as_default_value": true + }, + "work_path": { + "value": "", + "as_default_value": false + }, + "priority": { + "value": null, + "as_default_value": false + }, + "reload_cmd": { + "value": "", + "as_default_value": false + }, + "bk_process_name": { + "value": "p1", + "as_default_value": true + }, + "pid_file": { + "value": "", + "as_default_value": false + }, + "auto_start": { + "value": false, + "as_default_value": false + }, + "auto_time_gap": { + "value": null, + "as_default_value": false + }, + "start_cmd": { + "value": "", + "as_default_value": false + }, + "bk_func_id": { + "value": null, + "as_default_value": false + }, + "user": { + "value": "root100", + "as_default_value": false + }, + "timeout": { + "value": null, + "as_default_value": false + }, + "description": { + "value": "", + "as_default_value": false + }, + "bk_start_param_regex": { + "value": "", + "as_default_value": false + }, + "bind_info": { + "value": [ + { + "enable": { + "value": false, + "as_default_value": true + }, + "ip": { + "value": "1", + "as_default_value": true + }, + "port": { + "value": "100", + "as_default_value": true + }, + "protocol": { + "value": "1", + "as_default_value": true + }, + "row_id": 1 } - } - ] + ], + "as_default_value": true } - ] + }, + "creator": "admin", + "modifier": "admin", + "create_time": "2019-06-19T15:24:04.763+08:00", + "last_time": "2019-06-21T16:25:03.962512+08:00", + "bk_supplier_account": "0" } } diff --git a/paas2/esb/components/confapis/cc/apidocs/en/list_biz_host_process_relation.md b/paas2/esb/components/confapis/cc/apidocs/en/list_biz_host_process_relation.md deleted file mode 100644 index 3e1af0575..000000000 --- a/paas2/esb/components/confapis/cc/apidocs/en/list_biz_host_process_relation.md +++ /dev/null @@ -1,91 +0,0 @@ -### Functional description - -list host process relation in business - -### Request Parameters - -{{ common_args_desc }} - -#### General Parameters - -| Field | Type | Required | Description | -| ------------------- | --------- | -------- | ---------------- | -| bk_supplier_account | string | Yes | Supplier account | -| bk_biz_id | int | Yes | Business ID | -| bk_host_ids | int array | No | Host IDs | -| page | object | Yes | page condition | - -#### page - -| Field | Type | Required | Description | -| ----- | ------ | -------- | ------------------------------------------------- | -| start | int | Yes | start record | -| limit | int | Yes | page limit, max is 1000 | -| sort | string | No | the field for sort, '-' represent decending order | - -### Request Parameters Example - -```json -{ - "bk_biz_id": 2, - "page": { - "start": 0, - "limit": 1, - "sort": "-bk_host_id" - }, - "bk_host_ids": [ - 11, - 12 - ] -} -``` - - -### Return Result Example - -```json -{ - "result": true, - "code": 0, - "message": "success", - "permission": null, - "data": { - "count": 1, - "info": [ - { - "bk_host_id": 11, - "bk_process_id": 43, - "port": "81", - "bind_ip": "127.0.0.1", - "protocol": "1" - } - ] - } -} -``` - -#### response - -| Field | Type | Description | -| ------- | ------ | ------------------------------------------------------ | -| result | bool | request success or failed. true:success;false: failed | -| code | int | error code. 0: success, >0: something error | -| message | string | error info description | -| data | object | response data | - -#### data description - -| Field | Type | Description | -| ----- | ----- | --------------------- | -| count | int | the num of record | -| info | array | host and process data | - -#### info description - -| Field | Type | Description | -| ------------- | ------ | -------------------------- | -| bk_host_id | int | Host ID | -| bk_process_id | int | Process ID | -| port | string | Process Port | -| bind_ip | string | Process Bind IP | -| protocol | enum | Protocol:1/2(1:tcp, 2:udp) | \ No newline at end of file diff --git a/paas2/esb/components/confapis/cc/apidocs/en/list_biz_hosts_topo.md b/paas2/esb/components/confapis/cc/apidocs/en/list_biz_hosts_topo.md index 30482adb3..27dd7bf40 100644 --- a/paas2/esb/components/confapis/cc/apidocs/en/list_biz_hosts_topo.md +++ b/paas2/esb/components/confapis/cc/apidocs/en/list_biz_hosts_topo.md @@ -186,7 +186,7 @@ reference: it can speed up the request and reduce the network payload | + +#### Interface Parameters + +| Field | Type | Required | Description | +|-----------|------------|--------|------------| +| page | dict | Yes | search condition | +| fields | array string | Yes | host's attribute list need to return | +| host_property_filter | dict | No | host property filter | + + +#### host_property_filter +host property filter is a combined of atom filter rule, combine operator could be `AND` or `OR`, nested up to 2 levels。 +atom rule has three fields: `field`, `operator`, `value` + +| Field | Type | Required | Description | +| --- | --- | --- |--- | +| field|string|Yes|field | +| operator|string|No|operator |available values: equal,not_equal,in,not_in,less,less_or_equal,greater,greater_or_equal,between,not_between,contains,exists,not_exists; contains is a regular pattern operation which is case in-sensitive; exists/not_exists operator is to filter out a attribute is exists in a instances or not. | +| value| - | No| value|values's format depend on operator| + +reference: + +#### page + +| Field | Type | Required | Description | +|-----------|------------|--------|------------| +| start | int | Yes | start record | +| limit | int | Yes | page limit, maximum value is 500 | +| sort | string | No | the field for sort | + +### Request Parameters Example + +```json +{ + "bk_app_code": "esb_test", + "bk_app_secret": "xxx", + "bk_token": "xxx", + "page": { + "start": 0, + "limit": 10, + "sort": "bk_host_id" + }, + "fields": [ + "bk_host_id", + "bk_host_innerip" + ], + "host_property_filter": { + "condition": "AND", + "rules": [ + { + "field": "bk_host_innerip", + "operator": "equal", + "value": "192.168.1.1" + }, + { + "condition": "OR", + "rules": [ + { + "field": "bk_os_type", + "operator": "not_in", + "value": [ + "3" + ] + }, + { + "field": "bk_cloud_id", + "operator": "equal", + "value": 0 + } + ] + } + ] + } +} +``` +### Return Result Example + +```json +{ + "result": true, + "code": 0, + "message": "success", + "permission": null, + "data": { + "count": 2, + "info": [ + { + "host": { + "bk_host_id": 2, + "bk_host_innerip": "192.168.1.1" + }, + "topo": [ + { + "inst": { + "obj": "nation", + "name": "china", + "id": 30 + }, + "children": [ + { + "inst": { + "obj": "province", + "name": "prov-xxx", + "id": 31 + }, + "children": [ + { + "inst": { + "obj": "set", + "name": "set-xxx", + "id": 20 + }, + "children": [ + { + "inst": { + "obj": "module", + "name": "mod-xxx", + "id": 52 + }, + "children": null + }, + { + "inst": { + "obj": "module", + "name": "mod-yy", + "id": 53 + }, + "children": null + } + ] + } + ] + } + ] + }, + { + "inst": { + "obj": "nation", + "name": "cn", + "id": 29 + }, + "children": [ + { + "inst": { + "obj": "province", + "name": "prv1", + "id": 26 + }, + "children": [ + { + "inst": { + "obj": "set", + "name": "set11", + "id": 19 + }, + "children": [ + { + "inst": { + "obj": "module", + "name": "m22", + "id": 51 + }, + "children": null + } + ] + } + ] + } + ] + } + ] + }, + { + "host": { + "bk_host_id": 4, + "bk_host_innerip": "192.168.1.2" + }, + "topo": [ + { + "inst": { + "obj": "set", + "name": "IdleSet", + "id": 2 + }, + "children": [ + { + "inst": { + "obj": "module", + "name": "FaultModule", + "id": 4 + }, + "children": null + } + ] + } + ] + } + ] + } +} +``` + +### Return Result Parameters Description + +#### data + +| Field | Type | Description | +|-----------|-----------|-----------| +| count | int | the num of record | +| info | array | host data and topology information | + +#### data.info +| Field | Type | Description | +|-----------|-----------|-----------| +| host | dict | the num of record | +| topo | array | host's topology info | + +#### data.info.host +| Field | Type | Description | +|---|---|---| +| bk_isp_name| string | telecom operators | 0: Others; 1: China Telecom; 2: China Unicom; 3: China Mobile | +| bk_sn | string | device SN | +| operator | string | maintainer | +| bk_outer_mac | string | outer MAC | +| bk_state_name | string | country | CN: China, please refer to CMDB web page for detailed value | +| bk_province_name | string | province | | +| import_from | string | import from | 1:excel;2:agent;3:api | +| bk_sla | string | SLA level | 1:L1;2:L2;3:L3 | +| bk_service_term | int | warranty | 1-10 | +| bk_os_type | string | os type | 1:Linux;2:Windows;3:AIX | +| bk_os_version | string | os version | +| bk_os_bit | int | os bits | +| bk_mem | string | memory capacity | +| bk_mac | string | mac address | +| bk_host_outerip | string | outer ip | +| bk_host_name | string | hostname | +| bk_host_innerip | string | inner ip | +| bk_host_id | int | host id | +| bk_disk | int | disk capacity | | +| bk_cpu_module | string | CPU module | +| bk_cpu_mhz | int | CPU hz | | +| bk_cpu | int | CPU count | 1-1000000 | +| bk_comment | string | comment | +| bk_cloud_id | int | cloud area id | +| bk_bak_operator | string | backup maintainer | +| bk_asset_id | string | device id | + +#### data.info.topo +| Field | Type | Description | +|-----------|-----------|-----------| +| inst | object | this node's instance's details information | +| inst.obj | string | this node's object type, can be set/module/custom_level etc. | +| inst.name | string | node's name | +| inst.id | int | node's instance id | +| children | object array | node's children details topology information | +| children.inst | object | this child's instance's information | +| children.children | string | this instance's children details information | \ No newline at end of file diff --git a/paas2/esb/components/confapis/cc/apidocs/en/list_process_related_info.md b/paas2/esb/components/confapis/cc/apidocs/en/list_process_related_info.md index e81740022..94c83c01a 100644 --- a/paas2/esb/components/confapis/cc/apidocs/en/list_process_related_info.md +++ b/paas2/esb/components/confapis/cc/apidocs/en/list_process_related_info.md @@ -29,6 +29,7 @@ list process related info according to condition (v3.9.13) | ----- | ---- | -------- | -------------------------------- | | start | int | Yes | start record | | limit | int | Yes | page limit, maximum value is 500 | +| sort | string | No | the field for sort, '-' represent decending order, default sorted by bk_process_id | ### Request Parameters Example @@ -72,7 +73,8 @@ list process related info according to condition (v3.9.13) ], "page": { "start": 0, - "limit": 100 + "limit": 100, + "sort": "bk_process_id" } } ``` diff --git a/paas2/esb/components/confapis/cc/apidocs/en/list_service_instance_detail.md b/paas2/esb/components/confapis/cc/apidocs/en/list_service_instance_detail.md index a8ae3dd9c..90fdaf2dc 100644 --- a/paas2/esb/components/confapis/cc/apidocs/en/list_service_instance_detail.md +++ b/paas2/esb/components/confapis/cc/apidocs/en/list_service_instance_detail.md @@ -50,7 +50,7 @@ list service instances with processes info ### Return Result Example -```python +```json { "result": true, "code": 0, @@ -62,7 +62,7 @@ list service instances with processes info { "bk_biz_id": 1, "id": 49, - "name": "10.27.0.9_p1_81", + "name": "p1_81", "service_template_id": 50, "bk_host_id": 11, "bk_module_id": 56, @@ -75,7 +75,6 @@ list service instances with processes info "process_instances": [ { "process": { - "bk_biz_id": 1, "proc_num": 0, "stop_cmd": "", "restart_cmd": "", @@ -83,25 +82,29 @@ list service instances with processes info "bk_process_id": 43, "bk_func_name": "p1", "work_path": "", - "bind_ip": "0.0.0.0", "priority": 0, "reload_cmd": "", "bk_process_name": "p1", - "port": "81", "pid_file": "", "auto_start": false, - "auto_time_gap": 0, "last_time": "2019-07-22T09:54:50.927+08:00", "create_time": "2019-07-22T09:54:50.927+08:00", "bk_biz_id": 3, "start_cmd": "", - "bk_func_id": "", "user": "", "timeout": 0, - "protocol": "1", "description": "", "bk_supplier_account": "0", - "bk_start_param_regex": "" + "bk_start_param_regex": "", + "bind_info": [ + { + "enable": true, + "ip": "127.0.0.1", + "port": "80", + "protocol": "1", + "template_row_id": 1234 + } + ] }, "relation": { "bk_biz_id": 1, diff --git a/paas2/esb/components/confapis/cc/apidocs/en/list_service_template.md b/paas2/esb/components/confapis/cc/apidocs/en/list_service_template.md index 68cbc4876..928374973 100644 --- a/paas2/esb/components/confapis/cc/apidocs/en/list_service_template.md +++ b/paas2/esb/components/confapis/cc/apidocs/en/list_service_template.md @@ -12,57 +12,50 @@ list service templates |----------------------|------------|--------|-----------------------| | bk_supplier_account | string |Yes | Supplier Account ID | | service_category_id | int | No | Service Category ID | +| search | string | No | search service templates by name,default is empty string | +| is_exact | bool | No | whether exact match, used with search param, default is false (v3.9.19)| ### Request Parameters Example -```python +```json { - "bk_biz_id": 1, - "service_category_id": 1, - "page": { - "start": 0, - "limit": 10, - "sort": "-name" - } + "bk_biz_id": 1, + "service_category_id": 1, + "search": "test2", + "is_exact": true, + "page": { + "start": 0, + "limit": 10, + "sort": "-name" + } } ``` ### Return Result Example -```python +```json { - "result": true, - "code": 0, - "message": "success", - "permission": null, - "data": { - "count": 2, - "info": [ - { - "bk_biz_id": 1, - "id": 51, - "name": "test3", - "service_category_id": 1, - "creator": "admin", - "modifier": "admin", - "create_time": "2019-09-18T20:31:34.627+08:00", - "last_time": "2019-09-18T20:31:34.627+08:00", - "bk_supplier_account": "0" - }, - { - "bk_biz_id": 1, - "id": 50, - "name": "test2", - "service_category_id": 1, - "creator": "admin", - "modifier": "admin", - "create_time": "2019-09-18T20:31:29.607+08:00", - "last_time": "2019-09-18T20:31:29.607+08:00", - "bk_supplier_account": "0" - } - ] - } + "result": true, + "code": 0, + "message": "success", + "permission": null, + "data": { + "count": 1, + "info": [ + { + "bk_biz_id": 1, + "id": 50, + "name": "test2", + "service_category_id": 1, + "creator": "admin", + "modifier": "admin", + "create_time": "2019-09-18T20:31:29.607+08:00", + "last_time": "2019-09-18T20:31:29.607+08:00", + "bk_supplier_account": "0" + } + ] + } } ``` diff --git a/paas2/esb/components/confapis/cc/apidocs/en/list_service_template_difference.md b/paas2/esb/components/confapis/cc/apidocs/en/list_service_template_difference.md new file mode 100644 index 000000000..60bdae8e9 --- /dev/null +++ b/paas2/esb/components/confapis/cc/apidocs/en/list_service_template_difference.md @@ -0,0 +1,184 @@ +### Functional description + +list difference between the service template and service instances (v3.9.19) + +- only used for GSEKit,is hidden in ESB doc + +#### General Parameters + +{{ common_args_desc }} + +### Request Parameters + +| Field | Type | Required | Description | +| ---------- | --------- | -------- | ------------------------------------------------------------ | +| bk_biz_id | int64 | Yes | Business ID | +|bk_module_id|int64 array|Yes|module id array| + +### Request Parameters Example + +```json +{ + "bk_module_ids": [ + 60, + 61 + ], + "bk_biz_id": 3 +} +``` + +### Return Result Example + +```json +{ + "result": true, + "bk_error_code": 0, + "bk_error_msg": "success", + "permission": null, + "data": [ + { + "bk_module_id": 61, + "unchanged": [], + "changed": [ + { + "process_template_id": 48, + "process_template_name": "pr1", + "service_instance_count": 3, + "service_instances": [ + { + "service_instance": { + "id": 3, + "name": "192.168.15.13_pr1" + }, + "process": null, + "changed_attributes": [ + { + "id": 55, + "property_id": "description", + "property_name": "remark", + "property_value": "", + "template_property_value": { + "value": "aaa", + "as_default_value": true + } + } + ] + }, + { + "service_instance": { + "id": 5, + "name": "192.168.15.12_pr1" + }, + "process": null, + "changed_attributes": [ + { + "id": 55, + "property_id": "description", + "property_name": "remark", + "property_value": "", + "template_property_value": { + "value": "aaa", + "as_default_value": true + } + } + ] + }, + { + "service_instance": { + "id": 4, + "name": "192.168.15.11_pr1" + }, + "process": null, + "changed_attributes": [ + { + "id": 55, + "property_id": "description", + "property_name": "remark", + "property_value": "", + "template_property_value": { + "value": "aaa", + "as_default_value": true + } + } + ] + } + ] + } + ], + "added": [], + "removed": [], + "changed_attributes": [], + "has_difference": true + }, + { + "bk_module_id": 60, + "unchanged": [], + "changed": [ + { + "process_template_id": 48, + "process_template_name": "pr1", + "service_instance_count": 2, + "service_instances": [ + { + "service_instance": { + "id": 1, + "name": "192.168.15.10_pr1" + }, + "process": null, + "changed_attributes": [ + { + "id": 55, + "property_id": "description", + "property_name": "remark", + "property_value": "", + "template_property_value": { + "value": "aaa", + "as_default_value": true + } + } + ] + }, + { + "service_instance": { + "id": 2, + "name": "192.168.15.1_pr1" + }, + "process": null, + "changed_attributes": [ + { + "id": 55, + "property_id": "description", + "property_name": "remark", + "property_value": "", + "template_property_value": { + "value": "aaa", + "as_default_value": true + } + } + ] + } + ] + } + ], + "added": [], + "removed": [], + "changed_attributes": [], + "has_difference": true + } + ] +} +``` + +### Return Result Parameters Description + +#### data + +| Field | Type | Description | +| ----- | ----- | ----------------- | +|bk_module_id|int|module ID| +|unchanged|object array|unchanged processes info| +|changed|object array|changed processes info| +|added|object array|added processes info| +|removed|object array|removed processes info| +|changed_attributes|object array|the changed attributes between service template and module instance| +|has_difference|bool|whether the processes under module has any difference with service template| diff --git a/paas2/esb/components/confapis/cc/apidocs/en/resource_watch.md b/paas2/esb/components/confapis/cc/apidocs/en/resource_watch.md index bd550d113..b79264ec6 100644 --- a/paas2/esb/components/confapis/cc/apidocs/en/resource_watch.md +++ b/paas2/esb/components/confapis/cc/apidocs/en/resource_watch.md @@ -15,7 +15,7 @@ watch and get the change of a kind of resource's event. | bk_fields | array string | Depends on resource | the resource event fields you want to return, the host resource need to be set. | | bk_start_from | Int64 | No | watch from a unix seconds time, It is the number of seconds that have elapsed since the Unix epoch, minus leap seconds; | | bk_cursor | string | No | a cursor to represent the event you are watched at, you can use a cursor to watch the next event after it. | -| bk_resource | string | Yes | resource you can watch, now is host, host_relation, biz, set, module, set_template。"host" means a host's detail info, "host_relation" means host's relation with biz, set and module, "biz" means a biz's detail info, "set" means a set's detail info, "module" means a module's detail info, "set_template" means a set_template's detail info | +| bk_resource | string | Yes | resource you can watch, now is host, host_relation, biz, set, module, set_template, process. "host" means a host's detail info, "host_relation" means host's relation with biz, set and module, "biz" means a biz's detail info, "set" means a set's detail info, "module" means a module's detail info, "set_template" means a set_template's detail info, "process" means a process's detail info | | bk_supplier_account | string | Yes | supplier account | diff --git a/paas2/esb/components/bk/apisv2/cc/apidocs/en/delete_custom_query.md b/paas2/esb/components/confapis/cc/apidocs/en/transfer_host_to_recyclemodule.md similarity index 66% rename from paas2/esb/components/bk/apisv2/cc/apidocs/en/delete_custom_query.md rename to paas2/esb/components/confapis/cc/apidocs/en/transfer_host_to_recyclemodule.md index 596553b49..7cb389f67 100644 --- a/paas2/esb/components/bk/apisv2/cc/apidocs/en/delete_custom_query.md +++ b/paas2/esb/components/confapis/cc/apidocs/en/transfer_host_to_recyclemodule.md @@ -1,6 +1,6 @@ ### Functional description -delete customize query +transfer host to recycle module ### Request Parameters @@ -11,8 +11,8 @@ delete customize query | Field | Type | Required | Description | |-----------|------------|--------|------------| | bk_supplier_account | string | No | supplier account code | -| bk_biz_id | int | Yes | Business ID | -| id | string | Yes | Primary key ID | +| bk_biz_id | int | Yes | Business ID | +| bk_host_id | array | Yes | Host ID | ### Request Parameters Example @@ -21,9 +21,12 @@ delete customize query "bk_app_code": "esb_test", "bk_app_secret": "xxx", "bk_token": "xxx", - "bk_supplier_account": "123456789", + "bk_supplier_account": "0", "bk_biz_id": 1, - "id": "xxx" + "bk_host_id": [ + 9, + 10 + ] } ``` @@ -34,7 +37,7 @@ delete customize query { "result": true, "code": 0, - "message": "", - "data": {} + "message": "success", + "data": null } ``` diff --git a/paas2/esb/components/confapis/cc/apidocs/en/update_cloud_area.md b/paas2/esb/components/confapis/cc/apidocs/en/update_cloud_area.md index cce5298ea..958afb6ec 100644 --- a/paas2/esb/components/confapis/cc/apidocs/en/update_cloud_area.md +++ b/paas2/esb/components/confapis/cc/apidocs/en/update_cloud_area.md @@ -15,8 +15,9 @@ update cloud area ### Request Parameters Example -``` python +``` json { + "bk_cloud_id": 5, "bk_cloud_name": "cloudname1" } @@ -25,8 +26,7 @@ update cloud area ### Return Result Example -```python - +```json { "result": true, "code": 0, diff --git a/paas2/esb/components/confapis/cc/apidocs/en/update_process_instance.md b/paas2/esb/components/confapis/cc/apidocs/en/update_process_instance.md index 31a8a540c..5b5b031ca 100644 --- a/paas2/esb/components/confapis/cc/apidocs/en/update_process_instance.md +++ b/paas2/esb/components/confapis/cc/apidocs/en/update_process_instance.md @@ -16,35 +16,32 @@ batch update process info ### Request Parameters Example -```python +```json { "bk_biz_id": 1, "processes": [ { "bk_process_id": 43, "bk_supplier_account": "0", - "bind_ip": "1", "description": "", "start_cmd": "", "restart_cmd": "", "pid_file": "", "auto_start": false, "timeout": 30, - "protocol": "1", "auto_time_gap": 60, "reload_cmd": "", "bk_func_name": "java", "work_path": "/data/bkee", "stop_cmd": "", "face_stop_cmd": "", - "port": "8008,8443", "bk_process_name": "job_java", "user": "", "proc_num": 1, "priority": 1, "bk_biz_id": 2, "bk_func_id": "", - "bind_info": [ + "bind_info": [ { "enable": false, "ip": "127.0.0.1", diff --git a/paas2/esb/components/confapis/cc/apidocs/zh_hans/batch_create_proc_template.md b/paas2/esb/components/confapis/cc/apidocs/zh_hans/batch_create_proc_template.md index 934372336..faa9e3f73 100644 --- a/paas2/esb/components/confapis/cc/apidocs/zh_hans/batch_create_proc_template.md +++ b/paas2/esb/components/confapis/cc/apidocs/zh_hans/batch_create_proc_template.md @@ -17,7 +17,7 @@ ### 请求参数示例 -```python +```json { "bk_biz_id": 1, "service_template_id": 1, @@ -31,9 +31,28 @@ "auto_time_gap": { "as_default_value": false }, - "bind_ip": { - "as_default_value": true, - "value": "1" + "bind_info": { + "as_default_value": true, + "value": [ + { + "ip": { + "value": "2", + "as_default_value": true + }, + "port": { + "value": "1", + "as_default_value": false + }, + "protocol": { + "value": "2", + "as_default_value": false + }, + "enable": { + "value": false, + "as_default_value": false + } + } + ] }, "bk_biz_id": { "as_default_value": true, @@ -79,10 +98,6 @@ "as_default_value": true, "value": "" }, - "port": { - "as_default_value": true, - "value": "8000,8001,8003,8004" - }, "priority": { "as_default_value": true, "value": 1 @@ -91,10 +106,6 @@ "as_default_value": true, "value": 1 }, - "protocol": { - "as_default_value": true, - "value": "1" - }, "reload_cmd": { "as_default_value": true, "value": "" diff --git a/paas2/esb/components/confapis/cc/apidocs/zh_hans/clone_host_property.md b/paas2/esb/components/confapis/cc/apidocs/zh_hans/clone_host_property.md index ffccb4936..7dc762685 100644 --- a/paas2/esb/components/confapis/cc/apidocs/zh_hans/clone_host_property.md +++ b/paas2/esb/components/confapis/cc/apidocs/zh_hans/clone_host_property.md @@ -10,14 +10,19 @@ | 字段 | 类型 | 必选 | 描述 | |-------------|---------|--------|-----------------------------| -| bk_org_ip | string | 是 | 源主机ip, 只支持传入单ip | -| bk_dst_ip | string | 是 | 目标主机ip, 多个ip用","分割 | +| bk_org_ip | string | 是 | 源主机内网ip | +| bk_dst_ip | string | 是 | 目标主机内网ip | +| bk_org_id | int | 是 | 源主机身份ID | +| bk_dst_id | int | 是 | 目标主机身份ID | | bk_biz_id | int | 是 | 业务ID | | bk_cloud_id | int | 否 | 云区域ID | + +注: 使用主机内网IP进行克隆与使用主机身份ID进行克隆,这两种方式只能使用期中的一种,不能混用。 + ### 请求参数示例 -```python +```json { "bk_biz_id":2, "bk_org_ip":"127.0.0.1", @@ -25,7 +30,16 @@ "bk_cloud_id":0 } ``` +或 +```json +{ + "bk_biz_id":2, + "bk_org_id": 10, + "bk_dst_id": 11, + "bk_cloud_id":0 +} +``` ### 返回结果示例 diff --git a/paas2/esb/components/confapis/cc/apidocs/zh_hans/create_process_instance.md b/paas2/esb/components/confapis/cc/apidocs/zh_hans/create_process_instance.md index 565c54f32..b7c66c2d3 100644 --- a/paas2/esb/components/confapis/cc/apidocs/zh_hans/create_process_instance.md +++ b/paas2/esb/components/confapis/cc/apidocs/zh_hans/create_process_instance.md @@ -15,7 +15,7 @@ ### 请求参数示例 -```python +```json { "bk_biz_id": 1, "service_instance_id": 48, @@ -23,28 +23,33 @@ { "process_info": { "bk_supplier_account": "0", - "bind_ip": "1", "description": "", "start_cmd": "", "restart_cmd": "", "pid_file": "", "auto_start": false, "timeout": 30, - "protocol": "1", - "auto_time_gap": 60, "reload_cmd": "", "bk_func_name": "java", "work_path": "/data/bkee", "stop_cmd": "", "face_stop_cmd": "", - "port": "8008,8443", "bk_process_name": "job_java", "user": "", "proc_num": 1, "priority": 1, "bk_biz_id": 2, - "bk_func_id": "", - "bk_process_id": 1 + "bk_start_param_regex": "", + "bk_process_id": 1, + "bind_info": [ + { + "enable": false, + "ip": "127.0.0.1", + "port": "80", + "protocol": "1", + "template_row_id": 1234 + } + ] } } ] diff --git a/paas2/esb/components/confapis/cc/apidocs/zh_hans/create_service_instance.md b/paas2/esb/components/confapis/cc/apidocs/zh_hans/create_service_instance.md index 2571bd77b..21cb6a720 100644 --- a/paas2/esb/components/confapis/cc/apidocs/zh_hans/create_service_instance.md +++ b/paas2/esb/components/confapis/cc/apidocs/zh_hans/create_service_instance.md @@ -24,7 +24,7 @@ ### 请求参数示例 -```python +```json { "bk_biz_id": 1, "name": "test1", @@ -37,14 +37,21 @@ "process_template_id": 1, "process_info": { "bk_supplier_account": "0", - "bind_ip": "1", + "bind_info": [ + { + "enable": false, + "ip": "127.0.0.1", + "port": "80", + "protocol": "1", + "template_row_id": 1234 + } + ], "description": "", "start_cmd": "", "restart_cmd": "", "pid_file": "", "auto_start": false, "timeout": 30, - "protocol": "1", "auto_time_gap": 60, "reload_cmd": "", "bk_func_name": "java", diff --git a/paas2/esb/components/confapis/cc/apidocs/zh_hans/delete_cloud_area.md b/paas2/esb/components/confapis/cc/apidocs/zh_hans/delete_cloud_area.md index 2bceb85f9..43cf31f6b 100644 --- a/paas2/esb/components/confapis/cc/apidocs/zh_hans/delete_cloud_area.md +++ b/paas2/esb/components/confapis/cc/apidocs/zh_hans/delete_cloud_area.md @@ -15,15 +15,16 @@ ### 请求参数示例 -``` python - +``` json +{ + "bk_cloud_id": 5 +} ``` ### 返回结果示例 -```python - +```json { "result": true, "code": 0, diff --git a/paas2/esb/components/confapis/cc/apidocs/zh_hans/find_host_relations_with_topo.md b/paas2/esb/components/confapis/cc/apidocs/zh_hans/find_host_relations_with_topo.md new file mode 100644 index 000000000..66feff41f --- /dev/null +++ b/paas2/esb/components/confapis/cc/apidocs/zh_hans/find_host_relations_with_topo.md @@ -0,0 +1,74 @@ +### 功能描述 + +根据业务拓扑实例节点,查询该实例节点下的主机关系信息 + +### 请求参数 + +{{ common_args_desc }} + +#### 接口参数 + +| 字段 | 类型 | 必选 | 描述 | +|---------------------|------------|--------|-----------------------------| +| page | dict | 是 | 查询条件 | +| fields | array | 是 | 主机属性列表,控制返回结果的主机里有哪些字段,请按需求填写,可以为bk_biz_id,bk_host_id,bk_module_id,bk_set_id,bk_supplier_account| +| bk_obj_id | string | 是 | 拓扑节点的模型ID,可以是自定义层级模型ID,set,module等,但不能是业务 | +| bk_inst_ids | int array | 是 | 拓扑节点的实例ID,最多支持50个实例节点 | + + +#### page + +| 字段 | 类型 | 必选 | 描述 | +|-----------|------------|--------|------------| +| start | int | 是 | 记录开始位置 | +| limit | int | 是 | 每页限制条数,最大值为500 | +| sort | string | 否 | 排序字段 | + +### 请求参数示例 + +```json +{ + "bk_app_code": "esb_test", + "bk_app_secret": "xxx", + "bk_token": "xxx", + "page": { + "start": 0, + "limit": 10 + }, + "fields": [ + "bk_module_id", + "bk_host_id" + ], + "bk_obj_id": "province", + "bk_inst_ids": [10,11] +} +``` + +### 返回结果示例 + +```json +{ + "result":true, + "code":0, + "message":"success", + "data": { + "count": 1, + "info": [ + { + "bk_host_id": 2, + "bk_module_id": 51 + } + ] + } +} +``` + +### 返回结果参数说明 + +#### data + +| 字段 | 类型 | 描述 | +|-----------|-----------|-----------| +| count | int | 记录条数 | +| info | object array | 主机关系信息 | + diff --git a/paas2/esb/components/confapis/cc/apidocs/zh_hans/find_instance_association.md b/paas2/esb/components/confapis/cc/apidocs/zh_hans/find_instance_association.md index 7a709b93e..fe732c50c 100644 --- a/paas2/esb/components/confapis/cc/apidocs/zh_hans/find_instance_association.md +++ b/paas2/esb/components/confapis/cc/apidocs/zh_hans/find_instance_association.md @@ -35,7 +35,7 @@ condition params | bk_obj_asst_id | string | Yes | 模型关联关系的唯一id| | bk_asst_id | string | NO | 关联类型的唯一id| | bk_obj_id | string | NO | 源模型id| -| bk_asst_id | string | NO | 目标模型id| +| bk_asst_obj_id | string | NO | 目标模型id| ### 请求参数示例 diff --git a/paas2/esb/components/confapis/cc/apidocs/zh_hans/get_proc_template.md b/paas2/esb/components/confapis/cc/apidocs/zh_hans/get_proc_template.md index f43fe0fee..79d5c1cad 100644 --- a/paas2/esb/components/confapis/cc/apidocs/zh_hans/get_proc_template.md +++ b/paas2/esb/components/confapis/cc/apidocs/zh_hans/get_proc_template.md @@ -25,72 +25,120 @@ ### 返回结果示例 -```python +```json { "result": true, "code": 0, "message": "success", "permission": null, "data": { - "count": 1, - "info": [ - { - "bk_biz_id": 1, - "id": 49, - "name": "10.27.0.9_p1_81", - "service_template_id": 50, - "bk_host_id": 11, - "bk_host_innerip": "10.27.0.9", - "bk_module_id": 56, - "creator": "admin", - "modifier": "admin", - "create_time": "2019-07-22T09:54:50.906+08:00", - "last_time": "2019-07-22T09:54:50.906+08:00", - "bk_supplier_account": "0", - "service_category_id": 22, - "process_instances": [ - { - "process": { - "bk_biz_id": 1, - "proc_num": 0, - "stop_cmd": "", - "restart_cmd": "", - "face_stop_cmd": "", - "bk_process_id": 43, - "bk_func_name": "p1", - "work_path": "", - "bind_ip": "0.0.0.0", - "priority": 0, - "reload_cmd": "", - "bk_process_name": "p1", - "port": "81", - "pid_file": "", - "auto_start": false, - "auto_time_gap": 0, - "last_time": "2019-07-22T09:54:50.927+08:00", - "create_time": "2019-07-22T09:54:50.927+08:00", - "bk_biz_id": 3, - "start_cmd": "", - "bk_func_id": "", - "user": "", - "timeout": 0, - "protocol": "1", - "description": "", - "bk_supplier_account": "0", - "bk_start_param_regex": "" - }, - "relation": { - "bk_biz_id": 1, - "bk_process_id": 43, - "service_instance_id": 49, - "process_template_id": 48, - "bk_host_id": 11, - "bk_supplier_account": "0" + "id": 50, + "bk_process_name": "p1", + "bk_biz_id": 1, + "service_template_id": 51, + "property": { + "proc_num": { + "value": 300, + "as_default_value": false + }, + "stop_cmd": { + "value": "", + "as_default_value": false + }, + "restart_cmd": { + "value": "", + "as_default_value": false + }, + "face_stop_cmd": { + "value": "", + "as_default_value": false + }, + "bk_func_name": { + "value": "p1", + "as_default_value": true + }, + "work_path": { + "value": "", + "as_default_value": false + }, + "priority": { + "value": null, + "as_default_value": false + }, + "reload_cmd": { + "value": "", + "as_default_value": false + }, + "bk_process_name": { + "value": "p1", + "as_default_value": true + }, + "pid_file": { + "value": "", + "as_default_value": false + }, + "auto_start": { + "value": false, + "as_default_value": false + }, + "auto_time_gap": { + "value": null, + "as_default_value": false + }, + "start_cmd": { + "value": "", + "as_default_value": false + }, + "bk_func_id": { + "value": null, + "as_default_value": false + }, + "user": { + "value": "root100", + "as_default_value": false + }, + "timeout": { + "value": null, + "as_default_value": false + }, + "description": { + "value": "", + "as_default_value": false + }, + "bk_start_param_regex": { + "value": "", + "as_default_value": false + }, + "bind_info": { + "value": [ + { + "enable": { + "value": false, + "as_default_value": true + }, + "ip": { + "value": "1", + "as_default_value": true + }, + "port": { + "value": "100", + "as_default_value": true + }, + "protocol": { + "value": "1", + "as_default_value": true + }, + "row_id": 1 } - } - ] + ], + "as_default_value": true } - ] + }, + "creator": "admin", + "modifier": "admin", + "create_time": "2019-06-19T15:24:04.763+08:00", + "last_time": "2019-06-21T16:25:03.962512+08:00", + "bk_supplier_account": "0" } } diff --git a/paas2/esb/components/confapis/cc/apidocs/zh_hans/host_install_bk.md b/paas2/esb/components/confapis/cc/apidocs/zh_hans/host_install_bk.md index 03fd9008f..365980588 100644 --- a/paas2/esb/components/confapis/cc/apidocs/zh_hans/host_install_bk.md +++ b/paas2/esb/components/confapis/cc/apidocs/zh_hans/host_install_bk.md @@ -32,14 +32,14 @@ { "bk_set_name":"set1", "bk_module_name":"module2", - "bk_host_innerip":"127.127.0.1", + "bk_host_innerip":"127.0.0.1", "bk_cloud_id":0, "host_info":{ "bk_comment":"test bk_comment 1", "bk_os_type":"1" }, "proc_info":{ - "p1":{"bind_ip":"127.127.0.1"} + "p1":{"description":"xxx"} } } diff --git a/paas2/esb/components/confapis/cc/apidocs/zh_hans/list_biz_host_process_relation.md b/paas2/esb/components/confapis/cc/apidocs/zh_hans/list_biz_host_process_relation.md deleted file mode 100644 index a59f54d40..000000000 --- a/paas2/esb/components/confapis/cc/apidocs/zh_hans/list_biz_host_process_relation.md +++ /dev/null @@ -1,92 +0,0 @@ -### 功能描述 - -查询业务下的主机和进程信息 - -### 请求参数 - -{{ common_args_desc }} - -#### 接口参数 - -| 字段 | 类型 | 必选 | 描述 | -|----------------------|------------|--------|-----------------------| -| bk_biz_id | int | 是 | 业务ID | -| bk_host_ids | int array | 否 | 主机ID | -| page | object | 是 | 分页参数 | - -#### page -| 字段 | 类型 | 必选 | 描述 | -| ----- | ------ | --- | ---------------------- | -| start | int | 是 | 记录开始位置 | -| limit | int | 是 | 每页限制条数,最大值为1000 | -| sort | string | 否 | 排序字段,'-'代表倒序 | - -### 请求参数示例 - -```json -{ - "bk_biz_id": 2, - "page": { - "start": 0, - "limit": 1, - "sort": "-bk_host_id" - }, - "bk_host_ids": [ - 11, - 12 - ] -} -``` - -### 返回结果示例 - -```json -{ - "result": true, - "code": 0, - "message": "success", - "permission": null, - "data": { - "count": 1, - "info": [ - { - "bk_biz_id": 2, - "bk_host_id": 11, - "bk_process_id": 43, - "port": "81", - "bind_ip": "127.0.0.1", - "protocol": "1" - } - ] - } -} -``` - -### 返回结果参数说明 - -#### response - -| 名称 | 类型 | 描述 | -| ------- | ------ | ------------------------------------- | -| result | bool | 请求成功与否。true:请求成功;false请求失败 | -| code | int | 错误编码。 0表示success,>0表示失败错误 | -| message | string | 请求失败返回的错误信息 | -| data | object | 请求返回的数据 | - -#### data 字段说明 - -| 字段 | 类型 | 说明 | -| ----- | ------- | ------- | -| count | integer | 总数 | -| info | array | 返回结果 | - -#### info 字段说明 - -| 字段 | 类型 | 说明 | -| ------------- | ------ | ----------------------------- | -| bk_biz_id | int | 业务ID | -| bk_host_id | int | 主机ID | -| bk_process_id | int | 进程ID | -| port | string | 进程绑定端口 | -| bind_ip | string | 进程绑定ip | -| protocol | string | 进程绑定协议, "1"为TCP, "2"为UDP | \ No newline at end of file diff --git a/paas2/esb/components/confapis/cc/apidocs/zh_hans/list_host_detail_topology.md b/paas2/esb/components/confapis/cc/apidocs/zh_hans/list_host_detail_topology.md new file mode 100644 index 000000000..c54f4e5a2 --- /dev/null +++ b/paas2/esb/components/confapis/cc/apidocs/zh_hans/list_host_detail_topology.md @@ -0,0 +1,278 @@ +### 功能描述 + +根据主机条件信息查询主机详情及其所属的拓扑信息 + +### 请求参数 + + +#### 通用参数 + +| 字段 | 类型 | 必选 | 描述 | +|-----------|------------|--------|------------| +| bk_app_code | string | 是 | 应用ID | +| bk_app_secret| string | 是 | 安全密钥(应用 TOKEN),可以通过 蓝鲸智云开发者中心 -> 点击应用ID -> 基本信息 获取 | +| bk_token | string | 否 | 当前用户登录态,bk_token与bk_username必须一个有效,bk_token可以通过Cookie获取 | +| bk_username | string | 否 | 当前用户用户名,应用免登录态验证白名单中的应用,用此字段指定当前用户 | + +#### 接口参数 + +| 字段 | 类型 | 必选 | 描述 | +|-----------|------------|--------|------------| +| page | dict | 是 | 查询条件 | +| host_property_filter| object| 否| 主机属性组合查询条件 | +| fields | array | 是 | 主机属性列表,控制返回结果的主机里有哪些字段,请按需求填写| + +#### host_property_filter +该参数为主机属性字段过滤规则的组合,用于根据主机属性字段搜索主机。组合支持AND 和 OR 两种方式,可以嵌套,最多嵌套2层。 +过滤规则为四元组 `field`, `operator`, `value` + +| 名称 | 类型 |必填| 默认值 | 说明 | Description| +| --- | --- | --- |--- | --- | ---| +| field|string|是|无|字段名 || +| operator|string|是|无|操作符 |可选值 equal,not_equal,in,not_in,less,less_or_equal,greater,greater_or_equal,between,not_between,contains,exists,not_exists; 其中contains为正则匹配,大小写不敏感, exists为过滤某字段存在的条件, not_exists为过滤某字段不存在的条件 | +| value| - | 否| 无|操作数|不同的operator对应不同的value格式| + +组装规则可参考: + + + +#### page + +| 字段 | 类型 | 必选 | 描述 | +|-----------|------------|--------|------------| +| start | int | 是 | 记录开始位置 | +| limit | int | 是 | 每页限制条数,最大值为500 | +| sort | string | 否 | 排序字段 | + + + +### 请求参数示例 + +```json +{ + "bk_app_code": "esb_test", + "bk_app_secret": "xxx", + "bk_token": "xxx", + "page": { + "start": 0, + "limit": 10, + "sort": "bk_host_id" + }, + "fields": [ + "bk_host_id", + "bk_host_innerip" + ], + "host_property_filter": { + "condition": "AND", + "rules": [ + { + "field": "bk_host_innerip", + "operator": "equal", + "value": "192.168.1.1" + }, + { + "condition": "OR", + "rules": [ + { + "field": "bk_os_type", + "operator": "not_in", + "value": [ + "3" + ] + }, + { + "field": "bk_cloud_id", + "operator": "equal", + "value": 0 + } + ] + } + ] + } +} +``` + +### 返回结果示例 + +```json +{ + "result": true, + "code": 0, + "message": "success", + "permission": null, + "data": { + "count": 2, + "info": [ + { + "host": { + "bk_host_id": 2, + "bk_host_innerip": "192.168.1.1" + }, + "topo": [ + { + "inst": { + "obj": "nation", + "name": "中国", + "id": 30 + }, + "children": [ + { + "inst": { + "obj": "province", + "name": "prov-xxx", + "id": 31 + }, + "children": [ + { + "inst": { + "obj": "set", + "name": "set-xxx", + "id": 20 + }, + "children": [ + { + "inst": { + "obj": "module", + "name": "mod-xxx", + "id": 52 + }, + "children": null + }, + { + "inst": { + "obj": "module", + "name": "mod-yy", + "id": 53 + }, + "children": null + } + ] + } + ] + } + ] + }, + { + "inst": { + "obj": "nation", + "name": "国家", + "id": 29 + }, + "children": [ + { + "inst": { + "obj": "province", + "name": "prv1", + "id": 26 + }, + "children": [ + { + "inst": { + "obj": "set", + "name": "set11", + "id": 19 + }, + "children": [ + { + "inst": { + "obj": "module", + "name": "m22", + "id": 51 + }, + "children": null + } + ] + } + ] + } + ] + } + ] + }, + { + "host": { + "bk_host_id": 4, + "bk_host_innerip": "192.168.1.2" + }, + "topo": [ + { + "inst": { + "obj": "set", + "name": "空闲机池", + "id": 2 + }, + "children": [ + { + "inst": { + "obj": "module", + "name": "故障机", + "id": 4 + }, + "children": null + } + ] + } + ] + } + ] + } +} +``` + +### 返回结果参数说明 + +#### data + +| 字段 | 类型 | 描述 | +|-----------|-----------|-----------| +| count | int | 记录条数 | +| info | array | 主机数据和拓扑信息 | + +#### data.info +| 字段 | 类型 | 描述 | +|-----------|-----------|-----------| +| host | dict | 主机实际数据 | +| topo | array | 主机拓扑信息 | + +#### data.info.host +| 名称 | 类型 | 说明 |Description| +|---|---|---|---| +| bk_isp_name| string | 所属运营商 | 0:其它;1:电信;2:联通;3:移动| +| bk_sn | string | 设备SN | | +| operator | string | 主要维护人 | | +| bk_outer_mac | string | 外网MAC | | +| bk_state_name | string | 所在国家 |CN:中国,详细值,请参考CMDB页面 | +| bk_province_name | string | 所在省份 | | +| import_from | string | 录入方式 | 1:excel;2:agent;3:api | +| bk_sla | string | SLA级别 | 1:L1;2:L2;3:L3 | +| bk_service_term | int | 质保年限 | 1-10 | +| bk_os_type | string | 操作系统类型 | 1:Linux;2:Windows;3:AIX | +| bk_os_version | string | 操作系统版本 | | +| bk_os_bit | int | 操作系统位数 | | +| bk_mem | string | 内存容量| | +| bk_mac | string | 内网MAC地址 | | +| bk_host_outerip | string | 外网IP | | +| bk_host_name | string | 主机名称 | | +| bk_host_innerip | string | 内网IP | | +| bk_host_id | int | 主机ID | | +| bk_disk | int | 磁盘容量 | | +| bk_cpu_module | string | CPU型号 | | +| bk_cpu_mhz | int | CPU频率 | | +| bk_cpu | int | CPU逻辑核心数 | 1-1000000 | +| bk_comment | string | 备注 | | +| bk_cloud_id | int | 云区域 | | +| bk_bak_operator | string | 备份维护人 | | +| bk_asset_id | string | 固资编号 | | + +#### data.info.topo +| 字段 | 类型 | 描述 | +|-----------|-----------|-----------| +| inst | object | 描述该节点实例的详情信息| +| inst.obj | string | 该节点的模型类型,如set/module及自定义层级模型类型 | +| inst.name | string | 该节点的实例名 | +| inst.id | int | 该节点的实例ID | +| children | object array | 描述当前实例节点的子节点详情信息,可能有多个 | +| children.inst | object | 该子节点的实例详情信息 | +| children.children | string | 描述该节点的子节点详情信息 | + + diff --git a/paas2/esb/components/confapis/cc/apidocs/zh_hans/list_process_related_info.md b/paas2/esb/components/confapis/cc/apidocs/zh_hans/list_process_related_info.md index e8aa520c3..ee1017f1e 100644 --- a/paas2/esb/components/confapis/cc/apidocs/zh_hans/list_process_related_info.md +++ b/paas2/esb/components/confapis/cc/apidocs/zh_hans/list_process_related_info.md @@ -31,6 +31,7 @@ | --- | --- | --- | --- | | start|int|No|记录开始位置,默认为0 | | limit|int|Yes|每页限制条数,最大500 | +| sort | string | 否 | 排序字段,'-'表示倒序, 只能是进程的字段,默认按bk_process_id排序 | ### 请求参数示例 @@ -75,7 +76,8 @@ ], "page": { "start": 0, - "limit": 100 + "limit": 100, + "sort": "bk_process_id" } } ``` diff --git a/paas2/esb/components/confapis/cc/apidocs/zh_hans/list_service_instance_detail.md b/paas2/esb/components/confapis/cc/apidocs/zh_hans/list_service_instance_detail.md index 5495e3524..9b3dc945f 100644 --- a/paas2/esb/components/confapis/cc/apidocs/zh_hans/list_service_instance_detail.md +++ b/paas2/esb/components/confapis/cc/apidocs/zh_hans/list_service_instance_detail.md @@ -49,7 +49,7 @@ ### 返回结果示例 -```python +```json { "result": true, "code": 0, @@ -61,7 +61,7 @@ { "bk_biz_id": 1, "id": 49, - "name": "10.27.0.9_p1_81", + "name": "p1_81", "service_template_id": 50, "bk_host_id": 11, "bk_module_id": 56, @@ -74,7 +74,6 @@ "process_instances": [ { "process": { - "bk_biz_id": 1, "proc_num": 0, "stop_cmd": "", "restart_cmd": "", @@ -82,25 +81,29 @@ "bk_process_id": 43, "bk_func_name": "p1", "work_path": "", - "bind_ip": "0.0.0.0", "priority": 0, "reload_cmd": "", "bk_process_name": "p1", - "port": "81", "pid_file": "", "auto_start": false, - "auto_time_gap": 0, "last_time": "2019-07-22T09:54:50.927+08:00", "create_time": "2019-07-22T09:54:50.927+08:00", "bk_biz_id": 3, "start_cmd": "", - "bk_func_id": "", "user": "", "timeout": 0, - "protocol": "1", "description": "", "bk_supplier_account": "0", - "bk_start_param_regex": "" + "bk_start_param_regex": "", + "bind_info": [ + { + "enable": true, + "ip": "127.0.0.1", + "port": "80", + "protocol": "1", + "template_row_id": 1234 + } + ] }, "relation": { "bk_biz_id": 1, @@ -152,6 +155,7 @@ |create_time|string|创建时间|| |last_time|string|修复时间|| |bk_supplier_account|string|供应商ID|| +|service_category_id|integer|服务分类ID|| |process_instances|数组|进程实例信息|包括|| |bk_biz_id|int|业务ID|业务ID|| |process_instances.process|object|进程实例详情|进程属性字段|| diff --git a/paas2/esb/components/confapis/cc/apidocs/zh_hans/list_service_template.md b/paas2/esb/components/confapis/cc/apidocs/zh_hans/list_service_template.md index 64850d780..9f420267f 100644 --- a/paas2/esb/components/confapis/cc/apidocs/zh_hans/list_service_template.md +++ b/paas2/esb/components/confapis/cc/apidocs/zh_hans/list_service_template.md @@ -12,57 +12,50 @@ |----------------------|------------|--------|-----------------------| | bk_biz_id | int | 是 | 业务ID | | service_category_id | int | 否 | 服务分类ID | +| search | string | 否 | 按服务模版名查询,默认为空 | +| is_exact | bool | 否 | 是否精确匹配服务模版名,默认为否,和search参数搭配使用,在search参数不为空的情况下有效(v3.9.19) | ### 请求参数示例 -```python +```json { - "bk_biz_id": 1, - "service_category_id": 1, - "page": { - "start": 0, - "limit": 10, - "sort": "-name" - } + "bk_biz_id": 1, + "service_category_id": 1, + "search": "test2", + "is_exact": true, + "page": { + "start": 0, + "limit": 10, + "sort": "-name" + } } ``` ### 返回结果示例 -```python +```json { - "result": true, - "code": 0, - "message": "success", - "permission": null, - "data": { - "count": 2, - "info": [ - { - "bk_biz_id": 1, - "id": 51, - "name": "test3", - "service_category_id": 1, - "creator": "admin", - "modifier": "admin", - "create_time": "2019-09-18T20:31:34.627+08:00", - "last_time": "2019-09-18T20:31:34.627+08:00", - "bk_supplier_account": "0" - }, - { - "bk_biz_id": 1, - "id": 50, - "name": "test2", - "service_category_id": 1, - "creator": "admin", - "modifier": "admin", - "create_time": "2019-09-18T20:31:29.607+08:00", - "last_time": "2019-09-18T20:31:29.607+08:00", - "bk_supplier_account": "0" - } - ] - } + "result": true, + "code": 0, + "message": "success", + "permission": null, + "data": { + "count": 1, + "info": [ + { + "bk_biz_id": 1, + "id": 50, + "name": "test2", + "service_category_id": 1, + "creator": "admin", + "modifier": "admin", + "create_time": "2019-09-18T20:31:29.607+08:00", + "last_time": "2019-09-18T20:31:29.607+08:00", + "bk_supplier_account": "0" + } + ] + } } ``` diff --git a/paas2/esb/components/confapis/cc/apidocs/zh_hans/list_service_template_detail.md b/paas2/esb/components/confapis/cc/apidocs/zh_hans/list_service_template_detail.md deleted file mode 100644 index 86776bdd8..000000000 --- a/paas2/esb/components/confapis/cc/apidocs/zh_hans/list_service_template_detail.md +++ /dev/null @@ -1,156 +0,0 @@ -### 功能描述 - -根据业务id查询服务分类列表 - -### 请求参数 - -{{ common_args_desc }} - -#### 接口参数 - -| 字段 | 类型 | 必选 | 描述 | -|----------------------|------------|--------|-----------------------| -| bk_biz_id | int | 是 | 业务ID | -| bk_set_id | int | 否 | 集群ID | -| bk_module_id | int | 否 | 模块ID | -| bk_host_id | int | 否 | 主机ID | -| service_instance_ids | int | 否 | 服务实例ID列表 | -| selectors | int | 否 | label过滤功能,operator可选值: `=`,`!=`,`exists`,`!`,`in`,`notin`| - -### 请求参数示例 - -```python - -{ - "bk_biz_id": 1, - "limit": { - "start": 0, - "limit": 1 - }, - "with_name": true, - "bk_set_id": 15, - "bk_module_id": 8, - "bk_host_id": 11, - "service_instance_ids": [49], - "selectors": [{ - "key": "key1", - "operator": "notin", - "values": ["value1"] - }] -} - - -``` - -### 返回结果示例 - -```python -{ - "result": true, - "code": 0, - "message": "success", - "permission": null, - "data": { - "count": 1, - "info": [ - { - "bk_biz_id": 1, - "id": 49, - "name": "10.27.0.9_p1_81", - "service_template_id": 50, - "bk_host_id": 11, - "bk_host_innerip": "10.27.0.9", - "bk_module_id": 56, - "creator": "admin", - "modifier": "admin", - "create_time": "2019-07-22T09:54:50.906+08:00", - "last_time": "2019-07-22T09:54:50.906+08:00", - "bk_supplier_account": "0", - "service_category_id": 22, - "process_instances": [ - { - "process": { - "bk_biz_id": 1, - "proc_num": 0, - "stop_cmd": "", - "restart_cmd": "", - "face_stop_cmd": "", - "bk_process_id": 43, - "bk_func_name": "p1", - "work_path": "", - "bind_ip": "0.0.0.0", - "priority": 0, - "reload_cmd": "", - "bk_process_name": "p1", - "port": "81", - "pid_file": "", - "auto_start": false, - "auto_time_gap": 0, - "last_time": "2019-07-22T09:54:50.927+08:00", - "create_time": "2019-07-22T09:54:50.927+08:00", - "bk_biz_id": 3, - "start_cmd": "", - "bk_func_id": "", - "user": "", - "timeout": 0, - "protocol": "1", - "description": "", - "bk_supplier_account": "0", - "bk_start_param_regex": "" - }, - "relation": { - "bk_biz_id": 1, - "bk_process_id": 43, - "service_instance_id": 49, - "process_template_id": 48, - "bk_host_id": 11, - "bk_supplier_account": "0" - } - } - ] - } - ] - } -} - -``` - -### 返回结果参数说明 - -#### response - -| 名称 | 类型 | 描述 | -|---|---|---| -| result | bool | 请求成功与否。true:请求成功;false请求失败 | -| code | int | 错误编码。 0表示success,>0表示失败错误 | -| message | string | 请求失败返回的错误信息 | -| data | object | 请求返回的数据 | - -#### data 字段说明 - -| 字段|类型|说明|描述| -|---|---|---|---| -|count|integer|总数|| -|info|array|返回结果|| - -#### info 字段说明 - -| 字段|类型|说明|Description| -|---|---|---|---| -|id|integer|服务实例ID|| -|name|array|服务实例名称|| -|service_template_id|integer|服务模板ID|| -|service_category_id|integer|服务分类ID|| -|bk_host_id|integer|主机ID|| -|bk_host_innerip|string|主机IP|| -|bk_module_id|integer|模块ID|| -|creator|string|创建人|| -|modifier|string|修改人|| -|create_time|string|创建时间|| -|last_time|string|修复时间|| -|bk_supplier_account|string|供应商ID|| -|bk_biz_id|int|业务ID|| -|process_instances|数组|进程实例信息|包括|| -|process_instances.process|object|进程实例详情|进程属性字段|| -|process_instances.relation|object|进程实例的关联信息|比如主机ID,进程模板ID|| - diff --git a/paas2/esb/components/confapis/cc/apidocs/zh_hans/list_service_template_difference.md b/paas2/esb/components/confapis/cc/apidocs/zh_hans/list_service_template_difference.md new file mode 100644 index 000000000..353e1b91b --- /dev/null +++ b/paas2/esb/components/confapis/cc/apidocs/zh_hans/list_service_template_difference.md @@ -0,0 +1,190 @@ +### 功能描述 + +列出服务模版和服务实例之间的差异 (v3.9.19) + +- 该接口专供GSEKit使用,在ESB文档中为hidden状态 + +### 请求参数 + +{{ common_args_desc }} + +#### 接口参数 + +|字段|类型|必填|描述| +|---|---|---|---| +| bk_biz_id | int64 | Yes | 业务ID | +|bk_module_ids|int64 array|Yes|模块ID列表| + + +### 请求参数示例 + +``` json +{ + "bk_module_ids": [ + 60, + 61 + ], + "bk_biz_id": 3 +} +``` + +### 返回结果示例 +``` json +{ + "result": true, + "bk_error_code": 0, + "bk_error_msg": "success", + "permission": null, + "data": [ + { + "bk_module_id": 61, + "unchanged": [], + "changed": [ + { + "process_template_id": 48, + "process_template_name": "pr1", + "service_instance_count": 3, + "service_instances": [ + { + "service_instance": { + "id": 3, + "name": "192.168.15.13_pr1" + }, + "process": null, + "changed_attributes": [ + { + "id": 55, + "property_id": "description", + "property_name": "备注", + "property_value": "", + "template_property_value": { + "value": "aaa", + "as_default_value": true + } + } + ] + }, + { + "service_instance": { + "id": 5, + "name": "192.168.15.12_pr1" + }, + "process": null, + "changed_attributes": [ + { + "id": 55, + "property_id": "description", + "property_name": "备注", + "property_value": "", + "template_property_value": { + "value": "aaa", + "as_default_value": true + } + } + ] + }, + { + "service_instance": { + "id": 4, + "name": "192.168.15.11_pr1" + }, + "process": null, + "changed_attributes": [ + { + "id": 55, + "property_id": "description", + "property_name": "备注", + "property_value": "", + "template_property_value": { + "value": "aaa", + "as_default_value": true + } + } + ] + } + ] + } + ], + "added": [], + "removed": [], + "changed_attributes": [], + "has_difference": true + }, + { + "bk_module_id": 60, + "unchanged": [], + "changed": [ + { + "process_template_id": 48, + "process_template_name": "pr1", + "service_instance_count": 2, + "service_instances": [ + { + "service_instance": { + "id": 1, + "name": "192.168.15.10_pr1" + }, + "process": null, + "changed_attributes": [ + { + "id": 55, + "property_id": "description", + "property_name": "备注", + "property_value": "", + "template_property_value": { + "value": "aaa", + "as_default_value": true + } + } + ] + }, + { + "service_instance": { + "id": 2, + "name": "192.168.15.1_pr1" + }, + "process": null, + "changed_attributes": [ + { + "id": 55, + "property_id": "description", + "property_name": "备注", + "property_value": "", + "template_property_value": { + "value": "aaa", + "as_default_value": true + } + } + ] + } + ] + } + ], + "added": [], + "removed": [], + "changed_attributes": [], + "has_difference": true + } + ] +} +``` + +### 返回结果参数说明 + +| 名称 | 类型 | 描述 | +|---|---|--- | +| result | bool | 请求成功与否。true:请求成功;false请求失败 | +| code | int | 错误编码。 0表示success,>0表示失败错误 | +| message | string | 请求失败返回的错误信息 | + +- data 字段说明 + +| 名称 | 类型 | 描述 | +|---|---|--- | +|bk_module_id|int|模块ID| +|unchanged|object array|无变化的进程实例列表信息| +|changed|object array|有变化的进程实例列表信息| +|added|object array|增加的进程实例列表信息| +|removed|object array|移除的进程实例列表信息| +|changed_attributes|object array|服务模版属性和所应用的模块属性改变列表| +|has_difference|bool|服务模版所应用的模块对应的进程信息是否有差异| diff --git a/paas2/esb/components/confapis/cc/apidocs/zh_hans/resource_watch.md b/paas2/esb/components/confapis/cc/apidocs/zh_hans/resource_watch.md index 60d8d8bc0..14d8101f9 100644 --- a/paas2/esb/components/confapis/cc/apidocs/zh_hans/resource_watch.md +++ b/paas2/esb/components/confapis/cc/apidocs/zh_hans/resource_watch.md @@ -21,7 +21,7 @@ * 支持主机与主机关系数据变化的事件watch能力。 -* 采用短长链的设计,当用户通过游标进行事件watch时,如果没有事件,则会保持会话连接,在25s内有事件变更则直接直接将事件推回。避免用户不断请求,同时保证用户能及时的拿到变更的数据。 +* 采用短长链的设计,当用户通过游标进行事件watch时,如果没有事件,则会保持会话连接,在20s内有事件变更则直接直接将事件推回。避免用户不断请求,同时保证用户能及时的拿到变更的数据。 * 支持批量事件watch能力,提升系统吞吐能力。 @@ -42,7 +42,7 @@ | bk_fields | array string | 看情况 | 返回的事件中需要返回的字段列表,目前监听主机资源该字段为必填字段,不能置空,主机关系可以置空。置空则默认为返回所有字段。 | | bk_start_from | Int64 | 否 | 监听事件的起始时间,该值为unix time的秒数,即为从UTC1970年1月1日0时0分0秒起至你要watch的时间点的总秒数。 | | bk_cursor | string | 否 | 监听事件的游标,代表了要开始或者继续watch(监听)的事件地址,系统会返回这个游标的下一个、或一批事件。 | -| bk_resource | string | 是 | 要监听的资源类型,枚举值为:host, host_relation, biz, set, module, set_template。其中host代表主机详情事件,host_relation代表主机的关系事件,biz代表业务详情事件,set代表集群详情事件,module代表模块详情事件,set_template代表集群模板详情事件。 | +| bk_resource | string | 是 | 要监听的资源类型,枚举值为:host, host_relation, biz, set, module, set_template, process。其中host代表主机详情事件,host_relation代表主机的关系事件,biz代表业务详情事件,set代表集群详情事件,module代表模块详情事件,set_template代表集群模板详情事件,process代表进程详情事件。 | | bk_supplier_account | string | 是 | 开发商账号 | diff --git a/paas2/esb/components/bk/apisv2/cc/apidocs/zh_hans/delete_custom_query.md b/paas2/esb/components/confapis/cc/apidocs/zh_hans/transfer_host_to_recyclemodule.md similarity index 64% rename from paas2/esb/components/bk/apisv2/cc/apidocs/zh_hans/delete_custom_query.md rename to paas2/esb/components/confapis/cc/apidocs/zh_hans/transfer_host_to_recyclemodule.md index b662c758e..0da0dc941 100644 --- a/paas2/esb/components/bk/apisv2/cc/apidocs/zh_hans/delete_custom_query.md +++ b/paas2/esb/components/confapis/cc/apidocs/zh_hans/transfer_host_to_recyclemodule.md @@ -1,6 +1,6 @@ ### 功能描述 -删除自定义查询 +上交主机到业务的待回收模块 ### 请求参数 @@ -11,8 +11,8 @@ | 字段 | 类型 | 必选 | 描述 | |-----------|------------|--------|------------| | bk_supplier_account | string | 否 | 开发商账号 | -| bk_biz_id | int | 是 | 业务ID | -| id | string | 是 | 主键ID | +| bk_biz_id | int | 是 | 业务ID | +| bk_host_id | array | 是 | 主机ID | ### 请求参数示例 @@ -21,9 +21,12 @@ "bk_app_code": "esb_test", "bk_app_secret": "xxx", "bk_token": "xxx", - "bk_supplier_account": "123456789", + "bk_supplier_account": "0", "bk_biz_id": 1, - "id": "xxx" + "bk_host_id": [ + 9, + 10 + ] } ``` @@ -34,7 +37,7 @@ { "result": true, "code": 0, - "message": "", - "data": {} + "message": "success", + "data": null } ``` diff --git a/paas2/esb/components/confapis/cc/apidocs/zh_hans/update_cloud_area.md b/paas2/esb/components/confapis/cc/apidocs/zh_hans/update_cloud_area.md index 56cc20118..7e8339613 100644 --- a/paas2/esb/components/confapis/cc/apidocs/zh_hans/update_cloud_area.md +++ b/paas2/esb/components/confapis/cc/apidocs/zh_hans/update_cloud_area.md @@ -15,8 +15,9 @@ ### 请求参数示例 -``` python +``` json { + "bk_cloud_id": 5, "bk_cloud_name": "云区域1" } @@ -25,8 +26,7 @@ ### 返回结果示例 -```python - +```json { "result": true, "code": 0, diff --git a/paas2/esb/components/confapis/cc/apidocs/zh_hans/update_proc_template.md b/paas2/esb/components/confapis/cc/apidocs/zh_hans/update_proc_template.md index 7c94b7ccb..6d25b926b 100644 --- a/paas2/esb/components/confapis/cc/apidocs/zh_hans/update_proc_template.md +++ b/paas2/esb/components/confapis/cc/apidocs/zh_hans/update_proc_template.md @@ -89,7 +89,7 @@ value: 进程的值,不同的字段类型不一样 ### 返回结果示例 -```python +```json { "result": true, "code": 0, @@ -124,10 +124,6 @@ value: 进程的值,不同的字段类型不一样 "value": "", "as_default_value": false }, - "bind_ip": { - "value": "1", - "as_default_value": false - }, "priority": { "value": null, "as_default_value": false @@ -140,10 +136,6 @@ value: 进程的值,不同的字段类型不一样 "value": "p1", "as_default_value": true }, - "port": { - "value": "", - "as_default_value": false - }, "pid_file": { "value": "", "as_default_value": false @@ -172,10 +164,6 @@ value: 进程的值,不同的字段类型不一样 "value": null, "as_default_value": false }, - "protocol": { - "value": "1", - "as_default_value": false - }, "description": { "value": "", "as_default_value": false diff --git a/paas2/esb/components/confapis/cc/cc.yaml b/paas2/esb/components/confapis/cc/cc.yaml index 56a11966b..11e1e35f2 100644 --- a/paas2/esb/components/confapis/cc/cc.yaml +++ b/paas2/esb/components/confapis/cc/cc.yaml @@ -385,16 +385,6 @@ dest_path: /api/v3/hosts/property/batch dest_http_method: PUT -- path: /v2/cc/get_operation_log/ - name: get_operation_log - label: 获取操作日志 - label_en: get operation log - suggest_method: POST - api_type: query - comp_codename: generic.v2.cc.cc_component - dest_path: /api/v3/audit/search - dest_http_method: POST - - path: /v2/cc/get_mainline_object_topo/ name: get_mainline_object_topo label: 查询主线模型的业务拓扑 @@ -826,6 +816,17 @@ dest_http_method: POST is_hidden: true +- path: /v2/cc/list_service_template_difference/ + name: list_service_template_difference + label: 列出服务模版和服务实例之间的差异 + label_en: list service template difference + suggest_method: POST + api_type: query + comp_codename: generic.v2.cc.cc_component + dest_path: /api/v3/find/proc/service_instance/difference + dest_http_method: POST + is_hidden: true + - path: /v2/cc/list_process_detail_by_ids/ name: list_process_detail_by_ids label: 查询某业务下进程ID对应的进程详情 @@ -1120,3 +1121,34 @@ dest_path: /api/v3/cache/find/cache/topo/brief/biz/{bk_biz_id} dest_http_method: GET is_hidden: true + +- path: /v2/cc/transfer_host_to_recyclemodule/ + name: transfer_host_to_recyclemodule + label: 上交主机到业务的待回收模块 + label_en: transfer host to recycle module + suggest_method: POST + api_type: operate + comp_codename: generic.v2.cc.cc_component + dest_path: /api/v3/hosts/modules/recycle + dest_http_method: POST + +- path: /v2/cc/find_host_relations_with_topo/ + name: find_host_relations_with_topo + label: 根据业务拓扑中的实例节点查询其下的主机关系信息 + label_en: find host relations with topology instance node + suggest_method: POST + api_type: query + comp_codename: generic.v2.cc.cc_component + dest_path: /api/v3/findmany/hosts/relation/with_topo + dest_http_method: POST + +- path: /v2/cc/list_host_detail_topology/ + name: list_host_detail_topology + label: 根据主机条件信息查询主机详情及其所属的拓扑信息 + label_en: list host's detail info and its topology it belongs to + suggest_method: POST + api_type: operate + comp_codename: generic.v2.cc.cc_component + dest_path: /api/v3/findmany/hosts/detail_topo + dest_http_method: POST + is_hidden: true diff --git a/paas2/esb/components/confapis/usermanage/apidocs/en/list_departments.md b/paas2/esb/components/confapis/usermanage/apidocs/en/list_departments.md index 18612ea1b..d29f70d81 100644 --- a/paas2/esb/components/confapis/usermanage/apidocs/en/list_departments.md +++ b/paas2/esb/components/confapis/usermanage/apidocs/en/list_departments.md @@ -13,7 +13,7 @@ List all departments |-----------|------------|--------|------------| | lookup_field | string | no | lookup on which field, 'id' as default| | page | int | no | page num | -| no_page | bool | no | wether return all records, false as default | +| ~~no_page~~ | bool | no | deprecated, please remove this param | | page_size | int | no | page size | | fields | string | no | response fields, e.g. "username,id" | | exact_lookups | string | no | exact lookup list, e.g. "jack,pony" | @@ -24,8 +24,7 @@ List all departments ``` json { - "fields": "name,id", - "no_page": true + "fields": "name,id" } ``` diff --git a/paas2/esb/components/confapis/usermanage/apidocs/en/list_users.md b/paas2/esb/components/confapis/usermanage/apidocs/en/list_users.md index 0b03a1a0e..9df0317f1 100644 --- a/paas2/esb/components/confapis/usermanage/apidocs/en/list_users.md +++ b/paas2/esb/components/confapis/usermanage/apidocs/en/list_users.md @@ -13,7 +13,7 @@ List all users |-----------|------------|--------|------------| | lookup_field | string | no | lookup on which field, 'username' as default | | page | int | no | page num | -| no_page | bool | no | wether return all records, false as default | +| ~~no_page~~ | bool | no | deprecated, please remove this param | | page_size | int | no | page size | | fields | string | no | response fields, e.g. "username,id" | | exact_lookups | string | no | exact lookup list, e.g. "jack,pony" | @@ -24,8 +24,7 @@ List all users ``` json { - "fields": "username,id", - "no_page": true + "fields": "username,id" } ``` diff --git a/paas2/esb/components/confapis/usermanage/apidocs/en/retrieve_department.md b/paas2/esb/components/confapis/usermanage/apidocs/en/retrieve_department.md index a45aef7c5..f9d34c513 100644 --- a/paas2/esb/components/confapis/usermanage/apidocs/en/retrieve_department.md +++ b/paas2/esb/components/confapis/usermanage/apidocs/en/retrieve_department.md @@ -11,7 +11,7 @@ Query department info | field | type | required | description | |-----------|------------|--------|------------| -| lookup_field | string | no | lookup on which field, 'id' as default| +| id | string | yes | query department id, e.g. 1122 | | fields | string | no | response fields, e.g. "name,id" | @@ -19,6 +19,7 @@ Query department info ``` json { + "id": 1122, "fields": "name,id" } ``` diff --git a/paas2/esb/components/confapis/usermanage/apidocs/en/retrieve_user.md b/paas2/esb/components/confapis/usermanage/apidocs/en/retrieve_user.md index 737dbd7d8..f92cb1337 100644 --- a/paas2/esb/components/confapis/usermanage/apidocs/en/retrieve_user.md +++ b/paas2/esb/components/confapis/usermanage/apidocs/en/retrieve_user.md @@ -11,14 +11,17 @@ Query user info | field | type | required | description | |-----------|------------|--------|------------| -| lookup_field | string | no | lookup on which field, 'username' as default| +| id | string | yes | query username, e.g. "admin" | +| lookup_field | string | no | lookup on which field, 'username' as default, only key field only, which contain: username, id| | fields | string | no | response fields, e.g. "username,id" | ### sample request parameters +Query a profile which has 'admin' as username, only return selected fields (`username`, `id`) ``` json { + "id": "admin", "fields": "username,id" } ``` diff --git a/paas2/esb/components/confapis/usermanage/apidocs/zh_hans/list_department_profiles.md b/paas2/esb/components/confapis/usermanage/apidocs/zh_hans/list_department_profiles.md index 6d2fbe90c..15c05d517 100644 --- a/paas2/esb/components/confapis/usermanage/apidocs/zh_hans/list_department_profiles.md +++ b/paas2/esb/components/confapis/usermanage/apidocs/zh_hans/list_department_profiles.md @@ -11,9 +11,10 @@ | 字段 | 类型 | 必须 | 描述 | |-----------|------------|--------|------------| +| id | 字符串 | 是 | 部门 ID | | lookup_field | 字符串 | 否 | 查询字段, 默认为 'id' | | recursive | 布尔 | 否 | 是否级联查询部门用户,默认为否 | -| no_page | 布尔 | 否 | 是否不分页一次性返回所有结果,默认为否 | +| no_page | 布尔 | 否 | 是否不分页一次性返回所有结果,默认为否(注意:当使用 no_page=true 时,结果返回内容会根据 leader 关联情况平铺展开,可能出现 username 重复情况) | diff --git a/paas2/esb/components/confapis/usermanage/apidocs/zh_hans/list_departments.md b/paas2/esb/components/confapis/usermanage/apidocs/zh_hans/list_departments.md index 80f8b268a..29c1f0007 100644 --- a/paas2/esb/components/confapis/usermanage/apidocs/zh_hans/list_departments.md +++ b/paas2/esb/components/confapis/usermanage/apidocs/zh_hans/list_departments.md @@ -13,7 +13,7 @@ |-----------|------------|--------|------------| | lookup_field | 字符串 | 否 | 查找字段, 默认值为 'id' | | page | 整数 | 否 | 页码 | -| no_page | 布尔 | 否 | 是否返回全部结果,默认为否 | +| ~~no_page~~ | 布尔 | 否 | 即将下架,请不要使用,并尽快迁移 | | page_size | 整数 | 否 | 每页结果数量 | | fields | 字符串 | 否 | 返回值字段, 例如"username,id" | | exact_lookups | 字符串 | 否 | 精确查找内容列表, 例如"jack,pony" | @@ -24,8 +24,7 @@ ``` json { - "fields": "name,id", - "no_page": true + "fields": "name,id" } ``` diff --git a/paas2/esb/components/confapis/usermanage/apidocs/zh_hans/list_profile_departments.md b/paas2/esb/components/confapis/usermanage/apidocs/zh_hans/list_profile_departments.md index 0b5d2196d..bb6d4f816 100644 --- a/paas2/esb/components/confapis/usermanage/apidocs/zh_hans/list_profile_departments.md +++ b/paas2/esb/components/confapis/usermanage/apidocs/zh_hans/list_profile_departments.md @@ -11,6 +11,7 @@ | 字段 | 类型 | 必须 | 描述 | |-----------|------------|--------|------------| +| id | 字符串 | 是 | 用户 ID | | lookup_field | 字符串 | 否 | 查询字段, 默认为 'username' | | with_family | 布尔 | 否 | 结果是否返回部门树, 默认为否 | diff --git a/paas2/esb/components/confapis/usermanage/apidocs/zh_hans/list_users.md b/paas2/esb/components/confapis/usermanage/apidocs/zh_hans/list_users.md index 6b65b9a8d..e1fe7e8d2 100644 --- a/paas2/esb/components/confapis/usermanage/apidocs/zh_hans/list_users.md +++ b/paas2/esb/components/confapis/usermanage/apidocs/zh_hans/list_users.md @@ -13,7 +13,7 @@ |-----------|------------|--------|------------| | lookup_field | 字符串 | 否 | 查找字段, 默认值为 'username' | | page | 整数 | 否 | 页码 | -| no_page | 布尔 | 否 | 是否返回全部结果,默认为否 | +| ~~no_page~~ | 布尔 | 否 | 即将下架,请不要使用,并尽快迁移 | | page_size | 整数 | 否 | 每页结果数量 | | fields | 字符串 | 否 | 返回值字段, 例如"username,id" | | exact_lookups | 字符串 | 否 | 精确查找内容列表, 例如"jack,pony" | @@ -24,8 +24,7 @@ ``` json { - "fields": "username,id", - "no_page": true + "fields": "username,id" } ``` diff --git a/paas2/esb/components/confapis/usermanage/apidocs/zh_hans/retrieve_department.md b/paas2/esb/components/confapis/usermanage/apidocs/zh_hans/retrieve_department.md index be065966b..e1782c1c0 100644 --- a/paas2/esb/components/confapis/usermanage/apidocs/zh_hans/retrieve_department.md +++ b/paas2/esb/components/confapis/usermanage/apidocs/zh_hans/retrieve_department.md @@ -11,14 +11,16 @@ | 字段 | 类型 | 必须 | 描述 | |-----------|------------|--------|------------| -| lookup_field | 字符串 | 否 | 查询字段, 默认为 'username'| -| fields | 字符串 | 否 | 返回字段, 例如 "username,id" | +| id | 字符串 | 是 | 查询目标组织的 id,例如 1122 | +| fields | 字符串 | 否 | 返回字段, 例如 "name,id" | ### 请求参数示例 +查找 id 为 1122 的组织,只返回 name、id 字段 ``` json { + "id": 1122, "fields": "name,id" } ``` @@ -30,7 +32,7 @@ "code": 0, "data": { "id": 4, - "username": "PaaS", + "name": "PaaS", }, "result": true } diff --git a/paas2/esb/components/confapis/usermanage/apidocs/zh_hans/retrieve_user.md b/paas2/esb/components/confapis/usermanage/apidocs/zh_hans/retrieve_user.md index 9ac108b6f..ff201cb01 100644 --- a/paas2/esb/components/confapis/usermanage/apidocs/zh_hans/retrieve_user.md +++ b/paas2/esb/components/confapis/usermanage/apidocs/zh_hans/retrieve_user.md @@ -11,18 +11,29 @@ | 字段 | 类型 | 必须 | 描述 | |-----------|------------|--------|------------| -| lookup_field | 字符串 | 否 | 查询字段, 默认为 'username'| +| id | 字符串 | 否 | 查找目标用户的内容,可以为 'username'、'id'等内容,配合 lookup_field 使用,详细见下方示例 | +| lookup_field | 字符串 | 否 | 查询字段, 默认为 'username', 可选的唯一字段:'username'、'id'| | fields | 字符串 | 否 | 返回字段, 例如 "username,id" | ### 请求参数示例 +选择 username 为 admin 的用户,只返回 username、id 字段(默认查找 username,无需指定 lookup_field) ``` json { + "id": "admin", "fields": "username,id" } ``` +选择 id 为 1122 的用户,返回全部字段 +``` json +{ + "id": "1122", + "lookup_field": "id" +} +``` + ### 返回结果示例 ```json diff --git a/paas2/esb/components/confapis/usermanage/usermanage.yaml b/paas2/esb/components/confapis/usermanage/usermanage.yaml index 1d5ae5687..f1e217850 100644 --- a/paas2/esb/components/confapis/usermanage/usermanage.yaml +++ b/paas2/esb/components/confapis/usermanage/usermanage.yaml @@ -57,7 +57,7 @@ comp_codename: generic.v2.usermanage.usermanage_component dest_http_method: GET dest_path: /api/v1/department/{id}/ancestor/ - is_hidden: false + is_hidden: true label: 查询部门全部祖先 (旧版接口,不推荐使用,后续会下架,请尽快迁移) label_en: Query department ancestor name: department_ancestor diff --git a/paas2/release.md b/paas2/release.md index 8eb3f0f70..e13294fb3 100644 --- a/paas2/release.md +++ b/paas2/release.md @@ -1,5 +1,8 @@ Release Log =============================== +# 2.12.10 + - esb: update cc/usermanage/bscp/bk_log apis + # 2.12.9 - bugfix: fix home page js 404 From c6adddaa3472730a38250c8d8a38163594d4c9b0 Mon Sep 17 00:00:00 2001 From: alex-smile <443677891@qq.com> Date: Wed, 31 Mar 2021 18:35:19 +0800 Subject: [PATCH 2/3] add bk_apigateway to wlist --- paas2/esb/esb/management/utils/constants.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/paas2/esb/esb/management/utils/constants.py b/paas2/esb/esb/management/utils/constants.py index 1128db756..06bd0d5a2 100644 --- a/paas2/esb/esb/management/utils/constants.py +++ b/paas2/esb/esb/management/utils/constants.py @@ -19,7 +19,8 @@ "func_name": "Whether to skip user authentication", "wlist": ( "bk_cmdb,bk_fta_solutions,bk_gse,bk_iam,bk_job,bk_monitor,bk_nodeman," - "bk_paas,bk_paas_log_alert,bk_usermgr,bk_sops,bk_log_search,bk_bklog" + "bk_paas,bk_paas_log_alert,bk_usermgr,bk_sops,bk_log_search,bk_bklog," + "bk_paas3,bk_lesscode,bk_apigateway" ), } ] From 07a27143a19cecf3a7b52a0720fe982b0abc3d6f Mon Sep 17 00:00:00 2001 From: alex-smile <443677891@qq.com> Date: Wed, 31 Mar 2021 18:38:01 +0800 Subject: [PATCH 3/3] up release doc --- paas2/release.md | 1 + 1 file changed, 1 insertion(+) diff --git a/paas2/release.md b/paas2/release.md index e13294fb3..e593ee7b4 100644 --- a/paas2/release.md +++ b/paas2/release.md @@ -2,6 +2,7 @@ Release Log =============================== # 2.12.10 - esb: update cc/usermanage/bscp/bk_log apis + - esb: add bk_apigateway/bk_paas3 to user-auth-unrequired wlist # 2.12.9 - bugfix: fix home page js 404