From 097e3031501bcef121ab3fc9175ee4bd637c9aac Mon Sep 17 00:00:00 2001 From: bd-xiaowang Date: Thu, 25 Jan 2024 17:12:59 +0800 Subject: [PATCH] =?UTF-8?q?ESB=E6=96=87=E6=A1=A3=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E8=8B=B1=E6=96=87=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/apidoc/cc/en/add_cloud_host_to_biz.md | 93 +++-- docs/apidoc/cc/en/add_host_lock.md | 33 +- .../apidoc/cc/en/add_host_to_business_idle.md | 59 +-- .../apidoc/cc/en/add_host_to_resource_pool.md | 122 ++++-- docs/apidoc/cc/en/add_instance_association.md | 70 ++-- .../cc/en/add_label_for_service_instance.md | 43 +- docs/apidoc/cc/en/batch_create_inst.md | 54 +-- .../en/batch_create_instance_association.md | 58 +-- .../cc/en/batch_create_kube_namespace.md | 100 ++--- docs/apidoc/cc/en/batch_create_kube_node.md | 79 ++-- docs/apidoc/cc/en/batch_create_kube_pod.md | 164 ++++---- .../cc/en/batch_create_kube_workload.md | 118 +++--- .../cc/en/batch_create_proc_template.md | 112 +++--- docs/apidoc/cc/en/batch_create_project.md | 80 ++-- docs/apidoc/cc/en/batch_create_quoted_inst.md | 60 +-- .../apidoc/cc/en/batch_delete_business_set.md | 48 +-- docs/apidoc/cc/en/batch_delete_inst.md | 52 +-- .../apidoc/cc/en/batch_delete_kube_cluster.md | 42 +- .../cc/en/batch_delete_kube_namespace.md | 39 +- docs/apidoc/cc/en/batch_delete_kube_node.md | 41 +- docs/apidoc/cc/en/batch_delete_kube_pod.md | 40 +- .../cc/en/batch_delete_kube_workload.md | 37 +- docs/apidoc/cc/en/batch_delete_project.md | 45 +-- docs/apidoc/cc/en/batch_delete_quoted_inst.md | 40 +- docs/apidoc/cc/en/batch_delete_set.md | 45 ++- .../apidoc/cc/en/batch_update_business_set.md | 93 +++-- docs/apidoc/cc/en/batch_update_host.md | 53 ++- docs/apidoc/cc/en/batch_update_inst.md | 67 ++-- .../apidoc/cc/en/batch_update_kube_cluster.md | 67 ++-- .../cc/en/batch_update_kube_namespace.md | 45 ++- docs/apidoc/cc/en/batch_update_kube_node.md | 64 ++- .../cc/en/batch_update_kube_workload.md | 105 ++--- docs/apidoc/cc/en/batch_update_project.md | 61 ++- docs/apidoc/cc/en/batch_update_quoted_inst.md | 52 +-- docs/apidoc/cc/en/bind_host_agent.md | 43 +- docs/apidoc/cc/en/clone_host_property.md | 61 ++- docs/apidoc/cc/en/count_biz_host_cpu.md | 53 ++- .../cc/en/count_instance_associations.md | 64 +-- docs/apidoc/cc/en/count_object_instances.md | 82 ++-- docs/apidoc/cc/en/create_biz_custom_field.md | 156 +++----- docs/apidoc/cc/en/create_business_set.md | 86 ++-- docs/apidoc/cc/en/create_classification.md | 56 ++- docs/apidoc/cc/en/create_cloud_area.md | 53 ++- docs/apidoc/cc/en/create_dynamic_group.md | 65 +-- docs/apidoc/cc/en/create_inst.md | 73 ++-- docs/apidoc/cc/en/create_kube_cluster.md | 66 ++-- docs/apidoc/cc/en/create_object.md | 89 +++-- docs/apidoc/cc/en/create_object_attribute.md | 149 +++---- docs/apidoc/cc/en/create_process_instance.md | 104 ++--- docs/apidoc/cc/en/create_service_category.md | 62 +-- docs/apidoc/cc/en/create_service_instance.md | 142 +++---- docs/apidoc/cc/en/create_service_template.md | 54 +-- docs/apidoc/cc/en/create_set_template.md | 57 ++- docs/apidoc/cc/en/delete_classification.md | 63 +-- docs/apidoc/cc/en/delete_cloud_area.md | 40 +- .../cc/en/delete_cloud_host_from_biz.md | 35 +- docs/apidoc/cc/en/delete_dynamic_group.md | 41 +- docs/apidoc/cc/en/delete_host_lock.md | 34 +- docs/apidoc/cc/en/delete_inst.md | 54 ++- .../cc/en/delete_instance_association.md | 41 +- docs/apidoc/cc/en/delete_object.md | 38 +- docs/apidoc/cc/en/delete_object_attribute.md | 38 +- docs/apidoc/cc/en/delete_proc_template.md | 32 +- docs/apidoc/cc/en/delete_process_instance.md | 33 +- docs/apidoc/cc/en/delete_related_inst_asso.md | 35 +- docs/apidoc/cc/en/delete_service_category.md | 32 +- docs/apidoc/cc/en/delete_service_instance.md | 34 +- docs/apidoc/cc/en/delete_service_template.md | 44 +-- docs/apidoc/cc/en/delete_set_template.md | 33 +- docs/apidoc/cc/en/execute_dynamic_group.md | 154 +++++--- docs/apidoc/cc/en/find_audit_by_id.md | 83 ++-- docs/apidoc/cc/en/find_biz_tree_brief_info.md | 78 ++-- .../en/find_brief_biz_topo_node_relation.md | 85 ++-- docs/apidoc/cc/en/find_host_biz_relations.md | 52 +-- .../cc/en/find_host_by_service_template.md | 101 +++-- .../apidoc/cc/en/find_host_by_set_template.md | 101 +++-- docs/apidoc/cc/en/find_host_by_topo.md | 99 +++-- .../cc/en/find_host_identifier_push_result.md | 46 +-- .../cc/en/find_host_relations_with_topo.md | 69 ++-- docs/apidoc/cc/en/find_host_topo_relation.md | 100 ++--- .../apidoc/cc/en/find_instance_association.md | 74 ++-- .../cc/en/find_instassociation_with_inst.md | 131 +++--- docs/apidoc/cc/en/find_module_batch.md | 79 ++-- .../apidoc/cc/en/find_module_host_relation.md | 145 +++++-- .../apidoc/cc/en/find_module_with_relation.md | 91 +++-- docs/apidoc/cc/en/find_object_association.md | 74 ++-- docs/apidoc/cc/en/find_set_batch.md | 62 ++- docs/apidoc/cc/en/find_topo_node_paths.md | 81 ++-- docs/apidoc/cc/en/get_biz_brief_cache_topo.md | 113 +++--- docs/apidoc/cc/en/get_biz_internal_module.md | 76 ++-- docs/apidoc/cc/en/get_dynamic_group.md | 99 ++--- docs/apidoc/cc/en/get_mainline_object_topo.md | 136 +++---- docs/apidoc/cc/en/get_proc_template.md | 142 +++---- docs/apidoc/cc/en/get_service_template.md | 66 ++-- docs/apidoc/cc/en/host_install_bk.md | 76 ++-- docs/apidoc/cc/en/list_biz_hosts.md | 159 +++++--- docs/apidoc/cc/en/list_biz_hosts_topo.md | 210 +++++----- .../cc/en/list_business_in_business_set.md | 121 +++--- docs/apidoc/cc/en/list_business_set.md | 178 +++++---- docs/apidoc/cc/en/list_business_set_topo.md | 51 ++- .../apidoc/cc/en/list_host_detail_topology.md | 182 ++++----- .../cc/en/list_host_service_template_id.md | 38 +- .../cc/en/list_host_total_mainline_topo_en.md | 192 ++++----- docs/apidoc/cc/en/list_hosts_without_biz.md | 96 +++-- docs/apidoc/cc/en/list_kube_cluster.md | 137 ++++--- docs/apidoc/cc/en/list_kube_container.md | 143 ++++--- docs/apidoc/cc/en/list_kube_namespace.md | 200 ++++------ docs/apidoc/cc/en/list_kube_node.md | 137 +++---- docs/apidoc/cc/en/list_kube_pod.md | 133 +++---- docs/apidoc/cc/en/list_kube_workload.md | 186 +++++---- docs/apidoc/cc/en/list_operation_audit.md | 249 ++++++------ docs/apidoc/cc/en/list_proc_template.md | 374 +++++++++--------- .../cc/en/list_process_detail_by_ids.md | 138 +++++-- docs/apidoc/cc/en/list_process_instance.md | 146 +++---- .../apidoc/cc/en/list_process_related_info.md | 176 ++++++--- docs/apidoc/cc/en/list_project.md | 310 +++++++-------- docs/apidoc/cc/en/list_quoted_inst.md | 116 +++--- docs/apidoc/cc/en/list_resource_pool_hosts.md | 128 +++--- docs/apidoc/cc/en/list_service_category.md | 76 ++-- docs/apidoc/cc/en/list_service_instance.md | 96 ++--- .../cc/en/list_service_instance_by_host.md | 91 ++--- .../list_service_instance_by_set_template.md | 94 ++--- .../cc/en/list_service_instance_detail.md | 235 ++++++----- docs/apidoc/cc/en/list_service_template.md | 97 ++--- .../cc/en/list_service_template_difference.md | 86 ++-- .../en/list_service_template_sync_status.md | 65 ++- docs/apidoc/cc/en/list_set_template.md | 89 +++-- ...t_set_template_related_service_template.md | 65 +-- docs/apidoc/cc/en/push_host_identifier.md | 59 +-- .../en/remove_label_from_service_instance.md | 37 +- docs/apidoc/cc/en/resource_watch.md | 290 +++++++------- docs/apidoc/cc/en/search_classifications.md | 49 +-- docs/apidoc/cc/en/search_cloud_area.md | 80 ++-- docs/apidoc/cc/en/search_dynamic_group.md | 95 ++--- docs/apidoc/cc/en/search_host_lock.md | 40 +- docs/apidoc/cc/en/search_hostidentifier.md | 147 ++++--- docs/apidoc/cc/en/search_inst.md | 100 ++--- .../cc/en/search_inst_association_topo.md | 71 ++-- .../search_inst_asst_object_inst_base_info.md | 100 +++-- .../cc/en/search_instance_associations.md | 90 +++-- docs/apidoc/cc/en/search_object_attribute.md | 107 +++-- docs/apidoc/cc/en/search_object_instances.md | 122 +++--- docs/apidoc/cc/en/search_object_topo.md | 66 ++-- docs/apidoc/cc/en/search_objects.md | 78 ++-- docs/apidoc/cc/en/search_related_inst_asso.md | 66 ++-- docs/apidoc/cc/en/search_subscription.md | 85 ++-- docs/apidoc/cc/en/subscribe_event.md | 50 +-- ...nc_service_template_to_service_instance.md | 34 +- docs/apidoc/cc/en/sync_set_template_to_set.md | 35 +- docs/apidoc/cc/en/transfer_host_across_biz.md | 40 +- .../cc/en/transfer_host_to_recyclemodule.md | 38 +- .../cc/en/transfer_sethost_to_idle_module.md | 40 +- docs/apidoc/cc/en/unbind_host_agent.md | 41 +- docs/apidoc/cc/en/unsubcribe_event.md | 35 +- docs/apidoc/cc/en/update_biz_custom_field.md | 98 ++--- .../cc/en/update_business_enable_status.md | 36 +- docs/apidoc/cc/en/update_classification.md | 38 +- docs/apidoc/cc/en/update_cloud_area.md | 41 +- docs/apidoc/cc/en/update_dynamic_group.md | 56 +-- docs/apidoc/cc/en/update_event_subscribe.md | 48 ++- .../cc/en/update_host_cloud_area_field.md | 2 +- docs/apidoc/cc/en/update_inst.md | 52 ++- docs/apidoc/cc/en/update_kube_cluster_type.md | 38 +- docs/apidoc/cc/en/update_object.md | 51 ++- docs/apidoc/cc/en/update_object_attribute.md | 83 ++-- docs/apidoc/cc/en/update_proc_template.md | 135 +++---- docs/apidoc/cc/en/update_process_instance.md | 82 ++-- docs/apidoc/cc/en/update_project_id.md | 40 +- docs/apidoc/cc/en/update_service_category.md | 72 ++-- docs/apidoc/cc/en/update_service_template.md | 64 +-- docs/apidoc/cc/en/update_set_template.md | 61 ++- docs/apidoc/esb-cc/en/add_host_to_resource.md | 136 +++++-- docs/apidoc/esb-cc/en/create_business.md | 122 +++--- docs/apidoc/esb-cc/en/create_module.md | 139 ++++--- docs/apidoc/esb-cc/en/create_set.md | 141 ++++--- docs/apidoc/esb-cc/en/delete_host.md | 37 +- docs/apidoc/esb-cc/en/delete_module.md | 41 +- docs/apidoc/esb-cc/en/delete_set.md | 38 +- docs/apidoc/esb-cc/en/get_host_base_info.md | 57 +-- docs/apidoc/esb-cc/en/search_biz_inst_topo.md | 70 ++-- docs/apidoc/esb-cc/en/search_business.md | 164 ++++---- docs/apidoc/esb-cc/en/search_module.md | 89 +++-- docs/apidoc/esb-cc/en/search_set.md | 86 ++-- docs/apidoc/esb-cc/en/transfer_host_module.md | 43 +- .../esb-cc/en/transfer_host_to_faultmodule.md | 40 +- .../esb-cc/en/transfer_host_to_idlemodule.md | 40 +- .../en/transfer_host_to_resourcemodule.md | 44 ++- .../en/transfer_resourcehost_to_idlemodule.md | 40 +- docs/apidoc/esb-cc/en/update_business.md | 61 +-- docs/apidoc/esb-cc/en/update_host.md | 95 +++-- docs/apidoc/esb-cc/en/update_module.md | 59 +-- docs/apidoc/esb-cc/en/update_set.md | 65 +-- 192 files changed, 8442 insertions(+), 7787 deletions(-) diff --git a/docs/apidoc/cc/en/add_cloud_host_to_biz.md b/docs/apidoc/cc/en/add_cloud_host_to_biz.md index 47359d7b09..f51e8b2061 100644 --- a/docs/apidoc/cc/en/add_cloud_host_to_biz.md +++ b/docs/apidoc/cc/en/add_cloud_host_to_biz.md @@ -1,6 +1,6 @@ -### Function description +### Function Description -add cloud host to biz idle module (cloud host management dedicated interface, version: v3.10.19+, permission: edit business host) +Add the module for idle hosts in the business related to cloud hosts (Dedicated interface for cloud host management, Version: v3.10.19+, Permission: Business host editing permission) ### Request Parameters @@ -8,22 +8,54 @@ add cloud host to biz idle module (cloud host management dedicated interface, ve #### Interface Parameters -| field | type | mandatory | description | -|-----------|--------------|-----------|---------------------------------------------------------------------------------------------------------------------------| -| bk_biz_id | int | yes | business id | -| host_info | array | yes | to be added cloud host information, array length is limited to 200, these hosts can only succeed or fail at the same time | +| Field | Type | Required | Description | +| --------- | ----- | -------- | ------------------------------------------------------------ | +| bk_biz_id | int | Yes | Business ID | +| host_info | array | Yes | Information of newly added cloud hosts, array length can be up to 200, success or failure occurs for the entire batch of hosts | #### host_info -host information fields, cloud area ID and inner IP fields are required, other fields are attribute fields defined in host model. Only field examples are shown here, please fill in other fields as needed. - -| field | type | required | description | -|-----------------|--------|----------|-------------------------------------------------------------------| -| bk_host_innerip | string | yes | host inner ip in IPv4 format, multiple ips are seperated by comma | -| bk_cloud_id | int | yes | cloud area id | -| bk_host_name | string | no | host name, or any other property | -| operator | string | no | host main maintainer, or other attributes | -| bk_comment | string | no | comment, or other attributes | +Host information, where bk_cloud_id, bk_host_innerip, cloud vendor, and cloud host instance ID fields are required. Other fields are attributes defined in the host model. Only a subset of fields is shown here, please fill in other fields as needed. + +| Field | Type | Required | Description | +| -------------------- | ------ | -------- | ------------------------------------------------------------ | +| bk_cloud_id | int | Yes | Control area ID | +| bk_host_innerip | string | Yes | IPv4 format of host's internal IP, separated by commas for multiple IPs | +| bk_cloud_vendor | array | Yes | Cloud vendor | +| bk_cloud_inst_id | array | Yes | Cloud host instance ID | +| bk_addressing | string | No | Addressing method, static for cloud hosts | +| bk_host_name | string | No | Hostname or other attributes | +| operator | string | No | Main maintainer or other attributes | +| bk_comment | string | No | Remark or other attributes | +| import_from | string | No | Host import source, 3 for API import | +| bk_asset_id | string | No | Fixed asset number | +| bk_created_at | string | No | Creation time | +| bk_updated_at | string | No | Update time | +| bk_created_by | string | No | Creator | +| bk_updated_by | string | No | Updater | +| bk_cloud_host_status | string | No | Cloud host status | +| bk_cpu | int | No | CPU logical cores | +| bk_cpu_architecture | string | No | CPU architecture | +| bk_cpu_module | string | No | CPU model | +| bk_disk | int | No | Disk capacity (GB) | +| bk_host_outerip | string | No | Host's external IP | +| bk_host_innerip_v6 | string | No | Host's internal IPv6 | +| bk_host_outerip_v6 | string | No | Host's external IPv6 | +| bk_isp_name | string | No | Affiliated ISP | +| bk_mac | string | No | Host's internal MAC address | +| bk_mem | int | No | Host's RAM capacity (MB) | +| bk_os_bit | string | No | Operating system bit | +| bk_os_name | string | No | Operating system name | +| bk_os_type | string | No | Operating system type | +| bk_os_version | string | No | Operating system version | +| bk_outer_mac | string | No | Host's external MAC address | +| bk_province_name | string | No | Province where the host is located | +| bk_service_term | int | No | Warranty period | +| bk_sla | string | No | SLA level | +| bk_sn | string | No | Device SN | +| bk_state | string | No | Current state | +| bk_state_name | string | No | Country where the host is located | +| bk_bak_operator | string | No | Backup maintainer | ### Request Parameters Example @@ -38,6 +70,8 @@ host information fields, cloud area ID and inner IP fields are required, other f { "bk_cloud_id": 0, "bk_host_innerip": "127.0.0.1", + "bk_cloud_vendor": "2", + "bk_cloud_inst_id": "45515", "bk_host_name": "host1", "operator": "admin", "bk_comment": "comment" @@ -45,6 +79,8 @@ host information fields, cloud area ID and inner IP fields are required, other f { "bk_cloud_id": 0, "bk_host_innerip": "127.0.0.2", + "bk_cloud_vendor": "2", + "bk_cloud_inst_id": "45656", "bk_host_name": "host2", "operator": "admin", "bk_comment": "comment" @@ -53,7 +89,7 @@ host information fields, cloud area ID and inner IP fields are required, other f } ``` -### Return Result Example +### Response Example ```json { @@ -71,20 +107,21 @@ host information fields, cloud area ID and inner IP fields are required, other f } ``` -### Return Result Parameters Description +### Response Parameters Description #### response -| name | type | description | -|------------|--------|-------------------------------------------------------------------------------------------| -| result | bool | Whether the request was successful or not. true:request successful; false request failed. | -| code | int | The error code. 0 means success, >0 means failure error. | -| message | string | The error message returned by the failed request. | -| data | object | The data returned by the request. | -| permission | object | Permission information | -| request_id | string | Request chain id | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request was successful. true: success; false: failure | +| code | int | Error code. 0 indicates success, >0 indicates a failure error | +| message | string | Error message returned for a failed request | +| data | object | Data returned by the request | +| permission | object | Permission information | +| request_id | string | Request chain ID | #### data -| field | type | description | -|-------|-----------|------------------------------------| -| ids | array | successfully created host id array | \ No newline at end of file + +| Field | Type | Description | +| ----- | ----- | ------------------------------------------- | +| ids | array | Array of IDs for successfully created hosts | \ No newline at end of file diff --git a/docs/apidoc/cc/en/add_host_lock.md b/docs/apidoc/cc/en/add_host_lock.md index f3066d53f8..c4000e7dd0 100644 --- a/docs/apidoc/cc/en/add_host_lock.md +++ b/docs/apidoc/cc/en/add_host_lock.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Lock the host according to the id list of the host, and add a new host lock. If the host has already been locked, it will also prompt that the locking is successful (v3.8.6). +Lock hosts based on a list of host IDs. For newly added hosts, if the host has already been locked, it will also indicate successful locking (Version: v3.8.6, Permission: Business host editing permission) ### Request Parameters @@ -8,10 +8,9 @@ Lock the host according to the id list of the host, and add a new host lock. If #### Interface Parameters -| Field | Type | Required | Description | -|---------------------|-------------|--------|----------------------------------| -|id_list| int array| yes | Host ID list| - +| Field | Type | Required | Description | +| ------- | --------- | -------- | ---------------- | +| id_list | int array | Yes | List of host IDs | ### Request Parameters Example @@ -25,10 +24,9 @@ Lock the host according to the id list of the host, and add a new host lock. If } ``` -### Return Result Example +### Response Example ```python - { "result": true, "code": 0, @@ -38,13 +36,16 @@ Lock the host according to the id list of the host, and add a new host lock. If "request_id": "e43da4ef221746868dc4c837d36f3807" } ``` + +### Response Parameters Description + #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| data | object |Data returned by request | -| permission | object |Permission information | -| request_id | string |Request chain id | \ No newline at end of file +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request was successful. true: success; false: failure | +| code | int | Error code. 0 indicates success, >0 indicates a failure error | +| message | string | Error message returned for a failed request | +| data | object | Data returned by the request | +| permission | object | Permission information | +| request_id | string | Request chain ID | \ No newline at end of file diff --git a/docs/apidoc/cc/en/add_host_to_business_idle.md b/docs/apidoc/cc/en/add_host_to_business_idle.md index 505af661ba..af9c92a4a0 100644 --- a/docs/apidoc/cc/en/add_host_to_business_idle.md +++ b/docs/apidoc/cc/en/add_host_to_business_idle.md @@ -1,7 +1,6 @@ -### Function description +### Function Description -Add hosts to the service idle machine -- This interface ensures that hosts are either added successfully or fail at the same time(v3.10.25+) +Add hosts to the business idle hosts. This interface ensures that hosts are either added successfully together or fail together (v3.10.25+, Permission: Host pool host allocation to business permission) ### Request Parameters @@ -9,20 +8,21 @@ Add hosts to the service idle machine #### Interface Parameters -| field | type | mandatory | description | -| -----------|------------|--------|------------| -| bk_host_list | array | Yes | Host information (array length is limited to 200 at a time) | -| bk_biz_id | int | yes | business_id | +| Field | Type | Required | Description | +| ------------ | ----- | -------- | ---------------------------------------------- | +| bk_host_list | array | Yes | Host information (array length limited to 200) | +| bk_biz_id | int | Yes | Business ID | -#### bk_host_list(host-related fields) +#### bk_host_list (Fields related to hosts) -| field | type | required | description | -| -----------|------------|--------|------------| -| bk_host_innerip | string | yes | host_internal_ip | -| bk_cloud_id | int | Yes | cloud_region_id | -| bk_addressing | string | Yes | Addressing method, "static", "dynamic" | -| operator | string | No | Primary maintainer | -... +| Field | Type | Required | Description | +| ------------------ | ------ | -------- | ------------------------------------------------------------ | +| bk_host_innerip | string | No | Host's internal IPv4, one of bk_host_innerip or bk_host_innerip_v6 is required | +| bk_host_innerip_v6 | string | No | Host's internal IPv6, one of bk_host_innerip or bk_host_innerip_v6 is required | +| bk_cloud_id | int | Yes | Control area ID | +| bk_addressing | string | Yes | Addressing method, "static" or "dynamic" | +| operator | string | No | Main maintainer | +| ... | | | | ### Request Parameters Example @@ -50,10 +50,9 @@ Add hosts to the service idle machine } ``` -### Return Result Example +### Response Example ```python - { "result": true, "code": 0, @@ -68,20 +67,22 @@ Add hosts to the service idle machine } } ``` -### Return Result Parameters Description + +### Response Parameters Description #### response -| name | type | description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request was successful or not. true:request successful; false request failed.| -| code | int | The error code. 0 means success, >0 means failure error.| -| message | string | The error message returned by the failed request.| -| data | object | The data returned by the request.| -| permission | object | Permission information | -| request_id | string | Request chain id | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request was successful. true: success; false: failure | +| code | int | Error code. 0 indicates success, >0 indicates a failure error | +| message | string | Error message returned for a failed request | +| data | object | Data returned by the request | +| permission | object | Permission information | +| request_id | string | Request chain ID | #### data -| field | type | description | -| -----------|-----------|--------------| -| bk_host_ids | array | host_id of the host | + +| Field | Type | Description | +| ----------- | ----- | ----------------------------- | +| bk_host_ids | array | Host IDs of the created hosts | \ No newline at end of file diff --git a/docs/apidoc/cc/en/add_host_to_resource_pool.md b/docs/apidoc/cc/en/add_host_to_resource_pool.md index 381ec38f9d..3b255fd2fd 100644 --- a/docs/apidoc/cc/en/add_host_to_resource_pool.md +++ b/docs/apidoc/cc/en/add_host_to_resource_pool.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Adds a host to the resource pool with the specified id based on the host list information +Add hosts to the specified resource pool based on the host list information (Permission: Host pool host creation permission) ### Request Parameters @@ -8,19 +8,54 @@ Adds a host to the resource pool with the specified id based on the host list in #### Interface Parameters -| Field | Type | Required |Description | -|----------------------|--------------|--------|---------------------| -| host_info | object array |yes | Host information | -| directory | int | no | Resource directory ID | +| Field | Type | Required | Description | +| --------- | ------------ | -------- | -------------------------- | +| host_info | object array | Yes | Host information | +| directory | int | No | Resource pool directory ID | #### host_info -| Field | Type| Required| Description | -|-----------------|--------|-----|-------------------------| -| bk_host_innerip | string |yes| Host intranet ip | -| bk_cloud_id | int |yes| Cloud area id | -| bk_host_name | string |no| Host name, or any other property | -| operator | string | no | Main maintainer, or other attributes| -| bk_comment | string |no| Comments, or other attributes | + +| Field | Type | Required | Description | +| -------------------- | ------ | -------- | ------------------------------------------------------------ | +| bk_host_innerip | string | Yes | Host's inner IP | +| bk_cloud_id | int | Yes | Control area ID | +| bk_addressing | string | No | Addressing method, default is static addressing method "static" | +| bk_host_name | string | No | Host name, can also be other attributes | +| operator | string | No | Primary maintainer, can also be other attributes | +| bk_comment | string | No | Remark, can also be other attributes | +| bk_cloud_vendor | array | No | Cloud vendor | +| bk_cloud_inst_id | array | No | Cloud host instance ID | +| import_from | string | No | Host import source, 3 for API import | +| bk_asset_id | string | No | Fixed asset number | +| bk_created_at | string | No | Creation time | +| bk_updated_at | string | No | Update time | +| bk_created_by | string | No | Creator | +| bk_updated_by | string | No | Updater | +| bk_cloud_host_status | string | No | Cloud host status | +| bk_cpu | int | No | CPU logical cores | +| bk_cpu_architecture | string | No | CPU architecture | +| bk_cpu_module | string | No | CPU model | +| bk_disk | int | No | Disk capacity (GB) | +| bk_host_outerip | string | No | Host outer IP | +| bk_host_innerip_v6 | string | No | Host inner IPv6 | +| bk_host_outerip_v6 | string | No | Host outer IPv6 | +| bk_isp_name | string | No | ISP name | +| bk_mac | string | No | Host inner MAC address | +| bk_mem | int | No | Host memory capacity (MB) | +| bk_os_bit | string | No | OS bit | +| bk_os_name | string | No | OS name | +| bk_os_type | string | No | OS type | +| bk_os_version | string | No | OS version | +| bk_outer_mac | string | No | Host outer MAC address | +| bk_province_name | string | No | Province name | +| bk_service_term | int | No | Warranty period | +| bk_sla | string | No | SLA level | +| bk_sn | string | No | Device SN | +| bk_state | string | No | Current state | +| bk_state_name | string | No | Country name | +| bk_bak_operator | string | No | Backup maintainer | + +**Note: The control area ID and inner IP fields are required fields. Other fields are attribute fields defined in the host model. Only partial fields are shown here, please fill in other fields as needed. ### Request Parameters Example @@ -36,12 +71,12 @@ Adds a host to the resource pool with the specified id based on the host list in "bk_host_name": "host1", "bk_cloud_id": 0, "operator": "admin", + "bk_addressing": "dynamic", "bk_comment": "comment" }, { "bk_host_innerip": "127.0.0.2", "bk_host_name": "host2", - "bk_cloud_id": 0, "operator": "admin", "bk_comment": "comment" } @@ -50,11 +85,11 @@ Adds a host to the resource pool with the specified id based on the host list in } ``` -### Return Result Example +### Response Example ```json { - "result": true, + "result": false, "code": 0, "message": "success", "data": { @@ -62,49 +97,50 @@ Adds a host to the resource pool with the specified id based on the host list in { "index": 0, "bk_host_id": 6 - }, + } + ], + "error": [ { "index": 1, - "bk_host_id": 7 + "error_message": "'bk_cloud_id' unassigned" } ] }, "permission": null, "request_id": "e43da4ef221746868dc4c837d36f3807" } - ``` -### Return Result Parameters Description +### Response Parameters Description #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| data | object |Data returned by request | -| permission | object |Permission information | -| request_id | string |Request chain id | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request was successful. true: success; false: failure | +| code | int | Error code. 0 indicates success, >0 indicates a failure error | +| message | string | Error message returned for a failed request | +| data | object | Data returned by the request | +| permission | object | Permission information | +| request_id | string | Request chain ID | -#### Data field Description +#### data Field Description -| Field | Type| Description | -| ------- | ----- | ------------------ | -| success | array |Host information array added successfully| -| error | array |Add failed host info array| +| Field | Type | Description | +| ------- | ----- | ------------------------------------------------- | +| success | array | Array of successfully added host information | +| error | array | Array of host information that failed to be added | -#### Success Field Description +#### success Field Description -| Field | Type| Description | -| ---------- | ---- | --------------- | -| index | int |Add successful host subscripts| -| bk_host_id | int |Successfully added host ID | +| Field | Type | Description | +| ---------- | ---- | ------------------------------------ | +| index | int | Index of the successfully added host | +| bk_host_id | int | ID of the successfully added host | -#### Error Field Description +#### error Field Description -| Field | Type | Description | -| ------------- | ------ | --------------- | -| index | int | Add failed host subscript| -| error_message | string |Failure reason | +| Field | Type | Description | +| ------------- | ------ | ----------------------------------------- | +| index | int | Index of the host that failed to be added | +| error_message | string | Failure reason | \ No newline at end of file diff --git a/docs/apidoc/cc/en/add_instance_association.md b/docs/apidoc/cc/en/add_instance_association.md index e86329eb0b..4ba3ba35ec 100644 --- a/docs/apidoc/cc/en/add_instance_association.md +++ b/docs/apidoc/cc/en/add_instance_association.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Add an association relationship between model instances. +Create a new association relationship between model instances. (Permission: Model instances editing permission) ### Request Parameters @@ -8,30 +8,15 @@ Add an association relationship between model instances. #### Interface Parameters -| Field | Type | Required | Description | -|----------------------|------------|--------|-----------------------------| -| bk_obj_asst_id | string | yes | The unique id of the Association between models| -| bk_inst_id | int64 | yes | Source model instance id| -| bk_asst_inst_id | int64 | yes | Target model instance id| -| metadata | object | yes | meta data | - - -metadata params - -| Field | Type | Required | Description | -|---------------------|------------|--------|-----------------------------| -| label | string map | yes | Tag information| - - -label params - -| Field | Type | Required | Description | -|---------------------|------------|--------|-----------------------------| -| bk_biz_id | string | yes | Business id | +| Field | Type | Required | Description | +| --------------- | ------ | -------- | -------------------------------------------- | +| bk_obj_asst_id | string | Yes | Unique ID of the relationship between models | +| bk_inst_id | int64 | Yes | Source model instance ID | +| bk_asst_inst_id | int64 | Yes | Target model instance ID | ### Request Parameters Example -``` json +```json { "bk_app_code": "esb_test", "bk_app_secret": "xxx", @@ -39,47 +24,40 @@ label params "bk_token": "xxx", "bk_obj_asst_id": "bk_switch_belong_bk_host", "bk_inst_id": 11, - "bk_asst_inst_id": 21, - "metadata":{ - "label":{ - "bk_biz_id":"1" - } - } + "bk_asst_inst_id": 21 } ``` -### Return Result Example +### Response Example ```json { "result": true, "code": 0, - "message": "", + "message": "success", "data": { "id": 1038 }, "permission": null, "request_id": "e43da4ef221746868dc4c837d36f3807", } - ``` -### Return Result Parameters Description +### Response Parameters Description #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| data | object |Data returned by request | -| permission | object |Permission information | -| request_id | string |Request chain id | - -#### data +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request was successful. true: success; false: failure | +| code | int | Error code. 0 indicates success, >0 indicates a failure error | +| message | string | Error message returned for a failed request | +| data | object | Data returned by the request | +| permission | object | Permission information | +| request_id | string | Request chain ID | -| Field | Type | Description | -|------------|----------|--------------| -|id| int64| New instance Association identity id| +#### data Field Description +| Field | Type | Description | +| ----- | ----- | ------------------------------------------------------- | +| id | int64 | ID of the newly added instance association relationship | \ No newline at end of file diff --git a/docs/apidoc/cc/en/add_label_for_service_instance.md b/docs/apidoc/cc/en/add_label_for_service_instance.md index 6f016eecff..f1f8cefa87 100644 --- a/docs/apidoc/cc/en/add_label_for_service_instance.md +++ b/docs/apidoc/cc/en/add_label_for_service_instance.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Tag a service instance based on the service instance id and the tag set +Add labels to service instances based on service instance ID and set labels. (Permission: Service instance editing permission) ### Request Parameters @@ -8,15 +8,16 @@ Tag a service instance based on the service instance id and the tag set #### Interface Parameters -| Field | Type | Required | Description | -|----------------------|------------|--------|-----------------------| -|instance_ids| array| yes | Service instance ID, the max length is 100| -|labels| object| yes | Label added| -| bk_biz_id | int | yes | Business ID | +| Field | Type | Required | Description | +| ------------ | ------ | -------- | ------------------------------------------------------ | +| instance_ids | array | Yes | Service instance IDs, supports up to 100 IDs at a time | +| labels | object | Yes | Labels to be added | +| bk_biz_id | int | Yes | Business ID | -#### Labels Field Description -- key verification rules:`^[a-zA-Z]([a-z0-9A-Z\-_.]*[a-z0-9A-Z])?$` -- Value verification rule:`^[a-z0-9A-Z]([a-z0-9A-Z\-_.]*[a-z0-9A-Z])?$` +#### labels Field Description + +- key Validation Rule: `^[a-zA-Z]([a-z0-9A-Z\-_.]*[a-z0-9A-Z])?$` +- value Validation Rule: `^[a-z0-9A-Z]([a-z0-9A-Z\-_.]*[a-z0-9A-Z])?$` ### Request Parameters Example @@ -35,7 +36,7 @@ Tag a service instance based on the service instance id and the tag set } ``` -### Return Result Example +### Response Example ```python { @@ -49,17 +50,15 @@ Tag a service instance based on the service instance id and the tag set } ``` -### Return result description +### Response Explanation #### response -| Name| Type| Description| -|---|---|---| -| result | bool |Whether the request was successful or not. True: request succeeded;false request failed| -| code | int |Wrong code. 0 indicates success,>0 indicates failure error| -| message | string |Error message returned by request failure| -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | - - +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request was successful. true: success; false: failure | +| code | int | Error code. 0 indicates success, >0 indicates a failure error | +| message | string | Error message returned for a failed request | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned by the request | \ No newline at end of file diff --git a/docs/apidoc/cc/en/batch_create_inst.md b/docs/apidoc/cc/en/batch_create_inst.md index c8a726584a..c4d48fcf8f 100644 --- a/docs/apidoc/cc/en/batch_create_inst.md +++ b/docs/apidoc/cc/en/batch_create_inst.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description - Batch create generic model instances (v3.10.2+) +Batch create instances of a common model (Version: v3.10.2+, Permission: New instance permission) ### Request Parameters @@ -8,19 +8,19 @@ #### Interface Parameters -| Parameter | Type | Required| Description | -| -------- | ------ | ---- | ------------------ | -| bk_obj_id | string |yes | The model id used to create, allowing only instances of the generic model to be created | -| details | array |yes | The maximum number of instance contents to be created can not exceed 200, and the contents are the attribute information of the model instance| +| Parameter | Type | Required | Description | +| --------- | ------ | -------- | ------------------------------------------------------------ | +| bk_obj_id | string | Yes | Model ID for creation, only allows creating instances of common models | +| details | array | Yes | Content of instances to be created, up to 200 instances, content is the attribute information of the model instance | #### details -| Parameter | Type | Required| Description | -| --------------- | ------ | ---- | -------------- | -| bk_inst_name | string |yes | Instance name | -| bk_asset_id | string |yes| Fixed capital No. | -| bk_sn | string |no| Equipment SN| -| bk_operator | string |no| Maintainer| +| Parameter | Type | Required | Description | +| ------------ | ------ | -------- | --------------------- | +| bk_inst_name | string | Yes | Instance name | +| bk_asset_id | string | Yes | Asset ID | +| bk_sn | string | No | Device SN | +| bk_operator | string | No | Maintenance personnel | ### Request Parameters Example @@ -54,7 +54,7 @@ } ``` -### Return Result Example +### Response Example ```json { @@ -69,28 +69,28 @@ "2":1002 }, "error_msg":{ - "0":"duplicated instances exist, fields [bk_asset_id: test_001] duplicated" + "0":"数据唯一性校验失败, [bk_asset_id: test_001] 重复" } } } ``` -### Return Result Parameters Description +### Response Parameters Description #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request was successful. true: success; false: failure | +| code | int | Error code. 0 indicates success, >0 indicates a failure error | +| message | string | Error message returned for a failed request | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned by the request | #### data -| Field | Type| Description | -| -------------- | ---- | -------------------------------------------------------- | -| success_created | map |key is the index of the instance in the parameter details, and value is the id of the successfully created instance| -| error_msg | map |key is the index of the instance in the parameter details, and value is the failure information | \ No newline at end of file +| Field | Type | Description | +| --------------- | ---- | ------------------------------------------------------------ | +| success_created | map | Key is the index in the details parameter, value is the instance ID created successfully | +| error_msg | map | Key is the index in the details parameter, value is the failure information | \ No newline at end of file diff --git a/docs/apidoc/cc/en/batch_create_instance_association.md b/docs/apidoc/cc/en/batch_create_instance_association.md index af986baa57..088a8a796c 100644 --- a/docs/apidoc/cc/en/batch_create_instance_association.md +++ b/docs/apidoc/cc/en/batch_create_instance_association.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description - Batch create general model instance Association (v3.10.2+) +Batch create relationships between common model instances (Version: v3.10.2+, Permission: Edit permission for source and target model instances) ### Request Parameters @@ -8,21 +8,21 @@ #### Interface Parameters -| Parameter | Type | Required| Description | -| -------------- | ------ | ---- | ------------------------ | -| bk_obj_id | string |yes | Source model id | -| bk_asst_obj_id | string |yes | Target model model id | -| bk_obj_asst_id | string |yes | The unique id of the relationship between models| -| details | array |yes | The content of batch creation Association relationship can not exceed 200 relationships | +| Parameter | Type | Required | Description | +| -------------- | ------ | -------- | ------------------------------------------------------------ | +| bk_obj_id | string | Yes | Source model ID | +| bk_asst_obj_id | string | Yes | Target model ID | +| bk_obj_asst_id | string | Yes | Unique ID for the relationship between models | +| details | array | Yes | Content of creating relationships in batch, up to 200 relationships | #### details -| Parameter | Type | Required| Description | -| --------------- | ------ | ---- | -------------- | -| bk_inst_id | int |yes | Source model instance id | -| bk_asst_inst_id | int |yes | Target model instance id| +| Parameter | Type | Required | Description | +| --------------- | ---- | -------- | ------------------------ | +| bk_inst_id | int | Yes | Source model instance ID | +| bk_asst_inst_id | int | Yes | Target model instance ID | -#### Request Parameters Example +### Request Parameters Example ```json { @@ -46,13 +46,13 @@ } ``` -### Return Result Example +### Response Example ```json { "result":true, "code":0, - "message":"", + "message":"success", "permission": null, "request_id": "e43da4ef221746868dc4c837d36f3807", "data":{ @@ -60,28 +60,28 @@ "0":73 }, "error_msg":{ - "1":"the association inst is not exist" + "1":"关联实例不存在" } } } ``` -### Return Result Parameters Description +### Response Parameters Description #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request was successful. true: success; false: failure | +| code | int | Error code. 0 indicates success, >0 indicates a failure error | +| message | string | Error message returned for a failed request | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned by the request | #### data -| Field | Type| Description | -| -------------- | ---- | -------------------------------------------------------- | -| success_created | map |key is the index of the instance Association in the parameter details array, and value is the id of the successfully created instance Association| -| error_msg | map |key is the index of the instance Association in the parameter details array, and value is the failure information | \ No newline at end of file +| Field | Type | Description | +| --------------- | ---- | ------------------------------------------------------------ | +| success_created | map | Key is the index in the details array, value is the ID of the successfully created relationship | +| error_msg | map | Key is the index in the details array, value is the failure information | \ No newline at end of file diff --git a/docs/apidoc/cc/en/batch_create_kube_namespace.md b/docs/apidoc/cc/en/batch_create_kube_namespace.md index 1f31a8475b..c0417fc371 100644 --- a/docs/apidoc/cc/en/batch_create_kube_namespace.md +++ b/docs/apidoc/cc/en/batch_create_kube_namespace.md @@ -1,50 +1,50 @@ ### Function Description -Batch create namespace (version: v3.12.1+, auth: create container namespace) +Batch create namespaces (Version: v3.12.1+, Permission: Container namespace creation permission) -### Request parameters +### Request Parameters {{ common_args_desc }} #### Interface Parameters -| field | type | required | description | -|-----------|-------|----------|-------------------------------------------| -| bk_biz_id | int | yes | business_id | -| data | array | Yes | namespace array, limited to 200 at a time | +| Field | Type | Required | Description | +| --------- | ----- | -------- | ------------------------------------------------------- | +| bk_biz_id | int | Yes | Business ID | +| data | array | Yes | Array of namespaces, up to 200 can be created at a time | #### data[x] -| field | type | required | description | -|-----------------|--------|----------|------------------------------------------------------------------------------| -| bk_cluster_id | int | yes | The unique id of the cluster identified in cmdb, passed in with cluster_uid. | -| name | string | yes | namespace name | -| labels | map | no | labels | -| resource_quotas | array | no | namespace CPU and memory requests and limits | +| Field | Type | Required | Description | +| --------------- | ------ | -------- | ---------------------------------------------------- | +| bk_cluster_id | int | Yes | Unique ID that identifies the cluster in CMDB | +| name | string | Yes | Namespace name | +| labels | map | No | Labels | +| resource_quotas | array | No | CPU and memory requests and limits for the namespace | #### resource_quotas[x] -| field | type | required | description | -|----------------|--------|----------|------------------------------------------------------------------------------------------------------------------------------------------------| -| hard | object | no | hard limits required per named resource | -| scopes | array | no | Quota scopes,optional values are: "Terminating", "NotTerminating", "BestEffort", "NotBestEffort", "PriorityClass", "CrossNamespacePodAffinity" |scope_selector -| scope_selector | no | object | scope selector | +| Field | Type | Required | Description | +| -------------- | ------ | -------- | ------------------------------------------------------------ | +| hard | object | No | Hard limits for each named resource | +| scopes | array | No | Quota scope, optional values are: "Terminating", "NotTerminating", "BestEffort", "NotBestEffort", "PriorityClass", "CrossNamespacePodAffinity" | +| scope_selector | object | No | Scope selector | #### scope_selector -| field | type | required | description | -|-------------------|------|----------|-------------------| -| match_expressions | no | array | match_expressions | +| Field | Type | Required | Description | +| ----------------- | ----- | -------- | ----------------- | +| match_expressions | array | No | Match expressions | #### match_expressions[x] -| field | type | required | description | -|------------|--------|----------|------------------------------------------------------------------------------------------------------------------------------------------------| -| scope_name | array | is | quota scope,optional values are: "Terminating", "NotTerminating", "BestEffort", "NotBestEffort", "PriorityClass", " CrossNamespacePodAffinity" | -| operator | string | Yes | selector operator, with optional values "In", "NotIn", "Exists", "DoesNotExist" | -| values | array | no | Array of strings, cannot be empty if the operator is "In" or "NotIn", must be empty if it is "Exists" or "DoesNotExist" | +| Field | Type | Required | Description | +| ---------- | ------ | -------- | ------------------------------------------------------------ | +| scope_name | array | Yes | Quota scope, optional values are: "Terminating", "NotTerminating", "BestEffort", "NotBestEffort", "PriorityClass", "CrossNamespacePodAffinity" | +| operator | string | Yes | Selector operator, optional values are: "In", "NotIn", "Exists", "DoesNotExist" | +| values | array | No | String array, must not be empty if the operator is "In" or "NotIn", must be empty if the operator is "Exists" or "DoesNotExist" | -### Request parameter examples +### Request Parameters Example ```json { @@ -86,42 +86,42 @@ Batch create namespace (version: v3.12.1+, auth: create container namespace) } ``` -### Return Result Example +### Response Example ```json - { - "result": true, - "code": 0, - "data": { - "ids": [1] - }, - "message": "success", - "permission": null, - "request_id": "87de106ab55549bfbcc46e47ecf5bcc7" + "result": true, + "code": 0, + "data": { + "ids": [ + 1 + ] + }, + "message": "success", + "permission": null, + "request_id": "87de106ab55549bfbcc46e47ecf5bcc7" } ``` **Note:** -- The order of the namespace ID array in the returned data is consistent with the order of the array data in the - parameter. +- The order of the namespace ID array returned in the data field corresponds to the order of the array data in the parameters. -### Return result parameter description +### Response Parameters Description #### response -| name | type | description | -|------------|--------|-------------------------------------------------------------------------------------------| -| result | bool | Whether the request was successful or not. true:request successful; false request failed. | -| code | int | The error code. 0 means success, >0 means failure error. | -| message | string | The error message returned by the failed request. | -| permission | object | Permission information | -| request_id | string | request_chain_id | -| data | object | data returned by the request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request was successful. true: success; false: failure | +| code | int | Error code. 0 indicates success, >0 indicates a failure error | +| message | string | Error message returned for a failed request | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned by the request | #### data -| field | type | description | -|-------|-------|-------------------------------------------------| -| ids | array | array of unique identifiers for namespace in cc | +| Field | Type | Description | +| ----- | ----- | --------------------------------------------- | +| ids | array | Unique identifiers for namespaces in CC array | \ No newline at end of file diff --git a/docs/apidoc/cc/en/batch_create_kube_node.md b/docs/apidoc/cc/en/batch_create_kube_node.md index ff9bbf9484..6f112bc0e3 100644 --- a/docs/apidoc/cc/en/batch_create_kube_node.md +++ b/docs/apidoc/cc/en/batch_create_kube_node.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -create a new container node (v3.12.1+, permission: kube Node Creation Permission) +Create Container Nodes (v3.12.1+, Permission: Container nodes creation permission) ### Request Parameters @@ -8,34 +8,33 @@ create a new container node (v3.12.1+, permission: kube Node Creation Permission #### Interface Parameters -| Field | Type | Required | Description | -|-----------|-------|----------|---------------------------------------------------------------| -| bk_biz_id | int | yes | business ID | -| data | array | yes | the specific information of the node that needs to be created | +| Field | Type | Required | Description | +| --------- | ----- | -------- | ------------------------------ | +| bk_biz_id | int | Yes | Business ID | +| data | array | Yes | Node information to be created | #### data[x] -| Field | Type | Required | Description | -|-------------------|--------|----------|--------------------------------------------------------------------------------------| -| bk_cluster_id | int | yes | ID of the container cluster in cmdb | -| bk_host_id | int | yes | associated host ID | -| uid | string | yes | the own ID of the container cluster | -| name | string | yes | node name | -| roles | string | no | node roles | -| labels | object | no | label | -| taints | object | no | taints | -| unschedulable | bool | no | Whether to turn off schedulable, true means not schedulable, false means schedulable | -| internal_ip | array | no | internal ip | -| external_ip | array | no | external ip | -| hostname | string | no | hostname | -| runtime_component | string | no | runtime components | -| kube_proxy_mode | string | no | kube-proxy proxy mode | -| pod_cidr | string | no | The allocation range of the Pod address of this node | +| Field | Type | Required | Description | +| ----------------- | ------ | -------- | ------------------------------------------------------------ | +| bk_cluster_id | int | Yes | Unique ID of the container cluster in CMDB | +| bk_host_id | int | Yes | Associated host ID | +| name | string | Yes | Node name | +| roles | string | No | Node type | +| labels | object | No | Labels | +| taints | object | No | Taints | +| unschedulable | bool | No | Whether to disable scheduling, true means not schedulable, false means schedulable | +| internal_ip | array | No | Internal IP addresses | +| external_ip | array | No | External IP addresses | +| hostname | string | No | Hostname | +| runtime_component | string | No | Runtime component | +| kube_proxy_mode | string | No | Kube-proxy proxy mode | +| pod_cidr | string | No | Allocation range of Pod addresses for this node | ### Request Parameters Example ```json - { +{ "bk_app_code": "esb_test", "bk_app_secret": "xxx", "bk_username": "xxx", @@ -58,7 +57,7 @@ create a new container node (v3.12.1+, permission: kube Node Creation Permission "127.0.0.1" ], "external_ip": [ - "127.0.0.2" + "127.0.0.1" ], "hostname": "xxx", "runtime_component": "runtime_component", @@ -95,9 +94,9 @@ create a new container node (v3.12.1+, permission: kube Node Creation Permission **Note:** - internal_ip and external_ip cannot be empty at the same time. -- no more than 100 nodes can be created at one time. +- The number of nodes created at once should not exceed 100. -### Return Result Example +### Response Example ```json { @@ -117,23 +116,21 @@ create a new container node (v3.12.1+, permission: kube Node Creation Permission **Note:** -- The order of the node ID array in the returned data is consistent with the order of the array data in the parameter. - -### Return Result Parameters Description +- The order of the node ID array returned in the data field corresponds to the order of the array data in the parameters. -#### response +### Response Parameters Description -| Name | Type | Description | -|------------|--------|------------------------------------------------------------------------------------| -| result | bool | Whether the request succeeded or not. True: request succeeded;false request failed | -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string | Error message returned by request failure | -| permission | object | Permission information | -| data | object | Data returned by request | -| request_id | string | Request chain id | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request was successful. true: success; false: failure | +| code | int | Error code. 0 indicates success, >0 indicates a failure error | +| message | string | Error message returned for a failed request | +| permission | object | Permission information | +| data | object | Data returned by the request | +| request_id | string | Request chain ID | ### data -| Name | Type | Description | -|------|-------|-------------------------------| -| ids | array | list of kube node IDs created | +| Field | Type | Description | +| ---- | ----- | ---------------------------------- | +| ids | array | List of created container node IDs | \ No newline at end of file diff --git a/docs/apidoc/cc/en/batch_create_kube_pod.md b/docs/apidoc/cc/en/batch_create_kube_pod.md index e0ed41b8d9..251aea9a46 100644 --- a/docs/apidoc/cc/en/batch_create_kube_pod.md +++ b/docs/apidoc/cc/en/batch_create_kube_pod.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -create new container pods and containers(v3.12.1+,permission: kube pod creation permission) +Create Containers, Pods, and Containers (v3.12.1+, Permission: Container pods creation permission) ### Request Parameters @@ -8,102 +8,102 @@ create new container pods and containers(v3.12.1+,permission: kube pod creatio #### Interface Parameters -| Field | Type | Required | Description | -|-------|-------|----------|----------------------------------| -| data | array | yes | Details of the pod to be created | +| Field | Type | Required | Description | +| ----- | ----- | -------- | -------------------------------------- | +| data | array | Yes | Detailed information for creating pods | #### data[x] -| Field | Type | Required | Description | -|-----------|-------|----------|------------------------------------------------------| -| bk_biz_id | int | yes | business ID | -| pods | array | yes | Details of the pod to be created under this business | +| Field | Type | Required | Description | +| --------- | ----- | -------- | ------------------------------------------------------- | +| bk_biz_id | int | Yes | Business ID | +| pods | array | Yes | Detailed information for creating pods in this business | #### pods[x] -| Field | Type | Required | Description | -|----------------|--------------|----------|-----------------------------| -| spec | object | yes | pod association information | -| bk_host_id | int | yes | pod associated host id | -| name | string | yes | pod name | -| operator | string array | yes | pod operator | -| priority | object | no | priority | -| labels | object | no | labels | -| ip | string | no | Container network IP | -| ips | array | no | Container network IP array | -| volumes | object | no | Volume information | -| qos_class | string | no | service quality | -| node_selectors | object | no | Node label selector | -| tolerations | object | no | tolerance | -| containers | array | no | container information | +| Field | Type | Required | Description | +| -------------- | ------------ | -------- | ------------------------------ | +| spec | object | Yes | Associated pod information | +| bk_host_id | int | Yes | Associated host ID | +| name | string | Yes | Pod name | +| operator | string array | Yes | Person in charge of the pod | +| priority | object | No | Priority | +| labels | object | No | Labels | +| ip | string | No | Container network IP | +| ips | array | No | Array of container network IPs | +| volumes | object | No | Volume information | +| qos_class | string | No | Quality of service | +| node_selectors | object | No | Node label selector | +| tolerations | object | No | Tolerations | +| containers | array | No | Container information | #### spec -| Field | Type | Required | Description | -|-----------------|--------|----------|---------------------------------------------------------| -| bk_cluster_id | int | yes | ID of the cluster where the pod is located | -| bk_namespace_id | int | yes | The ID of the namespace to which the pod belongs | -| bk_node_id | int | yes | ID of the node where the pod is located | -| ref | object | yes | Information about the workload corresponding to the pod | +| Field | Type | Required | Description | +| --------------- | ------ | -------- | -------------------------------------------- | +| bk_cluster_id | int | Yes | ID of the cluster where the pod is located | +| bk_namespace_id | int | Yes | ID of the namespace to which the pod belongs | +| bk_node_id | int | Yes | ID of the node where the pod is located | +| ref | object | Yes | Relevant information about the pod | +| bk_pod_id | int | No | ID of the pod (optional) | #### ref -| Field | Type | Required | Description | -|-------|------|----------|----------------------------------------------------------------------------------| -| kind | int | yes | the workload category associated with the pod. For specific categories, see Note | -| id | int | yes | the ID of the workload associated with the pod | +| Field | Type | Required | Description | +| ----- | ---- | -------- | ------------------------------------------------------------ | +| kind | int | Yes | Category of the workload related to the pod, see notes for specific categories | +| id | int | Yes | ID of the workload related to the pod | #### containers[x] -| Field | Type | Required | Description | -|---------------|--------|----------|---------------------------| -| name | string | yes | container name | -| container_uid | string | yes | container ID | -| image | string | no | mirror information | -| ports | array | no | container port | -| host_ports | array | no | host port mapping | -| args | array | no | startup parameters | -| started | int | no | start time | -| limits | object | no | resource constraints | -| requests | object | no | application resource size | -| liveness | object | no | survival probe | -| environment | array | no | environment variable | -| mounts | array | no | mount volume | +| Field | Type | Required | Description | +| ------------- | ------ | -------- | ----------------------- | +| name | string | Yes | Container name | +| container_uid | string | Yes | Container ID | +| image | string | No | Image information | +| ports | array | No | Container ports | +| host_ports | array | No | Host port mapping | +| args | array | No | Startup parameters | +| started | int | No | Startup time | +| limits | object | No | Resource limits | +| requests | object | No | Requested resource size | +| liveness | object | No | Liveness probe | +| environment | array | No | Environment variables | +| mounts | array | No | Mounted volumes | #### ports[x] | Field | Type | Required | Description | -|---------------|--------|----------|----------------| -| name | string | yes | port name | -| hostPort | int | no | host port | -| containerPort | int | no | container port | -| protocol | string | no | protocol name | -| hostIP | string | no | host IP | +| ------------- | ------ | -------- | -------------- | +| name | string | Yes | Port name | +| hostPort | int | No | Host port | +| containerPort | int | No | Container port | +| protocol | string | No | Protocol name | +| hostIP | string | No | Host IP | #### liveness -| Field | Type | Required | Description | -|-----------|--------|----------|-----------------| -| exec | object | yes | perform action | -| httpGet | object | no | Http Get action | -| tcpSocket | object | no | tcp socket | -| grpc | object | no | grpc protocol | +| Field | Type | Required | Description | +| --------- | ------ | -------- | ---------------- | +| exec | object | Yes | Execution action | +| httpGet | object | No | Http Get action | +| tcpSocket | object | No | tcp socket | +| grpc | object | No | grpc protocol | -**注意:** +**Note:** -- create no more than 200 pods at one time . -- specific workload category: deployment、statefulSet、daemonSet、gameStatefulSet、gameDeployment、cronJob、job、pods. -- this interface will create pods and corresponding containers synchronously. +- The number of pods created at once should not exceed 200. +- Specific workload categories: deployment, statefulSet, daemonSet, gameStatefulSet, gameDeployment, cronJob, job, pods. +- This interface will synchronously create pods and their corresponding containers. ### Request Parameters Example ```json - { +{ "bk_app_code": "esb_test", "bk_app_secret": "xxx", "bk_username": "xxx", "bk_token": "xxx", - "bk_biz_id": 2, "data": [ { "bk_biz_id": 1, @@ -152,7 +152,7 @@ create new container pods and containers(v3.12.1+,permission: kube pod creatio } ``` -### Return Result Example +### Response Example ```json { @@ -170,25 +170,23 @@ create new container pods and containers(v3.12.1+,permission: kube pod creatio } ``` -**注意:** - -- the order of the pod ID array in the returned data is consistent with the order of the array data in the parameter. +**Note:** -### Return Result Parameters Description +- The order of the pod ID array returned in the data field corresponds to the order of the array data in the parameters. -#### response +### Response Parameters Description -| Name | Type | Description | -|------------|--------|------------------------------------------------------------------------------------| -| result | bool | Whether the request succeeded or not. True: request succeeded;false request failed | -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string | Error message returned by request failure | -| permission | object | Permission information | -| data | object | Data returned by request | -| request_id | string | Request chain id | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request was successful. true: success; false: failure | +| code | int | Error code. 0 indicates success, >0 indicates a failure error | +| message | string | Error message returned for a failed request | +| permission | object | Permission information | +| data | object | Data returned by the request | +| request_id | string | Request chain ID | ### data -| Name | Type | Description | -|------|-------|------------------------------| -| ids | array | list of kube pod IDs created | +| Field | Type | Description | +| ---- | ----- | ----------------------- | +| ids | array | List of created pod IDs | diff --git a/docs/apidoc/cc/en/batch_create_kube_workload.md b/docs/apidoc/cc/en/batch_create_kube_workload.md index e5f79ecd30..58219a8f97 100644 --- a/docs/apidoc/cc/en/batch_create_kube_workload.md +++ b/docs/apidoc/cc/en/batch_create_kube_workload.md @@ -1,73 +1,73 @@ -### Function description +### Function Description -Batch create workload (version: v3.12.1+, auth: create container workload) +Batch Create Workloads (Version: v3.12.1+, Permission: Container workloads creation permission) -### Request parameters +### Request Parameters {{ common_args_desc }} -#### Interface parameters +#### Interface Parameters -| field | type | required | description | -|-----------|--------|----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| bk_biz_id | int | yes | business id | -| kind | string | yes | workload type, the current built-in workload types are deployment, daemonSet, statefulSet, gameStatefulSet, gameDeployment, cronJob, job, pods (put those that do not pass the workload but directly create Pod) | -| data | array | Yes | array, limit to 200 at a time | +| Field | Type | Required | Description | +| --------- | ------ | -------- | ------------------------------------------------------------ | +| bk_biz_id | int | Yes | Business ID | +| kind | string | Yes | Workload type, currently supported workload types include deployment, daemonSet, statefulSet, gameStatefulSet, gameDeployment, cronJob, job, pods (create Pods directly without passing through workloads) | +| data | array | Yes | Array, limited to creating 200 at a time | #### data[x] -| field | type | required | description | -|-------------------------|--------|----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------| -| bk_namespace_id | int | yes | namespace's unique identifier in cc | -| name | string | yes | workload name | -| labels | map | no | labels | -| selector | object | no | workload selector | -| replicas | int | no | number of workload instances | -| strategy_type | string | no | workload update mechanism | -| min_ready_seconds | int | No | Specifies the minimum time that a newly created Pod will be ready without any container crashes, and only after that time will the Pod be considered available | -| rolling_update_strategy | object | No | Rolling update strategy | +| Field | Type | Required | Description | +| ----------------------- | ------ | -------- | ------------------------------------------------------------ | +| bk_namespace_id | int | Yes | The unique identifier of the namespace in cc | +| name | string | Yes | Workload name | +| labels | map | No | Labels | +| selector | object | No | Workload selector | +| replicas | int | No | Number of workload instances | +| strategy_type | string | No | Workload update mechanism | +| min_ready_seconds | int | No | Specifies the minimum ready time for a newly created Pod without any container crashes. Only when this time is exceeded, the Pod is considered available | +| rolling_update_strategy | object | No | Rolling update strategy | #### selector -| field | type | required | description | -|-------------------|-------|----------|-------------------| -| match_labels | map | no | match by label | -| match_expressions | array | no | match_expressions | +| Field | Type | Required | Description | +| ----------------- | ----- | -------- | -------------------- | +| match_labels | map | No | Match labels | +| match_expressions | array | No | Matching expressions | #### match_expressions[x] -| field | type | required | description | -|----------|--------|------------|-------------------------------------------------------------------------------------------------------------------------| -| key | string | is the key | of the |tag -| operator | string | is the | operator, with optional values: "In", "NotIn", "Exists", "DoesNotExist" | -| values | array | no | Array of strings, cannot be empty if the operator is "In" or "NotIn", must be empty if it is "Exists" or "DoesNotExist" | +| Field | Type | Required | Description | +| -------- | ------ | -------- | ----------- | +| key | string | Yes | Label key | +| operator | string | Yes | Operator | +| values | array | No | Values | #### rolling_update_strategy -When strategy_type is RollingUpdate, it is not empty, otherwise it is empty. +When strategy_type is RollingUpdate, it cannot be empty. Otherwise, it is empty. -| field | type | mandatory | description | -|-----------------|--------|-----------|-----------------| -| max_unavailable | object | no | max_unavailable | -| max_surge | object | no | max_overflow | +| Field | Type | Required | Description | +| --------------- | ------ | -------- | ------------------- | +| max_unavailable | object | No | Maximum unavailable | +| max_surge | object | No | Maximum surge | #### max_unavailable -| field | type | mandatory | description | -|---------|--------|-----------|-----------------------------------------------------------------------------------| -| type | int | Yes | Optional value of 0 (for int type) or 1 (for string type) | -| int_val | int | No | When type is 0 (for int type), it cannot be null, and the corresponding int value | -| str_val | string | no | when type is 1(for string type),cannot be null,corresponding string value | +| Field | Type | Required | Description | +| ------- | ------ | -------- | ------------------------------ | +| type | int | Yes | Type (0 for int, 1 for string) | +| int_val | int | No | Integer value | +| str_val | string | No | String value | #### max_surge -| field | type | mandatory | description | -|---------|--------|-----------|------------------------------------------------------------------------------------------| -| type | int | yes | optional value of 0 (for int type) or 1 (for string type) | -| int_val | int | No | When type is 0 (for int type), it cannot be null, and the corresponding int value | -| str_val | string | no | When type is 1 (for string type), it cannot be empty, and the corresponding string value | +| Field | Type | Required | Description | +| ------- | ------ | -------- | ------------------------------ | +| type | int | Yes | Type (0 for int, 1 for string) | +| int_val | int | No | Integer value | +| str_val | string | No | String value | -### Example request parameters +### Request Parameters Example ```json { @@ -118,10 +118,9 @@ When strategy_type is RollingUpdate, it is not empty, otherwise it is empty. } ``` -### Return Result Example +### Response Example ```json - { "result": true, "code": 0, @@ -138,24 +137,23 @@ When strategy_type is RollingUpdate, it is not empty, otherwise it is empty. **Note:** -- The order of the workload ID array in the returned data is consistent with the order of the array data in the - parameter. +- The order of the workload ID array returned in the data field corresponds to the order of the array data in the parameters. -### Return result parameter description +### Response Parameters Description #### response -| name | type | description | -|------------|--------|-------------------------------------------------------------------------------------------| -| result | bool | Whether the request was successful or not. true:request successful; false request failed. | -| code | int | The error code. 0 means success, >0 means failure error. | -| message | string | The error message returned by the failed request. | -| permission | object | Permission information | -| request_id | string | request_chain_id | -| data | object | The data returned by the request. | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request was successful. true: success; false: failure | +| code | int | Error code. 0 indicates success, >0 indicates a failure error | +| message | string | Error message returned for a failed request | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned by the request | #### data -| field | type | description | -|-------|-------|-----------------------------------| -| ids | array | Array of unique identifiers in cc | +| Field | Type | Description | +| ----- | ----- | --------------------------------- | +| ids | array | Array of unique identifiers in cc | \ No newline at end of file diff --git a/docs/apidoc/cc/en/batch_create_proc_template.md b/docs/apidoc/cc/en/batch_create_proc_template.md index 19f1cce1af..58bcd31586 100644 --- a/docs/apidoc/cc/en/batch_create_proc_template.md +++ b/docs/apidoc/cc/en/batch_create_proc_template.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Batch create process templates +Batch Create Process Templates (Permission: Service Template Editing Permission) ### Request Parameters @@ -8,47 +8,47 @@ Batch create process templates #### Interface Parameters -| Field | Type | Required | Description | -|----------------------|------------|--------|-----------------------| -| bk_biz_id | int | yes | Business ID | -| service_template_id | int |no | Service template ID| -| processes | array |yes | Process template information, the max length is 100| - - -#### processes -as_default_value: Is the value of the process based on the template - -| Field| Type| Required| Description| -|---|---|---|---| -|auto_start| bool| no | Whether to pull up automatically| -|auto_time_gap| int| no | Pull up interval| -|bk_biz_id| int| no | Business ID | -|bk_func_id| string| no | Function ID| -|bk_func_name| string| no | Process name| -|bk_process_id| int| no | Process id| -|bk_process_name| string| no| Process alias| -|bk_supplier_account| string| no| Developer account number| -|face_stop_cmd| string| no| Forced stop command| -|pid_file| string| no| PID file path| -|priority| int| no| Startup priority| -|proc_num| int| no| Number of starts| -|reload_cmd| string| no| Process reload command| -|restart_cmd| string| no| Restart command| -|start_cmd| string| no| Start command| -|stop_cmd| string| no| Stop command| -|timeout| int| no| Operation time-out duration| -|user| string| no| Start user| -|work_path| string| no| Working path| -|bind_info| object| no| Binding information| - -#### Bind_info Field Description -| Field| Type| Required| Description| -|---|---|---|---| -|enable| bool| no | Is the port enabled| -|ip| string| no | Bound ip| -|port| string| no | Bound port| -|protocol| string| no | Protocol used| -|row_id| int| no | Template row index used for instantiation, unique in process| +| Field | Type | Required | Description | +| ------------------- | ----- | -------- | --------------------------------------------------------- | +| bk_biz_id | int | Yes | Business ID | +| service_template_id | int | No | Service template ID | +| processes | array | Yes | Process template information, with a maximum value of 100 | + +#### processes + +as_default_value: Whether the value of the process is based on the template + +| Field | Type | Required | Description | +| ------------------- | ------ | -------- | ------------------------------ | +| auto_start | bool | No | Whether to start automatically | +| bk_biz_id | int | No | Business ID | +| bk_func_id | string | No | Function ID | +| bk_func_name | string | No | Process name | +| bk_process_id | int | No | Process ID | +| bk_process_name | string | No | Process alias | +| bk_supplier_account | string | No | Supplier account | +| face_stop_cmd | string | No | Force stop command | +| pid_file | string | No | PID file path | +| priority | int | No | Startup priority | +| proc_num | int | No | Number of startups | +| reload_cmd | string | No | Process reload command | +| restart_cmd | string | No | Restart command | +| start_cmd | string | No | Startup command | +| stop_cmd | string | No | Stop command | +| timeout | int | No | Operation timeout duration | +| user | string | No | Startup user | +| work_path | string | No | Working directory | +| bind_info | object | No | Binding information | + +#### bind_info Field Description + +| Field | Type | Required | Description | +| -------- | ------ | -------- | ------------------------------------------------------------ | +| enable | bool | No | Whether the port is enabled | +| ip | string | No | Bound IP | +| port | string | No | Bound port | +| protocol | string | No | Protocol used | +| row_id | int | No | Template row index used for instantiation, unique within the process | ### Request Parameters Example @@ -107,10 +107,6 @@ as_default_value: Is the value of the process based on the template "value": false, "as_default_value": false }, - "auto_time_gap": { - "value": null, - "as_default_value": false - }, "start_cmd": { "value": "", "as_default_value": false @@ -165,7 +161,7 @@ as_default_value: Is the value of the process based on the template } ``` -### Return Result Example +### Response Example ```python { @@ -174,19 +170,19 @@ as_default_value: Is the value of the process based on the template "message": "success", "permission": null, "request_id": "e43da4ef221746868dc4c837d36f3807", - "data": [[52]] + "data": [52] } ``` -### Return Result Parameters Description +### Response Parameters Description #### response -| Name| Type| Description| -|---|---|---| -| result | bool |Whether the request was successful or not. True: request succeeded;false request failed| -| code | int |Wrong code. 0 indicates success,>0 indicates failure error| -| message | string |Error message returned by request failure| -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | array |Successfully created process template ID| +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request was successful. true: success; false: failure | +| code | int | Error code. 0 indicates success, >0 indicates a failure error | +| message | string | Error message returned for a failed request | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | array | IDs of successfully created process templates | \ No newline at end of file diff --git a/docs/apidoc/cc/en/batch_create_project.md b/docs/apidoc/cc/en/batch_create_project.md index 0403d37e43..7052f5cc88 100644 --- a/docs/apidoc/cc/en/batch_create_project.md +++ b/docs/apidoc/cc/en/batch_create_project.md @@ -1,40 +1,39 @@ -### Function description +### Function Description -batch create project (version: v3.10.23+, permission: creation permission of the project) +Create a new project (Version: v3.10.23+, Permission: Project creation permission) -### Request parameters +### Request Parameters {{ common_args_desc }} +#### Interface Parameters -#### Interface parameters - -| field | type | required | description | -| ----------------------------|------------|----------|--------------------------------------------| -| data | array| yes | array, limited to 200 at a time| +| Field | Type | Required | Description | +| ----- | ----- | -------- | ------------------------------------ | +| data | array | Yes | Array, limit to create 200 at a time | #### data -| field | type | required | description | -|--------------------|------------|----------|---------------------------------------------------------------------------------------------------------------------------------------| -| bk_project_id | string | no | project_id, if pass this parameter, it needs to be a 32-bit uuid without underscore; if not, it will be automatically generated | -| bk_project_name | string | yes | project_name | -| bk_project_code | string | yes | project english name | -| bk_project_desc | string | no | project_description | -| bk_project_type | enum | no | project type, optional values: "mobile_game", "pc_game", "web_game", "platform_prod", "support_prod", "other", default value: "other" | -| bk_project_sec_lvl | enum | no | confidentiality level, optional values: "public", "private", "classified", default: "public" | -| bk_project_owner | string | yes | project owner | -| bk_project_team | array | no | project team | -| bk_project_icon | string | no | project icon | +| Field | Type | Required | Description | +| ------------------ | ------ | -------- | ------------------------------------------------------------ | +| bk_project_id | string | No | Project ID, if this parameter is passed, it needs to be a 32-character uuid without hyphens; if not passed, the system will generate it automatically | +| bk_project_name | string | Yes | Project name | +| bk_project_code | string | Yes | Project code | +| bk_project_desc | string | No | Project description | +| bk_project_type | enum | No | Project type, optional values: "mobile_game" (mobile game), "pc_game" (PC game), "web_game" (web game), "platform_prod" (platform product), "support_prod" (support product), "other" (other), default value: "other" | +| bk_project_sec_lvl | enum | No | Confidentiality level, optional values: "public" (public), "private" (private), "classified" (confidential), default value: "public" | +| bk_project_owner | string | Yes | Project owner | +| bk_project_team | array | No | Team it belongs to | +| bk_project_icon | string | No | Project icon | -### Request parameter examples +### Request Parameters Example ```json { - "bk_app_code": "esb_test", - "bk_app_secret": "xxx", - "bk_username": "xxx", - "bk_token": "xxx", + "bk_app_code":"esb_test", + "bk_app_secret":"xxx", + "bk_username":"xxx", + "bk_token":"xxx", "data": [ { "bk_project_id": "21bf9ef9be7c4d38a1d1f2uc0b44a8f2", @@ -51,13 +50,13 @@ batch create project (version: v3.10.23+, permission: creation permission of the } ``` -### Return Result Example +### Response Example ```json { "result":true, "code":0, - "message": "success", + "message":"success", "permission":null, "data": { "ids": [1] @@ -65,23 +64,26 @@ batch create project (version: v3.10.23+, permission: creation permission of the "request_id": "dsda1122adasadadada2222" } ``` + **Note:** -- The order of the array of ids in the returned data remains the same as the order of the array data in the parameters. -### Return result parameter description +- The order of the IDs array in the returned data is consistent with the order of the array data in the parameters. + +### Response Parameters Description + #### response -| name | type | description | -| ------- | ------ | ------------------------------------- | -| result | bool | The success or failure of the request. true: the request was successful; false: the request failed.| -| code | int | The error code. 0 means success, >0 means failure error.| -| message | string | The error message returned by the failed request.| -| permission | object | Permission information | -| request_id | string | request_chain_id | -| data | object | data returned by the request| +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request was successful. true: success; false: failure | +| code | int | Error code. 0 indicates success, >0 indicates a failure error | +| message | string | Error message returned for a failed request | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned for the request | #### data -| field | type | description | -| ----------- |----------|-----------------------------------| -| ids | array | array of unique identifiers in cc | +| Field | Type | Description | +| ----- | ----- | ----------------------------- | +| ids | array | Unique identifier array in cc | \ No newline at end of file diff --git a/docs/apidoc/cc/en/batch_create_quoted_inst.md b/docs/apidoc/cc/en/batch_create_quoted_inst.md index 8adb3452fd..b841349f2d 100644 --- a/docs/apidoc/cc/en/batch_create_quoted_inst.md +++ b/docs/apidoc/cc/en/batch_create_quoted_inst.md @@ -1,29 +1,29 @@ -### Function description +### Function Description -batch create quoted model instance (version: v3.10.30+, permission: update permission of the source model instance) +Batch create quoted model instance (Version: v3.10.30+, permission: Model instance editing permission) -### Request parameters +### Request Parameters {{ common_args_desc }} -#### Interface parameters +#### Interface Parameters -| Field | Type | Required | Description | -|----------------|--------------|----------|------------------------------------------------------| -| bk_obj_id | string | yes | source model id | -| bk_property_id | string | yes | source model quoted property id | -| data | object array | yes | instance data to be created, the maximum limit is 50 | +| Field | Type | Required | Description | +| -------------- | ------------ | -------- | ---------------------------------------------------------- | +| bk_obj_id | string | Yes | Source model ID | +| bk_property_id | string | Yes | Property ID of the source model referencing this model | +| data | object array | Yes | Information of instances to be created, up to 50 instances | #### data[n] -| Field | Type | Required | Description | -|-------------|--------|----------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------| -| bk_inst_id | int64 | no | source model instance id, if not set, the created instance should be associated with source model instance using create_inst | -| name | string | depends on the "isrequired" config of the property | name, this is only an example, actual fields is defined by quoted model properties | -| operator | string | depends on the "isrequired" config of the property | operator, this is only an example, actual fields is defined by quoted model properties | -| description | string | depends on the "isrequired" config of the property | description, this is only an example, actual fields is defined by quoted model properties | +| Parameter | Type | Required | Description | +| ----------- | ------ | ------------------------------------------------------- | ------------------------------------------------------------ | +| bk_inst_id | int64 | No | Source model instance ID, if not filled in, it needs to be associated with the source model instance through the interface for creating source model instances | +| name | string | Depends on the "Required" configuration in the property | Name, this is just an example, the actual field depends on the model property | +| operator | string | Depends on the "Required" configuration in the property | Maintainer, this is just an example, the actual field depends on the model property | +| description | string | Depends on the "Required" configuration in the property | Description, this is just an example, the actual field depends on the model property | -### Request parameter examples +### Request Parameters Example ```json { @@ -44,7 +44,7 @@ batch create quoted model instance (version: v3.10.30+, permission: update permi } ``` -### Return Result Example +### Response Example ```json { @@ -64,23 +64,23 @@ batch create quoted model instance (version: v3.10.30+, permission: update permi **Note:** -- The order of the array of ids in the returned data remains the same as the order of the array data in the parameters. +- The order of the IDs array in the returned data is consistent with the order of the array data in the parameters. -### Return result parameter description +### Response Parameters Description #### response -| Name | Type | Description | -|------------|--------|-----------------------------------------------------------------------------------------------------| -| result | bool | The success or failure of the request. true: the request was successful; false: the request failed. | -| code | int | The error code. 0 means success, >0 means failure error. | -| message | string | The error message returned by the failed request. | -| permission | object | Permission information | -| request_id | string | request_chain_id | -| data | object | data returned by the request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request was successful. true: success; false: failure | +| code | int | Error code. 0 indicates success, >0 indicates a failure error | +| message | string | Error message returned for a failed request | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned for the request | #### data -| Name | Type | Description | -|------|-------|----------------------------------------------------| -| ids | array | unique identifier array of created instances in cc | +| Field | Type | Description | +| ----- | ----------- | ----------------------------- | +| ids | int64 array | Unique identifier array in cc | \ No newline at end of file diff --git a/docs/apidoc/cc/en/batch_delete_business_set.md b/docs/apidoc/cc/en/batch_delete_business_set.md index 4847bf75ac..cd93c743d1 100644 --- a/docs/apidoc/cc/en/batch_delete_business_set.md +++ b/docs/apidoc/cc/en/batch_delete_business_set.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Delete business set (v3.10.12+) +Delete business set (Version: v3.10.12+, Permission: business set deletion permission) ### Request Parameters @@ -8,45 +8,47 @@ Delete business set (v3.10.12+) #### Interface Parameters -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_biz_set_ids | array | yes | Business set ID list| +| Field | Type | Required | Description | +| -------------- | ----- | -------- | ------------------------ | +| bk_biz_set_ids | array | Yes | List of business set IDs | -### Request Parameters Example +### Request Parameter Example ```python { - "bk_app_code":"esb_test", - "bk_app_secret":"xxx", - "bk_username":"xxx", - "bk_token":"xxx", - "bk_biz_set_ids":[ + "bk_app_code": "esb_test", + "bk_app_secret": "xxx", + "bk_username": "xxx", + "bk_token": "xxx", + "bk_biz_set_ids": [ 10, 12 ] } ``` -### Return Result Example +### Response Example ```python { "result": true, "code": 0, - "message": "", - "permission":null, + "message": "success", + "permission": null, "data": {}, "request_id": "dsda1122adasadadada2222" } ``` -### Return Result Parameters Description + +### Response Parameter Description + #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request succeeded or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| data | object |Data returned by request| -| request_id | string |Request chain id | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Indicates whether the request was successful. true: success; false: failure | +| code | int | Error code. 0 indicates success, >0 indicates failure error | +| message | string | Error message returned in case of request failure | +| permission | object | Permission information | +| data | object | Data returned in the request | +| request_id | string | Request chain ID | \ No newline at end of file diff --git a/docs/apidoc/cc/en/batch_delete_inst.md b/docs/apidoc/cc/en/batch_delete_inst.md index 7fbba7fb51..76c18b1437 100644 --- a/docs/apidoc/cc/en/batch_delete_inst.md +++ b/docs/apidoc/cc/en/batch_delete_inst.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Bulk delete object instances +Batch delete object instances (Permission: Model instance deletion permission) ### Request Parameters @@ -8,17 +8,18 @@ Bulk delete object instances #### Interface Parameters -| Field | Type | Required | Description | -|---------------------|-------------|--------|----------------------------------| -| bk_obj_id | string | yes | Model ID| -| delete | object |yes | Delete| +| Field | Type | Required | Description | +| --------- | ------ | -------- | ----------- | +| bk_obj_id | string | Yes | Model ID | +| delete | object | Yes | Deletion | #### delete -| Field | Type | Required | Description | -|---------------------|-------------|--------|----------------------------------| -| inst_ids | array | yes | Instance ID set | -### Request Parameters Example +| Field | Type | Required | Description | +| -------- | ----- | -------- | -------------------------- | +| inst_ids | array | Yes | Collection of instance IDs | + +### Request Parameter Example ```python { @@ -26,34 +27,35 @@ Bulk delete object instances "bk_app_secret": "xxx", "bk_username": "xxx", "bk_token": "xxx", - "bk_obj_id": "test", - "delete":{ - "inst_ids":[123] + "bk_obj_id": "bk_firewall", + "delete": { + "inst_ids": [ + 46, 47 + ] } } ``` -### Return Result Example +### Response Example ```python - { "result": true, "code": 0, - "message": "", + "message": "success", "permission": null, "request_id": "e43da4ef221746868dc4c837d36f3807", "data": "success" } ``` -#### response +#### Response -| Name | Type | Description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Indicates whether the request was successful. true: success; false: failure | +| code | int | Error code. 0 indicates success, >0 indicates failure error | +| message | string | Error message returned in case of request failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned in the request | \ No newline at end of file diff --git a/docs/apidoc/cc/en/batch_delete_kube_cluster.md b/docs/apidoc/cc/en/batch_delete_kube_cluster.md index a96b7c12c3..f73fdbcd42 100644 --- a/docs/apidoc/cc/en/batch_delete_kube_cluster.md +++ b/docs/apidoc/cc/en/batch_delete_kube_cluster.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -delete container clusters in batches (v3.12.1+, permission: kube cluster deletion permission) +Delete container cluster (v3.12.1+, Permission: Container cluster deletion permission) ### Request Parameters @@ -8,19 +8,17 @@ delete container clusters in batches (v3.12.1+, permission: kube cluster deletio #### Interface Parameters -| Field | Type | Required | Description | -|-----------|-------|----------|----------------------------------------------------| -| bk_biz_id | int | yes | business id to which the container cluster belongs | -| ids | array | yes | ids of the container cluster in cmdb | +| Field | Type | Required | Description | +| --------- | ----- | -------- | -------------------------------------------- | +| bk_biz_id | int | Yes | Business ID of the container cluster | +| ids | array | Yes | List of IDs of the container cluster in CMDB | **Note:** -- user needs to ensure that there are no associated resources (such as namespace, pod, node workload, etc.) under the - cluster to be deleted, otherwise the deletion will fail.- uid and id cannot be empty at the same time, nor can they be - filled in at the same time. -- the number of clusters to be deleted at one time cannot exceed 10. +- Users need to ensure that there are no associated resources (such as namespace, pod, node workload, etc.) under the clusters to be deleted, otherwise, deletion will fail. +- The number of clusters to be deleted in one go should not exceed 10. -### Request Parameters Example +### Request Parameter Example ```json { @@ -36,7 +34,7 @@ delete container clusters in batches (v3.12.1+, permission: kube cluster deletio } ``` -### Return Result Example +### Response Example ```json { @@ -49,15 +47,13 @@ delete container clusters in batches (v3.12.1+, permission: kube cluster deletio } ``` -### Return Result Parameters Description +### Response Parameter Description -#### response - -| Name | Type | Description | -|------------|--------|------------------------------------------------------------------------------------| -| result | bool | Whether the request succeeded or not. True: request succeeded;false request failed | -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string | Error message returned by request failure | -| permission | object | Permission information | -| data | object | Data returned by request | -| request_id | string | Request chain id | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Indicates whether the request was successful. true: success; false: failure | +| code | int | Error code. 0 indicates success, >0 indicates failure error | +| message | string | Error message returned in case of request failure | +| permission | object | Permission information | +| data | object | No data returned | +| request_id | string | Request chain ID | \ No newline at end of file diff --git a/docs/apidoc/cc/en/batch_delete_kube_namespace.md b/docs/apidoc/cc/en/batch_delete_kube_namespace.md index b6ed3f2ce5..6df40294f6 100644 --- a/docs/apidoc/cc/en/batch_delete_kube_namespace.md +++ b/docs/apidoc/cc/en/batch_delete_kube_namespace.md @@ -1,19 +1,21 @@ ### Function Description -Batch delete namespace (version: v3.12.1+, auth: delete container namespace) +Batch delete namespace (Version: v3.12.1+, Permission: Container namespace deletion permission) -### Request parameters +### Request Parameters {{ common_args_desc }} -#### Interface parameters +#### Interface Parameters -| field | type | required | description | -|-----------|-------|----------|-----------------------------------------------------------------| -| bk_biz_id | int | Yes | business id | -| ids | array | Yes | the namespace ids array to be deleted, limited to 200 at a time | +- Common Fields: -### Example request parameters +| Field | Type | Required | Description | +| --------- | ----- | -------- | ------------------------------------------------------------ | +| bk_biz_id | int | Yes | Business ID | +| ids | array | Yes | Unique identifiers of namespaces to be deleted in CC, with a limit of 200 at a time | + +### Request Parameter Example ```json { @@ -28,10 +30,9 @@ Batch delete namespace (version: v3.12.1+, auth: delete container namespace) } ``` -### Return Result Example +### Response Example ```json - { "result": true, "code": 0, @@ -42,15 +43,15 @@ Batch delete namespace (version: v3.12.1+, auth: delete container namespace) } ``` -### Return result parameter description +### Response Parameter Description #### response -| name | type | description | -|------------|--------|-------------------------------------------------------------------------------------------| -| result | bool | Whether the request was successful or not. true:request successful; false request failed. | -| code | int | The error code. 0 means success, >0 means failure error. | -| message | string | The error message returned by the failed request. | -| permission | object | Permission information | -| request_id | string | request_chain_id | -| data | object | The data returned by the request. | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Indicates whether the request was successful. true: success; false: failure | +| code | int | Error code. 0 indicates success, >0 indicates failure error | +| message | string | Error message returned in case of request failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned in the request | \ No newline at end of file diff --git a/docs/apidoc/cc/en/batch_delete_kube_node.md b/docs/apidoc/cc/en/batch_delete_kube_node.md index 9ba623e6c3..3a7d816a46 100644 --- a/docs/apidoc/cc/en/batch_delete_kube_node.md +++ b/docs/apidoc/cc/en/batch_delete_kube_node.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -delete container node (v3.12.1+, permission: kube node deletion permission) +Delete container node (v3.12.1+, Permission: Container node deletion permission) ### Request Parameters @@ -8,18 +8,17 @@ delete container node (v3.12.1+, permission: kube node deletion permission) #### Interface Parameters -| Field | Type | Required | Description | -|-----------|-------|----------|-----------------------------------| -| bk_biz_id | int | yes | ID of the container node in cmdb | -| ids | array | yes | IDs of the container node in cmdb | +| Field | Type | Required | Description | +| --------- | ----- | -------- | -------------------------------------- | +| bk_biz_id | int | Yes | Business ID of the container node | +| ids | array | Yes | List of IDs of the nodes to be deleted | **Note:** -- user needs to ensure that there are no associated resources (such as pods) under the node, otherwise the deletion will - fail. -- delete no more than 100 Nodes at one time. +- Users need to ensure that there are no associated resources (such as pods) under the nodes to be deleted, otherwise, deletion will fail. +- The number of nodes to be deleted in one go should not exceed 100. -### Request Parameters Example +### Request Parameter Example ```json { @@ -35,7 +34,7 @@ delete container node (v3.12.1+, permission: kube node deletion permission) } ``` -### Return Result Example +### Response Example ```json { @@ -48,15 +47,13 @@ delete container node (v3.12.1+, permission: kube node deletion permission) } ``` -### Return Result Parameters Description +### Response Parameter Description -#### response - -| Name | Type | Description | -|------------|--------|------------------------------------------------------------------------------------| -| result | bool | Whether the request succeeded or not. True: request succeeded;false request failed | -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string | Error message returned by request failure | -| permission | object | Permission information | -| data | object | Data returned by request | -| request_id | string | Request chain id | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Indicates whether the request was successful. true: success; false: failure | +| code | int | Error code. 0 indicates success, >0 indicates failure error | +| message | string | Error message returned in case of request failure | +| permission | object | Permission information | +| data | object | No data returned | +| request_id | string | Request chain ID | \ No newline at end of file diff --git a/docs/apidoc/cc/en/batch_delete_kube_pod.md b/docs/apidoc/cc/en/batch_delete_kube_pod.md index 222463be45..04eac62489 100644 --- a/docs/apidoc/cc/en/batch_delete_kube_pod.md +++ b/docs/apidoc/cc/en/batch_delete_kube_pod.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -batch delete kube pod (version: v3.12.1+, auth: Delete Kube Pod) +Batch delete pods (Version: v3.12.1+, Permission: Container pod deletion permission) ### Request Parameters @@ -8,18 +8,18 @@ batch delete kube pod (version: v3.12.1+, auth: Delete Kube Pod) #### Interface Parameters -| Field | Type | Required | Description | -|-------|--------------|----------|---------------------------------------------------------------------------------| -| data | object array | yes | The array of pod info to be deleted, the sum of all pods in data is at most 200 | +| Field | Type | Required | Description | +| ----- | ------------ | -------- | ------------------------------------------------------------ | +| data | object array | Yes | Array of pod information to be deleted, with a maximum of 200 pods in total in the 'data' array | -#### data[x] +#### data -| Field | Type | Required | Description | -|-----------|-----------|----------|-----------------------------------------------------------------------------------| -| bk_biz_id | int | yes | biz id | -| ids | int array | yes | The array of pod cc IDs to be deleted, the sum of all pods in data is at most 200 | +| Field | Type | Required | Description | +| --------- | --------- | -------- | ------------------------------------------------------------ | +| bk_biz_id | int | Yes | Business ID | +| ids | int array | Yes | Array of cc IDs of pods to be deleted, with a maximum of 200 IDs in total in the 'data' array | -### Request Parameters Example +### Request Parameter Example ```json { @@ -39,7 +39,7 @@ batch delete kube pod (version: v3.12.1+, auth: Delete Kube Pod) } ``` -### Return Result Example +### Response Example ```json { @@ -51,14 +51,14 @@ batch delete kube pod (version: v3.12.1+, auth: Delete Kube Pod) } ``` -### Return Result Parameters Description +### Response Parameter Description #### response -| Name | Type | Description | -|------------|--------|-----------------------------------------------------------------------------------------| -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed | -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string | Error message returned by request failure | -| permission | object | Permission information | -| request_id | string | Request chain id | \ No newline at end of file +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Indicates whether the request was successful. true: success; false: failure | +| code | int | Error code. 0 indicates success, >0 indicates failure error | +| message | string | Error message returned in case of request failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | \ No newline at end of file diff --git a/docs/apidoc/cc/en/batch_delete_kube_workload.md b/docs/apidoc/cc/en/batch_delete_kube_workload.md index e12633731c..b2112585f9 100644 --- a/docs/apidoc/cc/en/batch_delete_kube_workload.md +++ b/docs/apidoc/cc/en/batch_delete_kube_workload.md @@ -1,20 +1,20 @@ ### Function Description -Batch delete workload (version: v3.12.1+, auth: delete container workload) +Batch delete workloads (Version: v3.12.1+, Permission: Container workload deletion) -### Request parameters +### Request Parameters {{ common_args_desc }} #### Interface Parameters -| field | type | required | description | -|-----------|--------|----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| bk_biz_id | int | Yes | business id | -| kind | string | Yes | workload type, the current built-in workload types are deployment, daemonSet, statefulSet, gameStatefulSet, gameDeployment, cronJob, job, pods (put those that do not pass the workload but directly create Pod) | -| ids | array | Yes | the workload id array to be deleted, limited to 200 at a time | +| Field | Type | Required | Description | +| --------- | ------ | -------- | ------------------------------------------------------------ | +| bk_biz_id | int | Yes | Business ID | +| kind | string | Yes | Workload type. Currently supported workload types are deployment, daemonSet, statefulSet, gameStatefulSet, gameDeployment, cronJob, job, pods (creating pods directly without using workloads) | +| ids | array | Yes | Array of unique identifiers of workloads in CC, with a limit of 200 at a time | -### Example request parameters +### Request Parameter Example ```json { @@ -30,10 +30,9 @@ Batch delete workload (version: v3.12.1+, auth: delete container workload) } ``` -### Return Result Example +### Response Example ```json - { "result": true, "code": 0, @@ -44,15 +43,15 @@ Batch delete workload (version: v3.12.1+, auth: delete container workload) } ``` -### Return result parameter description +### Response Parameter Description #### response -| name | type | description | -|------------|--------|-------------------------------------------------------------------------------------------| -| result | bool | Whether the request was successful or not. true:request successful; false request failed. | -| code | int | The error code. 0 means success, >0 means failure error. | -| message | string | The error message returned by the failed request. | -| permission | object | Permission information | -| request_id | string | request_chain_id | -| data | object | The data returned by the request. | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Indicates whether the request was successful. true: success; false: failure | +| code | int | Error code. 0 indicates success, >0 indicates failure error | +| message | string | Error message returned in case of request failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned in the request | \ No newline at end of file diff --git a/docs/apidoc/cc/en/batch_delete_project.md b/docs/apidoc/cc/en/batch_delete_project.md index cddf9d335e..a7f0886a18 100644 --- a/docs/apidoc/cc/en/batch_delete_project.md +++ b/docs/apidoc/cc/en/batch_delete_project.md @@ -1,33 +1,32 @@ -### Function description +### Function Description -batch delete project (version: v3.10.23+, permission: delete permission for project) +Delete project (Version: v3.10.23+, Permission: Project deletion permission) -### Request parameters +### Request Parameters {{ common_args_desc }} - #### Interface Parameters -| field | type | required | description | -| ----------------------------|------------|----------|---------------------------------------------------------------------| -| ids | array| yes | an array of ids uniquely identified in cc, limited to 200 at a time | +| Field | Type | Required | Description | +| ----- | ----- | -------- | ------------------------------------------------------------ | +| ids | array | Yes | Array of unique identifiers of projects in CC, with a limit of 200 at a time | -### Request parameter examples +### Request Parameter Example ```json { - "bk_app_code": "esb_test", - "bk_app_secret": "xxx", - "bk_username": "xxx", - "bk_token": "xxx", + "bk_app_code":"esb_test", + "bk_app_secret":"xxx", + "bk_username":"xxx", + "bk_token":"xxx", "ids":[ 1, 2, 3 ] } ``` -### Return Result Example +### Response Example ```json { @@ -39,14 +38,16 @@ batch delete project (version: v3.10.23+, permission: delete permission for proj "request_id": "87de106ab55549bfbcc46e47ecf5bcc7" } ``` -### Return result parameter description + +### Response Parameter Description + #### response -| name | type | description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request was successful or not. true:request successful; false request failed.| -| code | int | The error code. 0 means success, >0 means failure error.| -| message | string | The error message returned by the failed request.| -| permission | object | Permission information | -| request_id | string | request_chain_id | -| data | object | The data returned by the request.| +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Indicates whether the request was successful. true: success; false: failure | +| code | int | Error code. 0 indicates success, >0 indicates failure error | +| message | string | Error message returned in case of request failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned in the request | diff --git a/docs/apidoc/cc/en/batch_delete_quoted_inst.md b/docs/apidoc/cc/en/batch_delete_quoted_inst.md index bfc91fc7fb..a3dbc8f77a 100644 --- a/docs/apidoc/cc/en/batch_delete_quoted_inst.md +++ b/docs/apidoc/cc/en/batch_delete_quoted_inst.md @@ -1,20 +1,20 @@ -### Function description +### Function Description -batch delete quoted model instance (version: v3.10.30+, permission: update permission of the source model instance) +Batch delete instances of referenced models (v3.10.30+, Permission: Edit permission of source model instances) -### Request parameters +### Request Parameters {{ common_args_desc }} -#### Interface parameters +#### Interface Parameters -| Field | Type | Required | Description | -|----------------|-------------|----------|--------------------------------------------------------------------| -| bk_obj_id | string | yes | source model id | -| bk_property_id | string | yes | source model quoted property id | -| ids | int64 array | yes | id list of quoted instance to be deleted, the maximum limit is 500 | +| Field | Type | Required | Description | +| -------------- | ----------- | -------- | ------------------------------------------------------------ | +| bk_obj_id | string | Yes | Source model ID | +| bk_property_id | string | Yes | ID of the property in the source model that references this model | +| ids | int64 array | Yes | Array of instance IDs to be deleted, with a maximum of 500 | -### Request parameter examples +### Request Parameter Example ```json { @@ -31,7 +31,7 @@ batch delete quoted model instance (version: v3.10.30+, permission: update permi } ``` -### Return Result Example +### Response Example ```json { @@ -39,18 +39,20 @@ batch delete quoted model instance (version: v3.10.30+, permission: update permi "code": 0, "message": "success", "permission": null, + "data": null, "request_id": "dsda1122adasadadada2222" } ``` -### Return result parameter description +### Response Parameter Description #### response -| Name | Type | Description | -|------------|--------|-----------------------------------------------------------------------------------------------------| -| result | bool | The success or failure of the request. true: the request was successful; false: the request failed. | -| code | int | The error code. 0 means success, >0 means failure error. | -| message | string | The error message returned by the failed request. | -| permission | object | Permission information | -| request_id | string | request_chain_id | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Indicates whether the request was successful. true: success; false: failure | +| code | int | Error code. 0 indicates success, >0 indicates failure error | +| message | string | Error message returned in case of request failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned in the request | \ No newline at end of file diff --git a/docs/apidoc/cc/en/batch_delete_set.md b/docs/apidoc/cc/en/batch_delete_set.md index 131fcb3d33..7ff55b48c2 100644 --- a/docs/apidoc/cc/en/batch_delete_set.md +++ b/docs/apidoc/cc/en/batch_delete_set.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Bulk delete set by set id under the specified business id +Batch delete set by set ID under a specified business ID (Permission: Business topology deletion permission) ### Request Parameters @@ -8,18 +8,18 @@ Bulk delete set by set id under the specified business id #### Interface Parameters -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_biz_id | int | yes | Business ID | -| delete | object |yes | Delete| +| Field | Type | Required | Description | +| --------- | ------ | -------- | ----------- | +| bk_biz_id | int | Yes | Business ID | +| delete | object | Yes | Deletion | #### delete -| Field | Type | Required | Description | -|---------------------|-------------|--------|----------------------------------| -| inst_ids | int array | yes | set ID collection | +| Field | Type | Required | Description | +| -------- | --------- | -------- | ---------------------------------- | +| inst_ids | int array | Yes | Array of Cluster IDs to be deleted | -### Request Parameters Example +### Request Parameter Example ```python { @@ -27,21 +27,20 @@ Bulk delete set by set id under the specified business id "bk_app_secret": "xxx", "bk_username": "xxx", "bk_token": "xxx", - "bk_biz_id":0, + "bk_biz_id": 0, "delete": { - "inst_ids": [123] + "inst_ids": [123] } } ``` -### Return Result Example +### Response Example ```python - { "result": true, "code": 0, - "message": "", + "message": "success", "permission": null, "request_id": "e43da4ef221746868dc4c837d36f3807", "data": "success" @@ -50,11 +49,11 @@ Bulk delete set by set id under the specified business id #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Indicates whether the request was successful. true: success; false: failure | +| code | int | Error code. 0 indicates success, >0 indicates failure error | +| message | string | Error message returned in case of request failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned in the request | \ No newline at end of file diff --git a/docs/apidoc/cc/en/batch_update_business_set.md b/docs/apidoc/cc/en/batch_update_business_set.md index a4e123bcf8..b8bf0ffd04 100644 --- a/docs/apidoc/cc/en/batch_update_business_set.md +++ b/docs/apidoc/cc/en/batch_update_business_set.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Update business set information (v3.10.12+) +Update Business Set Information (Version: v3.10.12+, Permission: Business Set Editing Permission) ### Request Parameters @@ -8,58 +8,57 @@ Update business set information (v3.10.12+) #### Interface Parameters -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_biz_set_ids | array |yes| Business set ID list| -| data | object |Yes.| Business set data| +| Field | Type | Required | Description | +| -------------- | ------ | -------- | ------------------------ | +| bk_biz_set_ids | array | Yes | List of business set IDs | +| data | object | Yes | Business set data | #### data -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_biz_set_attr | object |no | Business set model attribute | -| bk_scope | object |no | Selected business scope| +| Field | Type | Required | Description | +| --------------- | ------ | -------- | ------------------------- | +| bk_biz_set_attr | object | No | Business set model fields | +| bk_scope | object | No | Selected business scope | #### bk_biz_set_attr -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_biz_set_name | string |yes | Business set name| -| bk_biz_maintainer | string |no | Operation and maintenance personnel| -| bk_biz_set_desc | string |no | Business set description| +| Field | Type | Required | Description | +| ----------------- | ------ | -------- | ------------------------ | +| bk_biz_set_name | string | Yes | Business set name | +| bk_biz_maintainer | string | No | Operations personnel | +| bk_biz_set_desc | string | No | Business set description | #### bk_scope -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| match_all | bool |yes | Selected business scope tag| -| filter | object| no | Scope criteria for the selected business| +| Field | Type | Required | Description | +| --------- | ------ | -------- | ---------------------------------- | +| match_all | bool | Yes | Selected business scope flag | +| filter | object | No | Selected business scope conditions | #### filter -This parameter is a combination of filtering rules for business attribute fields, and is used to search for hosts according to host attribute fields. The combination only supports AND operation and can be nested, with a maximum of 2 layers. - -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| condition | string |yes | Rule operator| -| rules | array |yes | Scope condition rule for selected business| +This parameter is a combination of filtering rules for business property fields, used to search for hosts based on host property fields. Combinations support only AND operations and can be nested, with a maximum of 2 layers. +| Field | Type | Required | Description | +| --------- | ------ | -------- | ----------------------------- | +| condition | string | Yes | Rule operator | +| rules | array | Yes | Selected business scope rules | #### rules -| Name | Type | Required| Default value | Description | -| -------- | ------ | ---- | ------ | ------------------------------------------------------------ | -| field | string |yes | None | Field name| | -| operator | string |yes | None | Operator| Optional value equal,in| -| value | - |no | None | Operand| Different values correspond to different value formats | - +| Field | Type | Required | Default | Description | Description | +| -------- | ------ | -------- | ------- | ----------- | --------------------------------------------------------- | +| field | string | Yes | None | Field name | | +| operator | string | Yes | None | Operator | Optional values equal, in | +| value | - | No | None | Operand | Different operators correspond to different value formats | **Note:** -- The input parameters here only describe the required and built-in parameters, and the rest of the parameters to be filled in depend on the attribute fields defined by the user -- The and fields are not allowed to change for batch scenarios (number of IDs in bk_biz_set_ids is greater than 1`bk_biz_set_name``bk_scope` + +- The input parameters here only describe the required and system-built parameters. The rest of the parameters to be filled in depend on the attribute fields defined by the user. +- For batch scenarios (where the number of IDs in bk_biz_set_ids is greater than 1), changes to the `bk_biz_set_name` and `bk_scope` fields are not allowed. - The maximum number of batch updates is 200. -### Request Parameters Example +### Request Parameter Example ```python { @@ -93,28 +92,28 @@ This parameter is a combination of filtering rules for business attribute fields } ``` -### Return Result Example +### Response Example ```python - { "result": true, "code": 0, - "message": "", - "permission":null, + "message": "success", + "permission": null, "data": {}, "request_id": "dsda1122adasadadada2222" } ``` -### Return Result Parameters Description +### Response Parameter Description + #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| data | object |Data returned by request | -| request_id | string |Request chain id | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Indicates whether the request was successful. true: success; false: failure | +| code | int | Error code. 0 indicates success, >0 indicates failure error | +| message | string | Error message returned in case of request failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned in the request | \ No newline at end of file diff --git a/docs/apidoc/cc/en/batch_update_host.md b/docs/apidoc/cc/en/batch_update_host.md index a03f65469d..f09c008b90 100644 --- a/docs/apidoc/cc/en/batch_update_host.md +++ b/docs/apidoc/cc/en/batch_update_host.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Bulk update host attributes based on host id and attributes (can not be used to update cloud area field in host attributes) +Batch Update Host Properties Based on Host ID and Attributes (Cannot be used to update the control area field in host properties, Permission: Business Host Editing Permission) ### Request Parameters @@ -8,27 +8,27 @@ Bulk update host attributes based on host id and attributes (can not be used to #### Interface Parameters -| Field | Type | Required | Description | -|---------------------|--------------|--------|---------------------------------| -| update | array |yes | Host updated attributes and values, up to 500 | +| Field | Type | Required | Description | +| ------ | ----- | -------- | ------------------------------------------------------------ | +| update | array | Yes | Properties and values to be updated for hosts, up to 500 items | #### update -| Field | Type | Required | Description | -|-------------|--------|--------|----------------------------------------------------| -| properties | object |yes | The updated properties and values of the host can not be used to update the cloud area field in the host properties | -| bk_host_id | int | yes | Host ID for update | -#### properties -| Field | Type | Required | Description | -|--------------|--------|-------|-----------------------------------------------------------| -| bk_host_name | string |no | The host name, which can also be another attribute, can not be used to update the cloud area field in the host properties | -| operator | string |no | The primary maintainer, which can also be another attribute, can not be used to update the cloud area field in the host properties| -| bk_comment | string |no | Note, which can be other properties, can not be used to update the cloud area field in host properties | -| bk_isp_name | string |no | The operator, or other attributes, can not be used to update the cloud area field in the host attribute| +| Field | Type | Required | Description | +| ---------- | ------ | -------- | ------------------------------------------------------------ | +| properties | object | Yes | Properties and values to be updated for hosts, cannot be used to update the control area field in host properties | +| bk_host_id | int | Yes | Host ID used for updating | +#### properties +| Field | Type | Required | Description | +| ------------ | ------ | -------- | ------------------------------------------------------------ | +| bk_host_name | string | No | Host name, can also be other properties, cannot be used to update the control area field in host properties | +| operator | string | No | Main maintainer, can also be other properties, cannot be used to update the control area field in host properties | +| bk_comment | string | No | Remark, can also be other properties, cannot be used to update the control area field in host properties | +| bk_isp_name | string | No | Affiliated ISP, can also be other properties, cannot be used to update the control area field in host properties | -### Request Parameters Example +### Request Parameter Example ```json { @@ -50,8 +50,7 @@ Bulk update host attributes based on host id and attributes (can not be used to } ``` - -### Return Result Example +### Response Example ```json { @@ -66,11 +65,11 @@ Bulk update host attributes based on host id and attributes (can not be used to #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Indicates whether the request was successful. true: success; false: failure | +| code | int | Error code. 0 indicates success, >0 indicates failure error | +| message | string | Error message returned in case of request failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned in the request | \ No newline at end of file diff --git a/docs/apidoc/cc/en/batch_update_inst.md b/docs/apidoc/cc/en/batch_update_inst.md index 5d6a68afa9..5f610004ea 100644 --- a/docs/apidoc/cc/en/batch_update_inst.md +++ b/docs/apidoc/cc/en/batch_update_inst.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Bulk update object instances +Batch Update Object Instances (Permission: Model Instance Editing Permission) ### Request Parameters @@ -8,26 +8,27 @@ Bulk update object instances #### Interface Parameters -| Field | Type | Required | Description | -|---------------------|-------------|--------|----------------------------------| -| bk_obj_id | string | yes | Model ID | -| update | array| yes | Instance updated fields and values | +| Field | Type | Required | Description | +| --------- | ------ | -------- | --------------------------------------------- | +| bk_obj_id | string | Yes | Model ID | +| update | array | Yes | Fields and values to be updated for instances | #### update -| Field | Type | Required| Description | -|--------------|--------|-------|--------------------------------| -| datas | object |yes | The value of the field for which the instance is updated | -| inst_id | int | yes | Indicates the specific instance that datas uses for the update | + +| Field | Type | Required | Description | +| ------- | ------ | -------- | ------------------------------------------------------ | +| datas | object | Yes | Fields and values to be updated for instances | +| inst_id | int | Yes | Specific instance for which datas is used for updating | #### datas -| Field | Type | Required| Description | -|--------------|--------|-------|--------------------------------| -| bk_inst_name | string |no | Instance name, or any other custom field| -**Datas is an object of map type, key is a field defined by the model corresponding to the instance, and value is the value of the field** +| Field | Type | Required | Description | +| ------------ | ------ | -------- | ---------------------------------------------- | +| bk_inst_name | string | No | Instance name, can also be other custom fields | +**datas is a map-type object, where the key is the field defined in the model for the instance, and the value is the value of the field** -### Request Parameters Example +### Request Parameter Example ```python { @@ -35,23 +36,21 @@ Bulk update object instances "bk_app_secret": "xxx", "bk_username": "xxx", "bk_token": "xxx", - "bk_obj_id":"test", - "update":[ + "bk_obj_id": "test", + "update": [ { - "datas":{ - "bk_inst_name":"batch_update" - }, - "inst_id":46 - } - ] + "datas": { + "bk_inst_name": "batch_update" + }, + "inst_id": 46 + } + ] } ``` - -### Return Result Example +### Response Example ```python - { "result": true, "code": 0, @@ -64,11 +63,11 @@ Bulk update object instances #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request succeeded or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Indicates whether the request was successful. true: success; false: failure | +| code | int | Error code. 0 indicates success, >0 indicates failure error | +| message | string | Error message returned in case of request failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned in the request | \ No newline at end of file diff --git a/docs/apidoc/cc/en/batch_update_kube_cluster.md b/docs/apidoc/cc/en/batch_update_kube_cluster.md index 7f25a75ec1..95d0a75d8e 100644 --- a/docs/apidoc/cc/en/batch_update_kube_cluster.md +++ b/docs/apidoc/cc/en/batch_update_kube_cluster.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -batch update container cluster attribute fields (v3.12.1+, permission: kube cluster editing permissions) +Update Container Cluster Attribute Fields (Version: v3.12.1+, Permission: Edit Permission for Container Cluster) ### Request Parameters @@ -8,32 +8,32 @@ batch update container cluster attribute fields (v3.12.1+, permission: kube clus #### Interface Parameters -| Field | Type | Required | Description | -|-----------|--------|----------|-----------------------------------| -| bk_biz_id | int | yes | business ID | -| ids | array | yes | unique IDs of the cluster in cmdb | -| data | object | yes | data that needs to be updated | +| Field | Type | Required | Description | +| --------- | ------ | -------- | ------------------------------ | +| bk_biz_id | int | Yes | Business ID | +| ids | array | Yes | Unique IDs of clusters in cmdb | +| data | object | Yes | Data to be updated | #### data -| Field | Type | Required | Description | -|-----------------|--------|----------|-----------------------------------------| -| name | string | no | cluster name | -| version | string | no | cluster version | -| network_type | string | no | network type | -| region | string | no | the region where the cluster is located | -| vpc | string | no | vpc network | -| network | array | no | cluster network | -| bk_project_id | string | no | project_id | -| bk_project_name | string | no | project name | -| bk_project_code | string | no | project english name | +| Field | Type | Required | Description | +| --------------- | ------ | -------- | -------------------- | +| name | string | No | Cluster name | +| version | string | No | Cluster version | +| network_type | string | No | Network type | +| region | string | No | Region | +| network | array | No | Cluster network | +| environment | string | No | Environment | +| bk_project_id | string | No | Project ID | +| bk_project_name | string | No | Project name | +| bk_project_code | string | No | Project English name | **Note:** -- the number of clusters to be updated at one time does not exceed 100 -- this api does not support updating cluster type, please use the `update_kube_cluster_type` api to update it. +- The number of clusters to be updated at once should not exceed 100. +- This interface does not support updating the cluster type. If you need to update the cluster type, please use the `update_kube_cluster_type` interface. -### Request Parameters Example +### Request Parameter Example ```json { @@ -53,6 +53,7 @@ batch update container cluster attribute fields (v3.12.1+, permission: kube clus "network": [ "127.0.0.0/21" ], + "environment": "xxx", "bk_project_id": "21bf9ef9be7c4d38a1d1f2uc0b44a8f2", "bk_project_name": "test", "bk_project_code": "test" @@ -60,10 +61,10 @@ batch update container cluster attribute fields (v3.12.1+, permission: kube clus } ``` -### Return Result Example +### Response Example ```json - { +{ "result": true, "code": 0, "message": "success", @@ -73,15 +74,13 @@ batch update container cluster attribute fields (v3.12.1+, permission: kube clus } ``` -### Return Result Parameters Description - -#### response +### Response Parameters Description -| Name | Type | Description | -|------------|--------|-----------------------------------------------------------------------------------------| -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed | -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string | Error message returned by request failure | -| permission | object | Permission information | -| request_id | string | Request chain id | -| data | object | Data returned by request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Indicates whether the request was successful. true: success; false: failure | +| code | int | Error code. 0 indicates success, >0 indicates failure error | +| message | string | Error message returned in case of request failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned in the request | \ No newline at end of file diff --git a/docs/apidoc/cc/en/batch_update_kube_namespace.md b/docs/apidoc/cc/en/batch_update_kube_namespace.md index c345a6f929..e3f658a077 100644 --- a/docs/apidoc/cc/en/batch_update_kube_namespace.md +++ b/docs/apidoc/cc/en/batch_update_kube_namespace.md @@ -1,27 +1,27 @@ ### Function Description -Batch update namespace (version: v3.12.1+, auth: edit container namespace) +Batch Update Namespace (Version: v3.12.1+, Permission: Edit Namespace Permission) -### Request parameters +### Request Parameters {{ common_args_desc }} #### Interface Parameters -| field | type | required | description | -|-----------|--------|----------|-----------------------------------------| -| bk_biz_id | int | yes | business id | -| data | object | yes | contains the fields to be updated | -| ids | array | yes | an array of id unique identifiers in cc | +| Field | Type | Required | Description | +| --------- | ------ | -------- | ----------------------------- | +| bk_biz_id | int | Yes | Business ID | +| data | object | Yes | Contains fields to be updated | +| ids | array | Yes | Unique IDs in cc | #### data -| field | type | required | description | -|-----------------|-------|----------|----------------------------------------------| -| labels | map | no | labels | -| resource_quotas | array | no | namespace CPU and memory requests and limits | +| Field | Type | Required | Description | +| --------------- | ----- | -------- | -------------------------------------------- | +| labels | map | No | Labels | +| resource_quotas | array | No | Namespace CPU and memory requests and limits | -### Example request parameters +### Request Parameter Example ```json { @@ -64,10 +64,9 @@ Batch update namespace (version: v3.12.1+, auth: edit container namespace) } ``` -### Return Result Example +### Response Example ```json - { "result": true, "code": 0, @@ -78,15 +77,15 @@ Batch update namespace (version: v3.12.1+, auth: edit container namespace) } ``` -### Return result parameter description +### Response Parameters Description #### response -| name | type | description | -|------------|--------|-------------------------------------------------------------------------------------------| -| result | bool | Whether the request was successful or not. true:request successful; false request failed. | -| code | int | The error code. 0 means success, >0 means failure error. | -| message | string | The error message returned by the failed request. | -| permission | object | Permission information | -| request_id | string | request_chain_id | -| data | object | The data returned by the request. | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Indicates whether the request was successful. true: success; false: failure | +| code | int | Error code. 0 indicates success, >0 indicates failure error | +| message | string | Error message returned in case of request failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned in the request | \ No newline at end of file diff --git a/docs/apidoc/cc/en/batch_update_kube_node.md b/docs/apidoc/cc/en/batch_update_kube_node.md index 12c3d29e21..f08d96a24e 100644 --- a/docs/apidoc/cc/en/batch_update_kube_node.md +++ b/docs/apidoc/cc/en/batch_update_kube_node.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -batch update container node attribute field (v3.12.1+, permission: kube Node Edit Permission) +Update Container Node Attribute Fields (Version: v3.12.1+, Permission: Edit Container Node Permission) ### Request Parameters @@ -8,31 +8,30 @@ batch update container node attribute field (v3.12.1+, permission: kube Node Edi #### Interface Parameters -| Field | Type | Required | Description | -|-----------|--------|----------|-----------------------------------------------| -| bk_biz_id | int | yes | business ID | -| ids | array | yes | IDs of the node in cmdb | -| data | object | yes | Node attribute fields that need to be updated | +| Field | Type | Required | Description | +| --------- | ------ | -------- | ----------------------------------- | +| bk_biz_id | int | Yes | Business ID | +| ids | array | Yes | List of node IDs to be updated | +| data | object | Yes | Node attribute fields to be updated | #### data -| Field | Type | Required | Description | -|-------------------|-------------|----------|------------------------------------------------------------------------------------| -| labels | json object | no | label | -| taints | string | no | cluster name | -| unschedulable | bool | no | set whether to schedule | -| hostname | string | no | host name | -| runtime_component | string | no | runtime components | -| kube_proxy_mode | string | no | Kube-proxy proxy mode | -| pod_cidr | string | no | The allocation range of the Pod address of this node, for example: 172.17.0.128/26 | +| Field | Type | Required | Description | +| ----------------- | ----------- | -------- | ------------------------------------------------------------ | +| labels | json object | No | Labels | +| taints | string | No | Cluster name | +| unschedulable | bool | No | Set whether it can be scheduled | +| hostname | string | No | Hostname | +| runtime_component | string | No | Runtime component | +| kube_proxy_mode | string | No | Kube-proxy proxy mode | +| pod_cidr | string | No | Allocation range of Pod addresses on this node, e.g., 172.17.0.128/26 | -**注意:** +**Note:** -- Among them, labels and taints need to be updated as a whole. -- data field cannot be empty. -- The number of clusters to be updated at one time does not exceed 100. +- labels and taints need to be updated as a whole. +- The number of clusters to be updated at once should not exceed 100. -### Request Parameters Example +### Request Parameter Example ```json { @@ -59,13 +58,12 @@ batch update container node attribute field (v3.12.1+, permission: kube Node Edi "pod_cidr": "127.0.0.1/26" } } - ``` -### Return Result Example +### Response Example ```json - { +{ "result": true, "code": 0, "message": "success", @@ -75,13 +73,13 @@ batch update container node attribute field (v3.12.1+, permission: kube Node Edi } ``` -### Return Result Parameters Description +### Response Parameters Description -| Name | Type | Description | -|------------|--------|-----------------------------------------------------------------------------------------| -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed | -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string | Error message returned by request failure | -| permission | object | Permission information | -| request_id | string | Request chain id | -| data | object | Data returned by request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Indicates whether the request was successful. true: success; false: failure | +| code | int | Error code. 0 indicates success, >0 indicates failure error | +| message | string | Error message returned in case of request failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned in the request | \ No newline at end of file diff --git a/docs/apidoc/cc/en/batch_update_kube_workload.md b/docs/apidoc/cc/en/batch_update_kube_workload.md index 250d28a22a..8a61f3ce53 100644 --- a/docs/apidoc/cc/en/batch_update_kube_workload.md +++ b/docs/apidoc/cc/en/batch_update_kube_workload.md @@ -1,72 +1,74 @@ ### Function Description -Batch update workload (version: v3.12.1+, auth: edit container workload) +Batch Update Workloads (Version: v3.12.1+, Permission: Edit Container Workload Permission) -### Request parameters +### Request Parameters {{ common_args_desc }} #### Interface Parameters -| field | type | required | description | -|-----------|--------|----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| bk_biz_id | int | yes | business id | -| kind | string | yes | workload type, the current built-in workload types are deployment, daemonSet, statefulSet, gameStatefulSet, gameDeployment, cronJob, job, pods (put those that do not pass workload but directly create Pod) | -| data | object | yes | contains the fields to be updated | -| ids | array | yes | an array of id unique identifiers in cc | +| Field | Type | Required | Description | +| --------- | ------ | -------- | ------------------------------------------------------------ | +| bk_biz_id | int | Yes | Business ID | +| kind | string | Yes | Workload type, currently supported workload types include deployment, daemonSet, statefulSet, gameStatefulSet, gameDeployment, cronJob, job, pods (directly create Pods without going through workload) | +| data | object | Yes | Fields to be updated | +| ids | array | Yes | Unique ID array in cc | #### data -| field | type | required | description | -|-------------------------|--------|----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------| -| labels | map | no | labels | -| selector | object | no | workload selector | -| replicas | int | no | number of workload instances | -| strategy_type | string | no | workload update mechanism | -| min_ready_seconds | int | No | Specifies the minimum time that a newly created Pod will be ready without any container crashes, and only after that time will the Pod be considered available | -| rolling_update_strategy | object | No | Rolling update strategy | +| Field | Type | Required | Description | +| ----------------------- | ------ | -------- | ------------------------------------------------------------ | +| labels | map | No | Labels | +| selector | object | No | Workload selector | +| replicas | int | No | Number of workload instances | +| strategy_type | string | No | Workload update mechanism | +| min_ready_seconds | int | No | Specifies the minimum readiness time for newly created Pods, only Pods that exceed this time are considered available | +| rolling_update_strategy | object | No | Rolling update strategy | #### selector -| field | type | required | description | -|-------------------|-------|----------|-------------------| -| match_labels | map | no | match by label | -| match_expressions | array | no | match_expressions | +| Field | Type | Required | Description | +| ----------------- | ----- | -------- | --------------------- | +| match_labels | map | No | Match based on labels | +| match_expressions | array | No | Match expressions | #### match_expressions[x] -| field | type | required | description | -|----------|--------|------------|-------------------------------------------------------------------------------------------------------------------------| -| key | string | is the key | of the tag | -| operator | string | is the | operator, with optional values: "In", "NotIn", "Exists", "DoesNotExist" | -| values | array | no | Array of strings, cannot be empty if the operator is "In" or "NotIn", must be empty if it is "Exists" or "DoesNotExist" | +| Field | Type | Required | Description | +| -------- | ------ | -------- | ------------------------------------------------------------ | +| key | string | Yes | Label key | +| operator | string | Yes | Operator, optional values: "In", "NotIn", "Exists", "DoesNotExist" | +| values | array | No | String array, must be provided if the operator is "In" or "NotIn", must be empty if the operator is "Exists" or "DoesNotExist" | #### rolling_update_strategy -When strategy_type is RollingUpdate, it is not empty, otherwise it is empty. +Only applicable when strategy_type is RollingUpdate, otherwise it is empty -| field | type | mandatory | description | -|-----------------|--------|-----------|-----------------| -| max_unavailable | object | no | max_unavailable | -| max_surge | object | no | max_overflow | +| Field | Type | Required | Description | +| --------------- | ------ | -------- | ------------------- | +| max_unavailable | object | No | Maximum unavailable | +| max_surge | object | No | Maximum surge | #### max_unavailable -| field | type | mandatory | description | -|---------|--------|-----------|-----------------------------------------------------------------------------------| -| type | int | Yes | Optional value of 0 (for int type) or 1 (for string type) | -| int_val | int | No | When type is 0 (for int type), it cannot be null, and the corresponding int value | -| str_val | string | no | when type is 1(for string type),cannot be null,corresponding string value | +| Field | Type | Required | Description | +| ------- | ------ | -------- | ------------------------------------------------------------ | +| type | int | Yes | Optional values are 0 (representing int type) or 1 (representing string type) | +| int_val | int | No | Must be provided if type is 0 (representing int type), corresponding int value | +| str_val | string | No | Must be provided if type is 1 (representing string type), corresponding string value | #### max_surge -| field | type | mandatory | description | -|---------|--------|-----------|------------------------------------------------------------------------------------------| -| type | int | yes | optional value of 0 (for int type) or 1 (for string type) | -| int_val | int | No | When type is 0 (for int type), it cannot be null, and the corresponding int value | -| str_val | string | no | When type is 1 (for string type), it cannot be empty, and the corresponding string value | +| Field | Type | Required | Description | +| ------- | ------ | -------- | ------------------------------------------------------------ | +| type | int | Yes | Optional values are 0 (representing int type) or 1 (representing string type) | +| int_val | int | No | Must be provided if type is 0 (representing int type), corresponding int value | +| str_val | string | No | Must be provided if type is 1 (representing string type), corresponding string value | -### Example request parameters +Note: Use either the unique identifier of k8s or cc to pass in the association information. These two methods can only be used separately and cannot be mixed. + +### Request Parameter Example ```json { @@ -118,10 +120,9 @@ When strategy_type is RollingUpdate, it is not empty, otherwise it is empty. } ``` -### Return Result Example +### Response Example ```json - { "result": true, "code": 0, @@ -132,15 +133,15 @@ When strategy_type is RollingUpdate, it is not empty, otherwise it is empty. } ``` -### Return result parameter description +### Response Parameters Description #### response -| name | type | description | -|------------|--------|-------------------------------------------------------------------------------------------| -| result | bool | Whether the request was successful or not. true:request successful; false request failed. | -| code | int | The error code. 0 means success, >0 means failure error. | -| message | string | The error message returned by the failed request. | -| permission | object | Permission information | -| request_id | string | request_chain_id | -| data | object | The data returned by the request. | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Indicates whether the request was successful. true: success; false: failure | +| code | int | Error code. 0 indicates success, >0 indicates failure error | +| message | string | Error message returned in case of request failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned in the request | \ No newline at end of file diff --git a/docs/apidoc/cc/en/batch_update_project.md b/docs/apidoc/cc/en/batch_update_project.md index b41a0581b9..58dd023e4d 100644 --- a/docs/apidoc/cc/en/batch_update_project.md +++ b/docs/apidoc/cc/en/batch_update_project.md @@ -1,33 +1,32 @@ -### Function description +### Function Description -batch update project (version: v3.10.23+, permission: update permission of the project) +Update Project (Version: v3.10.23+, Permission: Update Project Permission) -### Request parameters +### Request Parameters {{ common_args_desc }} +#### Interface Parameters -#### Interface parameters - -| field | type | required | description | -| ----------------------------|------------|----------|-------------------------------------------| -| ids | array| yes | an array of ids uniquely identified in cc, limited to 200 at a time | -| data | object| yes |fields that need to be updated| +| Field | Type | Required | Description | +| ----- | ------ | -------- | ------------------------------------------------------------ | +| ids | array | Yes | Unique ID array in cc, a maximum of 200 can be passed at a time | +| data | object | Yes | Fields to be updated | #### data -| field | type | required | description | -|--------------------|------------|----------|---------------------------------------------------------------------------------------------------------------------------------------| -| bk_project_name | string | no | project_name | -| bk_project_code | string | no | project_code | -| bk_project_desc | string | no | project_description | -| bk_project_type | enum | no | project type, optional values: "mobile_game", "pc_game", "web_game", "platform_prod", "support_prod", "other", default value: "other" | -| bk_project_sec_lvl | enum | no | confidentiality level, optional values: "public", "private", "classified", default: "public" | -| bk_project_owner | string | no | project owner | -| bk_project_team | array | no | project team | -| bk_project_icon | string | no | project icon | +| Field | Type | Required | Description | +| ------------------ | ------ | -------- | ------------------------------------------------------------ | +| bk_project_name | string | No | Project name | +| bk_project_desc | string | No | Project description | +| bk_project_type | enum | No | Project type, optional values: "mobile_game" (mobile game), "pc_game" (PC game), "web_game" (web game), "platform_prod" (platform product), "support_prod" (supporting product), "other" (other) | +| bk_project_sec_lvl | enum | No | Confidentiality level, optional values: "public" (public), "private" (private), "classified" (classified) | +| bk_project_owner | string | No | Project owner | +| bk_project_team | array | No | Belonging team | +| bk_project_icon | string | No | Project icon | +| bk_status | string | No | Project status, optional values: "enable" (enabled), "disabled" (disabled) | -### Request parameter examples +### Request Parameter Example ```json { @@ -51,7 +50,7 @@ batch update project (version: v3.10.23+, permission: update permission of the p } ``` -### Return Result Example +### Response Example ```json { @@ -64,15 +63,15 @@ batch update project (version: v3.10.23+, permission: update permission of the p } ``` -### Return result parameter description -#### response +### Response Parameters Description -| name | type | description | -| ------- | ------ | ------------------------------------- | -| result | bool | The success or failure of the request. true: the request was successful; false: the request failed.| -| code | int | The error code. 0 means success, >0 means failure error.| -| message | string | The error message returned by the failed request.| -| permission | object | Permission information | -| request_id | string | request_chain_id | -| data | object | data returned by the request| +#### response +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Indicates whether the request was successful. true: success; false: failure | +| code | int | Error code. 0 indicates success, >0 indicates failure error | +| message | string | Error message returned in case of request failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned in the request | \ No newline at end of file diff --git a/docs/apidoc/cc/en/batch_update_quoted_inst.md b/docs/apidoc/cc/en/batch_update_quoted_inst.md index 1d94e32afe..b9dbe2352d 100644 --- a/docs/apidoc/cc/en/batch_update_quoted_inst.md +++ b/docs/apidoc/cc/en/batch_update_quoted_inst.md @@ -1,29 +1,29 @@ -### Function description +### Function Description -batch update quoted model instance (version: v3.10.30+, permission: update permission of the source model instance) +Batch Update Instances of Referenced Models (Version: v3.10.30+, Permission: Edit Permission of Source Model Instances) -### Request parameters +### Request Parameters {{ common_args_desc }} -#### Interface parameters +#### Interface Parameters -| Field | Type | Required | Description | -|----------------|-------------|----------|--------------------------------------------------------------------| -| bk_obj_id | string | yes | source model id | -| bk_property_id | string | yes | source model quoted property id | -| ids | int64 array | yes | id list of quoted instance to be updated, the maximum limit is 500 | -| data | object | yes | the quoted instance data to be updated | +| Field | Type | Required | Description | +| -------------- | ----------- | -------- | ----------------------------------------------------------- | +| bk_obj_id | string | Yes | Source model ID | +| bk_property_id | string | Yes | Property ID of the source model that references this model | +| ids | int64 array | Yes | Array of instance IDs to be updated, up to a maximum of 500 | +| data | object | Yes | Information of instances to be updated | #### data -| Field | Type | Required | Description | -|-------------|--------|--------------------------------------------------|-------------------------------------------------------------------------------------------| -| name | string | at least one of the fields in "data" is required | name, this is only an example, actual fields is defined by quoted model properties | -| operator | string | at least one of the fields in "data" is required | operator, this is only an example, actual fields is defined by quoted model properties | -| description | string | at least one of the fields in "data" is required | description, this is only an example, actual fields is defined by quoted model properties | +| Field | Type | Required | Description | +| ----------- | ------ | -------------------------------------------- | ------------------------------------------------------------ | +| name | string | At least one field in data must be filled in | Name, this is just an example, the actual fields depend on the model properties | +| operator | string | At least one field in data must be filled in | Operator, this is just an example, the actual fields depend on the model properties | +| description | string | At least one field in data must be filled in | Description, this is just an example, the actual fields depend on the model properties | -### Request parameter examples +### Request Parameter Example ```json { @@ -45,7 +45,7 @@ batch update quoted model instance (version: v3.10.30+, permission: update permi } ``` -### Return Result Example +### Response Example ```json { @@ -53,18 +53,20 @@ batch update quoted model instance (version: v3.10.30+, permission: update permi "code": 0, "message": "success", "permission": null, + "data": null, "request_id": "dsda1122adasadadada2222" } ``` -### Return result parameter description +### Response Parameters Description #### response -| Name | Type | Description | -|------------|--------|-----------------------------------------------------------------------------------------------------| -| result | bool | The success or failure of the request. true: the request was successful; false: the request failed. | -| code | int | The error code. 0 means success, >0 means failure error. | -| message | string | The error message returned by the failed request. | -| permission | object | Permission information | -| request_id | string | request_chain_id | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Indicates whether the request was successful. true: success; false: failure | +| code | int | Error code. 0 indicates success, >0 indicates failure error | +| message | string | Error message returned in case of request failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned in the request | \ No newline at end of file diff --git a/docs/apidoc/cc/en/bind_host_agent.md b/docs/apidoc/cc/en/bind_host_agent.md index 52c751ceaf..9f50187087 100644 --- a/docs/apidoc/cc/en/bind_host_agent.md +++ b/docs/apidoc/cc/en/bind_host_agent.md @@ -1,25 +1,25 @@ -### Functional description +### Function Description -Bind agent from host (v3.10.25+). +Bind Agent to Host (Version: v3.10.25+, Permission: Host AgentID Management Permission) ### Request Parameters {{ common_args_desc }} -#### Interface Parameters +### Request Parameters -| Field | Type | Required | Description | -| ----- | ------------ | -------- | --------------------------------------------------------------- | -| list | object array | yes | list of host IDs and agent IDs to unbind, maximum length is 200 | +| Field | Type | Required | Description | +| ----- | ----- | -------- | ------------------------------------------------------------ | +| list | array | Yes | List of host IDs and agent IDs to be bound, up to 200 entries | -#### list +### list -| Field | Type | Required | Description | -| ----------- | ------ | -------- | ----------------------- | -| bk_host_id | int | yes | host ID to unbind agent | -| bk_agent_id | string | yes | agent ID to unbind host | +| Field | Type | Required | Description | +| ----------- | ------ | -------- | -------------------------------------- | +| bk_host_id | int | Yes | Host ID to bind the agent to | +| bk_agent_id | string | Yes | Agent ID to bind to the specified host | -### Request Parameters Example +### Request Parameter Example ```json { @@ -40,7 +40,7 @@ Bind agent from host (v3.10.25+). } ``` -### Return Result Example +### Response Example ```json { @@ -52,13 +52,14 @@ Bind agent from host (v3.10.25+). } ``` +### Response Parameters Description + #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| data | object |Data returned by request | -| permission | object |Permission information | -| request_id | string |Request chain id | \ No newline at end of file +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Indicates whether the request was successful. true: success; false: failure | +| code | int | Error code. 0 indicates success, >0 indicates failure error | +| message | string | Error message returned in case of request failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | \ No newline at end of file diff --git a/docs/apidoc/cc/en/clone_host_property.md b/docs/apidoc/cc/en/clone_host_property.md index e22b81df7b..9685849b4b 100644 --- a/docs/apidoc/cc/en/clone_host_property.md +++ b/docs/apidoc/cc/en/clone_host_property.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Clone host properties +Clone Host Properties (Permission: Business Host Editing Permission) ### Request Parameters @@ -8,19 +8,18 @@ Clone host properties #### Interface Parameters -| Field | Type | Required | Description | -|-------------|---------|--------|-----------------------------| -| bk_org_ip | string |yes | Source host intranet ip | -| bk_dst_ip | string |yes | Target host intranet ip| -| bk_org_id | int |yes | Source host ID | -| bk_dst_id | int |yes | Destination host ID| -| bk_biz_id | int | yes | Business ID | -| bk_cloud_id | int | no | Cloud area ID | +| Field | Type | Required | Description | +| ----------- | ------ | -------- | ------------------------- | +| bk_org_ip | string | Yes | Source host's internal IP | +| bk_dst_ip | string | Yes | Target host's internal IP | +| bk_org_id | int | Yes | Source host ID | +| bk_dst_id | int | Yes | Target host ID | +| bk_biz_id | int | Yes | Business ID | +| bk_cloud_id | int | No | Control area ID | +Note: Cloning using the internal IP of the host and cloning using the identity ID of the host, these two methods can only be used separately and cannot be mixed. -Note: cloning by using host intranet IP and cloning by using host identity ID can only be used in one of the two methods, and can not be mixed. - -### Request Parameters Example +### Request Parameter Example ```json { @@ -28,13 +27,14 @@ Note: cloning by using host intranet IP and cloning by using host identity ID ca "bk_app_secret": "xxx", "bk_username": "xxx", "bk_token": "xxx", - "bk_biz_id":2, - "bk_org_ip":"127.0.0.1", - "bk_dst_ip":"127.0.0.2", - "bk_cloud_id":0 + "bk_biz_id": 2, + "bk_org_ip": "127.0.0.1", + "bk_dst_ip": "127.0.0.2", + "bk_cloud_id": 0 } ``` -Or + +or ```json { @@ -42,21 +42,20 @@ Or "bk_app_secret": "xxx", "bk_username": "xxx", "bk_token": "xxx", - "bk_biz_id":2, + "bk_biz_id": 2, "bk_org_id": 10, "bk_dst_id": 11, - "bk_cloud_id":0 + "bk_cloud_id": 0 } ``` -### Return Result Example +### Response Example ```python - { "result": true, "code": 0, - "message": "", + "message": "success", "permission": null, "request_id": "e43da4ef221746868dc4c837d36f3807", "data": null @@ -65,11 +64,11 @@ Or #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Indicates whether the request was successful. true: success; false: failure | +| code | int | Error code. 0 indicates success, >0 indicates failure error | +| message | string | Error message returned in case of request failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned in the request | \ No newline at end of file diff --git a/docs/apidoc/cc/en/count_biz_host_cpu.md b/docs/apidoc/cc/en/count_biz_host_cpu.md index d700de291e..7d839c2692 100644 --- a/docs/apidoc/cc/en/count_biz_host_cpu.md +++ b/docs/apidoc/cc/en/count_biz_host_cpu.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -count host cpu num in biz (special interface for cost managing, v3.8.17+/v3.10.17+) +Count the number of CPUs for each business's hosts (Special interface for cost management, v3.8.17+/v3.10.18+, Permission: Global Settings Permission) ### Request Parameters @@ -10,20 +10,19 @@ count host cpu num in biz (special interface for cost managing, v3.8.17+/v3.10.1 | Field | Type | Required | Description | | --------- | ------ | -------- | ------------------ | -| bk_biz_id | int | no | Business ID | -| page | object | no | Paging information | +| bk_biz_id | int | No | Business ID | +| page | object | No | Paging information | -**Note: only one of bk_biz_id and page parameters must set** +**Note: The bk_biz_id and page parameters must be provided, and only one of them can be passed.** -#### Page field Description +#### Page Field Description -| Field | Type | Required | Description | -| ----- | ---- | -------- | --------------------- | -| start | int | yes | Record start position | -| limit | int | yes | Page limit, maxium 10 | +| Field | Type | Required | Description | +| ----- | ---- | -------- | ------------------------------------ | +| start | int | Yes | Record start position | +| limit | int | Yes | Number of records per page, up to 10 | - -### Request Parameters Example +### Request Parameter Example ```json { @@ -38,13 +37,13 @@ count host cpu num in biz (special interface for cost managing, v3.8.17+/v3.10.1 } ``` -### Return Result Example +### Response Example ```json { "result": true, "code": 0, - "message": "", + "message": "success", "permission": null, "request_id": "e43da4ef221746868dc4c837d36f3807", "data": [ @@ -64,24 +63,24 @@ count host cpu num in biz (special interface for cost managing, v3.8.17+/v3.10.1 } ``` -### Return result parameter +### Response Parameters Description #### response -| Name | Type | Description | +| Field | Type | Description | | ---------- | ------ | ------------------------------------------------------------ | -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed | -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string | Error message returned by request failure | +| result | bool | Indicates whether the request was successful. true: success; false: failure | +| code | int | Error code. 0 indicates success, >0 indicates failure error | +| message | string | Error message returned in case of request failure | | permission | object | Permission information | -| request_id | string | Request chain id | -| data | object | Data returned by request | +| request_id | string | Request chain ID | +| data | object | Data returned in the request | #### data -| Field | Type | Description | -| ----------------- | ---- | ----------------------------------------------- | -| bk_biz_id | int | no | -| host_count | int | The number of hosts in the biz | -| cpu_count | int | The number of host cpus in the biz | -| no_cpu_host_count | int | The number of hosts with no cpu info in the biz | +| Field | Type | Description | +| ----------------- | ---- | ------------------------------------------- | +| bk_biz_id | int | Business ID | +| host_count | int | Number of hosts | +| cpu_count | int | Number of CPUs | +| no_cpu_host_count | int | Number of hosts without the CPU count field | \ No newline at end of file diff --git a/docs/apidoc/cc/en/count_instance_associations.md b/docs/apidoc/cc/en/count_instance_associations.md index 905b748ec2..beb2f55843 100644 --- a/docs/apidoc/cc/en/count_instance_associations.md +++ b/docs/apidoc/cc/en/count_instance_associations.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Model instance relation Qty query (v3.10.1+) +Model instance relationship count query (v3.10.1+) ### Request Parameters @@ -8,30 +8,30 @@ Model instance relation Qty query (v3.10.1+) #### Interface Parameters -| Field | Type | Required | Description | -|------------|---------|------|-----------------------------------------------------------------------------------------------------------------| -| bk_biz_id | int |no| Business ID, which needs to be provided when querying mainline model | -| bk_obj_id | string |yes| Model ID | -| conditions | object |no| Combined query criteria: AND and OR are supported for combination, and can be nested up to 3 layers. Each layer supports 20 OR criteria at most. If this parameter is not specified, it means all matches (i.e., Contexts are null).| +| Field | Type | Required | Description | +| ---------- | ------ | -------- | ------------------------------------------------------------ | +| bk_biz_id | int | No | Business ID, required for querying the mainline model | +| bk_obj_id | string | Yes | Model ID | +| conditions | object | No | Combined query conditions, supporting AND and OR, can be nested, up to 3 layers of nesting, up to 20 OR conditions per layer, not specifying this parameter means matching all (i.e., conditions is null) | #### conditions -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| condition | string |yes | Rule operator| -| rules | array |yes | Scope condition rule for selected business| +| Field | Type | Required | Description | +| --------- | ------ | -------- | ----------------------------------------------- | +| condition | string | Yes | Rule operator | +| rules | array | Yes | Range conditions for the selected business rule | #### conditions.rules -| Field | Type| Required| Description | -|----------|--------|------|-----------------------------------------------------------------------------------------------------------| -| field | string | yes | Condition field, optional value id, bk_inst_id, bk_obj_id, bk_Asst_inst_id, bk_Asst_obj_id, bk_obj_Asst_id, bk_Asst_id | -| operator | string |yes| Operator, optional values equal,not_equal,in,not_in,less,less_or_equal,greater,greater_or_equal,between,not_between, etc| -| value | - |no| The expected value of the condition field. Different values correspond to different value formats. The array type value supports up to 500 elements | +| Field | Type | Required | Description | +| -------- | ------ | -------- | ------------------------------------------------------------ | +| field | string | Yes | Condition field, optional values id, bk_inst_id, bk_obj_id, bk_asst_inst_id, bk_asst_obj_id, bk_obj_asst_id, bk_asst_id | +| operator | string | Yes | Operator, optional values equal, not_equal, in, not_in, less, less_or_equal, greater, greater_or_equal, between, not_between, etc. | +| value | - | No | Expected value of the condition field, different operators correspond to different value formats, and the maximum number of elements for an array-type value is 500 | -For details of assembly rules, please refer to: https: //github.com/Tencent/bk-cmdb/blob/master/src/common/querybuilder/README.md +For detailed assembly rules, please refer to: [QueryBuilder](https://github.com/Tencent/bk-cmdb/blob/master/src/common/querybuilder/README.md) -### Request Parameters Example +### Request Parameter Example ```json { @@ -68,13 +68,13 @@ For details of assembly rules, please refer to: https: //github.com/Tencent/bk-c } ``` -### Return Result Example +### Response Example ```json { "result": true, "code": 0, - "message": "", + "message": "success", "permission": null, "request_id": "e43da4ef221746868dc4c837d36f3807", "data": { @@ -83,21 +83,21 @@ For details of assembly rules, please refer to: https: //github.com/Tencent/bk-c } ``` -### Return result parameter +### Response Parameters Description #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Indicates whether the request was successful. true: success; false: failure | +| code | int | Error code. 0 indicates success, >0 indicates failure error | +| message | string | Error message returned in case of request failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned in the request | #### data -| Field| Type| Description | -|-------|---------|----------------------------| -| count | int |Returns the number of instance data that meets the condition| +| Field | Type | Description | +| ----- | ---- | -------------------------------------------- | +| count | int | Number of instances that meet the conditions | \ No newline at end of file diff --git a/docs/apidoc/cc/en/count_object_instances.md b/docs/apidoc/cc/en/count_object_instances.md index 249eaa0877..4a919ffc65 100644 --- a/docs/apidoc/cc/en/count_object_instances.md +++ b/docs/apidoc/cc/en/count_object_instances.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -General model instance quantity query (v3.10.1+) +Universal model instance quantity query (v3.10.1+) ### Request Parameters @@ -8,45 +8,45 @@ General model instance quantity query (v3.10.1+) #### Interface Parameters -| Field | Type | Required | Description | -|------------|--------|------|-----------------------------------------------------------------------------------------------------------------| -| bk_obj_id | string |yes| Model ID | -| conditions | object |no| Combined query criteria: AND and OR are supported for combination, and can be nested up to 3 layers. Each layer supports 20 OR criteria at most. If this parameter is not specified, it means all matches (i.e., Contexts are null).| -| time_condition | object | no | Query criteria for querying model instances by time| +| Field | Type | Required | Description | +| -------------- | ------ | -------- | ------------------------------------------------------------ | +| bk_obj_id | string | Yes | Model ID | +| conditions | object | No | Combined query conditions, supporting AND and OR, can be nested, up to 3 layers of nesting, up to 20 OR conditions per layer, not specifying this parameter means matching all (i.e., conditions is null) | +| time_condition | object | No | Query conditions for model instances by time | #### conditions -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| condition | string |yes | Rule operator| -| rules | array |yes | Scope condition rule for selected business| +| Field | Type | Required | Description | +| --------- | ------ | -------- | ----------------------------------------------- | +| condition | string | Yes | Rule operator | +| rules | array | Yes | Range conditions for the selected business rule | #### conditions.rules -| Field | Type| Required| Description | -|----------|--------|------|-----------------------------------------------------------------------------------------------------------| -| field | string |yes| Condition field | -| operator | string |yes| Operator, optional values equal,not_equal,in,not_in,less,less_or_equal,greater,greater_or_equal,between,not_between, etc| -| value | - |no| The expected value of the condition field. Different values correspond to different value formats. The array type value supports a maximum of 500 elements | +| Field | Type | Required | Description | +| -------- | ------ | -------- | ------------------------------------------------------------ | +| field | string | Yes | Condition field | +| operator | string | Yes | Operator, optional values equal, not_equal, in, not_in, less, less_or_equal, greater, greater_or_equal, between, not_between, etc. | +| value | - | No | Expected value of the condition field. Different operators correspond to different value formats. The maximum number of elements for an array-type value is 500 | -For details of assembly rules, please refer to https: //github.com/Tencent/bk-cmdb/blob/master/src/common/querybuilder/README.md +For detailed assembly rules, please refer to: [QueryBuilder](https://github.com/Tencent/bk-cmdb/blob/master/src/common/querybuilder/README.md) #### time_condition -| Field | Type | Required| Description | -|-------|--------|-----|--------------------| -| oper | string |yes| Operator, currently only and is supported| -| rules | array |yes| Time query criteria | +| Field | Type | Required | Description | +| ----- | ------ | -------- | ---------------------------------------- | +| oper | string | Yes | Operator. Currently only supports 'and'. | +| rules | array | Yes | Time query conditions | #### time_condition.rules -| Field | Type | Required| Description | -|-------|--------|-----|----------------------------------| -| field | string |yes| The value is the field name of the model | -| start | string |yes| Start time in the format yyyy MM dd hh: mm:ss| -| end | string |yes| End time in the format yyy MM dd hh: mm:ss| +| Field | Type | Required | Description | +| ----- | ------ | -------- | -------------------------------------------------------- | +| field | string | Yes | Field name, which should be the field name of the model. | +| start | string | Yes | Start time in the format yyyy-MM-dd hh:mm:ss | +| end | string | Yes | End time in the format yyyy-MM-dd hh:mm:ss | -### Request Parameters Example +### Request Parameter Example ```json { @@ -93,13 +93,13 @@ For details of assembly rules, please refer to https: //github.com/Tencent/bk-cm } ``` -### Return Result Example +### Response Example ```json { "result": true, "code": 0, - "message": "", + "message": "success", "permission": null, "request_id": "e43da4ef221746868dc4c837d36f3807", "data": { @@ -108,21 +108,21 @@ For details of assembly rules, please refer to https: //github.com/Tencent/bk-cm } ``` -### Return result parameter +### Response Parameters Description #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request succeeded or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Indicates whether the request was successful. true: success; false: failure | +| code | int | Error code. 0 indicates success, >0 indicates failure error | +| message | string | Error message returned in case of request failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned in the request | #### data -| Field| Type| Description | -|-------|---------|----------------------------| -| count | int |Returns the number of instance data that meets the condition| +| Field | Type | Description | +| ----- | ---- | -------------------------------------------- | +| count | int | Number of instances that meet the conditions | \ No newline at end of file diff --git a/docs/apidoc/cc/en/create_biz_custom_field.md b/docs/apidoc/cc/en/create_biz_custom_field.md index dd41a800f7..95716184f0 100644 --- a/docs/apidoc/cc/en/create_biz_custom_field.md +++ b/docs/apidoc/cc/en/create_biz_custom_field.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Create business custom model properties +Create Business Custom Model Property (Permission: Business Custom Field Edit Permission) ### Request Parameters @@ -8,43 +8,33 @@ Create business custom model properties #### Interface Parameters -| Field | Type | Required | Description | -|-----------------------|------------|--------|----------------------------------------------------------| -| bk_biz_id | int | yes | Business ID | -| creator | string | no | Who created the data | -| description | string | no | Description information of data | -| editable | bool | no | Indicates whether the data is editable | -| isonly | bool | no | Show uniqueness | -| ispre | bool | no | True: preset field,false: Non-built-in field | -| isreadonly | bool | no | True: read-only, false: Not read-only | -| isrequired | bool | no | True: required, false: Optional | -| option | string | no | User-defined content. The stored content and format are determined by the caller. Take the number type as an example ({"min":"1","max":"2"})| -| unit | string | no | Unit | -| placeholder | string | no | Placeholder | -| bk_property_group | string | no | Name of the field column | -| bk_obj_id | string | yes | Model ID | -| bk_property_id | string | yes | The property ID of the model | -| bk_property_name | string | yes | Model property name, used to show | -| bk_property_type | string | yes | The defined attribute field is used to store the data type of the data, and the value range can be (singlechar,longchar,int,enum,date,time,objUser,singleasst,multiasst,timezone,bool)| -| bk_asst_obj_id | string | no | This field must be set if there are other models associated with it, otherwise it is not required | - -#### bk_property_type - -| Identification | Name | -|------------|----------| -| singlechar |Short character | -| longchar | Long character | -| int | Reshaping | -| enum | Enumeration type| -| date | Date | -| time | Time | -| objuser | User | -| singleasst |Simple correlation | -| multiasst |Multiple correlation | -| timezone | Time zone | -| bool | Bull | - -### Request Parameters Example +| Field | Type | Required | Description | +| ----------------- | ------ | -------- | ------------------------------------------------------------ | +| bk_obj_id | string | Yes | Model ID | +| bk_property_id | string | Yes | Model property ID | +| bk_property_name | string | Yes | Model property name used for display | +| bk_property_type | string | Yes | Defined attribute field used to store data types, with a value range (singlechar(short character), longchar(long character), int(integer), enum(enum type), date(date), time(time), objuser(user), enummulti(enum multiple choice), enumquote(enum reference), timezone(time zone), bool(boolean), organization(organization)) | +| bk_biz_id | int | Yes | Business ID | +| creator | string | No | Data creator | +| description | string | No | Data description | +| editable | bool | No | Indicates whether the data is editable | +| isonly | bool | No | Indicates uniqueness | +| ispre | bool | No | true: Preset field, false: Non-built-in field | +| isreadonly | bool | No | true: Read-only, false: Non-read-only | +| isrequired | bool | No | true: Required, false: Optional | +| option | string | No | User-defined content, the content and format stored are determined by the calling party, as an example of a numeric type ({"min":1,"max":2}) | +| unit | string | No | Unit | +| placeholder | string | No | Placeholder | +| bk_property_group | string | No | Field column name | +| bk_asst_obj_id | string | No | If there is a relation to other models, then this field must be set, otherwise it does not need to be set | +| default | object | No | Add default value to property field, the value of default is passed according to the actual type of the field, for example, when creating an int type field, if you want to set a default value for this field, you can pass default:5, if it is a short character type, then default:"aaa", if you do not want to set a default value, do not pass this field | + +**Note:** + +- The `create_biz_custom_field` interface is used to create business custom fields, which are only valid within the business. The difference between business custom fields and other model fields is that the `bk_biz_id` of business custom fields is the actual business ID, while the `bk_biz_id` of other model fields is 0. +- When calling this interface, the `bk_biz_id` parameter in the parameters should be the actual business ID, and the `bk_obj_id` can only be set to "set", "module", and "host". + +### Request Parameter Example ```json { @@ -64,7 +54,7 @@ Create business custom model properties "unit": "1", "placeholder": "test", "bk_property_group": "default", - "bk_obj_id": "cc_test_inst", + "bk_obj_id": "set", "bk_property_id": "cc_test", "bk_property_name": "cc_test", "bk_property_type": "singlechar", @@ -72,8 +62,7 @@ Create business custom model properties } ``` - -### Return Result Example +### Response Example ```json { @@ -110,57 +99,42 @@ Create business custom model properties } ``` -### Return Result Parameters Description +### Response Parameters Description + #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Indicates whether the request was successful. true: success; false: failure | +| code | int | Error code. 0 indicates success, >0 indicates failure error | +| message | string | Error message returned in case of request failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned in the request | #### data -| Field | Type | Description | -|---------------------|--------------|------------------------------------------------------------| -| bk_biz_id | int | Business id of business custom field | -| creator | string | Who created the data | -| description | string | Description information of data | -| editable | bool | Indicates whether the data is editable | -| isonly | bool | Show uniqueness | -| ispre | bool | True: preset field,false: Non-built-in field | -| isreadonly | bool | True: read-only, false: Not read-only | -| isrequired | bool | True: required, false: Optional | -| option | string | User-defined content, stored content and format determined by the caller | -| unit | string | Unit | -| placeholder | string | Placeholder | -| bk_property_group | string | Name of the field column | -| bk_property_group_name | string | Name of the field column| -| bk_obj_id | string | Model ID | -| bk_supplier_account | string | Developer account number | -| bk_property_id | string | The property ID of the model | -| bk_property_name | string | Model attribute name, used to show | -| bk_property_type | string | The data type of the defined attribute field used to store the data (singlechar,longchar,int,enum,date,time,objUser,singleasst,multiasst,timezone,bool)| -| bk_asst_obj_id | string | This field must be set if there are other models associated with it, otherwise it is not required| -| create_time | string |Settling time | -| last_time | string |Update time | -| id| int |Primary key id| - -#### bk_property_type - -| Identification | Name | -|------------|----------| -| singlechar |Short character | -| longchar | Long character | -| int | Reshaping | -| enum | Enumeration type| -| date | Date | -| time | Time | -| objuser | User | -| singleasst |Simple correlation | -| multiasst |Multiple correlation | -| timezone | Time zone | -| bool | Bull | +| Field | Type | Description | +| ---------------------- | ------ | ------------------------------------------------------------ | +| bk_biz_id | int | Business ID of the business custom field | +| creator | string | Data creator | +| description | string | Data description | +| editable | bool | Indicates whether the data is editable | +| isonly | bool | Indicates uniqueness | +| ispre | bool | true: Preset field, false: Non-built-in field | +| isreadonly | bool | true: Read-only, false: Non-read-only | +| isrequired | bool | true: Required, false: Optional | +| option | string | User-defined content, the content and format stored are determined by the calling party | +| unit | string | Unit | +| placeholder | string | Placeholder | +| bk_property_group | string | Field column name | +| bk_property_group_name | string | Field column name | +| bk_obj_id | string | Model ID | +| bk_supplier_account | string | Vendor account | +| bk_property_id | string | Model property ID | +| bk_property_name | string | Model property name used for display | +| bk_property_type | string | Defined attribute field used to store data types | +| bk_asst_obj_id | string | If there is a relation to other models, then this field must be set | +| create_time | string | Creation time | +| last_time | string | Update time | +| id | int | Primary key ID | \ No newline at end of file diff --git a/docs/apidoc/cc/en/create_business_set.md b/docs/apidoc/cc/en/create_business_set.md index d79fa6d20e..52d78a78e9 100644 --- a/docs/apidoc/cc/en/create_business_set.md +++ b/docs/apidoc/cc/en/create_business_set.md @@ -1,58 +1,57 @@ -### Functional description +### Function Description -New business set (v3.10.12+) +Create a new business set (Version: v3.10.12+, Permission: Business Set Add Permission) ### Request Parameters {{ common_args_desc }} - #### Interface Parameters -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_biz_set_attr | object |yes | Business set model attribute | -| bk_scope | object |yes | Selected business scope| +| Field | Type | Required | Description | +| --------------- | ------ | -------- | ------------------------- | +| bk_biz_set_attr | object | Yes | Business set model fields | +| bk_scope | object | Yes | Selected business scope | #### bk_biz_set_attr -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_biz_set_name | string |yes | Business set name| -| bk_biz_maintainer | string |no | Operation and maintenance personnel| -| bk_biz_set_desc | string |no | Business set description| +| Field | Type | Required | Description | +| ----------------- | ------ | -------- | ------------------------------------ | +| bk_biz_set_name | string | Yes | Business set name | +| bk_biz_maintainer | string | No | Operations and Maintenance personnel | +| bk_biz_set_desc | string | No | Business set description | #### bk_scope -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| match_all | bool |yes | Selected business scope tag| -| filter | object |no | Scope criteria for the selected business| +| Field | Type | Required | Description | +| --------- | ------ | -------- | ---------------------------------- | +| match_all | bool | Yes | Selected business scope flag | +| filter | object | No | Selected business scope conditions | #### filter -This parameter is a combination of filtering rules for the service attribute field, and is used to search for services according to the service attribute field. The combination only supports AND operation and can be nested, with a maximum of 2 layers. - -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| condition | string |yes | Rule operator| -| rules | array |yes | Scope condition rule for selected business| +This parameter is a combination of filtering rules for business attribute fields, used to search for businesses based on business attribute fields. The combination supports only AND operations, can be nested, and supports up to 2 levels. +| Field | Type | Required | Description | +| --------- | ------ | -------- | ---------------------------------------- | +| condition | string | Yes | Rule operator | +| rules | array | Yes | Selected business scope conditions rules | #### rules -| Name | Type | Required| Default value| Description | Description | -| -------- | ------ | ---- | ------ | ------ | ------------------------------------------------------------ | -| field | string |yes | None | Field name| | -| operator | string |yes | None | Operator| Optional value equal,in| -| value | - |no | None | Operand| Different values correspond to different value formats | +| Field | Type | Required | Default | Description | Description | +| -------- | ------ | -------- | ------- | ----------- | --------------------------------------------------------- | +| field | string | Yes | None | Field name | | +| operator | string | Yes | None | Operator | Optional values: equal, in | +| value | - | No | None | Operand | Different operators correspond to different value formats | **Note:** -- The input here`bk_biz_set_attr` only describes the required and built-in parameters for parameters, and the rest of the parameters to be filled in depend on the attribute fields defined by the user -- `bk_scope`If the field in`match_all` is true, it means that the selected business range of the business set is all. In this case, the parameter`filter` is blank. If the`match_all` field is false`filter`, it needs to be non-empty, and the user needs to explicitly point to -Scope of business selection -- The circled type of the selected business attribute in the business set is organization and enumeration -### Request Parameters Example + +- The input here is only for the required and system-built parameters for the `bk_biz_set_attr` parameter, and the rest of the parameters to be filled in depend on the user's own defined attribute fields. +- If the `match_all` field in `bk_scope` is true, it means that the selected business scope of the business set is all, and the parameter `filter` does not need to be filled in. If `match_all` field is false, `filter` needs to be non-empty, and users need to explicitly specify the selection range of the business. +- The business attribute enclosure type selected in the business set is organization and enumeration. + +### Request Parameter Example ```python { @@ -86,10 +85,9 @@ Scope of business selection } ``` -### Return Result Example +### Response Example ```python - { "result":true, "code":0, @@ -99,14 +97,16 @@ Scope of business selection "request_id": "dsda1122adasadadada2222" } ``` -### Return Result Parameters Description + +### Response Parameters Description + #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request succeeded or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| data | int |Business set id created | -| request_id | string |Request chain id | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Indicates whether the request was successful. true: success; false: failure | +| code | int | Error code. 0 indicates success, >0 indicates failure error | +| message | string | Error message returned in case of request failure | +| permission | object | Permission information | +| data | int | ID of the created business set | +| request_id | string | Request chain ID | \ No newline at end of file diff --git a/docs/apidoc/cc/en/create_classification.md b/docs/apidoc/cc/en/create_classification.md index ee81ad7431..2c52efefe7 100644 --- a/docs/apidoc/cc/en/create_classification.md +++ b/docs/apidoc/cc/en/create_classification.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Add model classification +Add model classification (Permission: Model Group New Permission) ### Request Parameters @@ -8,15 +8,13 @@ Add model classification #### Interface Parameters -| Field | Type | Required | Description | -|----------------------------|------------|--------|--------------------------------------------| -| bk_classification_id | string | yes | Classification ID, English description for internal use of the system | -| bk_classification_name | string | yes | Class name | -| bk_classification_icon | string | no | Icon for model classification| +| Field | Type | Required | Description | +| ---------------------- | ------ | -------- | ------------------------------------------------------------ | +| bk_classification_id | string | Yes | Classification ID, English description for internal use in the system | +| bk_classification_name | string | Yes | Classification name | +| bk_classification_icon | string | No | Model classification icon | - - -### Request Parameters Example +### Request Parameter Example ```python { @@ -30,10 +28,9 @@ Add model classification } ``` -### Return Result Example +### Response Example ```python - { "result": true, "code": 0, @@ -51,25 +48,26 @@ Add model classification } ``` -### Return Result Parameters Description +### Response Parameters Description + #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Indicates whether the request was successful. true: success; false: failure | +| code | int | Error code. 0 indicates success, >0 indicates failure error | +| message | string | Error message returned in case of request failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Request return data | #### data -| Field | Type | Description | -|----------- |-----------|--------------------| -| id | int | ID of new data record | -| bk_classification_id | string | Classification ID, English description for internal use of the system | -| bk_classification_name | string | Class name | -| bk_classification_icon | string | Icon for model classification| -| bk_classification_type | string | Used to classify a classification (for example: Internal code is built-in classification, empty string is user-defined classification) | -| bk_supplier_account| string| Developer account number| \ No newline at end of file +| Field | Type | Description | +| ---------------------- | ------ | ------------------------------------------------------------ | +| id | int | ID of the newly added data record | +| bk_classification_id | string | Classification ID, English description for internal use in the system | +| bk_classification_name | string | Classification name | +| bk_classification_icon | string | Model classification icon | +| bk_classification_type | string | Used to classify classifications (e.g., inner code for built-in classifications, an empty string for custom classifications) | +| bk_supplier_account | string | Developer account | \ No newline at end of file diff --git a/docs/apidoc/cc/en/create_cloud_area.md b/docs/apidoc/cc/en/create_cloud_area.md index d1b8626bb1..2e4901c747 100644 --- a/docs/apidoc/cc/en/create_cloud_area.md +++ b/docs/apidoc/cc/en/create_cloud_area.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Create a cloud area based on the cloud area name +Create a control area based on the control area name (Permission: Control Area Creation Permission) ### Request Parameters @@ -8,13 +8,13 @@ Create a cloud area based on the cloud area name #### Interface Parameters -| Field | Type | Required | Description | -|----------------------|------------|--------|-------------| -| bk_cloud_name | string | yes | Cloud area name | +| Field | Type | Required | Description | +| ------------- | ------ | -------- | ----------------- | +| bk_cloud_name | string | Yes | Control area name | -### Request Parameters Example +### Request Parameter Example -``` python +```python { "bk_app_code": "esb_test", @@ -23,10 +23,9 @@ Create a cloud area based on the cloud area name "bk_token": "xxx", "bk_cloud_name": "test1" } - ``` -### Return Result Example +### Response Example ```python { @@ -44,30 +43,28 @@ Create a cloud area based on the cloud area name } ``` -### Return Result Parameters Description +### Response Parameters Description + #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Indicates whether the request was successful. true: success; false: failure | +| code | int | Error code. 0 indicates success, >0 indicates failure error | +| message | string | Error message returned in case of request failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Request return data | #### data -| Field | Type | Description | -|---------------|----------|----------| -| created | object | Create successfully, return message| - +| Field | Type | Description | +| ------- | ------ | ---------------------------------------- | +| created | object | Created successfully, return information | #### data.created -| Name | Type | Description | -|---------|--------|------------| -| origin_index| int |The result order of the corresponding request| -| id| int |Cloud zone id, bk_Cloud_id| - - +| Field | Type | Description | +| ------------ | ---- | ------------------------------------------------- | +| origin_index | int | Corresponding to the order of the request results | +| id | int | Control area id, bk_cloud_id | \ No newline at end of file diff --git a/docs/apidoc/cc/en/create_dynamic_group.md b/docs/apidoc/cc/en/create_dynamic_group.md index b8f3bdc072..31935f5a2a 100644 --- a/docs/apidoc/cc/en/create_dynamic_group.md +++ b/docs/apidoc/cc/en/create_dynamic_group.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Create dynamic grouping (V3.9.6) +Create a dynamic group (Version: v3.9.6+, Permission: Dynamic Group Creation Permission) ### Request Parameters @@ -8,29 +8,29 @@ Create dynamic grouping (V3.9.6) #### Interface Parameters -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_biz_id | int | yes | Business ID | -| bk_obj_id | string |yes | The target resource object type of dynamic grouping can be host,set at present| -| info | object |yes | General query criteria| -| name | string |yes | Dynamic group name| +| Field | Type | Required | Description | +| --------- | ------ | -------- | ------------------------------------------------------------ | +| bk_biz_id | int | Yes | Business ID | +| bk_obj_id | string | Yes | Target resource object type of the dynamic group, currently can be host, set | +| info | object | Yes | Common query conditions | +| name | string | Yes | Dynamic group name | #### info.condition -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_obj_id | string | yes | Conditional object resource type, info.conditon supported for dynamic grouping of host type: set,module,host; Info.conditions supported for dynamic grouping of type set: set| -| condition | array | yes | Query criteria| +| Field | Type | Required | Description | +| --------- | ------ | -------- | ------------------------------------------------------------ | +| bk_obj_id | string | Yes | Condition object resource type, host type dynamic group supports info.condition: set, module, host; set type dynamic group supports info.condition: set | +| condition | array | Yes | Query conditions | #### info.condition.condition -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| field | string | yes | Fields of the object| -| operator | string | yes | Operator with op values eq(equal)/ne(unequal)/in(of)/nin(not of)| -| value | object | yes | The value for the field| +| Field | Type | Required | Description | +| -------- | ------ | -------- | ------------------------------------------------------------ | +| field | string | Yes | Object field | +| operator | string | Yes | Operator, op value can be eq (equal) / ne (not equal) / in (belongs to) / nin (does not belong to) | +| value | object | Yes | Value of the field | -### Request Parameters Example +### Request Parameter Example ```json { @@ -78,13 +78,13 @@ Create dynamic grouping (V3.9.6) } ``` -### Return Result Example +### Response Example ```json { "result": true, "code": 0, - "message": "", + "message": "success", "permission": null, "request_id": "e43da4ef221746868dc4c837d36f3807", "data": { @@ -93,20 +93,21 @@ Create dynamic grouping (V3.9.6) } ``` -### Return result parameter +### Response Parameters Description + #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request succeeded or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Indicates whether the request was successful. true: success; false: failure | +| code | int | Error code. 0 indicates success, >0 indicates failure error | +| message | string | Error message returned in case of request failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Request return data | #### data -| Field | Type| Description | -|--------|-------|-----------| -| id | string |Returns a new dynamic grouping primary key ID after successful creation| +| Field | Type | Description | +| ----- | ------ | ------------------------------------------------------------ | +| id | string | Newly created dynamic group primary key ID returned after successful creation | \ No newline at end of file diff --git a/docs/apidoc/cc/en/create_inst.md b/docs/apidoc/cc/en/create_inst.md index 86555a0321..66e10c8e4e 100644 --- a/docs/apidoc/cc/en/create_inst.md +++ b/docs/apidoc/cc/en/create_inst.md @@ -1,8 +1,8 @@ -### Functional description +### Function Description -Create instance +Create an Instance (Permission: Model Instance Creation Permission) -- This interface only applies to custom hierarchical models and generic model instances, not to business, set, module, host and other model instances +- This interface is only applicable to custom hierarchical models and general model instances, not applicable to business, set, module, host, and other model instances. ### Request Parameters @@ -10,24 +10,20 @@ Create instance #### Interface Parameters -| Field | Type | Required | Description | -|----------------------------|------------|--------|--------------------------------------------| -| bk_obj_id | string | yes | Model ID | -| bk_inst_name | string | yes | Instance name| -| bk_biz_id | int | no | Business ID, which must be transferred when creating a custom mainline level model instance| -| bk_parent_id | int | no | It must be passed when creating a custom mainline level model instance, representing the parent level instance ID| - - Note: If the operation is a user-defined mainline hierarchy model instance and permission Center is used, for the version with CMDB less than 3.9, the metadata parameter containing the service id of the instance needs to be transferred. Otherwise, the permission Center authentication will fail. The format is -"metadata": { - "label": { - "bk_biz_id": "64" - } -} +| Field | Type | Required | Description | +| ------------ | ------ | -------- | ------------------------------------------------------------ | +| bk_obj_id | string | Yes | Model ID | +| bk_inst_name | string | Yes | Instance name | +| bk_biz_id | int | No | Business ID, required when creating custom mainline hierarchical model instances | +| bk_parent_id | int | No | Required when creating custom mainline hierarchical model instances, represents the ID of the parent hierarchical instance | + +Note: When operating on custom mainline hierarchical model instances and using permission center, for CMDB versions less than 3.9, you also need to pass the metadata parameter containing the business ID of the instance in the metadata parameter; otherwise, it will cause permission center authentication failure. The format is: -Other fields that belong to instance properties can also be input parameters. The value of the 'table' type attribute is the id list of the quoted table type model instance (need to be created through the batch_create_quoted_inst interface first), up to 50. +"metadata": { "label": { "bk_biz_id": "64" } } +Other fields belonging to instance properties can also be passed as parameters. For table-type attributes, the value is a list of IDs of associated instances of the table-type model (needs to be created first using the batch_create_quoted_inst interface), with a maximum of 50. -### Request Parameters Example +### Request Parameter Example ```json { @@ -41,10 +37,9 @@ Other fields that belong to instance properties can also be input parameters. Th } ``` -### Return Result Example +### Response Example ```json - { "result": true, "code": 0, @@ -64,27 +59,27 @@ Other fields that belong to instance properties can also be input parameters. Th } ``` -### Return Result Parameters Description +### Response Parameters Description + #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request succeeded or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Indicates whether the request was successful. true: success; false: failure | +| code | int | Error code. 0 indicates success, >0 indicates failure error | +| message | string | Error message returned in case of request failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Request return data | #### data -| Field | Type | Description | -|----------- |-----------|----------| -| bk_inst_id | int | Instance id | -| bk_biz_id | int | Business ID | -| bk_inst_name | string | Instance name | -| bk_obj_id | string | Model id| -| bk_supplier_account| string | Developer account number | -| create_time | string |Settling time | -| last_time | string |Update time | - +| Field | Type | Description | +| ------------------- | ------ | ---------------------------------------------- | +| bk_inst_id | int | Instance ID returned after successful creation | +| bk_biz_id | int | Business ID | +| bk_inst_name | string | Instance name | +| bk_obj_id | string | Model ID | +| bk_supplier_account | string | Supplier account | +| create_time | string | Creation time | +| last_time | string | Update time | \ No newline at end of file diff --git a/docs/apidoc/cc/en/create_kube_cluster.md b/docs/apidoc/cc/en/create_kube_cluster.md index ee44460281..f2b2fdf8f4 100644 --- a/docs/apidoc/cc/en/create_kube_cluster.md +++ b/docs/apidoc/cc/en/create_kube_cluster.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -create a new container cluster (v3.12.1+, permission: kube cluster editing permissions) +Create Container Cluster (v3.12.1+, Permission: Create Permission for Container Cluster) ### Request Parameters @@ -8,24 +8,25 @@ create a new container cluster (v3.12.1+, permission: kube cluster editing permi #### Interface Parameters -| Field | Type | Required | Description | -|-------------------|--------|----------|--------------------------------------------------------| -| bk_biz_id | int | yes | business ID | -| name | string | yes | cluster name | -| scheduling_engine | string | no | scheduling engine | -| uid | string | yes | cluster own ID | -| xid | string | no | associated cluster ID | -| version | string | no | cluster version | -| network_type | string | no | network type | -| region | string | no | the region where the cluster is located | -| vpc | string | no | vpc network | -| network | array | no | cluster network | -| type | string | yes | cluster type. enum: INDEPENDENT_CLUSTER, SHARE_CLUSTER | -| bk_project_id | string | no | project_id | -| bk_project_name | string | no | project name | -| bk_project_code | string | no | project english name | +| Field | Type | Required | Description | +| ----------------- | ------ | -------- | ------------------------------------------------------------ | +| bk_biz_id | int | Yes | Business ID | +| name | string | Yes | Cluster name | +| scheduling_engine | string | No | Scheduling engine | +| uid | string | Yes | Cluster's own ID | +| xid | string | No | Associated cluster ID | +| version | string | No | Cluster version | +| network_type | string | No | Network type | +| region | string | No | Region | +| vpc | string | No | VPC network | +| network | array | No | Cluster network | +| type | string | Yes | Cluster type. Enumeration values: INDEPENDENT_CLUSTER (Independent Cluster), SHARE_CLUSTER (Shared Cluster) | +| environment | string | No | Environment | +| bk_project_id | string | No | Project ID | +| bk_project_name | string | No | Project name | +| bk_project_code | string | No | Project English name | -### Request Parameters Example +### Request Parameter Example ```json { @@ -46,13 +47,14 @@ create a new container cluster (v3.12.1+, permission: kube cluster editing permi "127.0.0.0/21" ], "type": "INDEPENDENT_CLUSTER", + "environment": "xxx", "bk_project_id": "21bf9ef9be7c4d38a1d1f2uc0b44a8f2", "bk_project_name": "test", "bk_project_code": "test" } ``` -### Return Result Example +### Response Example ```json { @@ -67,19 +69,19 @@ create a new container cluster (v3.12.1+, permission: kube cluster editing permi } ``` -### Return result parameter +### Response Parameters Description -| Name | Type | Description | -|------------|--------|------------------------------------------------------------------------------------| -| result | bool | Whether the request succeeded or not. True: request succeeded;false request failed | -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string | Error message returned by request failure | -| permission | object | Permission information | -| data | object | Data returned by request | -| request_id | string | Request chain id | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Indicates whether the request was successful. true: success; false: failure | +| code | int | Error code. 0 indicates success, >0 indicates failure error | +| message | string | Error message returned in case of request failure | +| permission | object | Permission information | +| data | object | Request return data | +| request_id | string | Request chain ID | ### data -| Name | Type | Description | -|------|------|-------------------------| -| id | int | created kube cluster ID | +| Field | Type | Description | +| ---- | ---- | ---------------------------- | +| id | int | Created container cluster ID | \ No newline at end of file diff --git a/docs/apidoc/cc/en/create_object.md b/docs/apidoc/cc/en/create_object.md index 4f6cca08b9..30be632aa0 100644 --- a/docs/apidoc/cc/en/create_object.md +++ b/docs/apidoc/cc/en/create_object.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Modeling +Create Model (Permission: Create Model) ### Request Parameters @@ -8,16 +8,16 @@ Modeling #### Interface Parameters -| Field | Type | Required | Description | -|----------------------|------------|--------|----------------------------------------------------------| -| creator | string | no | Creator of this data | -| bk_classification_id | string | yes | The classification ID of the object model, which can only be named by English letter sequence | -| bk_obj_id | string | yes | The ID of the object model, which can only be named in English letter sequence | -| bk_obj_name | string | yes | The name of the object model, for presentation, can be used in any language that humans can read| -| bk_obj_icon | string | no | ICON information for the object model for front-end display| +| Field | Type | Required | Description | +| -------------------- | ------ | -------- | ------------------------------------------------------------ | +| creator | string | No | Creator of this data | +| bk_classification_id | string | Yes | ID of the classification for the object model, can only be named with English letters | +| bk_obj_id | string | Yes | ID of the object model, can only be named with English letters | +| bk_obj_name | string | Yes | Name of the object model, used for display, can be in any language readable by humans | +| bk_obj_icon | string | No | ICON information of the object model, used for frontend display | +| obj_sort_number | int | No | Sorting order of the object model under the corresponding model group | - -### Request Parameters Example +### Request Parameter Example ```python { @@ -29,15 +29,14 @@ Modeling "bk_classification_id": "test", "bk_obj_name": "test", "bk_obj_icon": "icon-cc-business", - "bk_obj_id": "test" + "bk_obj_id": "test", + "obj_sort_number": 1 } ``` - -### Return Result Example +### Response Example ```python - { "code": 0, "permission": null, @@ -59,37 +58,37 @@ Modeling "bk_obj_icon": "icon-cc-business", "modifier": "", "id": 2000002118, - "ispre": false + "ispre": false, + "obj_sort_number": 1 } } - ``` -### Return Result Parameters Description -#### response - -| Name | Type | Description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request succeeded or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | - -#### data - -| Field | Type | Description | -|-----------|-----------|--------------------| -| id | int | ID of the new data record| -| bk_classification_id | int | Classification ID of the object model | -| creator | string |Creator | -| modifier | string |Last modified by| -| create_time | string |Settling time | -| last_time | string |Update time | -| bk_supplier_account | string |Developer account number | -| bk_obj_id | string |Model type | -| bk_obj_name | string |Model name | -| bk_obj_icon | string | ICON information for the object model for front-end display| -| position | json object string |Coordinates for front-end presentation | -| ispre | bool | Predefined, true or false | \ No newline at end of file +### Response Parameters Description + +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Indicates whether the request was successful. true: success; false: failure | +| code | int | Error code. 0 indicates success, >0 indicates failure error | +| message | string | Error message returned in case of request failure | +| permission | object | Permission information | +| data | object | Request return data | +| request_id | string | Request chain ID | + +### data + +| Field | Type | Description | +| -------------------- | ------------------ | ------------------------------------------------------------ | +| id | int | New ID of data record | +| bk_classification_id | int | ID of the classification for the object model | +| creator | string | Creator | +| modifier | string | Last modifier | +| create_time | string | Creation time | +| last_time | string | Update time | +| bk_supplier_account | string | Developer account | +| bk_obj_id | string | Model type | +| bk_obj_name | string | Model name | +| bk_obj_icon | string | ICON information of the object model, used for frontend display | +| position | json object string | Coordinates for frontend display | +| ispre | bool | Whether it is predefined, true or false | +| obj_sort_number | int | Sorting order of the object model under the corresponding model group | \ No newline at end of file diff --git a/docs/apidoc/cc/en/create_object_attribute.md b/docs/apidoc/cc/en/create_object_attribute.md index 315c61193e..0c10301404 100644 --- a/docs/apidoc/cc/en/create_object_attribute.md +++ b/docs/apidoc/cc/en/create_object_attribute.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Create model properties +Create Model Property (Permission: Model Edit Permission) ### Request Parameters @@ -8,44 +8,27 @@ Create model properties #### Interface Parameters -| Field | Type | Required | Description | -|-----------------------|------------|--------|----------------------------------------------------------| -| creator | string | no | Who created the data | -| description | string | no | Description information of data | -| editable | bool | no | Indicates whether the data is editable | -| isonly | bool | no | Show uniqueness | -| ispre | bool | no | True: preset field,false: Non-built-in field | -| isreadonly | bool | no | True: read-only, false: Not read-only | -| isrequired | bool | no | True: required, false: Optional | -| option | string | no | User-defined content, stored content and format determined by the caller, taking numeric type as an example ({"min":"1","max":"2"})| -| unit | string | no | Unit | -| placeholder | string | no | Placeholder | -| bk_property_group | string | no | Name of the field column | -| bk_obj_id | string | yes | Model ID | -| bk_property_id | string | yes | The property ID of the model | -| bk_property_name | string | yes | Model attribute name, used to show | -| bk_property_type | string | yes | The defined attribute field is used to store the data type of the data, and the value range can be (singlechar,longchar,int,enum,date,time,objUser,singleasst,multiasst,timezone,bool)| -| ismultiple | bool | no | Whether multiple choices are allowed, where the field type is singlechar, longchar, int, float, enum, date, time, timezone, bool, and the list, temporarily does not support multiple choices. When creating an attribute, the field type is the above type, and the ismultiple parameter can not be passed. The default is false. If you pass true, you will be prompted that the type does not support multiple choices. enummulti, enumquote , user and organization fields support multiple choices, among which the user field and organization field are true by default | -| default | object | no | Add a default value to the attribute field. The default value is passed according to the actual type of the field. For example, create an int type field. If you want to set the default value for this field, you can pass default: 5. If it is a short character type, then default: "aaa". If you do not want to set the default value, you can not pass this field | - -#### bk_property_type - -| Identification | Name | -|------------|----------| -| singlechar |Short character | -| longchar | Long character | -| int | Reshaping | -| enum | Enumeration type| -| date | Date | -| time | Time | -| objuser | User | -| timezone | Time zone | -| bool | Bull | -| enummulti | Enumerate multiple | -| enumquote | Enumeration References | -| organization | Organization | - -### Request Parameters Example +| Field | Type | Required | Description | +| ----------------- | ------ | -------- | ------------------------------------------------------------ | +| creator | string | No | Data creator | +| description | string | No | Data description | +| editable | bool | No | Indicates whether the data is editable | +| isonly | bool | No | Indicates uniqueness | +| ispre | bool | No | true: Preset field, false: Non-built-in field | +| isreadonly | bool | No | true: Read-only, false: Non-read-only | +| isrequired | bool | No | true: Required, false: Optional | +| option | string | No | User-defined content, the content and format stored are determined by the calling party, as an example of a numeric type ({"min":1,"max":2}) | +| unit | string | No | Unit | +| placeholder | string | No | Placeholder | +| bk_property_group | string | No | Field column name | +| bk_obj_id | string | Yes | Model ID | +| bk_property_id | string | Yes | Model property ID | +| bk_property_name | string | Yes | Model property name used for display | +| bk_property_type | string | Yes | Defined attribute field used to store data types, with a value range (singlechar(short character), longchar(long character), int(integer), enum(enum type), date(date), time(time), objuser(user), enummulti(enum multiple choice), enumquote(enum reference), timezone(time zone), bool(boolean), organization(organization)) | +| ismultiple | bool | No | Whether it can be selected multiple times, where the field types are short character, long character, number, float, enum, date, time, time zone, boolean, and the list does not support multiple selections. When creating a property, the field types above do not need to pass the `ismultiple` parameter, and the default is false. If true is passed, it will prompt that this type does not support multiple selections for now. Enum multiple selection, enum reference, user, and organization fields support multiple selections, with user fields and organization fields defaulting to true | +| default | object | No | Add default value to the property field, the value of `default` is passed according to the actual type of the field. For example, when creating an int type field, if you want to set a default value for this field, you can pass `default:5`, if it is a short character type, then `default:"aaa"`, if you do not want to set a default value, do not pass this field | + +### Request Parameter Example ```json { @@ -60,7 +43,7 @@ Create model properties "ispre": false, "isreadonly": false, "isrequired": false, - "option": "^[0-9a-zA-Z_]{1,}$", + "option": "^[0-9a-zA-Z_]{1,}$", "unit": "1", "placeholder": "test", "bk_property_group": "default", @@ -69,12 +52,12 @@ Create model properties "bk_property_name": "cc_test", "bk_property_type": "singlechar", "bk_asst_obj_id": "test", + "ismultiple": false, "default":"aaaa" } ``` - -### Return Result Example +### Response Example ```json { @@ -107,61 +90,45 @@ Create model properties "create_time": "2020-03-25 17:12:08", "last_time": "2020-03-25 17:12:08", "bk_property_group_name": "default", + "ismultiple": false, "default":"aaaa" } } ``` -### Return Result Parameters Description +### Response Parameters Description + #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Indicates whether the request was successful. true: success; false: failure | +| code | int | Error code. 0 indicates success, >0 indicates failure error | +| message | string | Error message returned in case of request failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned in the request | #### data -| Field | Type | Description | -|---------------------|--------------|------------------------------------------------------------| -| creator | string | Who created the data | -| description | string | Description information of data | -| editable | bool | Indicates whether the data is editable | -| isonly | bool | Show uniqueness | -| ispre | bool | True: preset field,false: Non-built-in field | -| isreadonly | bool | True: read-only, false: Not read-only | -| isrequired | bool | True: required, false: Optional | -| option | string | User-defined content, stored content and format determined by the caller | -| unit | string | Unit | -| placeholder | string | Placeholder | -| bk_property_group | string | Name of the field column | -| bk_obj_id | string | Model ID | -| bk_supplier_account | string | Developer account number | -| bk_property_id | string | The property ID of the model | -| bk_property_name | string | Model attribute name, used to show | -| bk_property_type | string | The data type of the defined attribute field used to store the data (singlechar,longchar,int,enum,date,time,objUser,singleasst,multiasst,timezone,bool)| -| bk_biz_id | int | Business id of business custom field | -| bk_property_group_name | string | Name of the field column | -| ismultiple | bool | Can multiple fields be selected | -| default | object | attribute default vaule | - -#### bk_property_type - -| Identification | Name | -|------------|----------| -| singlechar |Short character | -| longchar | Long character | -| int | Reshaping | -| enum | Enumeration type| -| date | Date | -| time | Time | -| objuser | User | -| timezone | Time zone | -| bool | Bull | -| enummulti | Enumerate multiple | -| enumquote | Enumeration References | -| organization | Organization | +| Field | Type | Description | +| ---------------------- | ------ | ------------------------------------------------------------ | +| creator | string | Data creator | +| description | string | Data description | +| editable | bool | Indicates whether the data is editable | +| isonly | bool | Indicates uniqueness | +| ispre | bool | true: Preset field, false: Non-built-in field | +| isreadonly | bool | true: Read-only, false: Non-read-only | +| isrequired | bool | true: Required, false: Optional | +| option | string | User-defined content, the content and format stored are determined by the calling party | +| unit | string | Unit | +| placeholder | string | Placeholder | +| bk_property_group | string | Field column name | +| bk_obj_id | string | Model ID | +| bk_supplier_account | string | Vendor account | +| bk_property_id | string | Model property ID | +| bk_property_name | string | Model property name used for display | +| bk_property_type | string | Defined attribute field used to store data types | +| bk_property_group_name | string | Field column name | +| ismultiple | bool | Whether the field supports multiple selections | +| default | object | Property default value | \ No newline at end of file diff --git a/docs/apidoc/cc/en/create_process_instance.md b/docs/apidoc/cc/en/create_process_instance.md index 7e497c711a..efbd611a05 100644 --- a/docs/apidoc/cc/en/create_process_instance.md +++ b/docs/apidoc/cc/en/create_process_instance.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Creates a process instance based on the service instance ID and the process instance property values +Create Process Instance Based on Service Instance ID and Process Instance Attribute Values (Permission: Service Instance Edit Permission) ### Request Parameters @@ -8,45 +8,47 @@ Creates a process instance based on the service instance ID and the process inst #### Interface Parameters -| Field | Type | Required | Description | -|----------------------|------------|--------|-----------------------| -| service_instance_id | int |yes | Service instance ID| -| processes | array |yes | Property values in the process instance that differ from the template, the max length is 100| - -#### Description of the process_info field -| Field| Type| Required| Description| -|---|---|---|---| -|auto_start| bool| no | Whether to pull up automatically| -|auto_time_gap| int| no | Pull up interval| -|bk_biz_id| int| no | Business ID | -|bk_func_id| string| no | Function ID| -|bk_func_name| string| no | Process name| -|bk_process_id| int| no | Process id| -|bk_process_name| string| no| Process alias| -|bk_supplier_account| string| no| Developer account number| -|face_stop_cmd| string| no| Forced stop command| -|pid_file| string| no| PID file path| -|priority| int| no| Startup priority| -|proc_num| int| no| Number of starts| -|reload_cmd| string| no| Process reload command| -|restart_cmd| string| no| Restart command| -|start_cmd| string| no| Start command| -|stop_cmd| string| no| Stop order| -|timeout| int| no| Operation time-out duration| -|user| string| no| Start user| -|work_path| string| no| Working path| -|bind_info| object| no| Binding information| - -#### Bind_info Field Description -| Field| Type| Required| Description| -|---|---|---|---| -|enable| bool| no | Is the port enabled| -|ip| string| no | Bound ip| -|port| string| no | Bound port| -|protocol| string| no | Protocol used| -|row_id| int| no | Template row index used for instantiation, unique in process| - -### Request Parameters Example +| Field | Type | Required | Description | +| ------------------- | ----- | -------- | ------------------------------------------------------------ | +| service_instance_id | int | Yes | Service instance ID | +| processes | array | Yes | Attribute values in process instance different from the template, with a maximum of 100 | + +#### Explanation of process_info Fields + +| Field | Type | Required | Description | +| ------------------- | ------ | -------- | --------------------------------- | +| auto_start | bool | No | Whether to start automatically | +| auto_time_gap | int | No | Time interval for automatic start | +| bk_biz_id | int | No | Business ID | +| bk_func_id | string | No | Function ID | +| bk_func_name | string | No | Process name | +| bk_process_id | int | No | Process ID | +| bk_process_name | string | No | Process alias | +| bk_supplier_account | string | No | Developer account | +| face_stop_cmd | string | No | Forced stop command | +| pid_file | string | No | PID file path | +| priority | int | No | Startup priority | +| proc_num | int | No | Number of startups | +| reload_cmd | string | No | Process reload command | +| restart_cmd | string | No | Restart command | +| start_cmd | string | No | Start command | +| stop_cmd | string | No | Stop command | +| timeout | int | No | Operation timeout duration | +| user | string | No | Startup user | +| work_path | string | No | Working directory | +| bind_info | object | No | Binding information | + +#### Explanation of bind_info Fields + +| Field | Type | Required | Description | +| -------- | ------ | -------- | ------------------------------------------------------------ | +| enable | bool | No | Whether the port is enabled | +| ip | string | No | Bound IP | +| port | string | No | Bound port | +| protocol | string | No | Used protocol | +| row_id | int | No | Template row index used for instantiation, unique within the process | + +### Request Parameter Example ```json { @@ -93,7 +95,7 @@ Creates a process instance based on the service instance ID and the process inst } ``` -### Return Result Example +### Response Example ```python { @@ -106,15 +108,15 @@ Creates a process instance based on the service instance ID and the process inst } ``` -### Return Result Parameters Description +### Response Parameters Description #### response -| Name| Type| Description| -|---|---|---| -| result | bool |Whether the request was successful or not. True: request succeeded;false request failed| -| code | int |Wrong code. 0 indicates success,>0 indicates failure error| -| message | string |Error message returned by request failure| -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Newly created process instance ID list| +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Indicates whether the request was successful. true: success; false: failure | +| code | int | Error code. 0 indicates success, >0 indicates failure error | +| message | string | Error message returned in case of request failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Newly created process instance ID list | \ No newline at end of file diff --git a/docs/apidoc/cc/en/create_service_category.md b/docs/apidoc/cc/en/create_service_category.md index 914784b184..c5b38ebc26 100644 --- a/docs/apidoc/cc/en/create_service_category.md +++ b/docs/apidoc/cc/en/create_service_category.md @@ -1,6 +1,6 @@ -#### Functional description +### Function Description -Create service classification +Create Service Category (Permission: Service Category Creation Permission) ### Request Parameters @@ -8,13 +8,13 @@ Create service classification #### Interface Parameters -| Field | Type | Required | Description | -|----------------------|------------|--------|-----------------------| -| name | string |yes | Service class name| -| parent_id | int |no | Parent node ID| -| bk_biz_id | int |yes | Business ID | +| Field | Type | Required | Description | +| ------------ | ------ | -------- | --------------------- | +| name | string | Yes | Service category name | +| bk_parent_id | int | No | Parent node ID | +| bk_biz_id | int | Yes | Business ID | -### Request Parameters Example +### Request Parameter Example ```python { @@ -22,13 +22,13 @@ Create service classification "bk_app_secret": "xxx", "bk_username": "xxx", "bk_token": "xxx", - "parent_id": 0, + "bk_parent_id": 0, "bk_biz_id": 1, "name": "test101" } ``` -### Return Result Example +### Response Example ```python { @@ -41,35 +41,35 @@ Create service classification "bk_biz_id": 1, "id": 6, "name": "test101", - "root_id": 5, - "parent_id": 5, + "bk_root_id": 5, + "bk_parent_id": 5, "bk_supplier_account": "0", "is_built_in": false } } ``` -### Return Result Parameters Description +### Response Parameters Description #### response -| Name| Type| Description| -|---|---|---| -| result | bool |Whether the request succeeded or not. True: request succeeded;false request failed| -| code | int |Wrong code. 0 indicates success,>0 indicates failure error| -| message | string |Error message returned by request failure| -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |New service classification information| +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Indicates whether the request was successful. true: success; false: failure | +| code | int | Error code. 0 indicates success, >0 indicates failure error | +| message | string | Error message returned in case of request failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Newly created service category information | -#### Data field Description +#### data -| Field| Type| Description| -|---|---|---| -|id| integer| Service class ID| -|root_id| integer| Service classification root node ID| -|parent_id| integer| Service classification parent node ID| -|is_built_in| bool| Is it a built-in node (built-in node can not be edited)| -| bk_biz_id | int | Service ID| -| name | string | Service class name| -| bk_supplier_account| string| Developer account number| +| Field | Type | Description | +| ------------------- | ------- | ------------------------------------------------------------ | +| id | integer | Service category ID | +| root_id | integer | Service category root node ID | +| parent_id | integer | Service category parent node ID | +| is_built_in | bool | Whether it is a built-in node (built-in nodes cannot be edited) | +| bk_biz_id | int | Business ID | +| name | string | Service category name | +| bk_supplier_account | string | Vendor account | \ No newline at end of file diff --git a/docs/apidoc/cc/en/create_service_instance.md b/docs/apidoc/cc/en/create_service_instance.md index 3fee6c5287..bb07ecb801 100644 --- a/docs/apidoc/cc/en/create_service_instance.md +++ b/docs/apidoc/cc/en/create_service_instance.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Create service instances in batches. If the module is bound with a service template, the service instances will also be created according to the template. The process template ID corresponding to each process must also be provided in the process parameter for creating the service instance +Batch create service instances. If the module is bound to a service template, the service instances will also be created based on the template. The process parameters for creating service instances must also provide the process template ID corresponding to each process (Permission: Service Instance Creation Permission). ### Request Parameters @@ -8,62 +8,65 @@ Create service instances in batches. If the module is bound with a service templ #### Interface Parameters -| Field | Type | Required | Description | -|----------------------|------------|--------|-----------------------| -| bk_module_id | int |yes | Module ID| -| instances | array | Yes | new service instance data, the max length is 100 | -| bk_biz_id | int |yes | Business ID | - -#### Instances Field Description - -| Field| Type| Required | Description| Description| -|---|---|---|---|---| -|instances.bk_host_id| int| yes | Host ID| Host ID of the service instance binding| -|instances.processes| array| yes | Process information| New process information under service instance| -|instances.processes.process_template_id| int| yes | Process template ID| Fill in 0 if the module is not bound to the service template| -|instances.processes.process_info| object| yes | Process instance information| If the process has a template bound to it, only fields in the template that are not locked are valid| - -#### Processes Field Description -| Field| Type| Required | Description| -|---|---|---|---| -|process_template_id| int| yes | Process template id| -|auto_start| bool| no | Automatically pull up| -|auto_time_gap| int| no | Pull up interval| -|bk_biz_id| int| no | Business ID | -|bk_func_id| string| no | Function ID| -|bk_func_name| string| no | Process name| -|bk_process_id| int| no | Process id| -|bk_process_name| string| no | Process alias| -|bk_supplier_account| string| no | Developer account number| -|face_stop_cmd| string| no | Forced stop command| -|pid_file| string| no | PID file path| -|priority| int| no | Startup priority| -|proc_num| int| no | Number of starts| -|reload_cmd| string| no | Process reload command| -|restart_cmd| string| no | Restart command| -|start_cmd| string| no | Start command| -|stop_cmd| string| no | Stop order| -|timeout| int| no | Operation time-out duration| -|user| string| no | Start user| -|work_path| string| no | Working path| -|process_info| object| yes | Process information| - -#### Description of the process_info field -| Field| Type| Required | Description| -|---|---|---|---| -|bind_info| object| yes | Binding information| -|bk_supplier_account| string| yes | Developer account number| - -#### Bind_info Field Description -| Field| Type| Required | Description| -|---|---|---|---| -|enable| bool| yes | Is the port enabled| -|ip| string| yes | Bound ip| -|port| string| yes | Bound port| -|protocol| string| yes | Protocol used| -|template_row_id| int| yes | Template row index used for instantiation, unique in process| - -### Request Parameters Example +| Field | Type | Required | Description | +| ------------ | ----- | -------- | ------------------------------------------------------------ | +| bk_module_id | int | Yes | Module ID | +| instances | array | Yes | Information of service instances to be created, with a maximum value of 100 | +| bk_biz_id | int | Yes | Business ID | + +#### Explanation of the instances Field + +| Field | Type | Required | Explanation | +| --------------------------------------- | ------ | -------- | ------------------------------------------------------------ | +| instances.bk_host_id | int | Yes | Host ID, the host ID bound to the service instance | +| instances.service_instance_name | string | No | Service instance name. If not filled, the host IP plus the process name plus the service binding port will be used as the name, in the form of "123.123.123.123_job_java_80" | +| instances.processes | array | Yes | Process information, information of processes newly created under the service instance | +| instances.processes.process_template_id | int | Yes | Process template ID. If the module is not bound to a service template, fill in 0 | +| instances.processes.process_info | object | Yes | Process instance information. If the process is bound to a template, only the fields not locked in the template are valid | + +#### Explanation of the processes Field + +| Field | Type | Required | Explanation | +| ------------------- | ------ | -------- | ------------------------------ | +| process_template_id | int | Yes | Process template ID | +| auto_start | bool | No | Whether to start automatically | +| bk_biz_id | int | No | Business ID | +| bk_func_id | string | No | Function ID | +| bk_func_name | string | No | Process name | +| bk_process_id | int | No | Process ID | +| bk_process_name | string | No | Process alias | +| bk_supplier_account | string | No | Vendor account | +| face_stop_cmd | string | No | Force stop command | +| pid_file | string | No | PID file path | +| priority | int | No | Startup priority | +| proc_num | int | No | Number of startups | +| reload_cmd | string | No | Process reload command | +| restart_cmd | string | No | Restart command | +| start_cmd | string | No | Startup command | +| stop_cmd | string | No | Stop command | +| timeout | int | No | Operation timeout duration | +| user | string | No | Startup user | +| work_path | string | No | Working directory | +| process_info | object | Yes | Process information | + +#### Explanation of the process_info Field + +| Field | Type | Required | Explanation | +| ------------------- | ------ | -------- | ------------------- | +| bind_info | object | Yes | Binding information | +| bk_supplier_account | string | Yes | Vendor account | + +#### Explanation of the bind_info Field + +| Field | Type | Required | Explanation | +| --------------- | ------ | -------- | ------------------------------------------------------------ | +| enable | bool | Yes | Whether the port is enabled | +| ip | string | Yes | Bound IP | +| port | string | Yes | Bound port | +| protocol | string | Yes | Used protocol | +| template_row_id | int | Yes | Template row index used for instantiation, unique within the process | + +### Request Parameter Example ```json { @@ -76,6 +79,7 @@ Create service instances in batches. If the module is bound with a service templ "instances": [ { "bk_host_id": 2, + "service_instance_name": "test", "processes": [ { "process_template_id": 1, @@ -96,7 +100,6 @@ Create service instances in batches. If the module is bound with a service templ "pid_file": "", "auto_start": false, "timeout": 30, - "auto_time_gap": 60, "reload_cmd": "", "bk_func_name": "java", "work_path": "/data/bkee", @@ -118,7 +121,7 @@ Create service instances in batches. If the module is bound with a service templ } ``` -### Return Result Example +### Response Example ```python { @@ -131,16 +134,15 @@ Create service instances in batches. If the module is bound with a service templ } ``` -### Return Result Parameters Description +### Response Parameters Description #### response -| Name| Type| Description| -|---|---|---| -| result | bool |Whether the request was successful or not. True: request succeeded;false request failed| -| code | int |Wrong code. 0 indicates success,>0 indicates failure error| -| message | string |Error message returned by request failure| -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |New service instance ID list| - +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Indicates whether the request was successful. true: success; false: failure | +| code | int | Error code. 0 indicates success, >0 indicates failure error | +| message | string | Error message returned in case of request failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | List of newly created service instance IDs | \ No newline at end of file diff --git a/docs/apidoc/cc/en/create_service_template.md b/docs/apidoc/cc/en/create_service_template.md index e1572e646f..c994f5b0da 100644 --- a/docs/apidoc/cc/en/create_service_template.md +++ b/docs/apidoc/cc/en/create_service_template.md @@ -1,6 +1,6 @@ -### Functional description +### Functional Description -Creates a service template with the specified name and service class based on the passed-in service template name and service class ID +Creates a service template with the specified name and service class based on the provided service template name and service class ID. ### Request Parameters @@ -8,11 +8,11 @@ Creates a service template with the specified name and service class based on th #### Interface Parameters -| Field | Type | Required | Description | -|----------------------|------------|--------|-----------------------| -| name | string |yes | Service template name| -| service_category_id | int |yes | Service class ID| -| bk_biz_id | int |yes | Business ID | +| Field | Type | Required | Description | +| ------------------- | ------ | -------- | --------------------- | +| name | string | Yes | Service template name | +| service_category_id | int | Yes | Service class ID | +| bk_biz_id | int | Yes | Business ID | ### Request Parameters Example @@ -55,25 +55,25 @@ Creates a service template with the specified name and service class based on th #### response -| Name| Type| Description| -|---|---|---| -| result | bool |Whether the request was successful or not. True: request succeeded;false request failed| -| code | int |Wrong code. 0 indicates success,>0 indicates failure error| -| message | string |Error message returned by request failure| -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request| +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request was successful or not. True: request succeeded; false: request failed | +| code | int | Error code. 0 indicates success, >0 indicates failure error | +| message | string | Error message returned in case of request failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned by the request | -#### Data field Description +#### Data Field Description -| Field| Type| Description| -|---|---|---| -|id| int| Service template ID| -|bk_biz_id| int| Business ID | -|name| string| Service template name| -|service_category_id| int| Service template ID| -| creator | string | Creator of this data | -| modifier | string | The last person to modify this piece of data | -| create_time | string |Settling time | -| last_time | string |Update time | -| bk_supplier_account | string | Developer account number| \ No newline at end of file +| Field | Type | Description | +| ------------------- | ------ | -------------------------------------------- | +| id | int | Service template ID | +| bk_biz_id | int | Business ID | +| name | string | Service template name | +| service_category_id | int | Service class ID | +| creator | string | Creator of this data | +| modifier | string | The last person to modify this piece of data | +| create_time | string | Creation time | +| last_time | string | Last modification time | +| bk_supplier_account | string | Developer account number | \ No newline at end of file diff --git a/docs/apidoc/cc/en/create_set_template.md b/docs/apidoc/cc/en/create_set_template.md index 23b283ab46..ed12595b7c 100644 --- a/docs/apidoc/cc/en/create_set_template.md +++ b/docs/apidoc/cc/en/create_set_template.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Create a set template with the specified name under the specified service id, and the set template created to contain the service template by the specified service template id +Create a cluster template with the specified name under the specified business ID. The created cluster template includes service templates based on the specified service template IDs. (Permission: Cluster template creation permission) ### Request Parameters @@ -8,14 +8,13 @@ Create a set template with the specified name under the specified service id, an #### Interface Parameters -| Field | Type | Required| Description | -| -------------------- | ------ | ---- | -------------- | -| bk_biz_id | int | yes | Business ID | -| name | string |yes | Set template name | -| service_template_ids | array |yes | Service template ID list| +| Field | Type | Required | Description | +| -------------------- | ------ | -------- | ------------------------ | +| bk_biz_id | int | Yes | Business ID | +| name | string | Yes | Cluster template name | +| service_template_ids | array | Yes | Service template ID list | - -### Request Parameters Example +### Request Parameter Example ```json { @@ -30,7 +29,7 @@ Create a set template with the specified name under the specified service id, an } ``` -### Return Result Example +### Response Example ```json { @@ -56,24 +55,24 @@ Create a set template with the specified name under the specified service id, an #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request succeeded or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 represents success, >0 represents a failure error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned by the request | -#### Data field Description +#### data Field Explanation -| Field | Type | Description | -| ------------------- | ------ | ------------ | -| id | int | Set template ID | -| name | array |Set template name| -| bk_biz_id | int | Business ID | -| creator | string |Creator | -| modifier | string |Last modified by| -| create_time | string |Settling time | -| last_time | string |Update time | -| bk_supplier_account | string |Developer account number | +| Field | Type | Description | +| ------------------- | ------ | --------------------- | +| id | int | Cluster template ID | +| name | array | Cluster template name | +| bk_biz_id | int | Business ID | +| creator | string | Creator | +| modifier | string | Last modifier | +| create_time | string | Creation time | +| last_time | string | Update time | +| bk_supplier_account | string | Supplier account | \ No newline at end of file diff --git a/docs/apidoc/cc/en/delete_classification.md b/docs/apidoc/cc/en/delete_classification.md index fdf7c2548f..c2e0563473 100644 --- a/docs/apidoc/cc/en/delete_classification.md +++ b/docs/apidoc/cc/en/delete_classification.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Delete model classification by model classification ID +Delete a model category by model category ID. (Permission: Model category deletion permission) ### Request Parameters @@ -8,52 +8,59 @@ Delete model classification by model classification ID #### Interface Parameters -| Field| Type | Required | Description | -|-------|-------------|--------|----------------------------------| -| delete | object |yes | Delete| +| Field | Type | Required | Description | +| ----- | ---- | -------- | ----------------------- | +| id | int | Yes | Category data record ID | -#### delete -| Field | Type | Required | Description | -|---------------------|-------------|--------|----------------------------------| -|id | int | yes | Classification data record ID | +**Note** Can only delete an empty model category. Deletion will fail if the category has models. - -### Request Parameters Example +### Request Parameter Example ```python - { "bk_app_code": "esb_test", "bk_app_secret": "xxx", "bk_username": "xxx", "bk_token": "xxx", - "delete":{ - "id" : 0 - } + "id": 13 } ``` +### Response Example -### Return Result Example +#### Deletion Successful ```python - { "result": true, "code": 0, - "message": "", + "message": "success", "permission": null, "request_id": "e43da4ef221746868dc4c837d36f3807", "data": "success" } ``` -#### response - -| Name | Type | Description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | + +#### Deletion Failed (Category has models) + +```python +{ + "result": false, + "code": 1101029, + "data": null, + "message": "There is a model under the category, not allowed to delete", + "permission": null, + "request_id": "8c6b89e7f0cb4fad836f55d50f81f2c6" +} +``` + +#### Response + +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 represents success, >0 represents a failure error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned by the request | \ No newline at end of file diff --git a/docs/apidoc/cc/en/delete_cloud_area.md b/docs/apidoc/cc/en/delete_cloud_area.md index 55a8bdb8bb..d8d79077f2 100644 --- a/docs/apidoc/cc/en/delete_cloud_area.md +++ b/docs/apidoc/cc/en/delete_cloud_area.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Delete a cloud area based on the cloud area ID +Delete a control area based on the control area ID. (Permission: Control area deletion permission) ### Request Parameters @@ -8,14 +8,13 @@ Delete a cloud area based on the cloud area ID #### Interface Parameters -| Field | Type | Required | Description | -|----------------------|------------|--------|-------------| -| bk_cloud_id | int | yes | Cloud area ID | +| Field | Type | Required | Description | +| ----------- | ---- | -------- | --------------- | +| bk_cloud_id | int | Yes | Control area ID | +### Request Parameter Example -### Request Parameters Example - -``` json +```json { "bk_app_code": "esb_test", "bk_app_secret": "xxx", @@ -25,8 +24,7 @@ Delete a cloud area based on the cloud area ID } ``` -### Return Result Example - +### Response Example ```json { @@ -37,15 +35,15 @@ Delete a cloud area based on the cloud area ID "request_id": "e43da4ef221746868dc4c837d36f3807", "data": "success" } - ``` -#### response - -| Name | Type | Description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | + +#### Response + +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 represents success, >0 represents a failure error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned by the request | \ No newline at end of file diff --git a/docs/apidoc/cc/en/delete_cloud_host_from_biz.md b/docs/apidoc/cc/en/delete_cloud_host_from_biz.md index 7806c71410..2c782057b1 100644 --- a/docs/apidoc/cc/en/delete_cloud_host_from_biz.md +++ b/docs/apidoc/cc/en/delete_cloud_host_from_biz.md @@ -1,6 +1,6 @@ -### Function description +### Function Description -delete cloud host from biz idle set (cloud host management dedicated interface, version: v3.10.19+, permission: edit business host) +Delete cloud hosts from the idle machine cluster of a business (Dedicated interface for cloud host management, Version: v3.10.19+, Permission: Business host editing permission) ### Request Parameters @@ -8,12 +8,14 @@ delete cloud host from biz idle set (cloud host management dedicated interface, #### Interface Parameters -| field | type | mandatory | description | -|-------------|-----------|-----------|---------------------------------------------------------------------------------------------------------------------| -| bk_biz_id | int | yes | business id | -| bk_host_ids | array | yes | to be deleted cloud host ids, array length is limited to 200, these hosts can only succeed or fail at the same time | +| Field | Type | Required | Description | +| ----------- | ----- | -------- | ------------------------------------------------------------ | +| bk_biz_id | int | Yes | Business ID | +| bk_host_ids | array | Yes | Array of cloud host IDs to be deleted. The array length is at most 200, and a batch of hosts can only succeed or fail at the same time | -### Request Parameters Example +**Note: This interface can only delete cloud hosts. Filling in the IDs of other ordinary hosts will result in an error that the host does not exist. The bk_cloud_host_identifier field in the properties of a cloud host is true, while for other ordinary hosts, it is false. Cloud hosts can be added using cloud host-related interfaces such as (add_cloud_host_to_biz Add cloud hosts to the business's idle machine module).** + +### Request Parameter Example ```json { @@ -29,13 +31,14 @@ delete cloud host from biz idle set (cloud host management dedicated interface, } ``` -### Return Result Example +### Response Example ```json { "result": true, "code": 0, - "message": "", + "data": null, + "message": "success", "permission": null, "request_id": "e43da4ef221746868dc4c837d36f3807" } @@ -45,10 +48,10 @@ delete cloud host from biz idle set (cloud host management dedicated interface, #### response -| name | type | description | -|------------|--------|-------------------------------------------------------------------------------------------| -| result | bool | Whether the request was successful or not. true:request successful; false request failed. | -| code | int | The error code. 0 means success, >0 means failure error. | -| message | string | The error message returned by the failed request. | -| permission | object | Permission information | -| request_id | string | Request chain id | \ No newline at end of file +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 represents success, >0 represents a failure error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | \ No newline at end of file diff --git a/docs/apidoc/cc/en/delete_dynamic_group.md b/docs/apidoc/cc/en/delete_dynamic_group.md index 65404764a1..4ba4546e4e 100644 --- a/docs/apidoc/cc/en/delete_dynamic_group.md +++ b/docs/apidoc/cc/en/delete_dynamic_group.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Delete dynamic grouping (V3.9.6) +Delete a dynamic group (Version: v3.9.6, Permission: Dynamic group deletion permission) ### Request Parameters @@ -8,12 +8,12 @@ Delete dynamic grouping (V3.9.6) #### Interface Parameters -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_biz_id | int | yes | Business ID | -| id | string | yes | Dynamic grouping pk ID| +| Field | Type | Required | Description | +| --------- | ------ | -------- | ---------------------------- | +| bk_biz_id | int | Yes | Business ID | +| id | string | Yes | Dynamic group primary key ID | -### Request Parameters Example +### Request Parameter Example ```json { @@ -26,25 +26,26 @@ Delete dynamic grouping (V3.9.6) } ``` -### Return Result Example +### Response Example ```json { "result": true, "code": 0, - "message": "", + "message": "success", "permission": null, "request_id": "e43da4ef221746868dc4c837d36f3807", - "data": {} + "data": null } ``` -#### response - -| Name | Type | Description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | \ No newline at end of file + +#### Response + +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 represents success, >0 represents a failure error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned by the request | \ No newline at end of file diff --git a/docs/apidoc/cc/en/delete_host_lock.md b/docs/apidoc/cc/en/delete_host_lock.md index 595fef119f..f4acc6dd05 100644 --- a/docs/apidoc/cc/en/delete_host_lock.md +++ b/docs/apidoc/cc/en/delete_host_lock.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Remove host lock from host ID list (v3.8.6) +Delete host locks based on a list of host IDs (v3.8.6, Permission: Business host editing permission) ### Request Parameters @@ -8,12 +8,11 @@ Remove host lock from host ID list (v3.8.6) #### Interface Parameters -| Field | Type | Required | Description | -|---------------------|-------------|--------|----------------------------------| -|id_list| int array| yes | Host ID list| +| Field | Type | Required | Description | +| ------- | --------- | -------- | ---------------- | +| id_list | int array | Yes | List of host IDs | - -### Request Parameters Example +### Request Parameter Example ```python { @@ -25,10 +24,9 @@ Remove host lock from host ID list (v3.8.6) } ``` -### Return Result Example +### Response Example ```python - { "result": true, "code": 0, @@ -39,13 +37,13 @@ Remove host lock from host ID list (v3.8.6) } ``` -#### response +#### Response -| Name | Type | Description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 represents success, >0 represents a failure error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned by the request | \ No newline at end of file diff --git a/docs/apidoc/cc/en/delete_inst.md b/docs/apidoc/cc/en/delete_inst.md index 71e0cb467d..17eb5860ae 100644 --- a/docs/apidoc/cc/en/delete_inst.md +++ b/docs/apidoc/cc/en/delete_inst.md @@ -1,8 +1,8 @@ -### Functional description +### Function Description -Specify model ID and instance iddelete object instances under the specified model +Delete object instances under a specified model based on model ID and instance ID (Permission: Model instance deletion permission) -- This interface only applies to custom hierarchical models and generic model instances, not to business, set, module, host and other model instances +- This interface is only applicable to custom hierarchy models and general model instances, not applicable to business, cluster, module, host, and other model instances. ### Request Parameters @@ -10,55 +10,47 @@ Specify model ID and instance iddelete object instances under the specified mode #### Interface Parameters -| Field | Type | Required | Description | -|---------------------|-------------|--------|---------------------------------- | -| bk_obj_id | string | yes | Model ID| -| bk_inst_id | int | yes | Instance ID | -| bk_biz_id | int | no | Business ID, which must be transferred when deleting a user-defined mainline level model instance| +| Field | Type | Required | Description | +| ---------- | ------ | -------- | ------------------------------------------------------------ | +| bk_obj_id | string | Yes | Model ID | +| bk_inst_id | int | Yes | Instance ID | +| bk_biz_id | int | No | Business ID, required when deleting instances of custom mainline hierarchy models | - Note: If the operation is a user-defined mainline hierarchy model instance and permission Center is used, for the version with CMDB less than 3.9, the metadata parameter containing the service id of the instance needs to be transferred. Otherwise, the permission Center authentication will fail. The format is -"metadata": { - "label": { - "bk_biz_id": "64" - } -} +Note: When operating on instances of custom mainline hierarchy models and using permission center, for CMDB versions less than 3.9, you also need to pass the metadata parameter containing the business ID of the instance, otherwise permission center authentication will fail. The format is "metadata": { "label": { "bk_biz_id": "64" } } -### Request Parameters Example +### Request Parameter Example ```json - { "bk_app_code": "esb_test", "bk_app_secret": "xxx", "bk_username": "xxx", "bk_token": "xxx", "bk_obj_id": "test", - "bk_inst_id": 0 + "bk_inst_id": 44 } ``` - -### Return Result Example +### Response Example ```json - { "result": true, "code": 0, - "message": "", + "message": "success", "permission": null, "request_id": "e43da4ef221746868dc4c837d36f3807", - "data": "success" + "data": null } ``` -#### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request succeeded or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | +#### Response +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 represents success, >0 represents a failure error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned by the request | \ No newline at end of file diff --git a/docs/apidoc/cc/en/delete_instance_association.md b/docs/apidoc/cc/en/delete_instance_association.md index 491c23388a..8e3c43a2aa 100644 --- a/docs/apidoc/cc/en/delete_instance_association.md +++ b/docs/apidoc/cc/en/delete_instance_association.md @@ -1,20 +1,21 @@ -### Functional description +### Function Description -According to the unique identity id of the model instance Association relationship. +Delete the relationship between model instances based on the unique identity ID of the model instance relationship. (Permission: Editing permission of source model instance and target model instance) ### Request Parameters {{ common_args_desc }} #### Interface Parameters -| Field | Type | Required | Description | -|----------------------|------------|--------|-----------------------------| -| id | int | yes | Unique identity id of the model instance Association | -| bk_obj_id | string | yes | Source or target model id of the model instance Association (v3.10+)| -### Request Parameters Example +| Field | Type | Required | Description | +| --------- | ------ | -------- | ------------------------------------------------------------ | +| id | int | Yes | Unique identity ID of the model instance relationship | +| bk_obj_id | string | Yes | Source or target model ID of the model instance relationship (v3.10+) | -``` json +### Request Parameter Example + +```json { "bk_app_code": "esb_test", "bk_app_secret": "xxx", @@ -25,30 +26,28 @@ According to the unique identity id of the model instance Association relationsh } ``` -### Return Result Example +### Response Example ```json { "result": true, "code": 0, - "message": "", + "message": "success", "permission": null, "request_id": "e43da4ef221746868dc4c837d36f3807", - "data": "success" + "data": null } - ``` ### Return Result Parameters Description #### response -| Field | Type | Description | -|------------|----------|--------------| -| result | bool |Whether the request was successful or not. True: request succeeded;false request failed| -| code | int |Wrong code. 0 indicates success,>0 indicates failure error| -| message | string |Error message returned by request failure| -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request| - +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 represents success, >0 represents a failure error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned by the request | \ No newline at end of file diff --git a/docs/apidoc/cc/en/delete_object.md b/docs/apidoc/cc/en/delete_object.md index 02f08e1c02..d7dba68ccd 100644 --- a/docs/apidoc/cc/en/delete_object.md +++ b/docs/apidoc/cc/en/delete_object.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Delete model based on model id +Delete a model based on the model ID (Permission: Model deletion permission) ### Request Parameters @@ -8,15 +8,13 @@ Delete model based on model id #### Interface Parameters -| Field| Type | Required | Description | -|-------|-------------|--------|-----------------------| -| id | int | no | ID of the data record being deleted| +| Field | Type | Required | Description | +| ----- | ---- | -------- | ----------------------------------- | +| id | int | Yes | ID of the data record to be deleted | - -### Request Parameters Example +### Request Parameter Example ```python - { "bk_app_code": "esb_test", "bk_app_secret": "xxx", @@ -26,28 +24,26 @@ Delete model based on model id } ``` - -### Return Result Example +### Response Example ```python - { "result": true, "code": 0, - "message": "", + "message": "success", "permission": null, "request_id": "e43da4ef221746868dc4c837d36f3807", "data": "success" } ``` -#### response +#### Response -| Name | Type | Description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 represents success, >0 represents a failure error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned by the request | \ No newline at end of file diff --git a/docs/apidoc/cc/en/delete_object_attribute.md b/docs/apidoc/cc/en/delete_object_attribute.md index 0fb2766dc3..85f0818410 100644 --- a/docs/apidoc/cc/en/delete_object_attribute.md +++ b/docs/apidoc/cc/en/delete_object_attribute.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Delete the object model attribute. You can delete the business user-defined field +Delete object model attribute, which can include deleting business custom fields (Permission: Model editing permission) ### Request Parameters @@ -8,15 +8,13 @@ Delete the object model attribute. You can delete the business user-defined fiel #### Interface Parameters -| Field| Type | Required | Description | -|-------|-------------|--------|-------------------------------| -| id | int | no | The unique identification ID of the deleted data record| +| Field | Type | Required | Description | +| ----- | ---- | -------- | ----------------------------------------------------- | +| id | int | Yes | Unique identifier ID of the data record to be deleted | - -### Request Parameters Example +### Request Parameter Example ```python - { "bk_app_code": "esb_test", "bk_app_secret": "xxx", @@ -26,28 +24,26 @@ Delete the object model attribute. You can delete the business user-defined fiel } ``` - -### Return Result Example +### Response Example ```python - { "result": true, "code": 0, - "message": "", + "message": "success", "permission": null, "request_id": "e43da4ef221746868dc4c837d36f3807", "data": "success" } ``` -#### response +#### Response -| Name | Type | Description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request succeeded or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 represents success, >0 represents a failure error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned by the request | \ No newline at end of file diff --git a/docs/apidoc/cc/en/delete_proc_template.md b/docs/apidoc/cc/en/delete_proc_template.md index 4194dd1a90..defc938ebd 100644 --- a/docs/apidoc/cc/en/delete_proc_template.md +++ b/docs/apidoc/cc/en/delete_proc_template.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Delete a process template from the process template ID list +Delete process templates based on a list of process template IDs (Permission: Service template editing permission) ### Request Parameters @@ -8,12 +8,12 @@ Delete a process template from the process template ID list #### Interface Parameters -| Field | Type | Required | Description | -|----------------------|------------|--------|-----------------------| -| process_templates | array | Yes | process template ids, the max length is 500 | -| bk_biz_id | int | yes | Business ID | +| Field | Type | Required | Description | +| ----------------- | ----- | -------- | --------------------------------------------------------- | +| bk_biz_id | int | Yes | Business ID | +| process_templates | array | Yes | List of process template IDs, with a maximum value of 500 | -### Request Parameters Example +### Request Parameter Example ```python { @@ -26,7 +26,7 @@ Delete a process template from the process template ID list } ``` -### Return Result Example +### Response Example ```python { @@ -43,11 +43,11 @@ Delete a process template from the process template ID list #### response -| Name| Type| Description| -|---|---|---| -| result | bool |Whether the request succeeded or not. True: request succeeded;false request failed| -| code | int |Wrong code. 0 indicates success,>0 indicates failure error| -| message | string |Error message returned by request failure| -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 represents success, >0 represents a failure error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned by the request | \ No newline at end of file diff --git a/docs/apidoc/cc/en/delete_process_instance.md b/docs/apidoc/cc/en/delete_process_instance.md index 1c8477868a..69849615d7 100644 --- a/docs/apidoc/cc/en/delete_process_instance.md +++ b/docs/apidoc/cc/en/delete_process_instance.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Delete a process instance from the process instance ID list +Delete process instances based on a list of process instance IDs (Permission: Service instance editing permission) ### Request Parameters @@ -8,12 +8,12 @@ Delete a process instance from the process instance ID list #### Interface Parameters -| Field | Type | Required | Description | -|----------------------|------------|--------|-----------------------| -| process_instance_ids | int | Yes | process instance ids, the max length is 500 | -| bk_biz_id | int | yes | Business ID | +| Field | Type | Required | Description | +| -------------------- | ---- | -------- | --------------------------------------------------------- | +| process_instance_ids | int | Yes | List of process instance IDs, with a maximum value of 500 | +| bk_biz_id | int | Yes | Business ID | -### Request Parameters Example +### Request Parameter Example ```python { @@ -26,7 +26,7 @@ Delete a process instance from the process instance ID list } ``` -### Return Result Example +### Response Example ```python { @@ -43,12 +43,11 @@ Delete a process instance from the process instance ID list #### response -| Name| Type| Description| -|---|---|---| -| result | bool |Whether the request was successful or not. True: request succeeded;false request failed| -| code | int |Wrong code. 0 indicates success,>0 indicates failure error| -| message | string |Error message returned by request failure| -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request| - +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 represents success, >0 represents a failure error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned by the request | \ No newline at end of file diff --git a/docs/apidoc/cc/en/delete_related_inst_asso.md b/docs/apidoc/cc/en/delete_related_inst_asso.md index 917f728de1..b9893d55fc 100644 --- a/docs/apidoc/cc/en/delete_related_inst_asso.md +++ b/docs/apidoc/cc/en/delete_related_inst_asso.md @@ -1,20 +1,19 @@ -### Functional description +### Function Description - Deletes an Association between instances based on the ID of the instance Association relationship. (Effective Version: 3.5.40) +Delete the association between instances based on the ID of the instance relationship (Version: v3.5.40, Permission: Model instance deletion permission) ### Request Parameters {{ common_args_desc }} - #### Interface Parameters -| Field| Type | Required| Description | -| :--- | :------- | :--- | :--------------- | -| id | int |yes | ID of the instance Association (note: Identity ID of non-model instance), up to 500| -| bk_obj_id | string |yes| The model unique name of the relationship source model| +| Field | Type | Required | Description | +| :-------- | :----- | :------- | :----------------------------------------------------------- | +| id | int | Yes | ID of the instance relationship (Note: not the identity ID of the model instance), up to 500 | +| bk_obj_id | string | Yes | The unique name of the source model of the relationship | -### Request Parameters Example +### Request Parameter Example ```json { @@ -27,7 +26,7 @@ } ``` -### Return Result Example +### Response Example ```json { @@ -36,17 +35,17 @@ "message": "success", "permission": null, "request_id": "e43da4ef221746868dc4c837d36f3807", - "data": null + "data": 2 } ``` ### Return Result Parameters Description -| Name| Type| Description| -|---|---|---| -| result | bool |Whether the request succeeded or not. True: request succeeded;false request failed| -| code | int |Wrong code. 0 indicates success,>0 indicates failure error| -| message | string |Error message returned by request failure| -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request| \ No newline at end of file +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 represents success, >0 represents a failure error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | int | Number of deleted associations | \ No newline at end of file diff --git a/docs/apidoc/cc/en/delete_service_category.md b/docs/apidoc/cc/en/delete_service_category.md index c5e31ae352..a61ebcdea7 100644 --- a/docs/apidoc/cc/en/delete_service_category.md +++ b/docs/apidoc/cc/en/delete_service_category.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Delete service class based on service class ID +Delete service categories based on service category IDs (Permission: Service category deletion permission) ### Request Parameters @@ -8,12 +8,12 @@ Delete service class based on service class ID #### Interface Parameters -| Field | Type | Required | Description | -|----------------------|------------|--------|-----------------------| -| id | int |yes | Service class ID| -| bk_biz_id | int | yes | Business ID | +| Field | Type | Required | Description | +| --------- | ---- | -------- | ------------------- | +| id | int | Yes | Service category ID | +| bk_biz_id | int | Yes | Business ID | -### Request Parameters Example +### Request Parameter Example ```python { @@ -26,7 +26,7 @@ Delete service class based on service class ID } ``` -### Return Result Example +### Response Example ```python { @@ -43,11 +43,11 @@ Delete service class based on service class ID #### response -| Name| Type| Description| -|---|---|---| -| result | bool |Whether the request was successful or not. True: request succeeded;false request failed| -| code | int |Wrong code. 0 indicates success,>0 indicates failure error| -| message | string |Error message returned by request failure| -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request| +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 represents success, >0 represents a failure error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned by the request | \ No newline at end of file diff --git a/docs/apidoc/cc/en/delete_service_instance.md b/docs/apidoc/cc/en/delete_service_instance.md index 4f8a4d0c22..2f728e422a 100644 --- a/docs/apidoc/cc/en/delete_service_instance.md +++ b/docs/apidoc/cc/en/delete_service_instance.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Batch delete service instances based on service instance ID list +Batch delete service instances based on service instance IDs (Permission: Service instance deletion permission) ### Request Parameters @@ -8,14 +8,12 @@ Batch delete service instances based on service instance ID list #### Interface Parameters -| Field | Type | Required | Description | -|----------------------|------------|--------|-----------------------| -| service_instance_ids | array |yes | Service instance ID list| -| bk_biz_id | int | yes | Business ID | -| service_instance_ids | array | Yes | Service Instance IDs, the max length is 500 | +| Field | Type | Required | Description | +| -------------------- | ----- | -------- | ---------------------------------------------- | +| service_instance_ids | array | Yes | Service instance ID list, maximum value is 500 | +| bk_biz_id | int | Yes | Business ID | - -### Request Parameters Example +### Request Parameter Example ```python { @@ -28,7 +26,7 @@ Batch delete service instances based on service instance ID list } ``` -### Return Result Example +### Response Example ```python { @@ -45,11 +43,11 @@ Batch delete service instances based on service instance ID list #### response -| Name| Type| Description| -|---|---|---| -| result | bool |Whether the request was successful or not. True: request succeeded;false request failed| -| code | int |Wrong code. 0 indicates success,>0 indicates failure error| -| message | string |Error message returned by request failure| -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request| +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 represents success, >0 represents a failure error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned by the request | \ No newline at end of file diff --git a/docs/apidoc/cc/en/delete_service_template.md b/docs/apidoc/cc/en/delete_service_template.md index c212daaaff..24aa5f9f79 100644 --- a/docs/apidoc/cc/en/delete_service_template.md +++ b/docs/apidoc/cc/en/delete_service_template.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Delete service template based on service template ID +Delete service template based on service template ID (Permission: Service template deletion permission) ### Request Parameters @@ -8,12 +8,12 @@ Delete service template based on service template ID #### Interface Parameters -| Field | Type | Required | Description | -|----------------------|------------|--------|-----------------------| -| service_template_id | int |yes | Service template ID| -| bk_biz_id | int | yes | Business ID | +| Field | Type | Required | Description | +| ------------------- | ---- | -------- | ------------------- | +| service_template_id | int | Yes | Service template ID | +| bk_biz_id | int | Yes | Business ID | -### Request Parameters Example +### Request Parameter Example ```python { @@ -26,16 +26,16 @@ Delete service template based on service template ID } ``` -### Return Result Example +### Response Example ```python { - "result": false, - "code": 1199056, - "message": "delete service template failed", - "permission": null, - "request_id": "e43da4ef221746868dc4c837d36f3807", - "data": null + "result": true, + "code": 0, + "data": null, + "message": "success", + "permission": null, + "request_id": "b78feeebd55b4265b463200ab966f506" } ``` @@ -43,11 +43,11 @@ Delete service template based on service template ID #### response -| Name| Type| Description| -|---|---|---| -| result | bool |Whether the request was successful or not. True: request succeeded;false request failed| -| code | int |Wrong code. 0 indicates success,>0 indicates failure error| -| message | string |Error message returned by request failure| -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request| +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 represents success, >0 represents a failure error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned by the request | \ No newline at end of file diff --git a/docs/apidoc/cc/en/delete_set_template.md b/docs/apidoc/cc/en/delete_set_template.md index 9f48ab1c52..eea4adee7c 100644 --- a/docs/apidoc/cc/en/delete_set_template.md +++ b/docs/apidoc/cc/en/delete_set_template.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Delete the set template under the specified service according to the service ID and the set template ID list +Delete specified business's cluster templates based on business ID and cluster template ID list (Permission: Cluster template deletion permission) ### Request Parameters @@ -8,13 +8,12 @@ Delete the set template under the specified service according to the service ID #### Interface Parameters -| Field | Type | Required| Description | -| -------------------- | ------ | ---- | ------------ | -| bk_biz_id | int | yes | Business ID | -| set_template_ids | array |yes | set template ID list | +| Field | Type | Required | Description | +| ---------------- | ----- | -------- | ------------------------ | +| bk_biz_id | int | Yes | Business ID | +| set_template_ids | array | Yes | Cluster template ID list | - -### Request Parameters Example +### Request Parameter Example ```json { @@ -27,7 +26,7 @@ Delete the set template under the specified service according to the service ID } ``` -### Return Result Example +### Response Example ```json { @@ -44,11 +43,11 @@ Delete the set template under the specified service according to the service ID #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 represents success, >0 represents a failure error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned by the request | \ No newline at end of file diff --git a/docs/apidoc/cc/en/execute_dynamic_group.md b/docs/apidoc/cc/en/execute_dynamic_group.md index 1bdcd0b009..e0447c6b83 100644 --- a/docs/apidoc/cc/en/execute_dynamic_group.md +++ b/docs/apidoc/cc/en/execute_dynamic_group.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Query to obtain data according to specified dynamic grouping rules (V3.9.6) +Query and retrieve data based on the specified dynamic grouping rule (Version: v3.9.6, Permission: Business access permission) ### Request Parameters @@ -8,23 +8,23 @@ Query to obtain data according to specified dynamic grouping rules (V3.9.6) #### Interface Parameters -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_biz_id | int | yes | Business ID | -| id | string | yes | Dynamic grouping pk ID| -| fields | array | yes | Host attribute list, which controls the fields in the host that returns the result, can speed up interface requests and reduce network traffic transmission. If the target resource does not have the specified field, this field will be ignored| -| disable_counter | bool |no | Return total number of records; default| -| page | object | yes | Paging settings| +| Field | Type | Required | Description | +| --------------- | ------ | -------- | ------------------------------------------------------------ | +| bk_biz_id | int | Yes | Business ID | +| id | string | Yes | Dynamic grouping primary key ID | +| fields | array | Yes | Host attribute list, controls which fields are returned in the host, accelerates interface requests and reduces network traffic transmission. If the target resource does not have the specified fields, the field will be ignored | +| disable_counter | bool | No | Whether to return the total number of records, default is to return | +| page | object | Yes | Pagination settings | #### page -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| start | int | yes | Record start position| -| limit | int | yes | Limit number of bars per page, maximum 200| -| sort | string | no | Retrieve sort, by default by creation time| +| Field | Type | Required | Description | +| ----- | ------ | -------- | ------------------------------------------------------ | +| start | int | Yes | Record start position | +| limit | int | Yes | Number of records per page, maximum is 200 | +| sort | string | No | Retrieval sorting, default is to sort by creation time | -### Request Parameters Example +### Request Parameter Example ```json { @@ -48,55 +48,111 @@ Query to obtain data according to specified dynamic grouping rules (V3.9.6) } ``` -### Return Result Example +### Response Example ```json { "result": true, "code": 0, - "message": "", + "message": "success", "permission": null, "request_id": "e43da4ef221746868dc4c837d36f3807", "data": { - "count": 1, - "info": [ - { - "bk_obj_id": "host", - "bk_host_id": 1, - "bk_host_name": "nginx-1", - "bk_host_innerip": "10.0.0.1", - "bk_cloud_id": 0 - } - ] + "count": 1, + "info": [ + { + "bk_cloud_id": 0, + "bk_host_id": 2, + "bk_host_innerip": "127.0.0.1", + "bk_host_name": "host12" + }, + { + "bk_cloud_id": 0, + "bk_host_id": 9, + "bk_host_innerip": "127.0.0.2", + "bk_host_name": "host111" + } + ] } } ``` -### Return result parameter +### Response Result Parameters Description #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 represents success, >0 represents a failure error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned by the request | #### data -| Field | Type | Description | -|-----------|-----------|-----------| -| count | int |The total number of records that can be matched by the current rule (used for pre-paging by the caller, the actual number of returns from a single request and whether all data are pulled are subject to the number of JSON Array parsing)| -| info | array | Dict array, host actual data, returns host own attribute information when dynamic grouping is host query, and returns set information when dynamic grouping is set query| - -#### data.info -| Name| Type| Description| -| ---------------- | ------ | ---------------| -| bk_obj_id | string |Model id| -| bk_host_name | string |Host name | -| bk_host_innerip | string |Intranet IP | -| bk_host_id | int | Host ID | -| bk_cloud_id | int | Cloud area | \ No newline at end of file +| Field | Type | Description | +| ----- | ----- | ------------------------------------------------------------ | +| count | int | Total number of records that the current rule can match (used for callers to pre-page, the actual number of records returned in a single request and whether the data is all pulled is based on the JSON Array parsing quantity) | +| info | array | Dict array, actual data of hosts, returns host's own attribute information when dynamic grouping is host query, returns set information when dynamic grouping is set query | + +#### data.info -- Group target is host + +| Field | Type | Description | +| -------------------- | ------ | ------------------------------------ | +| bk_host_name | string | Host name | +| bk_host_innerip | string | Inner IP | +| bk_host_id | int | Host ID | +| bk_cloud_id | int | Control area | +| import_from | string | Host import source, 3 for API import | +| bk_asset_id | string | Fixed asset number | +| bk_cloud_inst_id | string | Cloud host instance ID | +| bk_cloud_vendor | string | Cloud vendor | +| bk_cloud_host_status | string | Cloud host status | +| bk_comment | string | Comment | +| bk_cpu | int | CPU logical cores | +| bk_cpu_architecture | string | CPU architecture | +| bk_cpu_module | string | CPU model | +| bk_disk | int | Disk capacity (GB) | +| bk_host_outerip | string | Host outer IP | +| bk_host_innerip_v6 | string | Host inner IPv6 | +| bk_host_outerip_v6 | string | Host outer IPv6 | +| bk_isp_name | string | ISP name | +| bk_mac | string | Host inner MAC address | +| bk_mem | int | Host memory capacity (MB) | +| bk_os_bit | string | Operating system bit number | +| bk_os_name | string | Operating system name | +| bk_os_type | string | Operating system type | +| bk_os_version | string | Operating system version | +| bk_outer_mac | string | Host outer MAC address | +| bk_province_name | string | Province name | +| bk_service_term | int | Warranty period | +| bk_sla | string | SLA level | +| bk_sn | string | Device SN | +| bk_state | string | Current status | +| bk_state_name | string | Country | +| operator | string | Main maintainer | +| bk_bak_operator | string | Backup maintainer | + +#### data.info -- Group target is set + +| Field | Type | Description | +| -------------------- | ------ | ----------------------------------------------------------- | +| bk_set_name | string | Set name | +| default | int | 0-ordinary set, 1-built-in module set, default is 0 | +| bk_biz_id | int | Business id | +| bk_capacity | int | Design capacity | +| bk_parent_id | int | Parent node ID | +| bk_set_id | int | Set id | +| bk_service_status | string | Service status: 1/2 (1: open, 2: closed) | +| bk_set_desc | string | Set description | +| bk_set_env | string | Environment type: 1/2/3 (1: test, 2: experience, 3: formal) | +| create_time | string | Creation time | +| last_time | string | Update time | +| bk_supplier_account | string | Developer account | +| description | string | Data description | +| set_template_version | array | Set template's current version | +| set_template_id | int | Set template ID | + +**Note: The return value here only explains the system's built-in attribute fields, and the rest of the return values depend on the user's self-defined attribute fields** \ No newline at end of file diff --git a/docs/apidoc/cc/en/find_audit_by_id.md b/docs/apidoc/cc/en/find_audit_by_id.md index 8ef555593a..ac4b83bc5d 100644 --- a/docs/apidoc/cc/en/find_audit_by_id.md +++ b/docs/apidoc/cc/en/find_audit_by_id.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description - Get details based on audit ID +Get detailed information based on the audit ID (Permission: Operation audit query permission) ### Request Parameters @@ -8,11 +8,11 @@ #### Interface Parameters -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| id | array | yes | Audit id array, limited to 200 at a time | +| Field | Type | Required | Description | +| ----- | ----- | -------- | ----------------------------------- | +| id | array | Yes | Audit ID array, up to 200 at a time | -### Request Parameters Example +### Request Parameter Example ```python { @@ -22,10 +22,9 @@ "bk_token": "xxx", "id":[95,118] } - ``` -### Return Result Example +### Response Example ```json { @@ -161,46 +160,48 @@ } ``` -### Return Result Parameters Description +### Response Result Parameters Description #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request succeeded or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 represents success, >0 represents a failure error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned by the request | #### data -| Field | Type | Description | -|-----------|-----------|--------------| -| id | int | Audit ID | -| audit_type | string | Operational audit type | -| bk_supplier_account | string | Developer account number | -| user | string | Operator| -| resource_type | string | Resource type | -| action | string | Operation type| -| operate_from | string | Source platform | -| operation_detail | object | Operational details | -| operation_time | string | Operating time| -| bk_biz_id | int | Business ID | -| resource_id | int | Resource id| -| resource_name | string | Resource Name | -| rid | string | Request chain id | +| Field | Type | Description | +| ------------------- | ------ | -------------------- | +| id | int | Audit ID | +| audit_type | string | Operation audit type | +| bk_supplier_account | string | Developer account | +| user | string | Operator | +| resource_type | string | Resource type | +| action | string | Operation type | +| operate_from | string | Source platform | +| operation_detail | object | Operation details | +| operation_time | string | Operation time | +| bk_biz_id | int | Business id | +| resource_id | int | Resource id | +| resource_name | string | Resource name | +| rid | string | Request chain ID | #### operation_detail -| Field | Type | Description | -|-----------|-----------|--------------| -| details | object | Detail data | -| bk_obj_id | string | Model type | + +| Field | Type | Description | +| --------- | ------ | ------------- | +| details | object | Detailed data | +| bk_obj_id | string | Model type | #### details -| Field | Type | Description | -|-----------|-----------|--------------| -| pre_data | object | Prior data | -| cur_data | object | Current data | -| update_fields | object | Updated field | + +| Field | Type | Description | +| ------------- | ------ | -------------- | +| pre_data | object | Previous data | +| cur_data | object | Current data | +| update_fields | object | Updated fields | \ No newline at end of file diff --git a/docs/apidoc/cc/en/find_biz_tree_brief_info.md b/docs/apidoc/cc/en/find_biz_tree_brief_info.md index 3ce7946f9a..1fe2dfdcb5 100644 --- a/docs/apidoc/cc/en/find_biz_tree_brief_info.md +++ b/docs/apidoc/cc/en/find_biz_tree_brief_info.md @@ -1,7 +1,8 @@ -### Functional description -Query the brief information of the service topo tree, which only contains set , module and host information. (v3.9.13) +### Function Description -- This interface is intended for use by GSEKit and is hidden in the ESB documentation +Query the brief information of the business topology tree, including clusters, modules, and hosts. (v3.9.13) + +- This interface is exclusively for GSEKit use and is hidden in the ESB document. ### Request Parameters @@ -9,18 +10,21 @@ Query the brief information of the service topo tree, which only contains set , #### Interface Parameters -|Field| Type| Required| Description| -|---|---|---|---| -|bk_biz_id| int64| yes | Business ID | -|set_fields| string array| yes | Controls which fields are in the set information that returns the result | -|module_fields| string array| yes | Controls which fields are in the module information that returns the result| -|host_fields| string array| yes | Controls which fields are in the host information that returns the result| - +| Field | Type | Required | Description | +| ------------- | ------------ | -------- | ------------------------------------------------------------ | +| bk_biz_id | int64 | Yes | Business ID | +| set_fields | string array | Yes | Control which fields are included in the cluster information | +| module_fields | string array | Yes | Control which fields are included in the module information | +| host_fields | string array | Yes | Control which fields are included in the host information | -### Request Parameters Example +### Request Parameter Example -``` json +```json { + "bk_app_code": "esb_test", + "bk_app_secret": "xxx", + "bk_username": "xxx", + "bk_token": "xxx", "bk_biz_id": 3, "set_fields": [ "bk_set_id", @@ -44,8 +48,9 @@ Query the brief information of the service topo tree, which only contains set , } ``` -### Return Result Example -``` json +### Response Example + +```json { "result": true, "code": 0, @@ -58,7 +63,7 @@ Query the brief information of the service topo tree, which only contains set , "bk_set_env": "3", "bk_platform": "sq", "bk_system": "android", - "bk_chn_name": "测试集群1", + "bk_chn_name": "Test Cluster 1", "bk_world_id": "35", "bk_service_status": "1" }, @@ -66,36 +71,36 @@ Query the brief information of the service topo tree, which only contains set , { "module": { "bk_module_id": 12, - "bk_module_name": "测试模块1" + "bk_module_name": "Test Module 1" }, "hosts": [ { "bk_host_id": 13, "bk_host_innerip": "127.0.0.1", - "bk_host_name": "测试主机1" + "bk_host_name": "Test Host 1" }, { "bk_host_id": 23, "bk_host_innerip": "127.0.0.1", - "bk_host_name": "测试主机2" + "bk_host_name": "Test Host 2" } ] }, { "module": { "bk_module_id": 14, - "bk_module_name": "测试模块2" + "bk_module_name": "Test Module 2" }, "hosts": [ { "bk_host_id": 15, "bk_host_innerip": "127.0.0.1", - "bk_host_name": "测试主机3" + "bk_host_name": "Test Host 3" }, { "bk_host_id": 24, "bk_host_innerip": "127.0.0.1", - "bk_host_name": "测试主机4" + "bk_host_name": "Test Host 4" } ] } @@ -103,4 +108,33 @@ Query the brief information of the service topo tree, which only contains set , } ] } -``` \ No newline at end of file +``` + +### Response Result Parameters Description + +#### response + +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 represents success, >0 represents a failure error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned by the request | + +#### data + +| Field | Type | Description | +| ------- | ------ | ------------------- | +| set | object | Cluster information | +| modules | array | Module list | + +#### data.modules + +| Field | Type | Description | +| ------ | ------ | ------------------ | +| module | object | Module information | +| hosts | array | Host list | + +**Note: The return value structure is briefly explained here. The specific fields returned for set, module, and host depend on the user-defined attribute fields.** \ No newline at end of file diff --git a/docs/apidoc/cc/en/find_brief_biz_topo_node_relation.md b/docs/apidoc/cc/en/find_brief_biz_topo_node_relation.md index d7a4988f73..99f70722a4 100644 --- a/docs/apidoc/cc/en/find_brief_biz_topo_node_relation.md +++ b/docs/apidoc/cc/en/find_brief_biz_topo_node_relation.md @@ -1,19 +1,13 @@ -### Functional description +### Function Description -This interface is used to query the concise relationship information of the upper and lower levels (models) directly associated with an instance of a certain level (model) in the business topology. (v3.10.1+) +This interface is used to query concise relationship information directly related to the upper and lower levels (models) of an instance in the business topology. (v3.10.1+) +If the business topology levels are from top to bottom: business, department (custom business level), cluster, module. Then: -If the business topology level is business, Department (user-defined business level), set and module from top to bottom. Then: - - -1. You can query the relationship information of the direct superior Department to which a set belongs upward; - - -2. The module relationship information directly associated with the set can be queried downward. - - -Conversely, you can not directly query the module relationship contained in a Department of a custom level instance through Department, because Department and module are not directly associated. +1. Upwards, you can query the relationship information of the directly superior **department** of a certain cluster. +2. Downwards, you can query the module relationship information directly associated with that cluster. +Conversely, you cannot directly query the relationship between a custom level instance **department** and the modules it contains, as departments and modules are not directly associated. ### Request Parameters @@ -21,24 +15,22 @@ Conversely, you can not directly query the module relationship contained in a De #### Interface Parameters -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| src_biz_obj | string |yes | In business hierarchy, the model ID of source hierarchy can be "biz," user-defined hierarchy model ID(bk_obj_id),"set," and "module." | -| src_ids | array |yes | List of instance IDs represented by src_biz_obj, with a list length in the range of [1200]| -| dest_biz_obj | string |yes | The business hierarchy model directly (immediately) associated with src_biz_obj. Where the business ("biz") As an exception, dest_biz_obj can be "biz" for any src_biz_obj. But the two are not allowed to be the same. | -| page | object |yes | Paging configuration information returned by queried data| - -#### Page field Description - -| Field| Type | Required| Description | -| ----- | ------ | ---- | --------------------- | -| start | int | yes | Record start position, starting from 0 | -| limit | int | yes | Limit bars per page, Max. 500| -| sort | string | Unavailable | This field is sorted by the identity ID of the associated (dest_biz_obj) by default in the interface. Please do not set this field| +| Field | Type | Required | Description | +| ------------ | ------ | -------- | ------------------------------------------------------------ | +| src_biz_obj | string | Yes | In the business level, the model ID of the source level, which can be "biz", the model ID of the custom level (bk_obj_id), "set", or "module". | +| src_ids | array | Yes | A list of instance IDs representing src_biz_obj, with a list length ranging from [1, 200]. | +| dest_biz_obj | string | Yes | The business level model directly (closely) related to src_biz_obj. For business ("biz"), any src_biz_obj's dest_biz_obj can be "biz". However, they cannot be the same. | +| page | object | Yes | Query the paging configuration information returned by the data | +#### Explanation of the page field +| Field | Type | Required | Description | +| ----- | ------ | -------------- | ------------------------------------------------------------ | +| start | int | Yes | Record starting position, starting from 0 | +| limit | int | Yes | Number of records per page, maximum 500 | +| sort | string | Not applicable | This field is set by default in the interface to sort by the ID of the associated (dest_biz_obj) identity. Do not set this field | -### Request Parameters Example +### Request Parameter Example ```json { @@ -56,7 +48,7 @@ Conversely, you can not directly query the module relationship contained in a De } ``` -### Return Result Example +### Response Example ```json { @@ -81,29 +73,28 @@ Conversely, you can not directly query the module relationship contained in a De } ``` -### Return Result Parameters Description +### Response Parameters Description #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request succeeded or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | - -#### Data description -| Field | Type | Description | -|-----------|------------|------------| -| bk_biz_id | int | The business ID to which this instance belongs | -| src_id | int | It is consistent with the ID list entered by the src_ids in the parameter. Represents the instance ID of the input query model| -| dest_id | int| The instance ID directly associated with the model corresponding to dest_biz_obj in the parameter and the instance corresponding to src_ids| +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 represents success, >0 represents a failure error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned by the request | -Note: +#### Explanation of data -1. If it is a downward query (query from the level to the lower level), it is judged that the method of paging and pulling data is that the returned data array list is empty. +| Field | Type | Description | +| --------- | ---- | ------------------------------------------------------------ | +| bk_biz_id | int | The business ID to which the instance belongs | +| src_id | int | Consistent with the ID list of the src_ids input in the parameter, representing the ID of the instance queried by the parameter | +| dest_id | int | Corresponding to the model of dest_biz_obj and the instance directly associated with src_ids | +Note: -2. In the case of an upward query (from a low level to a high level), the interface can return all query results at once, provided that the value of page.limit is>= the length of src_ids. +1. If it is a downward query (from higher level to lower level), the method to judge whether the data fetching is complete is that the data array list returned is empty. +2. If it is an upward query (from lower level to higher level), this interface can return all query results at once. The condition is that the value of page.limit must be >= the length of src_ids. \ No newline at end of file diff --git a/docs/apidoc/cc/en/find_host_biz_relations.md b/docs/apidoc/cc/en/find_host_biz_relations.md index 9233a477cd..018b5efdf3 100644 --- a/docs/apidoc/cc/en/find_host_biz_relations.md +++ b/docs/apidoc/cc/en/find_host_biz_relations.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Inquire service related information accord to host ID +Search for business-related information based on host ID. ### Request Parameters @@ -8,12 +8,12 @@ Inquire service related information accord to host ID #### Interface Parameters -| Field | Type | Required | Description | -|---------------------|------------|--------|-----------------------------| -| bk_host_id | array | yes | Host ID array, ID number can not exceed 500| -| bk_biz_id | int | no | Business ID | +| Field | Type | Required | Description | +| ---------- | ----- | -------- | ------------------------------------------------------ | +| bk_host_id | array | Yes | Array of host IDs, the number of IDs cannot exceed 500 | +| bk_biz_id | int | No | Business ID | -### Request Parameters Example +### Request Parameter Example ```json { @@ -29,7 +29,7 @@ Inquire service related information accord to host ID } ``` -### Return Result Example +### Response Example ```json { @@ -71,25 +71,25 @@ Inquire service related information accord to host ID } ``` -### Return Result Parameters Description -#### response +### Response Parameters Description -| Name | Type | Description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | +#### response -Data field Description: +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 represents success, >0 represents a failure error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned by the request | -| Name| Type| Description| -|---|---|---| -| bk_biz_id| int| Business ID | -| bk_host_id| int |Host ID| -| bk_module_id| int| Module ID| -| bk_set_id| int |set ID| -| bk_supplier_account| string| Developer account| +Explanation of the data field: +| Field | Type | Description | +| ------------------- | ------ | ----------------- | +| bk_biz_id | int | Business ID | +| bk_host_id | int | Host ID | +| bk_module_id | int | Module ID | +| bk_set_id | int | Cluster ID | +| bk_supplier_account | string | Developer account | \ No newline at end of file diff --git a/docs/apidoc/cc/en/find_host_by_service_template.md b/docs/apidoc/cc/en/find_host_by_service_template.md index ed0c8faeac..827a2f5c2f 100644 --- a/docs/apidoc/cc/en/find_host_by_service_template.md +++ b/docs/apidoc/cc/en/find_host_by_service_template.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Get host under service template (v3.8.6) +Get hosts under a service template (Version: v3.8.6, Permission: Business Access Permission) ### Request Parameters @@ -8,22 +8,22 @@ Get host under service template (v3.8.6) #### Interface Parameters -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_biz_id | int |yes | Business ID | -| bk_service_template_ids | array |yes | List of service template IDs, up to 500| -| bk_module_ids | array |no | Module ID list, up to 500| -| fields | array | yes | Host attribute list, which controls what fields are in the module information that returns the result| -| page | object | yes | Paging information| +| Field | Type | Required | Description | +| ----------------------- | ------ | -------- | ------------------------------------------------------------ | +| bk_biz_id | int | Yes | Business ID | +| bk_service_template_ids | array | Yes | List of service template IDs, up to 500 | +| bk_module_ids | array | No | List of module IDs, up to 500 | +| fields | array | Yes | List of host attributes, controls which fields are included in the module information | +| page | object | Yes | Pagination information | -#### Page field Description +#### page Field Explanation -| Field| Type | Required| Description | -| ----- | ------ | ---- | --------------------- | -| start | int | yes | Record start position | -| limit | int | yes | Limit bars per page, Max. 500| +| Field | Type | Required | Description | +| ----- | ---- | -------- | --------------------------------------- | +| start | int | Yes | Record start position | +| limit | int | Yes | Number of records per page, maximum 500 | -### Request Parameters Example +### Request Parameter Example ```json { @@ -51,7 +51,7 @@ Get host under service template (v3.8.6) } ``` -### Return Result Example +### Response Example ```json { @@ -92,29 +92,62 @@ Get host under service template (v3.8.6) } ``` -### Return Result Parameters Description +### Response Parameters Description + #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 represents success, >0 represents a failure error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned by the request | #### data -| Field | Type | Description | -|-----------|-----------|-----------| -| count | int | Number of records| -| info | array | Host actual data| +| Field | Type | Description | +| ----- | ----- | ----------------- | +| count | int | Number of records | +| info | array | Actual host data | #### data.info -| Field | Type | Description | -|-----------|-----------|-----------| -| bk_cloud_id | int | Cloud area id | -| bk_host_id | int | Host id| - +| Field | Type | Description | +| ------------------------------------------------------------ | ------ | ------------------------------------ | +| bk_host_name | string | Host name | +| bk_host_innerip | string | Inner IP | +| bk_host_id | int | Host ID | +| bk_cloud_id | int | Control area | +| import_from | string | Host import source, 3 for API import | +| bk_asset_id | string | Fixed asset number | +| bk_cloud_inst_id | string | Cloud host instance ID | +| bk_cloud_vendor | string | Cloud vendor | +| bk_cloud_host_status | string | Cloud host status | +| bk_comment | string | Comment | +| bk_cpu | int | Logical core count of CPU | +| bk_cpu_architecture | string | CPU architecture | +| bk_cpu_module | string | CPU model | +| bk_disk | int | Disk capacity (GB) | +| bk_host_outerip | string | Host public IP | +| bk_host_innerip_v6 | string | Host inner IPv6 | +| bk_host_outerip_v6 | string | Host public IPv6 | +| bk_isp_name | string | Internet service provider | +| bk_mac | string | Host inner MAC address | +| bk_mem | int | Host memory capacity (MB) | +| bk_os_bit | string | Operating system bit number | +| bk_os_name | string | Operating system name | +| bk_os_type | string | Operating system type | +| bk_os_version | string | Operating system version | +| bk_outer_mac | string | Host public MAC address | +| bk_province_name | string | Province where the host is located | +| bk_service_term | int | Warranty period | +| bk_sla | string | SLA level | +| bk_sn | string | Device SN | +| bk_state | string | Current status | +| bk_state_name | string | Country where the host is located | +| operator | string | Main maintainer | +| bk_bak_operator | string | Backup maintainer | + +**Note: The explanation of the return values here only covers the system's built-in attribute fields. The rest of the return values depend on the user's own defined attribute fields** \ No newline at end of file diff --git a/docs/apidoc/cc/en/find_host_by_set_template.md b/docs/apidoc/cc/en/find_host_by_set_template.md index bff31ff1b7..ad03ad0595 100644 --- a/docs/apidoc/cc/en/find_host_by_set_template.md +++ b/docs/apidoc/cc/en/find_host_by_set_template.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Get host under set template (v3.8.6) +Get hosts under a set template (Version: v3.8.6, Permission: Business Access Permission) ### Request Parameters @@ -8,22 +8,22 @@ Get host under set template (v3.8.6) #### Interface Parameters -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_biz_id | int |yes | Business ID | -| bk_service_template_ids | int array |yes | Set template ID list, up to 500 | -| bk_set_ids | int array |no | List of Set IDs, up to 500 | -| fields | string array | yes | Host attribute list, which controls what fields are in the module information that returns the result| -| page | object | yes | Paging information| +| Field | Type | Required | Description | +| ----------------------- | ------------ | -------- | ------------------------------------------------------------ | +| bk_biz_id | int | Yes | Business ID | +| bk_service_template_ids | int array | Yes | List of cluster template IDs, up to 500 | +| bk_set_ids | int array | No | List of cluster IDs, up to 500 | +| fields | string array | Yes | List of host attributes, controls which fields are included in the module information | +| page | object | Yes | Pagination information | -#### Page field Description +#### page Field Explanation -| Field| Type | Required| Description | -| ----- | ------ | ---- | --------------------- | -| start | int | yes | Record start position | -| limit | int | yes | Limit bars per page, Max. 500| +| Field | Type | Required | Description | +| ----- | ---- | -------- | --------------------------------------- | +| start | int | Yes | Record start position | +| limit | int | Yes | Number of records per page, maximum 500 | -### Request Parameters Example +### Request Parameter Example ```json { @@ -51,7 +51,7 @@ Get host under set template (v3.8.6) } ``` -### Return Result Example +### Response Example ```json { @@ -96,29 +96,62 @@ Get host under set template (v3.8.6) } ``` -### Return Result Parameters Description +### Response Parameters Description + #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request succeeded or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 represents success, >0 represents a failure error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned by the request | #### data -| Field | Type | Description | -|-----------|-----------|-----------| -| count | int | Number of records| -| info | array | Host actual data| +| Field | Type | Description | +| ----- | ----- | ----------------- | +| count | int | Number of records | +| info | array | Actual host data | #### data.info -| Field | Type | Description | -|-----------|-----------|-----------| -| bk_cloud_id | int | Cloud area id | -| bk_host_id | int | Host id| - +| Field | Type | Description | +| -------------------- | ------ | ------------------------------------ | +| bk_host_name | string | Host name | +| bk_host_innerip | string | Inner IP | +| bk_host_id | int | Host ID | +| bk_cloud_id | int | Control area | +| import_from | string | Host import source, 3 for API import | +| bk_asset_id | string | Fixed asset number | +| bk_cloud_inst_id | string | Cloud host instance ID | +| bk_cloud_vendor | string | Cloud vendor | +| bk_cloud_host_status | string | Cloud host status | +| bk_comment | string | Comment | +| bk_cpu | int | Logical core count of CPU | +| bk_cpu_architecture | string | CPU architecture | +| bk_cpu_module | string | CPU model | +| bk_disk | int | Disk capacity (GB) | +| bk_host_outerip | string | Host public IP | +| bk_host_innerip_v6 | string | Host inner IPv6 | +| bk_host_outerip_v6 | string | Host public IPv6 | +| bk_isp_name | string | Internet service provider | +| bk_mac | string | Host inner MAC address | +| bk_mem | int | Host memory capacity (MB) | +| bk_os_bit | string | Operating system bit number | +| bk_os_name | string | Operating system name | +| bk_os_type | string | Operating system type | +| bk_os_version | string | Operating system version | +| bk_outer_mac | string | Host public MAC address | +| bk_province_name | string | Province where the host is located | +| bk_service_term | int | Warranty period | +| bk_sla | string | SLA level | +| bk_sn | string | Device SN | +| bk_state | string | Current status | +| bk_state_name | string | Country where the host is located | +| operator | string | Main maintainer | +| bk_bak_operator | string | Backup maintainer | + +**Note: The explanation of the return values here only covers the system's built-in attribute fields. The rest of the return values depend on the user's own defined attribute fields** \ No newline at end of file diff --git a/docs/apidoc/cc/en/find_host_by_topo.md b/docs/apidoc/cc/en/find_host_by_topo.md index 3f1165b621..708c70403f 100644 --- a/docs/apidoc/cc/en/find_host_by_topo.md +++ b/docs/apidoc/cc/en/find_host_by_topo.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Query hosts under topology nodes (v3.8.13) +Query hosts under a topology node (Version: v3.8.13, Permission: Business Access Permission) ### Request Parameters @@ -8,22 +8,22 @@ Query hosts under topology nodes (v3.8.13) #### Interface Parameters -| Field | Type| Required | Description | -|------------|--------|--------|------------| -| bk_biz_id | int | yes | Business ID | -| bk_obj_id | string |yes | Topology node model ID, which can not be biz| -| bk_inst_id | int | yes | Topology node instance ID| -| fields | array |yes | Host attribute list, which controls which fields are in the host that returns the result, can speed up interface requests and reduce network traffic transmission | -| page | object |yes | Paging information| +| Field | Type | Required | Description | +| ---------- | ------ | -------- | ------------------------------------------------------------ | +| bk_biz_id | int | Yes | Business ID | +| bk_obj_id | string | Yes | Topology node model ID, such as cluster (set), module (module), or other models on topology nodes. It cannot be biz or host | +| bk_inst_id | int | Yes | Topology node instance ID | +| fields | array | Yes | List of host attributes, controls which fields are included in the host, speeding up interface requests and reducing network traffic transmission | +| page | object | Yes | Pagination information | -#### Page field Description +#### page Field Explanation -| Field| Type | Required| Description | -| ----- | ------ | ---- | --------------------- | -| start | int | yes | Record start position | -| limit | int | yes | Limit bars per page, Max. 500| +| Field | Type | Required | Description | +| ----- | ---- | -------- | --------------------------------------- | +| start | int | Yes | Record start position | +| limit | int | Yes | Number of records per page, maximum 500 | -### Request Parameters Example +### Request Parameter Example ```json { @@ -45,7 +45,7 @@ Query hosts under topology nodes (v3.8.13) } ``` -### Return Result Example +### Response Example ```json { @@ -70,21 +70,62 @@ Query hosts under topology nodes (v3.8.13) } ``` -### Return Result Parameters Description +### Response Parameters Description + #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 represents success, >0 represents a failure error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned by the request | #### data -| Field | Type | Description | -|-----------|-----------|-----------| -| count | int | Number of records| -| info | array | Host actual data| +| Field | Type | Description | +| ----- | ----- | ----------------- | +| count | int | Number of records | +| info | array | Actual host data | + +#### data.info + +| Field | Type | Description | +| -------------------- | ------ | ------------------------------------ | +| bk_host_name | string | Host name | +| bk_host_innerip | string | Inner IP | +| bk_host_id | int | Host ID | +| bk_cloud_id | int | Control area | +| import_from | string | Host import source, 3 for API import | +| bk_asset_id | string | Fixed asset number | +| bk_cloud_inst_id | string | Cloud host instance ID | +| bk_cloud_vendor | string | Cloud vendor | +| bk_cloud_host_status | string | Cloud host status | +| bk_comment | string | Comment | +| bk_cpu | int | Logical core count of CPU | +| bk_cpu_architecture | string | CPU architecture | +| bk_cpu_module | string | CPU model | +| bk_disk | int | Disk capacity (GB) | +| bk_host_outerip | string | Host public IP | +| bk_host_innerip_v6 | string | Host inner IPv6 | +| bk_host_outerip_v6 | string | Host public IPv6 | +| bk_isp_name | string | Internet service provider | +| bk_mac | string | Host inner MAC address | +| bk_mem | int | Host memory capacity (MB) | +| bk_os_bit | string | Operating system bit number | +| bk_os_name | string | Operating system name | +| bk_os_type | string | Operating system type | +| bk_os_version | string | Operating system version | +| bk_outer_mac | string | Host public MAC address | +| bk_province_name | string | Province where the host is located | +| bk_service_term | int | Warranty period | +| bk_sla | string | SLA level | +| bk_sn | string | Device SN | +| bk_state | string | Current status | +| bk_state_name | string | Country where the host is located | +| operator | string | Main maintainer | +| bk_bak_operator | string | Backup maintainer | + +**Note: The explanation of the return values here only covers the system's built-in attribute fields. The rest of the return values depend on the user's own defined attribute fields** \ No newline at end of file diff --git a/docs/apidoc/cc/en/find_host_identifier_push_result.md b/docs/apidoc/cc/en/find_host_identifier_push_result.md index 72bdbcac1f..0702b233ec 100644 --- a/docs/apidoc/cc/en/find_host_identifier_push_result.md +++ b/docs/apidoc/cc/en/find_host_identifier_push_result.md @@ -1,7 +1,6 @@ -### Function description +### Function Description -Get the result from the identity of the push host to the machine (you can only get the tasks pushed within 30 minutes). -(version: v3.10.23+ permission: when the host included in the task is under business, the access permission of the corresponding business is required; when the host is under the host pool, the update permission of the host is required.) +Get the result of pushing host identity to machines (can only get tasks pushed within 30 minutes) (Version: v3.10.23+, Permission: When the hosts included in the task belong to a business, the corresponding business access permission is required; when the hosts belong to a host pool, host update permission is required) ### Request Parameters @@ -9,11 +8,11 @@ Get the result from the identity of the push host to the machine (you can only g #### Interface Parameters -| field | type | required | description | -| ---- | ---- | ---- | ---------- | -| task_id | string | yes | task_id | +| Field | Type | Required | Description | +| ------- | ------ | -------- | ----------- | +| task_id | string | Yes | Task ID | -### Request Parameters Example +### Request Parameter Example ```json { @@ -25,7 +24,7 @@ Get the result from the identity of the push host to the machine (you can only g } ``` -### Return Result Example +### Response Example ```json { @@ -51,22 +50,23 @@ Get the result from the identity of the push host to the machine (you can only g } ``` -### Return Result Parameter Description +### Response Parameters Description #### response -| name | type | description | -| ------- | ------ | ------------------------------------------ | -| result | bool | Whether the request was successful or not. true:request successful; false request failed. -| code | int | The error code. 0 means success, >0 means failure error. -| message | string | The error message returned by the failed request. -| permission | object | Permission information | -| request_id | string | request_chain_id | -| data | object | The data returned by the request. +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 represents success, >0 represents a failure error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned by the request | -#### data Field Description -| name | type | description | -| ------- | ------ | ------------------------------------------ | -| success_list | array | List of host ids that executed successfully | -| failed_list | array | list of failed host ids | -| pending_list | array |List of host ids for which gse was invoked to send down the host identity and the result is not yet available | +#### data Field Explanation + +| Field | Type | Description | +| ------------ | ----- | ------------------------------------------------------------ | +| success_list | array | List of host IDs that executed successfully | +| failed_list | array | List of host IDs that failed to execute | +| pending_list | array | List of host IDs for which the host identity was called by GSE, but the result has not been obtained yet | \ No newline at end of file diff --git a/docs/apidoc/cc/en/find_host_relations_with_topo.md b/docs/apidoc/cc/en/find_host_relations_with_topo.md index c412f57c2e..504fc56937 100644 --- a/docs/apidoc/cc/en/find_host_relations_with_topo.md +++ b/docs/apidoc/cc/en/find_host_relations_with_topo.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -According to the service topology instance node, querying the host relationship information under the instance node +Query host relationship information based on the business topology instance node (Permission: Business access permission) ### Request Parameters @@ -8,23 +8,23 @@ According to the service topology instance node, querying the host relationship #### Interface Parameters -| Field | Type | Required | Description | -|---------------------|------------|--------|-----------------------------| -| page | dict | yes | Query criteria| -| fields | array | yes | Host attribute list, which controls the fields in the host that returns the result. Please fill them in as required. They can be bk_biz_id,bk_host_id,bk_module_id,bk_set_id,bk_supplier_account| -| bk_obj_id | string |yes| The model ID of the topology node, which can be a user-defined hierarchical model ID, set, module, etc., But can not be a business| -| bk_inst_ids | array |yes| The instance ID of the topology node, supporting up to 50 instance nodes| -| bk_biz_id | int |yes| Business ID | +| Field | Type | Required | Description | +| ----------- | ------ | -------- | ------------------------------------------------------------ | +| page | dict | Yes | Query conditions | +| fields | array | Yes | List of host properties, control which fields of the host information should be returned. Please fill in according to your needs. It can be bk_biz_id, bk_host_id, bk_module_id, bk_set_id, bk_supplier_account | +| bk_obj_id | string | Yes | Model ID of the topology node, it can be a custom hierarchical model ID, set, module, etc., but cannot be a business | +| bk_inst_ids | array | Yes | List of instance IDs of the topology node, supports up to 50 instance nodes | +| bk_biz_id | int | Yes | Business ID | #### page -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| start | int | yes | Record start position| -| limit | int | yes | Limit bars per page, maximum 500| -| sort | string |no | Sort field| +| Field | Type | Required | Description | +| ----- | ------ | -------- | ------------------------------------------------ | +| start | int | Yes | Record start position | +| limit | int | Yes | Number of records per page, maximum value is 500 | +| sort | string | No | Sorting field | -### Request Parameters Example +### Request Parameter Example ```json { @@ -46,7 +46,7 @@ According to the service topology instance node, querying the host relationship } ``` -### Return Result Example +### Response Example ```json { @@ -67,28 +67,29 @@ According to the service topology instance node, querying the host relationship } ``` -### Return Result Parameters Description +### Response Parameters Description + #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 represents success, >0 represents a failure error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned by the request | #### data -| Field | Type | Description | -|-----------|-----------|-----------| -| count | int | Number of records| -| info | array | Host relationship information| +| Field | Type | Description | +| ----- | ----- | ----------------------------- | +| count | int | Number of records | +| info | array | Host relationship information | -#### info -| Field | Type | Description | -|-----------|-----------|-----------| -| bk_host_id | int | Host id| -| bk_module_id | int | Module id| +#### info +| Field | Type | Description | +| ------------ | ---- | ----------- | +| bk_host_id | int | Host ID | +| bk_module_id | int | Module ID | \ No newline at end of file diff --git a/docs/apidoc/cc/en/find_host_topo_relation.md b/docs/apidoc/cc/en/find_host_topo_relation.md index 64edaf9935..0e933adee1 100644 --- a/docs/apidoc/cc/en/find_host_topo_relation.md +++ b/docs/apidoc/cc/en/find_host_topo_relation.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Get host-to-topology relationship +Get the relationship between hosts and topology (Permission: Business access permission) ### Request Parameters @@ -8,22 +8,22 @@ Get host-to-topology relationship #### Interface Parameters -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_biz_id| int| yes | Business ID | -| bk_set_ids| array |no| List of set IDs, up to 200| -| bk_module_ids| array |no| Module ID list, up to 500| -| bk_host_ids| array |no| Host ID list, up to 500| -| page| object| yes | Paging information| +| Field | Type | Required | Description | +| ------------- | ------ | -------- | ------------------------------ | +| bk_biz_id | int | Yes | Business ID | +| bk_set_ids | array | No | List of cluster IDs, up to 200 | +| bk_module_ids | array | No | List of module IDs, up to 500 | +| bk_host_ids | array | No | List of host IDs, up to 500 | +| page | object | Yes | Page information | -#### Page field Description +#### page Field Description -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -|start| int| no | Get data offset position| -|limit| int| yes | Limit on the number of data pieces in the past, 200 is recommended| +| Field | Type | Required | Description | +| ----- | ---- | -------- | ---------------------------------------------------- | +| start | int | No | Data offset position | +| limit | int | Yes | Number of records per page, recommended value is 200 | -### Request Parameters Example +### Request Parameter Example ```python { @@ -42,10 +42,9 @@ Get host-to-topology relationship } ``` -### Return Result Example +### Response Example ```python - { "result": true, "code": 0, @@ -78,39 +77,40 @@ Get host-to-topology relationship } ``` +### Response Parameters Description - -### Return Result Parameters Description #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | - -#### Data field Description: - -| Name| Type| Description| -|---|---|---| -| count| int| Number of records| -| data| object array |Data details list of host and set, module and set under service| -| page| object| Page| - -#### Data.data field Description: -| Name| Type| Description| -|---|---|---| -| bk_biz_id | int |Service ID| -| bk_set_id | int |Set ID| -| bk_module_id | int |Module ID| -| bk_host_id | int |Host ID| -| bk_supplier_account | string |Developer account number| - -#### Data.page field Description: -| Name| Type| Description| -|---|---|---| -|start| int| Data offset position| -|limit| int| Limit on number of past data pieces| +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 represents success, >0 represents a failure error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned by the request | + +#### data Field Explanation: + +| Field | Type | Description | +| ----- | ------------ | ------------------------------------------------------------ | +| count | int | Number of records | +| data | object array | Details list of data for hosts and clusters, modules, clusters under the business | +| page | object | Page | + +#### data.data Field Explanation: + +| Field | Type | Description | +| ------------------- | ------ | ---------------- | +| bk_biz_id | int | Business ID | +| bk_set_id | int | Cluster ID | +| bk_module_id | int | Module ID | +| bk_host_id | int | Host ID | +| bk_supplier_account | string | Supplier account | + +#### data.page Field Explanation: + +| Field | Type | Description | +| ----- | ---- | -------------------------- | +| start | int | Data offset position | +| limit | int | Number of records per page | \ No newline at end of file diff --git a/docs/apidoc/cc/en/find_instance_association.md b/docs/apidoc/cc/en/find_instance_association.md index 7fbeac576e..eafcbf01de 100644 --- a/docs/apidoc/cc/en/find_instance_association.md +++ b/docs/apidoc/cc/en/find_instance_association.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Query the instance Association relationship of the model. +Query the instance association relationship of the model. (Permission: Model instance query permission) ### Request Parameters @@ -8,24 +8,22 @@ Query the instance Association relationship of the model. #### Interface Parameters -| Field | Type | Required | Description | -|----------------------|------------|--------|-----------------------------| -| condition | object | yes | Query criteria| -| bk_obj_id | string | yes | Source model id(v3.10+)| - +| Field | Type | Required | Description | +| --------- | ------ | -------- | ------------------------ | +| condition | object | Yes | Query conditions | +| bk_obj_id | string | Yes | Source model id (v3.10+) | #### condition -| Field | Type | Required | Description | -|---------------------|------------|--------|-----------------------------| -| bk_obj_asst_id | string | yes | The unique id of the model Association| -| bk_asst_id | string | no | Unique id of the Association type| -| bk_asst_obj_id | string | no | Target model id| - +| Field | Type | Required | Description | +| -------------- | ------ | -------- | ----------------------------------------------- | +| bk_obj_asst_id | string | Yes | Unique id of the model association relationship | +| bk_asst_id | string | No | Unique id of the association type | +| bk_asst_obj_id | string | No | Target model id | -### Request Parameters Example +### Request Parameter Example -``` json +```json { "bk_app_code": "esb_test", "bk_app_secret": "xxx", @@ -40,13 +38,13 @@ Query the instance Association relationship of the model. } ``` -### Return Result Example +### Response Example ```json { "result": true, "code": 0, - "message": "", + "message": "success", "permission": null, "request_id": "e43da4ef221746868dc4c837d36f3807", "data": [{ @@ -58,30 +56,28 @@ Query the instance Association relationship of the model. "bk_asst_inst_id":13 }] } - ``` +### Response Parameters Description -### Return Result Parameters Description #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | - -#### data - -| Field | Type | Description | -|------------|----------|--------------| -|id|int|the association's unique id| -| bk_obj_asst_id| string| Automatically generated model association id.| -| bk_obj_id| string| Association relationship source model id| -| bk_asst_obj_id| string| Association relation target model id| -| bk_inst_id| int| Source model instance id| -| bk_asst_inst_id| int| Target model instance id| - +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 represents success, >0 represents a failure error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned by the request | + +#### data Field Explanation: + +| Field | Type | Description | +| --------------- | ------ | ---------------------------------------------------------- | +| id | int | The association's unique id | +| bk_obj_asst_id | string | Automatically generated model association relationship id. | +| bk_obj_id | string | Source model id of the association relationship | +| bk_asst_obj_id | string | Target model id of the association relationship | +| bk_inst_id | int | Source model instance id | +| bk_asst_inst_id | int | Target model instance id | \ No newline at end of file diff --git a/docs/apidoc/cc/en/find_instassociation_with_inst.md b/docs/apidoc/cc/en/find_instassociation_with_inst.md index 060a2ea1ab..ab0e91fda3 100644 --- a/docs/apidoc/cc/en/find_instassociation_with_inst.md +++ b/docs/apidoc/cc/en/find_instassociation_with_inst.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Query the model instance Association, and optionally return the details of the source model instance and the target model instance (v3.10.11+) +Query the instance association relationship of the model, and optionally return details of the source model instance and target model instance. (Version: v3.10.11+, Permission: Model instance query permission) ### Request Parameters @@ -8,52 +8,53 @@ Query the model instance Association, and optionally return the details of the s #### Interface Parameters -| Parameter | Type| Required| Description | -| --------- | ---- | ---- | -------- | -| condition | map |yes | Query parameter| -| page | map |yes | Paging condition| +| Field | Type | Required | Description | +| --------- | ------ | -------- | ------------------------------ | +| bk_obj_id | string | Yes | Unique identifier of the model | +| condition | map | Yes | Query parameters | +| page | map | Yes | Pagination conditions | **condition** -| Parameter | Type| Required| Description | -| :---------- | ----- | ---- | ----------------------------------------- | -| asst_filter | map | yes | Filter for querying Association relationship | -| asst_fields | array |no | Content to be returned for Association relationship. All are returned without filling in | -| src_fields | array |no | The attributes to be returned by the source model. All are returned without filling in | -| dst_fields | array |no | Attributes to be returned by the target model. All are returned without filling in | -| src_detail | bool |no | The default value is false, and the instance details of the source model are not returned | -| dst_detail | bool |no | The default value is false, and the instance details of the target model are not returned| +| Field | Type | Required | Description | +| ----------- | ----- | -------- | ------------------------------------------------------------ | +| asst_filter | map | Yes | Filter for querying association relationships | +| asst_fields | array | No | Content to be returned for association relationships, returns all if not specified | +| src_fields | array | No | Properties to be returned for the source model, returns all if not specified | +| dst_fields | array | No | Properties to be returned for the target model, returns all if not specified | +| src_detail | bool | No | Defaults to false, does not return details of the source model instance | +| dst_detail | bool | No | Defaults to false, does not return details of the target model instance | **asst_filter** -This parameter is a combination of filtering rules for Association attribute fields, and is used to search Association according to Association attribute. The combination supports AND and OR, and can be nested, with a maximum of 2 layers. The filtering rules are quaternions`field`,`operator`,`value` +This parameter is a combination of filter rules for association relationship attribute fields, used to search association relationships based on association relationship attributes. The combination supports both AND and OR, and can be nested, with a maximum nesting depth of 2. The filter rule is a quadruple `field`, `operator`, `value`. -| Parameter | Type | Required| Description | -| --------- | ------ | ---- | ----------------------------- | -| condition | string |yes | Combination of query criteria, AND or OR| -| rule | array |yes | Collection containing all query criteria | +| Field | Type | Required | Description | +| --------- | ------ | -------- | ------------------------------------------------- | +| condition | string | Yes | Combination method of query conditions, AND or OR | +| rules | array | Yes | Collection containing all query conditions | -**rule** +**rules** -| Parameter | Type | Required| Description | -| -------- | ------ | ---- | ------------------------------------------------------------ | -| field | string |yes | Fields in query criteria, for example: bk_obj_id,bk_asst_obj_id,bk_inst_id| -| operator | string |yes | Query method in query criteria, equal, in, nin, etc. | -| value | string |yes | Value corresponding to query criteria | +| Field | Type | Required | Description | +| --------- | ------ | -------- | ------------------------------------------------------------ | +| field | string | Yes | Field in the query condition, such as bk_obj_id, bk_asst_obj_id, bk_inst_id | +| operator | string | Yes | Query method in the query condition, such as equal, in, nin, etc. | +| value | string | Yes | Value corresponding to the query condition | -For assembly rules, refer to: https: //github.com/Tencent/bk-cmdb/blob/master/src/common/querybuilder/README.md +Assembly rules can refer to: [bk-cmdb Query Builder](https://github.com/Tencent/bk-cmdb/blob/master/src/common/querybuilder/README.md) **page** -| Parameter| Type | Required| Description | -| ----- | ------ | ---- | -------------------- | -| start | int | no | Record start position | -| limit | int | yes | Limit bars per page, Max. 200| -| sort | string |no | Sort field | +| Field | Type | Required | Description | +| --------- | ------ | -------- | ---------------------------------- | +| start | int | No | Record start position | +| limit | int | Yes | Record limit per page, maximum 200 | +| sort | string | No | Sorting field | -**Paging object is associated** +**Pagination object is for association relationships** -#### Request Parameters Example +#### Request Parameter Example ```json { @@ -61,6 +62,7 @@ For assembly rules, refer to: https: //github.com/Tencent/bk-cmdb/blob/master/sr "bk_app_secret": "xxx", "bk_username": "xxx", "bk_token": "xxx", + "bk_obj_id":"bk_switch", "condition": { "asst_filter": { "condition": "AND", @@ -100,7 +102,7 @@ For assembly rules, refer to: https: //github.com/Tencent/bk-cmdb/blob/master/sr } ``` -### Return Result Example +### Response Example ```json { @@ -160,49 +162,48 @@ For assembly rules, refer to: https: //github.com/Tencent/bk-cmdb/blob/master/sr } ``` -### Return Result Parameters Description +### Response Parameters Description #### response -| Field | Type| Description | -| ------------------- | ----- | ---------- | -| result | bool | Whether the request was successful or not. True: request succeeded;false: Request failed| -| code | int | Wrong. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Request result | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 represents success, >0 represents a failure error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned by the request | #### data -| Field | Type| Description | -| ----------- | ----- | ---------------------------------------- | -| association | array |The queried Association relationship details are sorted by the paging sorting parameter| -| src | array |Details of the source model instance | -| dst | array |Details of the target model instance | +| Field | Type | Description | +| ----------- | ----- | ------------------------------------------------------------ | +| association | array | Details of the queried association relationships, sorted according to the pagination sorting parameters | +| src | array | Details of the source model instance | +| dst | array | Details of the target model instance | ##### association -| Name | Type | Description | -| --------------- | ------ | ------------------------ | -| id | int64 |Association id | -| bk_inst_id | int64 |Source model instance id | -| bk_obj_id | string |Association relationship source model id | -| bk_asst_inst_id | int64 |Association relation target model id | -| bk_asst_obj_id | string |Target model instance id | -| bk_obj_asst_id | string |Auto-generated model association id| -| bk_asst_id | string |Relationship name | +| Field | Type | Description | +| --------------- | ------ | --------------------------------------------------------- | +| id | int64 | Association ID | +| bk_inst_id | int64 | Source model instance ID | +| bk_obj_id | string | Source model ID of the association relationship | +| bk_asst_inst_id | int64 | Target model instance ID | +| bk_asst_obj_id | string | Target model ID of the association relationship | +| bk_obj_asst_id | string | Automatically generated model association relationship ID | +| bk_asst_id | string | Relationship name | ##### src -| Name | Type | Description | -| ------------ | ------ | ------ | -| bk_inst_name | string |Instance name| -| bk_inst_id | int | Instance id| +| Field | Type | Description | +| ------------ | ------ | ------------- | +| bk_inst_name | string | Instance name | +| bk_inst_id | int | Instance ID | ##### dst -| Name | Type | Description | -| ---------------- | ------ | ---------- | -| bk_host_inner_ip | string |Host intranet ip| - +| Field | Type | Description | +| ---------------- | ------ | ------------- | +| bk_host_inner_ip | string | Host inner IP | \ No newline at end of file diff --git a/docs/apidoc/cc/en/find_module_batch.md b/docs/apidoc/cc/en/find_module_batch.md index 997bd67e33..097a4ce6ab 100644 --- a/docs/apidoc/cc/en/find_module_batch.md +++ b/docs/apidoc/cc/en/find_module_batch.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Obtain the attribute information of the module instances under the specified service in batches according to the service ID and module instance ID list, plus the module attribute list you want to return (v3.8.6) +Batch obtain the attribute information of specified module instances under a specified business based on the business ID and the list of module instance IDs, along with the desired module attribute list. (v3.8.6) ### Request Parameters @@ -8,13 +8,13 @@ Obtain the attribute information of the module instances under the specified ser #### Interface Parameters -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_biz_id | int |yes | Business ID | -| bk_ids | array |yes | Module instance ID list, i.e. bk_module_id list, can be filled in up to 500| -| fields | array | yes | Module attribute list, which controls the fields in the module information that returns the result| +| Field | Type | Required | Description | +| --------- | ----- | -------- | ------------------------------------------------------------ | +| bk_biz_id | int | Yes | Business ID | +| bk_ids | array | Yes | List of module instance IDs, i.e., bk_module_id list, up to 500 | +| fields | array | Yes | Module attribute list, control which fields to return in the module information | -### Request Parameters Example +### Request Parameter Example ```json { @@ -38,7 +38,7 @@ Obtain the attribute information of the module instances under the specified ser } ``` -### Return Result Example +### Response Example ```json { @@ -62,41 +62,62 @@ Obtain the attribute information of the module instances under the specified ser }, { "bk_module_id": 58, - "bk_module_name": "recycle", + "bk_module_name": "Pending recycle", "create_time": "2020-05-12T21:03:37.238+08:00", "default": 3 }, { "bk_module_id": 57, - "bk_module_name": "fault", + "bk_module_name": "Faulty machine", "create_time": "2020-05-12T21:03:37.183+08:00", "default": 2 }, { "bk_module_id": 56, - "bk_module_name": "idle", + "bk_module_name": "Idle machine", "create_time": "2020-05-12T21:03:37.122+08:00", "default": 1 } ] } ``` -### Return Result Parameters Description + +### Response Parameters Description + #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request succeeded or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | - -#### Data description -| Field | Type | Description | -|-----------|------------|------------| -|bk_module_id | int |Module id| -|bk_module_name | string |Module name| -|default | int |Indicates the module type| -|create_time | string |Settling time| \ No newline at end of file +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 represents success, >0 represents a failure error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | array | Data returned by the request | + +#### data Explanation + +| Field | Type | Description | +| ------------------- | ------- | ---------------------------------------------------------- | +| bk_module_id | int | Module ID | +| bk_module_name | string | Module name | +| default | int | Indicates the module type | +| create_time | string | Creation time | +| bk_set_id | int | Cluster ID | +| bk_bak_operator | string | Backup maintenance personnel | +| bk_biz_id | int | Business ID | +| bk_module_type | string | Module type | +| bk_parent_id | int | Parent node ID | +| bk_supplier_account | string | Developer account | +| last_time | string | Update time | +| host_apply_enabled | bool | Whether to enable automatic application of host properties | +| operator | string | Main maintainer | +| service_category_id | integer | Service category ID | +| service_template_id | int | Service template ID | +| set_template_id | int | Cluster template ID | +| bk_created_at | string | Creation time | +| bk_updated_at | string | Update time | +| bk_created_by | string | Creator | + + +**Note: The returned value here only explains the built-in property fields. The rest of the returned values depend on the user's own defined property fields.** \ No newline at end of file diff --git a/docs/apidoc/cc/en/find_module_host_relation.md b/docs/apidoc/cc/en/find_module_host_relation.md index d43a5025ff..0db6c6e619 100644 --- a/docs/apidoc/cc/en/find_module_host_relation.md +++ b/docs/apidoc/cc/en/find_module_host_relation.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Query host-module relationship by module ID (v3.8.7) +Query the relationship between hosts and modules based on the module ID (version: v3.8.7, permission: Business access permission) ### Request Parameters @@ -8,24 +8,24 @@ Query host-module relationship by module ID (v3.8.7) #### Interface Parameters -| Field | Type | Required| Description | -| ------------- | ------------ | ---- | -------------------------------------------- | -| bk_biz_id | int | yes | Business ID | -| bk_module_ids | array | yes | Module ID array, up to 200 | -| module_fields | array |yes | Module attribute list, which controls which fields are in the module that returns the result| -| host_fields | array |yes | Host attribute list, which controls which fields are in the host that returns the result| -| page | object | yes | Paging parameter | +| Field | Type | Required | Description | +| ------------- | ------ | -------- | ------------------------------------------------------------ | +| bk_biz_id | int | Yes | Business ID | +| bk_module_ids | array | Yes | Module ID array, up to 200 | +| module_fields | array | Yes | Module attribute list, control which fields to return in the module information | +| host_fields | array | Yes | Host attribute list, control which fields to return in the host information | +| page | object | Yes | Pagination parameters | #### page -| Field| Type| Required| Description | -| ----- | ---- | ---- | --------------------- | -| start | int |no | Record start position, default 0| -| limit | int |yes | Limit number of bars per page, maximum 1000| +| Field | Type | Required | Description | +| ----- | ---- | -------- | ------------------------------------------- | +| start | int | No | Record start position, default is 0 | +| limit | int | Yes | Number of records per page, maximum is 1000 | -**Note: the host relationship under a module may be split and returned multiple times. The paging method is to sort by host ID.** +**Note: The relationship between hosts and modules under a module may be returned multiple times, and the paging method is based on the host ID sorting.** -### Request Parameters Example +### Request Parameter Example ```json { @@ -54,7 +54,7 @@ Query host-module relationship by module ID (v3.8.7) } ``` -### Return Result Example +### Response Example ```json { @@ -99,28 +99,91 @@ Query host-module relationship by module ID (v3.8.7) } ``` -### Return Result Parameters Description - -| Name | Type | Description | -| ------- | ------ | ------------------------------------------ | -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | - -Data field Description: - -| Name | Type | Description | -| -------- | ------------ | ------------------ | -| count | int | Number of records | -| relation | array |Host and module actual data| - - -Description of the recall field: - -| Name | Type | Description | -| ------- | ------------ | ------------------ | -| host | object | Host data | -| modules | array |Module information to which the host belongs| +### Response Parameters Description + +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 represents success, >0 represents a failure error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned by the request | + +#### Explanation of data field: + +| Field | Type | Description | +| -------- | ----- | -------------------------------- | +| count | int | Number of records | +| relation | array | Actual data of hosts and modules | + +#### Explanation of data.relation field: + +| Field | Type | Description | +| ------- | ------ | ------------------------------------------------------- | +| host | object | Host data | +| modules | array | Information about the modules to which the host belongs | + +#### Explanation of data.relation.host field: + +| Field | Type | Description | +| -------------------- | ------ | ----------------------------------------- | +| bk_host_name | string | Host name | +| bk_host_innerip | string | Private IP of the host | +| bk_host_id | int | Host ID | +| bk_cloud_id | int | Control area | +| import_from | string | Host import source, imported via API is 3 | +| bk_asset_id | string | Fixed asset number | +| bk_cloud_inst_id | string | Cloud host instance ID | +| bk_cloud_vendor | string | Cloud vendor | +| bk_cloud_host_status | string | Cloud host status | +| bk_comment | string | Comment | +| bk_cpu | int | Number of logical cores of CPU | +| bk_cpu_architecture | string | CPU architecture | +| bk_cpu_module | string | CPU model | +| bk_disk | int | Disk capacity (GB) | +| bk_host_outerip | string | Outer IP of the host | +| bk_host_innerip_v6 | string | Inner IPv6 of the host | +| bk_host_outerip_v6 | string | Outer IPv6 of the host | +| bk_isp_name | string | ISP name | +| bk_mac | string | Inner MAC address of the host | +| bk_mem | int | Memory capacity of the host (MB) | +| bk_os_bit | string | OS bit | +| bk_os_name | string | OS name | +| bk_os_type | string | OS type | +| bk_os_version | string | OS version | +| bk_outer_mac | string | Outer MAC address of the host | +| bk_province_name | string | Province name | +| bk_service_term | int | Warranty period | +| bk_sla | string | SLA level | +| bk_sn | string | Device SN | +| bk_state | string | Current status | +| bk_state_name | string | Country of the host | +| operator | string | Main maintainer | +| bk_bak_operator | string | Backup maintainer | + +Explanation of data.relation.modules field: + +| Field | Type | Description | +| ------------------- | ------- | ---------------------------------------------------------- | +| bk_module_id | int | Module ID | +| bk_module_name | string | Module name | +| default | int | Indicates the module type | +| create_time | string | Creation time | +| bk_set_id | int | Cluster ID | +| bk_bak_operator | string | Backup maintainer | +| bk_biz_id | int | Business ID | +| bk_module_type | string | Module type | +| bk_parent_id | int | Parent node ID | +| bk_supplier_account | string | Developer account | +| last_time | string | Update time | +| host_apply_enabled | bool | Whether to enable automatic application of host properties | +| operator | string | Main maintainer | +| service_category_id | integer | Service category ID | +| service_template_id | int | Service template ID | +| set_template_id | int | Cluster template ID | +| bk_created_at | string | Creation time | +| bk_updated_at | string | Update time | +| bk_created_by | string | Creator | + +**Note: The returned value here only explains the built-in property fields. The rest of the returned values depend on the user's own defined property fields.** \ No newline at end of file diff --git a/docs/apidoc/cc/en/find_module_with_relation.md b/docs/apidoc/cc/en/find_module_with_relation.md index 360946a734..5dd973068a 100644 --- a/docs/apidoc/cc/en/find_module_with_relation.md +++ b/docs/apidoc/cc/en/find_module_with_relation.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Query modules under Business by criteria (v3.9.7) +Query modules under a business based on conditions (v3.9.7) ### Request Parameters @@ -8,22 +8,22 @@ Query modules under Business by criteria (v3.9.7) #### Interface Parameters -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_biz_id | int |yes | Business ID | -| bk_set_ids | array |no | List of set IDs, up to 200 | -| bk_service_template_ids | array |no | Service template ID list| -| fields | array | yes | Module attribute list, which controls the fields in the module information that returns the result| -| page | object | yes | Paging information| +| Field | Type | Required | Description | +| ----------------------- | ------ | -------- | ------------------------------------------------------------ | +| bk_biz_id | int | Yes | Business ID | +| bk_set_ids | array | No | Cluster ID list, up to 200 | +| bk_service_template_ids | array | No | Service template ID list | +| fields | array | Yes | Module attribute list, control which fields to return in the module information | +| page | object | Yes | Pagination information | -#### Page field Description +#### page Field Explanation -| Field| Type | Required| Description | -| ----- | ------ | ---- | --------------------- | -| start | int | yes | Record start position | -| limit | int | yes | Limit bars per page, Max. 500| +| Field | Type | Required | Description | +| ----- | ---- | -------- | ------------------------------------------ | +| start | int | Yes | Record start position | +| limit | int | Yes | Number of records per page, maximum is 500 | -### Request Parameters Example +### Request Parameter Example ```json { @@ -42,7 +42,7 @@ Query modules under Business by criteria (v3.9.7) } ``` -### Return Result Example +### Response Example ```json { @@ -66,20 +66,45 @@ Query modules under Business by criteria (v3.9.7) } } ``` -### Return Result Parameters Description -#### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------------ | -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | - -Data field Description: - -| Name | Type | Description | -| -------- | ------------ | ------------------ | -| count | int | Number of records | -| info | object array |Module actual data| \ No newline at end of file + +### Response Parameters Description + +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 represents success, >0 represents a failure error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned by the request | + +#### Explanation of data field: + +| Field | Type | Description | +| ----- | ------------ | ---------------------- | +| count | int | Number of records | +| info | object array | Actual data of modules | + +#### Explanation of data.info field: + +| Field | Type | Description | +| ------------------- | ------- | ---------------------------------------------------------- | +| bk_module_id | int | Module ID | +| bk_module_name | string | Module name | +| default | int | Indicates the module type | +| create_time | string | Creation time | +| bk_set_id | int | Cluster ID | +| bk_bak_operator | string | Backup maintainer | +| bk_biz_id | int | Business ID | +| bk_module_type | string | Module type | +| bk_parent_id | int | Parent node ID | +| bk_supplier_account | string | Developer account | +| last_time | string | Update time | +| host_apply_enabled | bool | Whether to enable automatic application of host properties | +| operator | string | Main maintainer | +| service_category_id | integer | Service category ID | +| service_template_id | int | Service template ID | +| set_template_id | int | Cluster template ID | +| bk_created_at | string | Creation time | +| bk_updated_at | string | Update time | +| bk_created_by | string | Creator | \ No newline at end of file diff --git a/docs/apidoc/cc/en/find_object_association.md b/docs/apidoc/cc/en/find_object_association.md index 13c761f0bd..cb0e39e28d 100644 --- a/docs/apidoc/cc/en/find_object_association.md +++ b/docs/apidoc/cc/en/find_object_association.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -The Association between instances of the query model. +Query the association relationships between models. (Permission: Model view permission) ### Request Parameters @@ -8,23 +8,25 @@ The Association between instances of the query model. #### Interface Parameters -| Field | Type | Required | Description| -|----------------------|------------|--------|-----------------------------| -| condition | string map | yes | Query criteria| +| Field | Type | Required | Description | +| --------- | ---------- | -------- | ---------------- | +| condition | string map | Yes | Query conditions | +Condition Parameters -condition params +| Field | Type | Required | Description | +| -------------- | ------ | -------- | ---------------------------------------------------------- | +| bk_asst_id | string | No | Unique ID of the model's association type | +| bk_obj_id | string | No | Source model ID, either this or bk_asst_obj_id is required | +| bk_asst_obj_id | string | No | Target model ID, either this or bk_obj_id is required | -| Field | Type | Required | Description| -|---------------------|------------|--------|-----------------------------| -| bk_asst_id | string | yes | Association type unique id of the model| -| bk_obj_id | string | yes | Source model id| -| bk_asst_id | string | yes | Target model id| +**Note: Without the condition limit of bk_asst_id, if only the condition of bk_obj_id is filled, it will query all association relationships where the model acts as the source model; if only the condition of bk_asst_obj_id is filled, it will query all association relationships where the model acts as the target model** -### Request Parameters Example -``` json +### Request Parameter Example + +```json { "bk_app_code": "esb_test", "bk_app_secret": "xxx", @@ -38,7 +40,7 @@ condition params } ``` -### Return Result Example +### Response Example ```json { @@ -62,32 +64,32 @@ condition params } ] } - ``` +### Response Parameters Description -### Return Result Parameters Description #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------------ | -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | + +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 represents success, >0 represents a failure error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned by the request | #### data -| Field | Type | Description| -|------------|----------|--------------| -| id| int64| The identity id of the model Association| -| bk_obj_asst_id| string| The unique ID of the model Association.| -| bk_obj_asst_name| string| Alias for the Association. | -| bk_asst_id| string| Association type id| -| bk_obj_id| string| Source model id| -| bk_asst_obj_id| string| Target model id| -| mapping| string| The mapping relationship of the Association relationship instance between the source model and the target model can be one of the following [1: 1,1:n, n: n]| -| on_delete| string| The action to delete an Association is one [of none, delete_src, delete_dest], "none" does nothing, "delete_src" deletes an instance of the source model, and "delete_dest" deletes an instance of the target model.| -| bk_supplier_account | string |Developer account number | -| ispre | bool | True: preset field,false: Non-built-in field | \ No newline at end of file +| Field | Type | Description | +| ------------------- | ------ | ------------------------------------------------------------ | +| id | int64 | Identity ID of the model association relationship | +| bk_obj_asst_id | string | Unique ID of the model association relationship. | +| bk_obj_asst_name | string | Alias of the association relationship. | +| bk_asst_id | string | ID of the association type | +| bk_obj_id | string | Source model ID | +| bk_asst_obj_id | string | Target model ID | +| mapping | string | Mapping relationship between the source model and the target model, one of [1:1, 1:n, n:n] | +| on_delete | string | Action when deleting the association relationship, one of [none, delete_src, delete_dest]. "none" does nothing, "delete_src" deletes instances of the source model, "delete_dest" deletes instances of the target model. | +| bk_supplier_account | string | Developer account | +| ispre | bool | true: pre-installed field, false: non-built-in field | \ No newline at end of file diff --git a/docs/apidoc/cc/en/find_set_batch.md b/docs/apidoc/cc/en/find_set_batch.md index cd642f4492..2273883865 100644 --- a/docs/apidoc/cc/en/find_set_batch.md +++ b/docs/apidoc/cc/en/find_set_batch.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Obtain the attribute details of the set under the specified service in batches according to the service id, set instance id list and the attribute list you want to obtain (v3.8.6) +Batch obtain the property details of specified clusters under the specified business based on the business ID and the list of cluster instance IDs, and the list of properties to be returned. (v3.8.6) ### Request Parameters @@ -8,13 +8,13 @@ Obtain the attribute details of the set under the specified service in batches #### Interface Parameters -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_biz_id | int |yes | Business ID | -| bk_ids | array |yes | Set instance ID list, namely bk_set_id list, can be filled with up to 500 | -| fields | array | yes | Set attribute list, which controls which fields are in the set information of the returned result | +| Field | Type | Required | Description | +| --------- | ----- | -------- | ------------------------------------------------------------ | +| bk_biz_id | int | Yes | Business ID | +| bk_ids | array | Yes | List of cluster instance IDs, i.e., bk_set_id list, up to 500 | +| fields | array | Yes | List of cluster properties, control which fields are included in the returned cluster information | -### Request Parameters Example +### Request Parameter Example ```json { @@ -35,7 +35,7 @@ Obtain the attribute details of the set under the specified service in batches } ``` -### Return Result Example +### Response Example ```json { @@ -61,13 +61,39 @@ Obtain the attribute details of the set under the specified service in batches } ``` -### Return Result Parameters Description +### Response Parameters Description + #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------------ | -| result | bool | Whether the request succeeded or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | + +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 represents success, >0 represents a failure error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | array | Data returned by the request | + +#### data + +| Field | Type | Description | +| -------------------- | ------ | ------------------------------------------------------------ | +| bk_set_name | string | Cluster name | +| default | int | 0-normal cluster, 1-built-in module collection, default is 0 | +| bk_biz_id | int | Business ID | +| bk_capacity | int | Design capacity | +| bk_parent_id | int | Parent node ID | +| bk_set_id | int | Cluster ID | +| bk_service_status | string | Service status: 1/2 (1: open, 2: closed) | +| bk_set_desc | string | Cluster description | +| bk_set_env | string | Environment type: 1/2/3 (1: test, 2: experience, 3: formal) | +| create_time | string | Creation time | +| last_time | string | Update time | +| bk_supplier_account | string | Developer account | +| description | string | Description information of the data | +| set_template_version | array | Current version of the cluster template | +| set_template_id | int | Cluster template ID | +| bk_created_at | string | Creation time | +| bk_updated_at | string | Update time | + +**Note: The returned values here only explain the system-built property fields. The rest of the returned values depend on the user's own defined property fields.** \ No newline at end of file diff --git a/docs/apidoc/cc/en/find_topo_node_paths.md b/docs/apidoc/cc/en/find_topo_node_paths.md index 99ac50f1d4..7817239649 100644 --- a/docs/apidoc/cc/en/find_topo_node_paths.md +++ b/docs/apidoc/cc/en/find_topo_node_paths.md @@ -1,9 +1,8 @@ -### Functional description +### Function Description -This interface is used to query the path information from the parent level of a node to the service vertex according to a node instance (including a custom node level instance) in the service topology level. (v3.9.1) +This interface is used to query the path information from a node instance in the business topology hierarchy to the business vertex based on a certain business topology level (including custom topology level). (v3.9.1) -**Attention.** -The interface has a cache, and the maximum time for cache updates is 5 minutes. +**Note** This interface has a cache, and the longest cache update time is 5 minutes. ### Request Parameters @@ -11,20 +10,19 @@ The interface has a cache, and the maximum time for cache updates is 5 minutes. #### Interface Parameters -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_biz_id | int |yes | Business ID | -| bk_nodes | array |yes | List of service topology instance node information to query. The maximum number of queries is 1000| +| Field | Type | Required | Description | +| --------- | ----- | -------- | ------------------------------------------------------------ | +| bk_biz_id | int | Yes | Business ID | +| bk_nodes | array | Yes | List of business topology instance node information to be queried, with a maximum query quantity of 1000 | +#### Explanation of bk_nodes Fields -#### bk_nodes Field Description +| Field | Type | Required | Description | +| ---------- | ------ | -------- | ------------------------------------------------------------ | +| bk_obj_id | string | Yes | Business topology node model name, such as biz, set, module, and the model name of custom level | +| bk_inst_id | int | Yes | The instance ID of the business topology node | -| Field| Type | Required| Description | -| ----- | ------ | ---- | --------------------- | -| bk_obj_id | string | yes | Business topology node model name, such as biz,set,module and user-defined hierarchy model name | -| bk_inst_id | int | yes | The instance ID of the service topology node| - -### Request Parameters Example +### Request Parameter Example ```json { @@ -50,7 +48,7 @@ The interface has a cache, and the maximum time for cache updates is 5 minutes. } ``` -### Return Result Example +### Response Example ```json { @@ -121,28 +119,31 @@ The interface has a cache, and the maximum time for cache updates is 5 minutes. } ``` -### Return Result Parameters Description +### Response Parameters Description + #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------------ | -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | - - -#### Data description -| Field | Type | Description | -|-----------|------------|------------| -| bk_obj_id | string | Business topology node model name, such as biz,set,module and user-defined hierarchy model name | -| bk_inst_id | int | The instance ID of the service topology node| -| bk_paths | array| Hierarchy information of the node, i.e. Hierarchy information from the service to the parent node of the node| - -#### bk_paths description -| Field | Type | Description | -|-----------|------------|------------| -| bk_obj_id | string | Node type | -| bk_inst_id | int | Node instance ID| -| bk_inst_name | string | Node instance name| + +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 represents success, >0 represents a failure error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned by the request | + +#### Explanation of data + +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| bk_obj_id | string | Business topology node model name, such as biz, set, module, and the model name of custom level | +| bk_inst_id | int | The instance ID of the business topology node | +| bk_paths | array | The hierarchical information of the node, that is, the hierarchical information from the business to the parent node of the node | + +#### Explanation of bk_paths + +| Field | Type | Description | +| ------------ | ------ | ------------------ | +| bk_obj_id | string | Node type | +| bk_inst_id | int | Node instance ID | +| bk_inst_name | string | Node instance name | \ No newline at end of file diff --git a/docs/apidoc/cc/en/get_biz_brief_cache_topo.md b/docs/apidoc/cc/en/get_biz_brief_cache_topo.md index 9f73ae0abf..d56caa8961 100644 --- a/docs/apidoc/cc/en/get_biz_brief_cache_topo.md +++ b/docs/apidoc/cc/en/get_biz_brief_cache_topo.md @@ -1,11 +1,11 @@ -### Functional description +### Function Description -According to the service ID, querying the full-volume concise topology tree information of the service.(v3.9.14) -The full information of the service topology includes all topology hierarchy tree data from the root node of the service, to the user-defined hierarchy instance (if included in the topology hierarchy of the main line), to the middle of the set , module, etc. +This interface is used to query the full simplified topology tree information of a business based on the business ID. (v3.9.14) The full information of the business topology contains all the topology tree data from the root node of the business, to custom level instances (if included in the main topology level), to clusters, modules, and other intermediate topology levels. Note: -- This interface is a cache interface and the default full cache refresh time is 15 minutes. -- If the topology information of the service changes, the topology data of the service will be refreshed and cached in real time through the event mechanism. + +- This interface is a cache interface, and the default full cache refresh time is 15 minutes. +- If the topology information of the business changes, the cache of the business topology data will be refreshed in real-time through the event mechanism. ### Request Parameters @@ -13,12 +13,11 @@ Note: #### Interface Parameters -| Field | Type | Required | Description | -|----------------------|------------|--------|--------------------------------------------------| -| bk_biz_id | int | yes | ID of the business to which the business topology to query belongs | - +| Field | Type | Required | Description | +| --------- | ---- | -------- | ------------------------------------------------------------ | +| bk_biz_id | int | Yes | ID of the business to which the business topology to be queried belongs | -### Request Parameters Example +### Request Parameter Example ```json { @@ -30,7 +29,7 @@ Note: } ``` -### Return Result Example +### Response Example ```json { @@ -50,27 +49,27 @@ Note: { "obj": "set", "id": 3, - "nm": "Idle pool", + "nm": "Idle Host Pool", "dft": 1, "nds": [ { "obj": "module", "id": 7, - "nm": "Idle machine", + "nm": "Idle Host", "dft": 1, "nds": null }, { "obj": "module", "id": 8, - "nm": "Faulty machine", + "nm": "Fault Host", "dft": 2, "nds": null }, { "obj": "module", "id": 9, - "nm": "To be recycled", + "nm": "To Be Recycled", "dft": 3, "nds": null } @@ -112,46 +111,48 @@ Note: } ``` -### Return Result Parameters Description +### Response Parameters Description + #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------------ | -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | - -#### Data.biz Parameter Description - -| Field | Type | Description | -| ------------ | ------------ | -------- | -| id | int | Service ID | -| nm | string | Business name | -| dft | int |Business type, the value>= 0,0: Indicates that the service is an ordinary service. 1: indicates that the service is a resource pool service| -| bk_supplier_account | string | Developer account number | -#### Data.idle object parameter Description -The data in the idle object indicates the data in the idle set of the service. There is only one idle set at present, and there may be multiple sets in the future. Please do not rely on this quantity. - -| Field | Type | Description | -| ------------ | ------------ | -------- | -| obj | string| The object of the resource may be the module id(bk_obj_id field value), set, module, etc. Corresponding to the business user-defined level.| -| id | int | The ID of the instance | -| nm | string | The name of the instance| -| dft | int | This value>=0. Only set and module have this field. 0: Represents a common set or module,>1: set or module represented as an idle machine class. | -| nds | object | Child node information to which this node belongs| - -#### Data.NDS object parameter Description -Describe the topology data of other topology nodes except idle set under the service. The object is an array object and is empty if there are no other nodes. -The object for each node is described below, and each node and its corresponding child nodes are nested one by one according to the topology level. -It should be noted that the nds node of module must be empty, and module is the lowest node in the whole service topology tree. - -| Field | Type | Description | -| ------------ | ------------ | -------- | -| obj | string| The object of the resource may be the module id(bk_obj_id field value), set, module, etc. Corresponding to the business user-defined level.| -| id | int | The ID of the instance | -| nm | string | The name of the instance| -| dft | int | This value>=0. Only set and module have this field. 0: Represents a common set or module,>1: set or module represented as an idle machine class. | -| nds | object | The information of the child nodes to which the node belongs is circularly nested step by step according to the topology level. | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 represents success, >0 represents a failure error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned by the request | + +#### Explanation of data.biz Parameters + +| Field | Type | Description | +| ------------------- | ------ | ------------------------------------------------------------ | +| id | int | Business ID | +| nm | string | Business name | +| dft | int | Business type, the value is >=0, 0: indicates that the business is a regular business. 1: indicates that the business is a resource pool business | +| bk_supplier_account | string | Supplier account | + +#### Explanation of data.idle Object Parameters + +The data in the idle object represents the data in the idle set of the business. Currently, there is only one idle set, and there may be more sets in the future. Do not rely on this quantity. + +| Field | Type | Description | +| ----- | ------ | ------------------------------------------------------------ | +| obj | string | Object of this resource, can be the module ID corresponding to the business custom level (value of the bk_obj_id field), set, module, etc. | +| id | int | ID of this instance | +| nm | string | Name of this instance | +| dft | int | The value is >=0. Only set and module have this field. 0: indicates a regular cluster or module, >1: indicates a set or module for idle hosts. | +| nds | object | Subnode information of this node | + +#### Explanation of data.nds Object Parameters + +Describes the topology data of other topology nodes except the idle set in the business. This object is an array object. If there are no other nodes, it is empty. Each node object is described as follows, nesting one by one with its corresponding child nodes. It should be noted that the "nds" node of the module must be empty. The module is the bottommost node in the entire business topology tree. + +| Field | Type | Description | +| ----- | ------ | ------------------------------------------------------------ | +| obj | string | Object of this resource, can be the module ID corresponding to the business custom level (value of the bk_obj_id field), set, module, etc. | +| id | int | ID of this instance | +| nm | string | Name of this instance | +| dft | int | The value is >=0. Only set and module have this field. 0: indicates a regular cluster or module, >1: indicates a set or module for idle hosts. | +| nds | object | Subnode information of this node, nested one by one according to the topology level. | \ No newline at end of file diff --git a/docs/apidoc/cc/en/get_biz_internal_module.md b/docs/apidoc/cc/en/get_biz_internal_module.md index 01c9aa6b9e..647d0d4e07 100644 --- a/docs/apidoc/cc/en/get_biz_internal_module.md +++ b/docs/apidoc/cc/en/get_biz_internal_module.md @@ -1,22 +1,20 @@ -### Functional description +### Function Description -The service idle machine, that fault machine and the module to be recycle are obtained accord to the service ID +Get business idle hosts, faulty hosts, and modules to be recycled based on the business ID. ### Request Parameters {{ common_args_desc }} - #### Interface Parameters -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_biz_id | int | yes | Business ID | +| Field | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| bk_biz_id | int | Yes | Business ID | -### Request Parameters Example +### Request Parameter Example ```python - { "bk_app_code": "esb_test", "bk_app_secret": "xxx", @@ -26,7 +24,7 @@ The service idle machine, that fault machine and the module to be recycle are ob } ``` -### Return Result Example +### Response Example ```python { @@ -37,23 +35,23 @@ The service idle machine, that fault machine and the module to be recycle are ob "request_id": "e43da4ef221746868dc4c837d36f3807", "data": { "bk_set_id": 2, - "bk_set_name": "Idle machine", + "bk_set_name": "idle pool", "module": [ { "bk_module_id": 3, - "bk_module_name": "Idle machine", + "bk_module_name": "idle host", "default": 1, "host_apply_enabled": false }, { "bk_module_id": 4, - "bk_module_name": "Faulty machine", + "bk_module_name": "fault host", "default": 2, "host_apply_enabled": false }, { "bk_module_id": 5, - "bk_module_name": "To be recycled", + "bk_module_name": "recycle host", "default": 3, "host_apply_enabled": false } @@ -62,28 +60,32 @@ The service idle machine, that fault machine and the module to be recycle are ob } ``` -### Return Result Parameters Description +### Response Parameters Description + #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------------ | -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | - - -#### Data description -| Field | Type | Description | -|-----------|------------|------------| -|bk_set_id | int64 |The instance ID of the set to which the idle machine, the failed machine, and the module to be recycled belong| -|bk_set_name | string |The instance name of the set to which the idle machine, the failed machine, and the module to be recycled belong| - -#### Module description -| Field | Type | Description | -|-----------|------------|------------| -|bk_module_id | int |The instance ID of the idle machine, failed machine, or module to be recycled| -|bk_module_name | string |The instance name of the idle machine, failed machine, or module to be recycled| -|default | int |Indicates the module type| -| host_apply_enabled| bool| Enable automatic application of host properties| + +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 represents success, >0 represents a failure error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned by the request | + +#### Explanation of data Parameters + +| Field | Type | Description | +| ----------- | ------ | ------------------------------------------------------------ | +| bk_set_id | int64 | Instance ID of the set to which idle hosts, faulty hosts, and modules to be recycled belong | +| bk_set_name | string | Instance name of the set to which idle hosts, faulty hosts, and modules to be recycled belong | +| module | array | Information about idle hosts, faulty hosts, and modules to be recycled | + +#### Explanation of module Parameters + +| Field | Type | Description | +| ------------------ | ------ | ------------------------------------------------------------ | +| bk_module_id | int | Instance ID of idle hosts, faulty hosts, or modules to be recycled | +| bk_module_name | string | Instance name of idle hosts, faulty hosts, or modules to be recycled | +| default | int | Indicates the module type | +| host_apply_enabled | bool | Whether to enable automatic application of host properties | \ No newline at end of file diff --git a/docs/apidoc/cc/en/get_dynamic_group.md b/docs/apidoc/cc/en/get_dynamic_group.md index cdf4b0481f..aa1dfcf3d3 100644 --- a/docs/apidoc/cc/en/get_dynamic_group.md +++ b/docs/apidoc/cc/en/get_dynamic_group.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Get dynamic grouping details (V3.9.6) +Get details of a dynamic group (Version: v3.9.6, Permission: Business access permission) ### Request Parameters @@ -8,12 +8,12 @@ Get dynamic grouping details (V3.9.6) #### Interface Parameters -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_biz_id | int | yes | Business ID | -| id | string |yes | Target dynamic grouping pk ID| +| Field | Type | Required | Description | +| --------- | ------ | -------- | ----------------------------------- | +| bk_biz_id | int | Yes | Business ID | +| id | string | Yes | Target dynamic group primary key ID | -### Request Parameters Example +### Request Parameter Example ```json { @@ -26,7 +26,7 @@ Get dynamic grouping details (V3.9.6) } ``` -### Return Result Example +### Response Example ```json { @@ -84,43 +84,50 @@ Get dynamic grouping details (V3.9.6) } ``` -### Return result parameter +### Response Parameters Description + #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | - -#### data - -| Field | Type | Description | -|-----------|-----------|-----------| -| bk_biz_id | int | Business ID | -| id | string |Dynamic grouping pk ID| -| bk_obj_id | string |Target resource object type of dynamic grouping, which can be host,set at present| -| name | string |Dynamic group naming| -| info | object |Dynamic grouping rule information| -| last_time | string |Update time| -| modify_user | string |Modifier| -| create_time | string |Settling time| -| create_user | string |Creator| - -#### data.info.condition - -| Field | Type | Description | -|-----------|-----------|------------| -| bk_obj_id | string | Conditional object resource type, info.conditon supported for dynamic grouping of host type: set,module,host; Info.conditions supported for dynamic grouping of type set: set| -| condition | array | Query criteria| - -#### data.info.condition.condition - -| Field | Type | Description | -|-----------|------------|------------| -| field | string | Fields of the object| -| operator | string | Operator with op values eq(equal)/ne(unequal)/in(of)/nin(not of)| -| value | object | The value corresponding to the field| +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 represents success, >0 represents a failure error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned by the request | + +#### Explanation of data Parameters + +| Field | Type | Description | +| ----------- | ------ | ------------------------------------------------------------ | +| bk_biz_id | int | Business ID | +| id | string | Dynamic group primary key ID | +| bk_obj_id | string | Target resource object type of dynamic group, which can be host or set for now | +| name | string | Dynamic group naming | +| info | object | Dynamic group rule information | +| last_time | string | Update time | +| modify_user | string | Modifier | +| create_time | string | Creation time | +| create_user | string | Creator | + +#### Explanation of info Parameters + +| Field | Type | Description | +| --------- | ----- | ---------------- | +| condition | array | Query conditions | + +#### Explanation of condition Parameters + +| Field | Type | Description | +| --------- | ------ | ------------------------------------------------------------ | +| bk_obj_id | string | Condition object resource type, the dynamic group of the host type supports info.conditon:set,module,host; the dynamic group of the set type supports info.condition:set | +| condition | array | Query conditions | + +#### Explanation of condition.condition Parameters + +| Field | Type | Description | +| -------- | ------ | ------------------------------------------------------------ | +| field | string | Object field | +| operator | string | Operator, op value can be eq (equal)/ne (not equal)/in (belongs to)/nin (does not belong to) | +| value | object | Value corresponding to the field | \ No newline at end of file diff --git a/docs/apidoc/cc/en/get_mainline_object_topo.md b/docs/apidoc/cc/en/get_mainline_object_topo.md index 017c47090c..cfeb47f0d0 100644 --- a/docs/apidoc/cc/en/get_mainline_object_topo.md +++ b/docs/apidoc/cc/en/get_mainline_object_topo.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Get the business topology of the mainline model +Get the business topology of the mainline model. ### Request Parameters @@ -8,10 +8,11 @@ Get the business topology of the mainline model #### Interface Parameters -| Field | Type | Required | Description | -|-----------|------------|--------|------------| +| Field | Type | Required | Description | +| ----- | ---- | -------- | ----------- | +| | | | | -### Request Parameters Example +### Request Parameter Example ```python { @@ -22,76 +23,77 @@ Get the business topology of the mainline model } ``` -### Return Result Example +### Response Example ```python { - "result": true, - "code": 0, - "message": "success", - "permission": null, - "request_id": "e43da4ef221746868dc4c837d36f3807", - "data": [ - { - "bk_obj_id": "biz", - "bk_obj_name": "business", - "bk_supplier_account": "0", - "bk_next_obj": "set", - "bk_next_name": "set", - "bk_pre_obj_id": "", - "bk_pre_obj_name": "" - }, - { - "bk_obj_id": "set", - "bk_obj_name": "set", - "bk_supplier_account": "0", - "bk_next_obj": "module", - "bk_next_name": "module", - "bk_pre_obj_id": "biz", - "bk_pre_obj_name": "business" - }, - { - "bk_obj_id": "module", - "bk_obj_name": "module", - "bk_supplier_account": "0", - "bk_next_obj": "host", - "bk_next_name": "host", - "bk_pre_obj_id": "set", - "bk_pre_obj_name": "set" - }, - { - "bk_obj_id": "host", - "bk_obj_name": "host", - "bk_supplier_account": "0", - "bk_next_obj": "", - "bk_next_name": "", - "bk_pre_obj_id": "module", - "bk_pre_obj_name": "module" - } - ] + "result": true, + "code": 0, + "message": "success", + "permission": null, + "request_id": "e43da4ef221746868dc4c837d36f3807", + "data": [ + { + "bk_obj_id": "biz", + "bk_obj_name": "Business", + "bk_supplier_account": "0", + "bk_next_obj": "set", + "bk_next_name": "Set", + "bk_pre_obj_id": "", + "bk_pre_obj_name": "" + }, + { + "bk_obj_id": "set", + "bk_obj_name": "Set", + "bk_supplier_account": "0", + "bk_next_obj": "module", + "bk_next_name": "Module", + "bk_pre_obj_id": "biz", + "bk_pre_obj_name": "Business" + }, + { + "bk_obj_id": "module", + "bk_obj_name": "Module", + "bk_supplier_account": "0", + "bk_next_obj": "host", + "bk_next_name": "Host", + "bk_pre_obj_id": "set", + "bk_pre_obj_name": "Set" + }, + { + "bk_obj_id": "host", + "bk_obj_name": "Host", + "bk_supplier_account": "0", + "bk_next_obj": "", + "bk_next_name": "", + "bk_pre_obj_id": "module", + "bk_pre_obj_name": "Module" + } + ] } ``` -### Return Result Parameters Description +### Response Parameters Description #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: success; false: failure | +| code | int | Error code. 0 indicates success, >0 indicates a failure error | +| message | string | Error message returned in case of request failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned by the request | #### data -| Field | Type | Description | -|-----------|------------|------------| -|bk_obj_id | string |The unique ID of the model| -|bk_obj_name | string |Model name| -|bk_supplier_account | string |Developer account name| -|bk_next_obj | string |The next model unique ID of the current model| -|bk_next_name | string |Next model name for the current model| -|bk_pre_obj_id | string |Unique ID of the previous model of the current model| -|bk_pre_obj_name | string |The name of the model preceding the current model| + +| Field | Type | Description | +| ------------------- | ------ | ----------------------------------------------------- | +| bk_obj_id | string | Unique ID of the model | +| bk_obj_name | string | Model name | +| bk_supplier_account | string | Developer account name | +| bk_next_obj | string | Unique ID of the next model for the current model | +| bk_next_name | string | Name of the next model for the current model | +| bk_pre_obj_id | string | Unique ID of the previous model for the current model | +| bk_pre_obj_name | string | Name of the previous model for the current model | \ No newline at end of file diff --git a/docs/apidoc/cc/en/get_proc_template.md b/docs/apidoc/cc/en/get_proc_template.md index a50fe1b3df..75f5b03e29 100644 --- a/docs/apidoc/cc/en/get_proc_template.md +++ b/docs/apidoc/cc/en/get_proc_template.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Obtain process template information, and specify process template ID in url parameter +Get process template information by specifying the process template ID in the URL. ### Request Parameters @@ -8,12 +8,12 @@ Obtain process template information, and specify process template ID in url para #### Interface Parameters -| Field | Type | Required | Description | -|----------------------|------------|--------|-----------------------| -| bk_biz_id | int | yes | Business ID | -| process_template_id | int | yes | Process template ID | +| Field | Type | Required | Description | +| ------------------- | ---- | -------- | ------------------- | +| bk_biz_id | int | No | Business ID | +| process_template_id | int | Yes | Process template ID | -### Request Parameters Example +### Request Parameter Example ```python { @@ -22,11 +22,11 @@ Obtain process template information, and specify process template ID in url para "bk_username": "xxx", "bk_token": "xxx", "bk_biz_id": 1, - "process_template_id": 49, + "process_template_id": 49 } ``` -### Return Result Example +### Response Result Example ```json { @@ -145,70 +145,70 @@ Obtain process template information, and specify process template ID in url para "bk_supplier_account": "0" } } - ``` -### Return Result Parameters Description +### Response Parameters Description #### response -| Name| Type| Description| -|---|---|---| -| result | bool |Whether the request was successful or not. True: request succeeded;false request failed| -| code | int |Wrong code. 0 indicates success,>0 indicates failure error| -| message | string |Error message returned by request failure| -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request| - -#### Data field Description -| Name| Type| Description| -|---|---|---| -| id |int |Process template id| -| bk_process_name |string |Process alias| -| bk_biz_id | int| Business ID | -| service_template_id| int| Service template id| -| property | object |Process properties| -| creator | string | Creator of this data | -| modifier | string | The last person to modify this piece of data | -| create_time | string |Settling time | -| last_time | string |Update time | -| bk_supplier_account | string | Developer account number| - -#### Property Field Description - -| Field| Type| Description| -|---|---|---| -|auto_start| bool| Whether to pull up automatically| -|auto_time_gap| int| Pull up interval| -|bk_biz_id| int| Business ID | -|bk_func_id| string| Function ID| -|bk_func_name| string| Process name| -|bk_process_id| int| Process id| -|bk_process_name| string| Process alias| -|bk_start_param_regex| string| Process start parameters| -|bk_supplier_account| string| Developer account number| -|create_time| string| Settling time| -|description| string| Description| -|face_stop_cmd| string| Forced stop command| -|last_time| string| Update time| -|pid_file| string| PID file path| -|priority| int| Startup priority| -|proc_num| int| Number of starts| -|reload_cmd| string| Process reload command| -|restart_cmd| string| Restart command| -|start_cmd| string| Start command| -|stop_cmd| string| Stop order| -|timeout| int| Operation time-out duration| -|user| string| Start user| -|work_path| string| Working path| -|bind_info| object| Binding information| - -#### Bind_info Field Description -| Field| Type| Description| -|---|---|---| -|enable| bool| Is the port enabled| -|ip| string| Bound ip| -|port| string| Bound port| -|protocol| string| Protocol used| -|row_id| int| Template row index used for instantiation, unique in process| \ No newline at end of file +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: success; false: failure | +| code | int | Error code. 0 indicates success, >0 indicates a failure error | +| message | string | Error message returned in case of request failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned by the request | + +#### data Field Description + +| Field | Type | Description | +| ------------------- | ------ | -------------------------- | +| id | int | Process template ID | +| bk_process_name | string | Process alias | +| bk_biz_id | int | Business ID | +| service_template_id | int | Service template ID | +| property | object | Process properties | +| creator | string | Creator of this data | +| modifier | string | Last modifier of this data | +| create_time | string | Creation time | +| last_time | string | Last update time | +| bk_supplier_account | string | Supplier account | + +#### property Field Description + +| Field | Type | Description | +| -------------------- | ------ | ---------------------------- | +| auto_start | bool | Auto start flag | +| bk_biz_id | int | Business ID | +| bk_func_id | string | Function ID | +| bk_func_name | string | Process name | +| bk_process_id | int | Process ID | +| bk_process_name | string | Process alias | +| bk_start_param_regex | string | Process start parameters | +| bk_supplier_account | string | Supplier account | +| create_time | string | Creation time | +| description | string | Description | +| face_stop_cmd | string | Force stop command | +| last_time | string | Last update time | +| pid_file | string | PID file path | +| priority | int | Start priority | +| proc_num | int | Number of instances to start | +| reload_cmd | string | Process reload command | +| restart_cmd | string | Restart command | +| start_cmd | string | Start command | +| stop_cmd | string | Stop command | +| timeout | int | Operation timeout | +| user | string | Start user | +| work_path | string | Working directory | +| bind_info | object | Binding information | + +#### bind_info Field Description + +| Field | Type | Description | +| -------- | ------ | ------------------------------------------------------------ | +| enable | bool | Whether the port is enabled | +| ip | string | Bound IP | +| port | string | Bound port | +| protocol | string | Used protocol | +| row_id | int | Template row index used for instantiation, unique within the process | \ No newline at end of file diff --git a/docs/apidoc/cc/en/get_service_template.md b/docs/apidoc/cc/en/get_service_template.md index 8742d4e176..b888d5ad63 100644 --- a/docs/apidoc/cc/en/get_service_template.md +++ b/docs/apidoc/cc/en/get_service_template.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Obtain service template according to service template ID +Get service template by service template ID. ### Request Parameters @@ -8,12 +8,11 @@ Obtain service template according to service template ID #### Interface Parameters -| Field | Type | Required | Description | -|----------------------|------------|--------|-----------------------| -| service_template_id | int |yes | Service template ID| +| Field | Type | Required | Description | +| ------------------- | ---- | -------- | ------------------- | +| service_template_id | int | Yes | Service template ID | - -### Request Parameters Example +### Request Parameter Example ```json { @@ -25,8 +24,7 @@ Obtain service template according to service template ID } ``` - -### Return Result Example +### Response Result Example ```json { @@ -44,34 +42,36 @@ Obtain service template according to service template ID "modifier": "admin", "create_time": "2020-05-26T09:46:15.259Z", "last_time": "2020-05-26T09:46:15.259Z", - "bk_supplier_account": "0" + "bk_supplier_account": "0", + "host_apply_enabled": false } } ``` -### Return Result Parameters Description +### Response Parameters Description #### response -| Name| Type| Description| -|---|---|---| -| result | bool |Whether the request was successful or not. True: request succeeded;false request failed| -| code | int |Wrong code. 0 indicates success,>0 indicates failure error| -| message | string |Error message returned by request failure| -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request| - -#### Data field Description - -| Field| Type| Description| -|---|---|---| -|bk_biz_id| int| Business ID | -|id| int| Service template ID| -|name| array| Service template name| -|service_category_id| integer| Service class ID| -| creator | string |Creator | -| modifier | string |Last modified by| -| create_time | string |Settling time | -| last_time | string |Update time | -| bk_supplier_account | string |Developer account number | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: success; false: failure | +| code | int | Error code. 0 indicates success, >0 indicates a failure error | +| message | string | Error message returned in case of request failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned by the request | + +#### data Field Description + +| Field | Type | Description | +| ------------------- | ------- | ---------------------------------------------------------- | +| bk_biz_id | int | Business ID | +| id | int | Service template ID | +| name | array | Service template name | +| service_category_id | integer | Service category ID | +| creator | string | Creator of the service template | +| modifier | string | Last modifier of the service template | +| create_time | string | Creation time | +| last_time | string | Last update time | +| bk_supplier_account | string | Supplier account | +| host_apply_enabled | bool | Whether to enable automatic application of host properties | \ No newline at end of file diff --git a/docs/apidoc/cc/en/host_install_bk.md b/docs/apidoc/cc/en/host_install_bk.md index d6acb7d39e..352104e41a 100644 --- a/docs/apidoc/cc/en/host_install_bk.md +++ b/docs/apidoc/cc/en/host_install_bk.md @@ -1,11 +1,12 @@ -### Functional description +### Function Description -Install the host to the blue whale business as follows: -1. Can only operate blue whale business -2. Host can not be transferred to built-in modules such as idle and failed machines -3. Host modules that already exist in the host will not be deleted, only new hosts and modules will be added. -4. The non-existent host will be added, and the rule will judge whether the host exists through the intranet IP and cloud id -5. No error reported if process does not exist +Install a host to the BlueKing business with the following details: + +1. Can only operate in the BlueKing business. +2. Cannot transfer hosts to built-in modules such as idle machines and faulty machines. +3. Will not delete existing host modules; it will only add the host to the module. +4. Newly add hosts if they do not exist; the rule is determined by the intranet IP and cloud ID to check if the host exists. +5. No error will be reported if the process does not exist. ### Request Parameters @@ -13,43 +14,38 @@ Install the host to the blue whale business as follows: #### Interface Parameters -| Field | Type | Required | Description | -|----------------------|------------|--------|-----------------------| -| bk_set_name | string | yes | The set name where the host resides | -| bk_module_name | string |yes | Module name where the host resides| -| bk_host_innerip | string |yes | Host intranet IP| -| bk_cloud_id | int |no | Cloud area where the host is located, default 0 | -| host_info | object |no | Host details, all fields and values of host model correspond| -| proc_info | object |no| The value of the process in the service instance of the host under the current module, {"process name":{"Process properties": value}}, referencing the process model| - - - +| Field | Type | Required | Description | +| --------------- | ------ | -------- | ------------------------------------------------------------ | +| bk_set_name | string | Yes | Name of the cluster where the host is located | +| bk_module_name | string | Yes | Name of the module where the host is located | +| bk_host_innerip | string | Yes | Intranet IP of the host | +| bk_cloud_id | int | No | Control area where the host is located; default is 0 | +| host_info | object | No | Host details, corresponding to all fields and values of the host model | +| proc_info | object | No | Values of processes in the service instance under the current module, {"process name": {"process property": value}}, refer to the process model | -### Request Parameters Example +### Request Parameter Example ```python - { "bk_app_code": "esb_test", "bk_app_secret": "xxx", "bk_username": "xxx", "bk_token": "xxx", - "bk_set_name":"set1", - "bk_module_name":"module2", - "bk_host_innerip":"127.0.0.1", - "bk_cloud_id":0, - "host_info":{ - "bk_comment":"test bk_comment 1", - "bk_os_type":"1" + "bk_set_name": "set1", + "bk_module_name": "module2", + "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":{"description":"xxx"} + "proc_info": { + "p1": {"description": "xxx"} } } - ``` -### Return Result Example +### Response Result Example ```python { @@ -61,16 +57,14 @@ Install the host to the blue whale business as follows: } ``` -### Return Result Parameters Description +### Response Parameters Description #### response -| Name| Type| Description| -|---|---|---| -| result | bool |Whether the request was successful or not. True: request succeeded;false request failed| -| code | int |Wrong code. 0 indicates success,>0 indicates failure error| -| message | string |Error message returned by request failure| -| permission | object |Permission information | -| request_id | string |Request chain id | - - +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: success; false: failure | +| code | int | Error code. 0 indicates success, >0 indicates a failure error | +| message | string | Error message returned in case of request failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | \ No newline at end of file diff --git a/docs/apidoc/cc/en/list_biz_hosts.md b/docs/apidoc/cc/en/list_biz_hosts.md index 4caf57712e..07f444f19d 100644 --- a/docs/apidoc/cc/en/list_biz_hosts.md +++ b/docs/apidoc/cc/en/list_biz_hosts.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Query the host under the service according to the service ID, and other filtering information can be attached, such as set id, module id, etc +Query hosts under a business based on business ID, with optional additional filtering information such as cluster ID, module ID, etc. (Permission: Business access permission) ### Request Parameters @@ -8,61 +8,61 @@ Query the host under the service according to the service ID, and other filterin #### Interface Parameters -| Field | Type | Required| Description | -| -------------------- | ------ | ---- | ------------------------------------------------------------ | -| page | object | yes | Query criteria | -| bk_biz_id | int | yes | Business ID | -| bk_set_ids | array |no | List of set IDs, up to 200 **bk_set_ids and set_cond can only use one of them** | -| set_cond | array |no | Only one of the set query criteria **bk_set_ids and set_cond can be used** | -| bk_module_ids | array |no | List of module IDs, up to 500 **bk_module_ids and module_cond only one can be used**| -| module_cond | array |no | Only one of the module query criteria **bk_module_ids and module_cond can be used**| -| host_property_filter | object |no | Host attribute combination query criteria | -| fields | array |yes | Host attribute list, which controls which fields are in the host that returns the result, can speed up interface requests and reduce network traffic transmission| +| Field | Type | Required | Description | +| -------------------- | ------ | -------- | ------------------------------------------------------------ | +| page | object | Yes | Query conditions | +| bk_biz_id | int | Yes | Business ID | +| bk_set_ids | array | No | Cluster ID list, up to 200 items **bk_set_ids and set_cond can only use one of them** | +| set_cond | array | No | Cluster query condition **bk_set_ids and set_cond can only use one of them** | +| bk_module_ids | array | No | Module ID list, up to 500 items **bk_module_ids and module_cond can only use one of them** | +| module_cond | array | No | Module query condition **bk_module_ids and module_cond can only use one of them** | +| host_property_filter | object | No | Combined query conditions for host properties | +| fields | array | Yes | List of host properties, control which fields are returned in the result to speed up the interface request and reduce network traffic transmission | #### host_property_filter -This parameter is a combination of host attribute field filtering rules used to search for hosts based on the host attribute field. The combination supports AND and OR, and can be nested, with a maximum of 2 layers. -The filtering rule is a quadruple`field`,`operator`,`value` -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| condition | string | no | Combined query criteria| -| rules | array | no | Rule| +This parameter is a combination of filtering rules for host property fields, used to search for hosts based on host property fields. The combination supports both AND and OR, and can be nested, with a maximum of 2 levels. The filtering rule is a quadruple `field`, `operator`, `value` +| Field | Type | Required | Description | +| --------- | ------ | -------- | ------------------------ | +| condition | string | No | Combined query condition | +| rules | array | No | Rules | #### rules -| Name | Type | Required| Default value| Description | Description | -| -------- | ------ | ---- | ------ | ------ | ------------------------------------------------------------ | -| field | string |yes | None | Field name| Field name | -| operator | string |yes | None | Operator| Optional values equal,not_equal,in,not_in,less,less_or_equal,greater,greater_or_equal,between,not_between| -| value | - |no | None | Operand| Different values correspond to different value formats | -Assembly rules can be found at: https://github.com/Tencent/bk-cmdb/blob/master/src/common/querybuilder/README.md +| Field | Type | Required | Description | +| -------- | ------ | -------- | ------------------------------------------------------------ | +| field | string | Yes | Field name | +| operator | string | Yes | Operator, optional values equal, not_equal, in, not_in, less, less_or_equal, greater, greater_or_equal, between, not_between | +| value | - | No | Operand, different operators correspond to different value formats | + +Assembly rules can refer to: https://github.com/Tencent/bk-cmdb/blob/master/src/common/querybuilder/README.md #### set_cond -| Field | Type | Required| Description | -| -------- | ------ | ---- | ----------------------------- | -| field | string |yes | Field whose value is set | -| operator | string |yes | Value is: $eq $ne | -| value | string |yes | Field the value corresponding to the set field of the configuration | -#### module_cond -| Field | Type | Required| Description | -| -------- | ------ | ---- | ----------------------------- | -| field | string |yes | Field whose value is module | -| operator | string |yes | Value is: $eq $ne | -| value | string |yes | Field the value corresponding to the module field of the configuration| +| Field | Type | Required | Description | +| -------- | ------ | -------- | ------------------------------------------------------------ | +| field | string | Yes | Value is the field of the cluster | +| operator | string | Yes | Optional values are $eq, $ne | +| value | string | Yes | The value corresponding to the field configured as the cluster field | -#### page +#### module_cond -| Field| Type | Required| Description | -| ----- | ------ | ---- | -------------------- | -| start | int | yes | Record start position | -| limit | int | yes | Limit bars per page, Max. 500| -| sort | string |no | Sort field | +| Field | Type | Required | Description | +| -------- | ------ | -------- | ------------------------------------------------------------ | +| field | string | Yes | Value is the field of the module | +| operator | string | Yes | Optional values are $eq, $ne | +| value | string | Yes | The value corresponding to the field configured as the module field | +#### page +| Field | Type | Required | Description | +| ----- | ------ | -------- | --------------------------- | +| start | int | Yes | Record start position | +| limit | int | Yes | Limit per page, maximum 500 | +| sort | string | No | Sorting field | -### Request Parameters Example +### Request Parameter Example ```json { @@ -70,7 +70,6 @@ Assembly rules can be found at: https://github.com/Tencent/bk-cmdb/blob/master/s "bk_app_secret": "xxx", "bk_username": "xxx", "bk_token": "xxx", - "bk_supplier_account": "0", "page": { "start": 0, "limit": 10, @@ -122,7 +121,7 @@ Assembly rules can be found at: https://github.com/Tencent/bk-cmdb/blob/master/s } ``` -### Return Result Example +### Response Result Example ```json { @@ -153,30 +152,62 @@ Assembly rules can be found at: https://github.com/Tencent/bk-cmdb/blob/master/s } ``` -### Return Result Parameters Description +### Response Parameters Description + #### response -| Name| Type| Description| -|---|---|---| -| result | bool |Whether the request succeeded or not. True: request succeeded;false request failed| -| code | int |Wrong code. 0 indicates success,>0 indicates failure error| -| message | string |Error message returned by request failure| -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request| +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: success; false: failure | +| code | int | Error code. 0 indicates success, >0 indicates a failure error | +| message | string | Error message returned in case of request failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned in the request | #### data -| Field| Type| Description | -| ----- | ----- | ------------ | -| count | int | Number of records | -| info | array |Host actual data| +| Field | Type | Description | +| ----- | ----- | ----------------- | +| count | int | Number of records | +| info | array | Host actual data | #### data.info -| Name | Type | Description | -| ---------------- | ------ | ------------------------------- | -| bk_os_type | string |Operating system type| 1:Linux;2:Windows; 3:AIX | -| bk_mac | string |Intranet MAC address | | -| bk_host_innerip | string |Intranet IP | | -| bk_host_id | int | Host ID | | -| bk_cloud_id | int | Cloud area | | + +| Field | Type | Description | +| -------------------- | ------ | ----------------------------------------- | +| bk_host_name | string | Host name | +| bk_host_innerip | string | Intranet IP | +| bk_host_id | int | Host ID | +| bk_cloud_id | int | Control area | +| import_from | string | Host import source, imported as 3 via API | +| bk_asset_id | string | Fixed asset number | +| bk_cloud_inst_id | string | Cloud host instance ID | +| bk_cloud_vendor | string | Cloud vendor | +| bk_cloud_host_status | string | Cloud host status | +| bk_comment | string | Remarks | +| bk_cpu | int | CPU logical cores | +| bk_cpu_architecture | string | CPU architecture | +| bk_cpu_module | string | CPU model | +| bk_disk | int | Disk capacity (GB) | +| bk_host_outerip | string | Host public IP | +| bk_host_innerip_v6 | string | Host intranet IPv6 | +| bk_host_outerip_v6 | string | Host public IPv6 | +| bk_isp_name | string | ISP name | +| bk_mac | string | Host intranet MAC address | +| bk_mem | int | Host memory capacity (MB) | +| bk_os_bit | string | Operating system bit | +| bk_os_name | string | Operating system name | +| bk_os_type | string | Operating system type | +| bk_os_version | string | Operating system version | +| bk_outer_mac | string | Host public MAC address | +| bk_province_name | string | Province where the host is located | +| bk_service_term | int | Warranty period | +| bk_sla | string | SLA level | +| bk_sn | string | Device SN | +| bk_state | string | Current state | +| bk_state_name | string | Country where the host is located | +| operator | string | Main maintainer | +| bk_bak_operator | string | Backup maintainer | + +**Note: The returned values here only explain the system's built-in property fields. Other returned values depend on the user's self-defined property fields.** \ No newline at end of file diff --git a/docs/apidoc/cc/en/list_biz_hosts_topo.md b/docs/apidoc/cc/en/list_biz_hosts_topo.md index 40936f7458..1e14c5db62 100644 --- a/docs/apidoc/cc/en/list_biz_hosts_topo.md +++ b/docs/apidoc/cc/en/list_biz_hosts_topo.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Query the host and topology information under the service according to the service ID, and attach the filtering information of set , module and host +Query host and topology information based on the business ID, with optional filtering for clusters, modules, and hosts (Permission: Business Access Permission). ### Request Parameters @@ -8,84 +8,80 @@ Query the host and topology information under the service according to the servi #### Interface Parameters -| Field | Type | Required| Description | -| ---------------------- | ------ | ---- | ------------------------------------------------------------ | -| page | object |yes | Paging query criteria, returned host data sorted by bk_host_id | -| bk_biz_id | int | yes | Business ID | -| set_property_filter | object |no | Set attribute combination query criteria | -| module_property_filter | object |no | Module attribute combination query criteria | -| host_property_filter | object |no | Host attribute combination query criteria | -| fields | array |yes | Host attribute list, which controls which fields are in the host that returns the result, can speed up interface requests and reduce network traffic transmission| +| Field | Type | Required | Description | +| ---------------------- | ------ | -------- | ------------------------------------------------------------ | +| page | object | Yes | Pagination query conditions, the returned host data is sorted by bk_host_id. | +| bk_biz_id | int | Yes | Business ID | +| set_property_filter | object | No | Cluster attribute combination query conditions | +| module_property_filter | object | No | Module attribute combination query conditions | +| host_property_filter | object | No | Host attribute combination query conditions | +| fields | array | Yes | Host attribute list, control which fields are in the returned result to accelerate the interface request and reduce network traffic | #### set_property_filter -This parameter is a combination of filtering rules for set attribute fields, and is used to search hosts under the set according to the set attribute fields. The combination supports AND and OR, and can be nested, with a maximum of 2 layers. -The filtering rules are quaternions`field`,`operator`,`value` -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| condition | string | no | Combined query criteria| -| rules | array | no | Rule| +This parameter is the combination of cluster attribute field filtering rules, used to search for hosts under the cluster based on cluster attribute fields. The combination supports AND and OR, nested up to 2 layers. The filtering rule is a quadruple `field`, `operator`, `value`. +| Field | Type | Required | Description | +| --------- | ------ | -------- | --------------------------- | +| condition | string | No | Combination query condition | +| rules | array | No | Rules | #### rules -| Name | Type | Required| Default value| Description | -| -------- | ------ | ---- | ------ | ------------------------------------------------------------ | -| field | string |yes | None | Field name| | -| operator | string |yes | None | Optional values equal,not_equal,in,not_in,less,less_or_equal,greater,greater_or_equal,between,not_between| -| value | - |no | None | Different values correspond to different value formats | -Assembly rules can be found at: https://github.com/Tencent/bk-cmdb/blob/master/src/common/querybuilder/README.md +| Field | Type | Required | Description | +| -------- | ------ | -------- | ------------------------------------------------------------ | +| field | string | Yes | Field name | +| operator | string | Yes | Operator, optional values: equal, not_equal, in, not_in, less, less_or_equal, greater, greater_or_equal, between, not_between | +| value | - | No | Operand, different operators correspond to different value formats | + +Assembly rules can refer to: https://github.com/Tencent/bk-cmdb/blob/master/src/common/querybuilder/README.md #### module_property_filter -This parameter is the combination of module attribute field filtering rules, used to search the host under the module according to the module attribute field. The combination supports AND and OR, and can be nested, with a maximum of 2 layers. -The filtering rule is a quadruple`field`,`operator`,`value` -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| condition | string | no | Combined query criteria| -| rules | array | no | Rule| +This parameter is the combination of module attribute field filtering rules, used to search for hosts under the module based on module attribute fields. The combination supports AND and OR, nested up to 2 layers. The filtering rule is a quadruple `field`, `operator`, `value`. +| Field | Type | Required | Description | +| --------- | ------ | -------- | --------------------------- | +| condition | string | No | Combination query condition | +| rules | array | No | Rules | #### rules -| Name | Type | Required| Default value| Description | -| -------- | ------ | ---- | ------ | ------------------------------------------------------------ | -| field | string |yes | None | Field name| Field name | -| operator | string |yes | None | Optional values equal,not_equal,in,not_in,less,less_or_equal,greater,greater_or_equal,between,not_between| -| value | - |no | None | Different values correspond to different value formats | +| Field | Type | Required | Description | +| -------- | ------ | -------- | ------------------------------------------------------------ | +| field | string | Yes | Field name | +| operator | string | Yes | Operator, optional values: equal, not_equal, in, not_in, less, less_or_equal, greater, greater_or_equal, between, not_between | +| value | - | No | Operand, different operators correspond to different value formats | -Assembly rules can be found at: https://github.com/Tencent/bk-cmdb/blob/master/src/common/querybuilder/README.md +Assembly rules can refer to: https://github.com/Tencent/bk-cmdb/blob/master/src/common/querybuilder/README.md #### host_property_filter -This parameter is a combination of filtering rules for the host attribute field and is used to search for hosts based on the host attribute field. The combination supports AND and OR, and can be nested, with a maximum of 2 layers. -The filtering rule is a quadruple`field`,`operator`,`value` -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| condition | string | no | Combined query criteria| -| rules | array | no | Rule| +This parameter is the combination of host attribute field filtering rules, used to search for hosts based on host attribute fields. The combination supports AND and OR, nested up to 2 layers. The filtering rule is a quadruple `field`, `operator`, `value`. +| Field | Type | Required | Description | +| --------- | ------ | -------- | --------------------------- | +| condition | string | No | Combination query condition | +| rules | array | No | Rules | #### rules -| Name | Type | Required| Default value| Description | -| -------- | ------ | ---- | ------ | ------------------------------------------------------------ | -| field | string |yes | None | Field name| Field name | -| operator | string |yes | None | Optional values equal,not_equal,in,not_in,less,less_or_equal,greater,greater_or_equal,between,not_between| -| value | - |no | None | Different values correspond to different value formats | +| Field | Type | Required | Description | +| -------- | ------ | -------- | ------------------------------------------------------------ | +| field | string | Yes | Field name | +| operator | string | Yes | Operator, optional values: equal, not_equal, in, not_in, less, less_or_equal, greater, greater_or_equal, between, not_between | +| value | - | No | Operand, different operators correspond to different value formats | -Assembly rules can be found at: https://github.com/Tencent/bk-cmdb/blob/master/src/common/querybuilder/README.md +Assembly rules can refer to: https://github.com/Tencent/bk-cmdb/blob/master/src/common/querybuilder/README.md #### page -| Field| Type| Required| Description | -| ----- | ---- | ---- | -------------------- | -| start | int |yes | Record start position | -| limit | int |yes | Limit bars per page, Max. 500| - - +| Field | Type | Required | Description | +| ----- | ---- | -------- | ----------------------------------- | +| start | int | Yes | Record start position | +| limit | int | Yes | Records limit per page, maximum 500 | -### Request Parameters Example +### Request Parameter Example ```json { @@ -194,7 +190,7 @@ Assembly rules can be found at: https://github.com/Tencent/bk-cmdb/blob/master/s } ``` -### Return Result Example +### Response Example ```json { @@ -259,11 +255,11 @@ Assembly rules can be found at: https://github.com/Tencent/bk-cmdb/blob/master/s "topo": [ { "bk_set_id": 10, - "bk_set_name": "空闲机池", + "bk_set_name": "Idle Pool", "module": [ { "bk_module_id": 54, - "bk_module_name": "空闲机" + "bk_module_name": "Idle Host" } ] } @@ -274,50 +270,84 @@ Assembly rules can be found at: https://github.com/Tencent/bk-cmdb/blob/master/s } ``` -### Return Result Parameters Description -#### response +### Response Parameters Description -| Name| Type| Description| -|---|---|---| -| result | bool |Whether the request was successful or not. True: request succeeded;false request failed| -| code | int |Wrong code. 0 indicates success,>0 indicates failure error| -| message | string |Error message returned by request failure| -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request| +#### response +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 means success, >0 means failed error | +| message | string | Error message for failed requests | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned by the request | #### data -| Field| Type| Description | -| ----- | ----- | ------------------ | -| count | int | Number of records | -| info | array |Host data and topology information| +| Field | Type | Description | +| ----- | ----- | ---------------------------------- | +| count | int | Number of records | +| info | array | Host data and topology information | #### data.info -| Field| Type| Description | -| ---- | ----- | ------------ | -| host | dict |Host actual data| -| topo | array |Host topology information| + +| Field | Type | Description | +| ----- | ----- | -------------------- | +| host | dict | Actual host data | +| topo | array | Topology information | #### data.info.host -| Name | Type | Description | -| ---------------- | ------ | ------------------------------- | -| bk_os_type | string |Operating system type| 1:Linux;2:Windows; 3:AIX | -| bk_mac | string |Intranet MAC address | | -| bk_host_innerip | string |Intranet IP | | -| bk_host_id | int | Host ID | | -| bk_cloud_id | int | Cloud area | | + +| Field | Type | Description | +| -------------------- | ------ | ------------------------------------ | +| bk_host_name | string | Host name | +| bk_host_innerip | string | Internal IP | +| bk_host_id | int | Host ID | +| bk_cloud_id | int | Control area | +| import_from | string | Host import source, 3 for API import | +| bk_asset_id | string | Fixed asset number | +| bk_cloud_inst_id | string | Cloud host instance ID | +| bk_cloud_vendor | string | Cloud vendor | +| bk_cloud_host_status | string | Cloud host status | +| bk_comment | string | Comment | +| bk_cpu | int | CPU logical core count | +| bk_cpu_architecture | string | CPU architecture | +| bk_cpu_module | string | CPU model | +| bk_disk | int | Disk capacity (GB) | +| bk_host_outerip | string | Host external IP | +| bk_host_innerip_v6 | string | Host internal IPv6 | +| bk_host_outerip_v6 | string | Host external IPv6 | +| bk_isp_name | string | Operator name | +| bk_mac | string | Host internal MAC address | +| bk_mem | int | Host memory capacity (MB) | +| bk_os_bit | string | Operating system bit number | +| bk_os_name | string | Operating system name | +| bk_os_type | string | Operating system type | +| bk_os_version | string | Operating system version | +| bk_outer_mac | string | Host external MAC address | +| bk_province_name | string | Province name | +| bk_service_term | int | Warranty period | +| bk_sla | string | SLA level | +| bk_sn | string | Device SN | +| bk_state | string | Current status | +| bk_state_name | string | Country name | +| operator | string | Main maintainer | +| bk_bak_operator | string | Backup maintainer | + +**Note: The return value here only explains the system's built-in attribute fields. Other return values depend on the user's own defined attribute fields** #### data.info.topo -| Field | Type | Description | -| ----------- | ------ | ------------------------ | -| bk_set_id | int | The set ID to which the host belongs | -| bk_set_name | string |The name of the set to which the host belongs | -| module | array |Module information under set to which host belongs| + +| Field | Type | Description | +| ----------- | ------ | ------------------ | +| bk_set_id | int | Cluster ID | +| bk_set_name | string | Cluster name | +| module | array | Module information | #### data.info.topo.module -| Field | Type | Description | -| -------------- | ------ | -------- | -| bk_module_id | int | Module ID | -| bk_module_name | string |Module name| + +| Field | Type | Description | +| -------------- | ------ | ----------- | +| bk_module_id | int | Module ID | +| bk_module_name | string | Module name | \ No newline at end of file diff --git a/docs/apidoc/cc/en/list_business_in_business_set.md b/docs/apidoc/cc/en/list_business_in_business_set.md index 0369822a8d..6f0a0858bf 100644 --- a/docs/apidoc/cc/en/list_business_in_business_set.md +++ b/docs/apidoc/cc/en/list_business_in_business_set.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Query business in business set (v3.10.12+) +Query business in the centralized business (Version: v3.10.12+, Permission: Business set access permission) ### Request Parameters @@ -8,45 +8,46 @@ Query business in business set (v3.10.12+) #### Interface Parameters -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_biz_set_id | int | yes | Business set ID| -| filter | object |no | Business attribute combination query criteria| -| fields | array | no | Specify the fields to query. The parameter is any attribute of the business. If you do not fill in the field information, the system will return all the fields of the business| -| page | object |yes | Paging condition| +| Field | Type | Required | Description | +| ------------- | ------ | -------- | ------------------------------------------------------------ | +| bk_biz_set_id | int | Yes | Business set ID | +| filter | object | No | Business attribute combination query conditions | +| fields | array | No | Specify the fields to query, parameters can be any business attribute. If no field information is provided, the system will return all fields of the business | +| page | object | Yes | Pagination conditions | #### filter -Query criteria. The combination supports AND and OR. Can be nested, up to 2 layers. - -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| condition | string |yes | Rule operator| -| rules | array |yes | Scope rule for filtering business| +Query conditions. Supports combination of AND and OR. Can be nested, with a maximum nesting level of 2. +| Field | Type | Required | Description | +| --------- | ------ | -------- | ----------------------------------------- | +| condition | string | Yes | Rule operator | +| rules | array | Yes | Filtering rules for the scope of business | #### rules -The filtering rule is triplet`field`,`operator`,`value` -| Name | Type | Required| Default value| Description | -| -------- | ------ | ---- | ------ | ------------------------------------------------------------ | -| field | string |yes | None | Field name| | -| operator | string |yes | None | Operator| Optional value equal,not_equal,in,not_in,less,less_or_equal,greater,greater_or_equal,between,not_between| -| value | - |no | None | Operand| Different values correspond to different value formats | +Filter rules are triplets `field`, `operator`, `value` + +| Field | Type | Required | Description | +| -------- | ------ | -------- | ------------------------------------------------------------ | +| field | string | Yes | Field name | +| operator | string | Yes | Operator, optional values are equal, not_equal, in, not_in, less, less_or_equal, greater, greater_or_equal, between, not_between | +| value | - | No | Operand, different operators correspond to different value formats | -Assembly rules can be found at: https://github.com/Tencent/bk-cmdb/blob/master/src/common/querybuilder/README.md +Assembly rules can refer to: [QueryBuilder README](https://github.com/Tencent/bk-cmdb/blob/master/src/common/querybuilder/README.md) #### page -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| start | int | yes | Record start position| -| limit | int | yes | Limit bars per page, Max. 500| -| enable_count | bool |yes| Whether to get the flag of the number of query objects| -| sort | string |no | Sort the field. By adding sort in front of the field, for example, sort": sort field" can indicate descending order by field field| +| Field | Type | Required | Description | +| ------------ | ------ | -------- | ------------------------------------------------------------ | +| start | int | Yes | Record start position | +| limit | int | Yes | Number of records per page, maximum 500 | +| enable_count | bool | Yes | Flag to get the count of query objects | +| sort | string | No | Sorting field, by adding a "-", e.g., sort: ""-field"", it represents sorting in descending order by the field | **Note:** -- `enable_count`If this flag is true, then the request is to get the quantity. The remaining fields must be initialized,start is 0, and limit is: 0, sort is "." + +- If `enable_count` is set to true, it indicates that this request is to obtain the count. In this case, other fields must have initial values, start is 0, limit is 0, sort is "". ### Request Parameters Example @@ -87,10 +88,9 @@ Assembly rules can be found at: https://github.com/Tencent/bk-cmdb/blob/master/s } ``` -### Details return result example +### Detailed Information Response Example ```python - { "result": true, "code": 0, @@ -109,10 +109,10 @@ Assembly rules can be found at: https://github.com/Tencent/bk-cmdb/blob/master/s } ``` -### Example of return result of query business quantity +### Query Business Count Response Example -```python -{ +``` +pythonCopy code{ "result":true, "code":0, "message":"", @@ -127,33 +127,48 @@ Assembly rules can be found at: https://github.com/Tencent/bk-cmdb/blob/master/s } ``` -### Return Result Parameters Description +### Response Result Explanation + #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| data | object |Data returned by request | -| request_id | string |Request chain id | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Success or failure of the request. true: success; false: failure | +| code | int | Error code. 0 represents success, >0 represents failure error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| data | object | Data returned by the request | +| request_id | string | Request chain ID | #### data -| Field | Type | Description | -|-----------|-----------|-----------| -| count | int | Number of records| -| info | array | Actual business data| - +| Field | Type | Description | +| ----- | ----- | -------------------- | +| count | int | Number of records | +| info | array | Actual business data | #### info -| Field | Type | Description | -|-----------|-----------|-----------| -| bk_biz_id | int | Business ID | -| bk_biz_name | string | Business name| - +| Field | Type | Description | +| ------------------- | ------ | ------------------------------------------ | +| bk_biz_id | int | Business ID | +| bk_biz_name | string | Business name | +| bk_biz_maintainer | string | Operations personnel | +| bk_biz_productor | string | Product personnel | +| bk_biz_developer | string | Development personnel | +| bk_biz_tester | string | Testing personnel | +| time_zone | string | Time zone | +| language | string | Language, "1" for Chinese, "2" for English | +| bk_supplier_account | string | Supplier account | +| create_time | string | Creation time | +| last_time | string | Update time | +| default | int | Indicates business type | +| operator | string | Main maintainer | +| life_cycle | string | Business lifecycle | +| bk_created_at | string | Creation time | +| bk_updated_at | string | Update time | +| bk_created_by | string | Creator | **Note:** -- If this request is to query details, count is 0. If the query is quantity, info is empty. + +- The returned values here only explain the system's built-in attribute fields, other returned values depend on user-defined attribute fields. \ No newline at end of file diff --git a/docs/apidoc/cc/en/list_business_set.md b/docs/apidoc/cc/en/list_business_set.md index 03f008e583..11cae0fea2 100644 --- a/docs/apidoc/cc/en/list_business_set.md +++ b/docs/apidoc/cc/en/list_business_set.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Query business set (v3.10.12+) +Query business sets (Version: v3.10.12+, Permission: Business set view permission) ### Request Parameters @@ -8,61 +8,62 @@ Query business set (v3.10.12+) #### Interface Parameters -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_biz_set_filter | object |no | Business set condition range| -| time_condition | object |no | Business set time range| -| fields | array | no | Query criteria. The parameter is any attribute of the business. If it is not written, it means to search all data.| -| page | object |Yes. | Paging condition| +| Field | Type | Required | Description | +| ----------------- | ------ | -------- | ------------------------------------------------------------ | +| bk_biz_set_filter | object | No | Business set condition range | +| time_condition | object | No | Business set time range | +| fields | array | No | Query conditions, parameters can be any business attribute. If not provided, search all data | +| page | object | Yes | Pagination conditions | #### bk_biz_set_filter -This parameter is a combination of filtering rules for business set attribute fields, and is used to search business sets according to business set attribute fields. The combination supports AND and OR, allowing nesting, with a maximum of 2 layers. - -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| condition | string | yes | Rule operator| -| rules | array |yes | Scope rule for filtering business| +This parameter is a combination of filtering rules for business set attribute fields, used to search for business sets based on business set attribute fields. The combination supports AND and OR, allows nesting, with a maximum nesting level of 2. +| Field | Type | Required | Description | +| --------- | ------ | -------- | ---------------------------------------------- | +| condition | string | Yes | Rule operator | +| rules | array | Yes | Filtering rules for the scope of business sets | #### rules -The filtering rule is triplet`field`,`operator`,`value` -| Name | Type | Required| Default value| Description | -| -------- | ------ | ---- | ------ | ------------------------------------------------------------ | -| field | string |yes | None | Field name| | -| operator | string |yes | None | Operator| Optional values equal,not_equal,in,not_in,less,less_or_equal,greater,greater_or_equal,between,not_between| -| value | - |no | None | Operand| Different values correspond to different value formats | +Filter rules are triplets `field`, `operator`, `value` + +| Field | Type | Required | Description | +| -------- | ------ | -------- | ------------------------------------------------------------ | +| field | string | Yes | Field name | +| operator | string | Yes | Operator, optional values are equal, not_equal, in, not_in, less, less_or_equal, greater, greater_or_equal, between, not_between | +| value | - | No | Operand, different operators correspond to different value formats | -Assembly rules can be found at: https://github.com/Tencent/bk-cmdb/blob/master/src/common/querybuilder/README.md +Assembly rules can refer to: [QueryBuilder README](https://github.com/Tencent/bk-cmdb/blob/master/src/common/querybuilder/README.md) #### time_condition -| Field | Type | Required| Description | -|-------|--------|-----|--------------------| -| oper | string |yes| Operator, currently only and is supported| -| rules | array | yes | Time query criteria | +| Field | Type | Required | Description | +| ----- | ------ | -------- | ------------------------------------- | +| oper | string | Yes | Operator, currently only supports and | +| rules | array | Yes | Time query conditions | #### rules -| Field | Type | Required| Description | -|-------|--------|-----|----------------------------------| -| field | string |yes| The value is the field name of the model | -| start | string |yes| Start time in the format yyyy MM dd hh: mm:ss| -| end | string |yes| End time in the format yyyy MM dd hh: mm:ss| +| Field | Type | Required | Description | +| ----- | ------ | -------- | ----------------------------------------- | +| field | string | Yes | Takes the value of the model's field name | +| start | string | Yes | Start time, format: yyyy-MM-dd hh:mm:ss | +| end | string | Yes | End time, format: yyyy-MM-dd hh:mm:ss | #### page -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| start | int | yes | Record start position| -| limit | int | yes | Limit bars per page, Max. 500| -| enable_count | bool |yes| Whether this request is a token to obtain quantity or details| -| sort | string |no | Sort the field. By adding sort in front of the field, for example, sort": sort field" can indicate descending order by field field| +| Field | Type | Required | Description | +| ------------ | ------ | -------- | ------------------------------------------------------------ | +| start | int | Yes | Record start position | +| limit | int | Yes | Number of records per page, maximum 500 | +| enable_count | bool | Yes | Flag to get the count of query objects | +| sort | string | No | Sorting field, by adding a "-", e.g., sort: ""-field"", it represents sorting in descending order by the field | **Note:** -- `enable_count`If this flag is true, this request is a get quantity. The remaining fields must be initialized, start is 0, and limit is: 0, sort is "." -- `sort`If the caller does not specify it, the background specifies it as the business set ID by default. + +- If `enable_count` is set to true, it indicates that this request is to obtain the count. In this case, other fields must have initial values, start is 0, limit is 0, sort is "". +- If `sort` is not specified by the caller, the backend defaults it to the business set ID. ### Request Parameters Example @@ -81,7 +82,7 @@ Assembly rules can be found at: https://github.com/Tencent/bk-cmdb/blob/master/s "value":10 }, { - "field":"bk_biz_set_maintainer", + "field":"bk_biz_maintainer", "operator":"equal", "value":"admin" } @@ -109,11 +110,11 @@ Assembly rules can be found at: https://github.com/Tencent/bk-cmdb/blob/master/s } ``` -### Return Result Example +### Response Example -### Details interface response -```python +### Detailed Information Interface Response +```python { "result":true, "code":0, @@ -126,7 +127,7 @@ Assembly rules can be found at: https://github.com/Tencent/bk-cmdb/blob/master/s "bk_biz_set_id":10, "bk_biz_set_name":"biz_set", "bk_biz_set_desc":"dba", - "biz_set_maintainer":"tom", + "bk_biz_maintainer":"tom", "create_time":"2021-09-06T08:10:50.168Z", "last_time":"2021-10-15T02:30:01.867Z", "bk_scope":{ @@ -137,7 +138,7 @@ Assembly rules can be found at: https://github.com/Tencent/bk-cmdb/blob/master/s "bk_biz_set_id":11, "bk_biz_set_name":"biz_set1", "bk_biz_set_desc":"dba", - "biz_set_maintainer":"tom", + "bk_biz_maintainer":"tom", "create_time":"2021-09-06T08:10:50.168Z", "last_time":"2021-10-15T02:30:01.867Z", "bk_scope":{ @@ -165,9 +166,10 @@ Assembly rules can be found at: https://github.com/Tencent/bk-cmdb/blob/master/s } ``` -### Business set quantity interface response -```python -{ +### Business Set Count Interface Response + +``` +pythonCopy code{ "result":true, "code":0, "message":"success", @@ -181,62 +183,66 @@ Assembly rules can be found at: https://github.com/Tencent/bk-cmdb/blob/master/s } ``` -### Return Result Parameters Description +### Response Result Explanation + #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request succeeded or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| data | object |Data returned by request | -| request_id | string |Request chain id | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Success or failure of the request. true: success; false: failure | +| code | int | Error code. 0 represents success, >0 represents failure error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| data | object | Data returned by the request | +| request_id | string | Request chain ID | #### data -| Field | Type | Description | -|-----------|-----------|-----------| -| count | int | Number of records| -| info | array | Actual business data| +| Field | Type | Description | +| ----- | ----- | -------------------- | +| count | int | Number of records | +| info | array | Actual business data | #### info -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_biz_set_id | int |yes | Business set ID| -| create_time | string |no | Business set creation time| -| last_time | string |no | Business set modification time| -| bk_biz_set_name | string |yes | Business set name| -| bk_biz_maintainer | string |no | Operation and maintenance personnel| -| bk_biz_set_desc | string |no | Business set description| -| bk_scope | object |no | Business set selected business scope| +| Field | Type | Description | +| ----------------- | ------ | ------------------------------ | +| bk_biz_set_id | int | Business set ID | +| create_time | string | Business set creation time | +| last_time | string | Business set modification time | +| bk_biz_set_name | string | Business set name | +| bk_biz_maintainer | string | Operations personnel | +| bk_biz_set_desc | string | Business set description | +| bk_scope | object | Selected business scope | +| bk_created_at | string | Creation time | +| bk_created_by | string | Creator | +| bk_updated_at | string | Update time | #### bk_scope -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| match_all | bool |yes | Selected business scope tag| -| filter | object |no | Scope criteria for the selected business| +| Field | Type | Description | +| --------- | ------ | ---------------------------------- | +| match_all | bool | Selected business scope flag | +| filter | object | Selected business range conditions | #### filter -This parameter is a combination of filtering rules for service attribute fields, and is used to search for services according to the service attribute fields. The combination only supports AND operation and can be nested, with a maximum of 2 layers. - -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| condition | string |yes | Rule operator| -| rules | array |yes | Scope condition rule for selected business| +This parameter is a combination of filtering rules for business attributes, used to search for businesses based on business attributes. The combination only supports AND operations, can be nested, with a maximum nesting level of 2. +| Field | Type | Description | +| --------- | ------ | ----------------------------------------- | +| condition | string | Rule operator | +| rules | array | Filtering rules for the scope of business | #### rules -| Name | Type | Required| Default value| Description | -| -------- | ------ | ---- | ------ | ------------------------------------------------------------ | -| field | string |yes | None | Field name| | -| operator | string |yes | None | Operator| Optional value equal,in| -| value | - |no | None | Operand| Different values correspond to different value formats | +| Field | Type | Description | +| -------- | ------ | ------------------------------------------------------------ | +| field | string | Field name | +| operator | string | Operator, optional values are equal, in | +| value | - | Operand, different operators correspond to different value formats | **Note:** -- If this request is to query details, count is 0. If the query is quantity, info is empty. -- The input here`info` only describes the required and built-in parameters for parameters, and the rest of the parameters to be filled in depend on the attribute fields defined by the user + +- If this request is to query detailed information, count is 0. If querying for the count, info is empty. +- The input here for the `info` parameter only explains the required and system built-in parameters, other parameters to be filled depend on user-defined attribute fields. \ No newline at end of file diff --git a/docs/apidoc/cc/en/list_business_set_topo.md b/docs/apidoc/cc/en/list_business_set_topo.md index 9a17dfc582..08a4b02f5c 100644 --- a/docs/apidoc/cc/en/list_business_set_topo.md +++ b/docs/apidoc/cc/en/list_business_set_topo.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Query business set topology (v3.10.12+) +Query business set topology (Version: v3.10.12+, Permission: Business set access) ### Request Parameters @@ -8,11 +8,11 @@ Query business set topology (v3.10.12+) #### Interface Parameters -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_biz_set_id | int | yes | Business set ID| -| bk_parent_obj_id | string |yes| The parent object ID of the query model is required| -| bk_parent_id | int | yes | The parent ID of the query model is required| +| Field | Type | Required | Description | +| ---------------- | ------ | -------- | ------------------------------------------ | +| bk_biz_set_id | int | Yes | Business set ID | +| bk_parent_obj_id | string | Yes | ID of the parent object to query the model | +| bk_parent_id | int | Yes | ID of the parent to query the model | ### Request Parameters Example @@ -28,13 +28,13 @@ Query business set topology (v3.10.12+) } ``` -### Return Result Example +### Response Example ```json { "result":true, "code":0, - "message":"", + "message":"success", "permission":null, "data":[ { @@ -54,25 +54,24 @@ Query business set topology (v3.10.12+) } ``` -### Return Result Parameters Description +### Response Result Explanation + #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| data | array |Data returned by request | -| request_id | string |Request chain id | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Success or failure of the request. true: success; false: failure | +| code | int | Error code. 0 represents success, >0 represents failure error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| data | array | Data returned by the request | +| request_id | string | Request chain ID | #### data -| Name | Type | Description | -| ------- | ------ | --------------- | -| bk_obj_id | string | Model object ID| -| bk_inst_id | int | Model instance ID | -| bk_inst_name | string |Model instance name | -| default | int |Model instance classification | - - +| Field | Type | Description | +| ------------ | ------ | ----------------------------- | +| bk_obj_id | string | Model object ID | +| bk_inst_id | int | Model instance ID | +| bk_inst_name | string | Model instance name | +| default | int | Model instance classification | \ No newline at end of file diff --git a/docs/apidoc/cc/en/list_host_detail_topology.md b/docs/apidoc/cc/en/list_host_detail_topology.md index c1baaa5255..08b5a70c08 100644 --- a/docs/apidoc/cc/en/list_host_detail_topology.md +++ b/docs/apidoc/cc/en/list_host_detail_topology.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Query the host details and the topology information it belongs to according to the host condition information +Query host details and its topology information based on host condition information (Permission: Host pool host view permission) ### Request Parameters @@ -8,43 +8,38 @@ Query the host details and the topology information it belongs to according to t #### Interface Parameters -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| page | dict | yes | Query criteria| -| host_property_filter| object| no | Host attribute combination query criteria| -| fields | array | yes | Host attribute list, which controls the fields in the host that returns the result. Please fill in as required| +| Field | Type | Required | Description | +| -------------------- | ------ | -------- | ------------------------------------------------------------ | +| page | dict | Yes | Query conditions | +| host_property_filter | object | No | Combined query conditions for host properties | +| fields | array | Yes | List of host properties, control which fields are in the returned result, fill in according to requirements | #### host_property_filter -This parameter is a combination of filtering rules for the host attribute field and is used to search for hosts based on the host attribute field. The combination supports AND and OR, and can be nested, with a maximum of 2 layers. -The filtering rules are quaternions`field`,`operator`,`value` -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| condition | string | no | Combined query criteria| -| rules | array | no | Rule| +This parameter is a combination of filtering rules for host property fields, used to search for hosts based on host property fields. The combination supports AND and OR, and can be nested up to two levels. Filtering rules are quadruples `field`, `operator`, `value` +| Field | Type | Required | Description | +| --------- | ------ | -------- | ------------------------- | +| condition | string | No | Combined query conditions | +| rules | array | No | Rules | #### rules -| Name| Type| Required| Default value| Description| -| --- | --- | --- |--- | ---| -| field| string| yes | None| Field name| Field name| -| operator| string| yes | None| Operator| Optional values equal,not_equal,in, not_in, less,less_or_equal,greater,greater_or_equal,between,not_between, contexts, exists,not_exists; Where contexts is regular matching and case insensitive, exists is the condition for filtering the existence of a field, and not_exists is the condition for filtering the non-existence of a field| -| value| - |no| None| Operand| Different values correspond to different value formats| - -Assembly rules can be found at https: - +| Field | Type | Required | Description | +| -------- | ------ | -------- | ------------------------------------------------------------ | +| field | string | Yes | Field name | +| operator | string | Yes | Operator, optional values are equal, not_equal, in, not_in, less, less_or_equal, greater, greater_or_equal, between, not_between | +| value | - | No | Operand, different operators correspond to different value formats | +Assembly rules can refer to: https://github.com/Tencent/bk-cmdb/blob/master/src/common/querybuilder/README.md #### page -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| start | int | yes | Record start position| -| limit | int | yes | Limit bars per page, maximum 500| -| sort | string |no | Sort field| - - +| Field | Type | Required | Description | +| ----- | ------ | -------- | ------------------------------------------------ | +| start | int | Yes | Record start position | +| limit | int | Yes | Number of records per page, maximum value is 500 | +| sort | string | No | Sorting field | ### Request Parameters Example @@ -93,7 +88,7 @@ Assembly rules can be found at https: 0 indicates failure error| -| message | string |Error message returned by request failure| -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request| +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Success or failure of the request. true: success; false: failure | +| code | int | Error code. 0 represents success, >0 represents failure error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned by the request | #### data -| Field | Type | Description | -|-----------|-----------|-----------| -| count | int | Number of records| -| info | array | Host data and topology information| +| Field | Type | Description | +| ----- | ----- | ---------------------------------- | +| count | int | Number of records | +| info | array | Host data and topology information | #### data.info -| Field | Type | Description | -|-----------|-----------|-----------| -| host | dict | Host actual data| -| topo | array | Host topology information| + +| Field | Type | Description | +| ----- | ----- | ------------------------- | +| host | dict | Actual host data | +| topo | array | Host topology information | #### data.info.host -| Name| Type| Description| -|---|---|---| -| bk_isp_name| string |Operator| 0: other;1: telecommunications;2: Unicom;3: mobile| -| bk_sn | string |Equipment SN|| -| operator | string |Main maintainer|| -| bk_outer_mac | string |Extranet MAC|| -| bk_state_name | string |Country| CN: China please refer to CMDB page for detailed values| -| bk_province_name | string |Province|| -| import_from | string |Entry method| 1:excel;2:agent; 3:api| -| bk_sla | string |SLA level| 1:L1;2:L2;3: L3| -| bk_service_term | int |Warranty period| 1-10 | -| bk_os_type | string |Operating system type| 1:Linux;2:Windows; 3:AIX| -| bk_os_version | string |Operating system version|| -| bk_os_bit | int |Operating system bits|| -| bk_mem | string |Memory capacity|| -| bk_mac | string |Intranet MAC address|| -| bk_host_outerip | string |Extranet IP|| -| bk_host_name | string |Host name|| -| bk_host_innerip | string |Intranet IP|| -| bk_host_id | int |Host ID|| -| bk_disk | int |Disk capacity|| -| bk_cpu_module | string |CPU model|| -| bk_cpu_mhz | int |CPU frequency|| -| bk_cpu | int |Number of CPU logical cores| 1-1000000 | -| bk_comment | string |Remarks|| -| bk_cloud_id | int |Cloud area|| -| bk_bak_operator | string |Backup maintainer|| -| bk_asset_id | string |Fixed capital no|| -#### data.info.topo -| Field | Type | Description | -|-----------|-----------|-----------| -| inst | object | Details describing the node instance| -| inst.obj | string | Model type of this node, such as set/module and user-defined hierarchical model type| -| inst.name | string |The instance name of the node| -| inst.id | int | The instance ID of this node| -| children | object array | Details of child nodes describing the current instance node, possibly multiple| -| children.inst | object | Instance detail information of the child node| -| children.children | string |Detail information describing the child nodes of the node| +| Field | Type | Description | +| -------------------- | ------ | ------------------------------------ | +| bk_host_name | string | Host name | +| bk_host_innerip | string | Internal IP of the host | +| bk_host_id | int | Host ID | +| bk_cloud_id | int | Managed area | +| import_from | string | Host import source, 3 for API import | +| bk_asset_id | string | Fixed asset number | +| bk_cloud_inst_id | string | Cloud host instance ID | +| bk_cloud_vendor | string | Cloud vendor | +| bk_cloud_host_status | string | Cloud host status | +| bk_comment | string | Comment | +| bk_cpu | int | CPU logical cores | +| bk_cpu_architecture | string | CPU architecture | +| bk_cpu_module | string | CPU model | +| bk_disk | int | Disk capacity (GB) | +| bk_host_outerip | string | Host external IP | +| bk_host_innerip_v6 | string | Host internal IPv6 | +| bk_host_outerip_v6 | string | Host external IPv6 | +| bk_isp_name | string | ISP name | +| bk_mac | string | Host internal MAC address | +| bk_mem | int | Host memory capacity (MB) | +| bk_os_bit | string | Operating system bit number | +| bk_os_name | string | Operating system name | +| bk_os_type | string | Operating system type | +| bk_os_version | string | Operating system version | +| bk_outer_mac | string | Host external MAC address | +| bk_province_name | string | Province where the host is located | +| bk_service_term | int | Warranty period | +| bk_sla | string | SLA level | +| bk_sn | string | Device SN | +| bk_state | string | Current status | +| bk_state_name | string | Country where the host is located | +| operator | string | Main maintainer | +| bk_bak_operator | string | Backup maintainer | +**Note: The return value here only explains the system-built property fields, other return values depend on user-defined property fields** + +#### data.info.topo +| Field | Type | Description | +| ----------------- | ------------ | ------------------------------------------------------------ | +| inst | object | Details of the node instance | +| inst.obj | string | Model type of the node, such as set/module and custom hierarchical model type | +| inst.name | string | Instance name of the node | +| inst.id | int | Instance ID of the node | +| children | object array | Details of child nodes of the current instance, there may be multiple | +| children.inst | object | Details of the instance of the child node | +| children.children | string | Details of child nodes of the current instance | \ No newline at end of file diff --git a/docs/apidoc/cc/en/list_host_service_template_id.md b/docs/apidoc/cc/en/list_host_service_template_id.md index 72478e00e8..e1eedd7678 100644 --- a/docs/apidoc/cc/en/list_host_service_template_id.md +++ b/docs/apidoc/cc/en/list_host_service_template_id.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Query the service template ID corresponding to the host. This interface is dedicated to node management and may be adjusted at any time. Do not use other services (v3.10.11+) +Query the service template ID corresponding to the host. This interface is dedicated to node management and may be adjusted at any time. Please do not use it for other services (Version: v3.10.11+, Permission: Host pool host view permission) ### Request Parameters @@ -8,9 +8,9 @@ Query the service template ID corresponding to the host. This interface is dedic #### Interface Parameters -| Parameter | Type| Required| Description | -| ---------- | ----- | ---- | ------------------- | -| bk_host_id | array |yes | Host IDs, up to 200| +| Field | Type | Required | Description | +| ---------- | ----- | -------- | ------------------------ | +| bk_host_id | array | Yes | Host ID, up to 200 hosts | #### Request Parameters Example @@ -27,7 +27,7 @@ Query the service template ID corresponding to the host. This interface is dedic } ``` -### Return Result Example +### Response Example ```json { @@ -54,22 +54,22 @@ Query the service template ID corresponding to the host. This interface is dedic } ``` -### Return Result Parameters Description +### Response Result Explanation #### response -| Field | Type| Description | -| ------------------- | ----- | ---------- | -| result | bool | Whether the request was successful or not. True: request succeeded;false: Request failed| -| code | int | Wrong. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | array |Request result | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Success or failure of the request. true: success; false: failure | +| code | int | Error code. 0 represents success, >0 represents failure error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | array | Request result | #### data -| Field | Type| Description | -| ------------------- | ----- | ---------- | -| bk_host_id | int | Host id | -| service_template_id | array |Service template id| +| Field | Type | Description | +| ------------------- | ----- | ------------------- | +| bk_host_id | int | Host ID | +| service_template_id | array | Service template ID | \ No newline at end of file diff --git a/docs/apidoc/cc/en/list_host_total_mainline_topo_en.md b/docs/apidoc/cc/en/list_host_total_mainline_topo_en.md index 3628daaa95..20035f533d 100644 --- a/docs/apidoc/cc/en/list_host_total_mainline_topo_en.md +++ b/docs/apidoc/cc/en/list_host_total_mainline_topo_en.md @@ -1,31 +1,29 @@ -### Functional description - -query host and its corresponding Topo +### Functional Description +Query the host and its corresponding topology. ### Request Parameters {{ common_args_desc }} - #### General Parameters | Field | Type | Required | Description | | ------------------------- | ------ | -------- | ------------------------------------------------------------ | -| bk_biz_id | int | Yes | business id | -| mainline_property_filters | array | No | custom level query filter | -| set_property_filter | object | No | set query filter | -| module_property_filter | object | No | module query filter | -| host_property_filter | object | No | host query filter | -| fields | array | No | host property list, which controls which fields are in the host that returns the results | -| page | object | Yes | paging query condition, returning host data according to bk_ host_ id sorting | +| bk_biz_id | int | Yes | Business ID | +| mainline_property_filters | array | No | Custom level query filter | +| set_property_filter | object | No | Set query filter | +| module_property_filter | object | No | Module query filter | +| host_property_filter | object | No | Host query filter | +| fields | array | No | Host property list, which controls which fields are in the host that returns the results | +| page | object | Yes | Paging query condition, returning host data according to bk_ host_ id sorting | #### mainline_property_filters | Field | Type | Required | Description | | --------- | ------ | -------- | ------------------------------ | | bk_obj_id | string | Yes | bk_obj_id of the filter target | -| filter | object | Yes | target object's query filter | +| filter | object | Yes | Target object's query filter | ##### filter @@ -33,19 +31,18 @@ query host and its corresponding Topo | Field | Type | Required | Description | | --------- | ------ | -------- | ----------------------------------------------- | -| condition | string | Yes | rule operator | -| rules | array | Yes | scope condition rules for the selected business | - +| condition | string | Yes | Rule operator | +| rules | array | Yes | Scope condition rules for the selected business | #### rules | Field | Type | Required | Description | | -------- | ------ | -------- | ------------------------------------------------------------ | -| field | string | No | field name | -| operator | string | No | available values: equal,not_equal,in,not_in,less,less_or_equal,greater,greater_or_equal,between,not_between | -| value | - | No | values's format depend on operator | +| field | string | No | Field name | +| operator | string | No | Available values: equal, not_equal, in, not_in, less, less_or_equal, greater, greater_or_equal, between, not_between | +| value | - | No | Values format depends on the operator | -Assembly rules are available for reference:https://github.com/Tencent/bk-cmdb/blob/master/src/common/querybuilder/README.md +Assembly rules are available for reference: [QueryBuilder Rules](https://github.com/Tencent/bk-cmdb/blob/master/src/common/querybuilder/README.md) #### set_property_filter @@ -53,19 +50,18 @@ Assembly rules are available for reference:https://github.com/Tencent/bk-cmdb/bl | Field | Type | Required | Description | | --------- | ------ | -------- | ----------------------------------------------- | -| condition | string | Yes | rule operator | -| rules | array | Yes | scope condition rules for the selected business | - +| condition | string | Yes | Rule operator | +| rules | array | Yes | Scope condition rules for the selected business | #### rules | Field | Type | Required | Description | | -------- | ------ | -------- | ------------------------------------------------------------ | -| field | string | No | field name | -| operator | string | No | available values: equal,not_equal,in,not_in,less,less_or_equal,greater,greater_or_equal,between,not_between | -| value | - | No | values's format depend on operator | +| field | string | No | Field name | +| operator | string | No | Available values: equal, not_equal, in, not_in, less, less_or_equal, greater, greater_or_equal, between, not_between | +| value | - | No | Values format depends on the operator | -Assembly rules are available for reference:https://github.com/Tencent/bk-cmdb/blob/master/src/common/querybuilder/README.md +Assembly rules are available for reference: [QueryBuilder Rules](https://github.com/Tencent/bk-cmdb/blob/master/src/common/querybuilder/README.md) #### module_property_filter @@ -73,19 +69,18 @@ Assembly rules are available for reference:https://github.com/Tencent/bk-cmdb/bl | Field | Type | Required | Description | | --------- | ------ | -------- | ----------------------------------------------- | -| condition | string | Yes | rule operator | -| rules | array | Yes | scope condition rules for the selected business | - +| condition | string | Yes | Rule operator | +| rules | array | Yes | Scope condition rules for the selected business | #### rules | Field | Type | Required | Description | | -------- | ------ | -------- | ------------------------------------------------------------ | -| field | string | No | field name | -| operator | string | No | available values: equal,not_equal,in,not_in,less,less_or_equal,greater,greater_or_equal,between,not_between | -| value | - | No | values's format depend on operator | +| field | string | No | Field name | +| operator | string | No | Available values: equal, not_equal, in, not_in, less, less_or_equal, greater, greater_or_equal, between, not_between | +| value | - | No | Values format depends on the operator | -Assembly rules are available for reference:https://github.com/Tencent/bk-cmdb/blob/master/src/common/querybuilder/README.md +Assembly rules are available for reference: [QueryBuilder Rules](https://github.com/Tencent/bk-cmdb/blob/master/src/common/querybuilder/README.md) #### host_property_filter @@ -93,19 +88,18 @@ Assembly rules are available for reference:https://github.com/Tencent/bk-cmdb/bl | Field | Type | Required | Description | | --------- | ------ | -------- | ----------------------------------------------- | -| condition | string | Yes | rule operator | -| rules | array | Yes | scope condition rules for the selected business | - +| condition | string | Yes | Rule operator | +| rules | array | Yes | Scope condition rules for the selected business | #### rules | Field | Type | Required | Description | | -------- | ------ | -------- | ------------------------------------------------------------ | -| field | string | No | field name | -| operator | string | No | available values: equal,not_equal,in,not_in,less,less_or_equal,greater,greater_or_equal,between,not_between | -| value | - | No | values's format depend on operator | +| field | string | No | Field name | +| operator | string | No | Available values: equal, not_equal, in, not_in, less, less_or_equal, greater, greater_or_equal, between, not_between | +| value | - | No | Values format depends on the operator | -Assembly rules are available for reference:https://github.com/Tencent/bk-cmdb/blob/master/src/common/querybuilder/README.md +Assembly rules are available for reference: [QueryBuilder Rules](https://github.com/Tencent/bk-cmdb/blob/master/src/common/querybuilder/README.md) #### page @@ -116,8 +110,7 @@ Assembly rules are available for reference:https://github.com/Tencent/bk-cmdb/bl ### Request Parameters Example -```json -{ +```json{ "bk_app_code": "esb_test", "bk_app_secret": "xxx", "bk_username": "xxx", @@ -476,72 +469,81 @@ Assembly rules are available for reference:https://github.com/Tencent/bk-cmdb/bl response -| Field | Type | Description | -| ---------- | ------ | --------------------------------------------- | -| result | bool | 请求成功与否。true:请求成功;false:请求失败 | -| code | int | 错误编吗。0表示success,>0表示失败错误 | -| message | string | 请求失败返回的错误信息 | -| permission | object | 权限信息 | -| request_id | string | 请求链id | -| data | array | 请求结果 | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Success or failure of the request. true: success; false: failure | +| code | int | Error code. 0 represents success, >0 represents failure error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | array | Request result | + #### data -| Field | Type | Description | -| :---- | :---- | :----------------- | -| count | int | 记录条数 | -| info | array | 主机数据和拓扑信息 | +| Field | Type | Description | +| :----- | :---- | :------------------ | +| count | int | Number of records | +| info | array | Host data and topology information | #### data.info -| Field | Type | Description | -| :---- | :---- | :----------- | -| host | dict | 主机实际数据 | -| topo | array | 主机拓扑信息 | +| Field | Type | Description | +| :---- | :---- | :----------------- | +| host | dict | Actual host data | +| topo | array | Host topology information | #### data.info.host -| Field | Type | Description | | -| :--------------- | :----- | :-------------------------- | :------------------------------------- | -| bk_isp_name | string | Internet Service Provider | 0:other;1:telecom;2:unicom;3:mobile | -| bk_sn | string | Device SN | | -| operator | string | Main maintainer | | -| bk_outer_mac | string | Internet mac | | -| bk_state_name | string | Country | CN:China | -| bk_province_name | string | Province | | -| import_from | string | Entry method | 1:excel;2:agent;3:api | -| bk_sla | string | SLA level | 1:L1;2:L2;3:L3 | -| bk_service_term | int | Warranty period | 1-10 | -| bk_os_type | string | Operating system type | 1:Linux;2:Windows;3:AIX | -| bk_os_version | string | Operating system version | | -| bk_os_bit | int | Operating system bits | | -| bk_mem | string | Memory capacity | | -| bk_mac | string | Intranet MAC address | | -| bk_host_outerip | string | Internet IP | | -| bk_host_name | string | Host name | | -| bk_host_innerip | string | Intranet IP | | -| bk_host_id | int | Host ID | | -| bk_disk | int | Disk capacity | | -| bk_cpu_module | string | CPU model | | -| bk_cpu_mhz | int | CPU frequency | | -| bk_cpu | int | Number of CPU logical cores | 1-1000000 | -| bk_comment | string | remarks | | -| bk_cloud_id | int | Cloud region | | -| bk_bak_operator | string | Backup maintainer | | -| bk_asset_id | string | Fixed assets No | | +| Field | Type | Description | +| -------------------- | ------ | -------------------- | +| bk_host_name | string | Host name | +| bk_host_innerip | string | Inner IP | +| bk_host_id | int | Host ID | +| bk_cloud_id | int | Cloud control area | +| import_from | string | Host import source, 3 for API import | +| bk_asset_id | string | Fixed asset number | +| bk_cloud_inst_id | string | Cloud host instance ID | +| bk_cloud_vendor | string | Cloud vendor | +| bk_cloud_host_status | string | Cloud host status | +| bk_comment | string | Remark | +| bk_cpu | int | CPU logical cores | +| bk_cpu_architecture | string | CPU architecture | +| bk_cpu_module | string | CPU model | +| bk_disk | int | Disk capacity (GB) | +| bk_host_outerip | string | Host outer IP | +| bk_host_innerip_v6 | string | Host inner IPv6 | +| bk_host_outerip_v6 | string | Host outer IPv6 | +| bk_isp_name | string | ISP name | +| bk_mac | string | Host inner MAC address | +| bk_mem | int | Host memory capacity (MB) | +| bk_os_bit | string | Operating system bit | +| bk_os_name | string | Operating system name | +| bk_os_type | string | Operating system type | +| bk_os_version | string | Operating system version | +| bk_outer_mac | string | Host outer MAC address | +| bk_province_name | string | Province name | +| bk_service_term | int | Warranty period | +| bk_sla | string | SLA level | +| bk_sn | string | Device SN | +| bk_state | string | Current state | +| bk_state_name | string | Country | +| operator | string | Main maintainer | +| bk_bak_operator | string | Backup maintainer | + +**Note: The returned values here only provide explanations for the system's built-in attribute fields. Other returned values depend on user-defined attribute fields.** #### data.info.topo -| Field | Type | Description | -| :------- | :----- | :---------------------------- | -| inst | object | Topology instance information | -| children | array | Subset of topology instances | +| Field | Type | Description | +| :-------- | :----- | :----------------- | +| inst | Object | Topology instance information | +| children | array | Subset of topology instances | #### data.info.topo.inst -| Field | Type | Description | -| :---- | :----- | :------------ | -| obj | string | Object ID | +| Field | Type | Description | +| :---- | :----- | :---------- | +| obj | string | Model ID | | name | string | Instance name | -| id | int | Instance ID | - +| id | int | Instance ID | diff --git a/docs/apidoc/cc/en/list_hosts_without_biz.md b/docs/apidoc/cc/en/list_hosts_without_biz.md index 85744cd0a9..d076d06ea7 100644 --- a/docs/apidoc/cc/en/list_hosts_without_biz.md +++ b/docs/apidoc/cc/en/list_hosts_without_biz.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Host query without business information +Host query without business information (Permission: Host pool host view permission) ### Request Parameters @@ -8,44 +8,40 @@ Host query without business information #### Interface Parameters -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_biz_id | int | no | Business ID | -| page | object | yes | Query criteria| -| host_property_filter| object| no | Host attribute combination query criteria| -| fields | array | yes | Host attribute list, which controls which fields are in the host that returns the result, can speed up interface requests and reduce network traffic | +| Field | Type | Required | Description | +| -------------------- | ------ | -------- | ------------------------------------------------------------ | +| bk_biz_id | int | No | Business ID | +| page | object | Yes | Query conditions | +| host_property_filter | object | No | Host property combination query conditions | +| fields | array | No | List of host properties, controls which fields are returned in the results, speeding up the interface request and reducing network traffic. If not filled, all fields are returned by default | #### host_property_filter -This parameter is a combination of filtering rules for the host attribute field and is used to search for hosts based on the host attribute field. The combination supports AND and OR, and can be nested, with a maximum of 2 layers. -The filtering rule is a quadruple`field`,`operator`,`value` -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| condition | string | no | Combined query criteria| -| rules | array | no | Rule| +This parameter is a combination of host property field filtering rules, used to search for hosts based on host property fields. The combination supports AND and OR two ways, can be nested, with a maximum nesting of 2 levels. The filtering rule is a quadruple `field`, `operator`, `value`. +| Field | Type | Required | Description | +| --------- | ------ | -------- | ------------------------- | +| condition | string | No | Combined query conditions | +| rules | array | No | Rules | #### rules -| Name| Type| Required| Default value| Description| -| --- | --- | --- |--- | ---| -| field| string| yes | None| Field name| Field name| -| operator| string| yes | None| Operator| Optional values equal,not_equal,in,not_in,less,less_or_equal,greater,greater_or_equal,between,not_between| -| value| - |no| None| Operand| Different values correspond to different value formats| - -Assembly rules can be found at: https://github.com/Tencent/bk-cmdb/blob/master/src/common/querybuilder/README.md +| Field | Type | Required | Description | +| -------- | ------ | -------- | ------------------------------------------------------------ | +| field | string | Yes | Field name | +| operator | string | Yes | Operator, optional values are equal, not_equal, in, not_in, less, less_or_equal, greater, greater_or_equal, between, not_between | +| value | - | No | Operand, different operators correspond to different value formats | +Assembly rules can be referred to: [QueryBuilder README](https://github.com/Tencent/bk-cmdb/blob/master/src/common/querybuilder/README.md) #### page -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| start | int | yes | Record start position| -| limit | int | yes | Limit bars per page, Max. 500| - - +| Field | Type | Required | Description | +| ----- | ---- | -------- | --------------------------------------- | +| start | int | Yes | Record start position | +| limit | int | Yes | Number of records per page, maximum 500 | -### Request Parameters Example +### Request Parameter Example ```json { @@ -95,7 +91,7 @@ Assembly rules can be found at: https://github.com/Tencent/bk-cmdb/blob/master/s } ``` -### Return Result Example +### Response Example ```json { @@ -133,30 +129,32 @@ Assembly rules can be found at: https://github.com/Tencent/bk-cmdb/blob/master/s } ``` -### Return Result Parameters Description +### Response Result Explanation + #### response -| Name| Type| Description| -|---|---|---| -| result | bool |Whether the request was successful or not. True: request succeeded;false request failed| -| code | int |Wrong code. 0 indicates success,>0 indicates failure error| -| message | string |Error message returned by request failure| -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request| +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failed error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned by the request | #### data -| Field | Type | Description | -|-----------|-----------|-----------| -| count | int | Number of records| -| info | array | Host actual data| +| Field | Type | Description | +| ----- | ----- | ----------------- | +| count | int | Number of records | +| info | array | Actual host data | #### data.info -| Name| Type| Description| -| ---------------- | ------ | ------------------------------- | -| bk_os_type | string |Operating system type| 1:Linux;2:Windows; 3:AIX | -| bk_mac | string |Intranet MAC address | | -| bk_host_innerip | string |Intranet IP | | -| bk_host_id | int | Host ID | | -| bk_cloud_id | int | Cloud area | | + +| Field | Type | Description | +| --------------- | ------ | ----------------------- | +| bk_cloud_id | int | Cloud control area | +| bk_host_id | int | Host ID | +| bk_host_innerip | string | Internal IP of the host | +| bk_mac | string | Host MAC address | +| bk_os_type | string | Operating system type | \ No newline at end of file diff --git a/docs/apidoc/cc/en/list_kube_cluster.md b/docs/apidoc/cc/en/list_kube_cluster.md index 503a322f81..01844043a0 100644 --- a/docs/apidoc/cc/en/list_kube_cluster.md +++ b/docs/apidoc/cc/en/list_kube_cluster.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -list container clusters (v3.12.1+, permissions: biz access) +Query container clusters (v3.12.1+, Permission: Business access) ### Request Parameters @@ -8,61 +8,52 @@ list container clusters (v3.12.1+, permissions: biz access) #### Interface Parameters -| Field | Type | Required | Description | -|-----------|--------|----------|--------------------------------------------------------------------------------------------| -| bk_biz_id | int | yes | business ID | -| filter | object | no | container cluster query scope | -| fields | array | no | the container cluster attribute to be queried, if not written, it means to search all data | -| page | object | yes | paging condition | +| Field | Type | Required | Description | +| --------- | ------ | -------- | ------------------------------------------------------------ | +| bk_biz_id | int | Yes | Business ID | +| filter | object | No | Container cluster query scope | +| fields | array | No | Container cluster properties to be queried. If not specified, all data will be searched | +| page | object | Yes | Pagination conditions | #### filter -This parameter is the filter rule to search for container based on its attribute fields. This parameter supports the -following two filter rules types. The combined filter rules can be nested with the maximum nesting level of 2. The -specific supported filter rule types are as follows: +This parameter is a combination of container cluster property field filtering rules, used to search for container clusters based on container cluster property fields. The combination supports AND and OR two ways, and allows nesting, with a maximum nesting of 2 levels. -##### combined filter rule +| Field | Type | Required | Description | +| --------- | ------ | -------- | ----------------------------------------- | +| condition | string | Yes | Rule operator | +| rules | array | Yes | Filtering rules for the range of clusters | -This filter rule type defines filter rules composed of other rules, the combined rules support logic and/or -relationships +#### rules -| Field | Type | Required | Description | -|-----------|--------|----------|----------------------------------------------------------------------------| -| condition | string | yes | query criteria, support `AND` and `OR` | -| rules | array | yes | query rules, can be of `combined filter rule` or `atomic filter rule` type | +The filtering rule is a triple `field`, `operator`, `value`. -##### atomic filter rule +| Field | Type | Required | Description | +| -------- | ------ | -------- | ------------------------------------------------------------ | +| field | string | Yes | Field name | +| operator | string | Yes | Operator, optional values are equal, not_equal, in, not_in, less, less_or_equal, greater, greater_or_equal, between, not_between | +| value | - | No | Operand, different operators correspond to different value formats | -This filter rule type defines basic filter rules, which represent rules for filtering a field. Any filter rule is either -directly an atomic filter rule, or a combination of multiple atomic filter rules - -| Field | Type | Required | Description | -|----------|----------------------------------------------------------------------|----------|----------------------------------------------------------------------------------------------------------------------| -| field | string | yes | cluster's field | -| operator | string | yes | operator, optional values: equal,not_equal,in,not_in,less,less_or_equal,greater,greater_or_equal,between,not_between | -| value | different fields and operators correspond to different value formats | yes | operand | - -Assembly rules can refer to: +Assembly rules can be referred to: [QueryBuilder README](https://github.com/Tencent/bk-cmdb/blob/master/src/common/querybuilder/README.md) #### page -| Field | Type | Required | Description | -|--------------|--------|----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| start | int | yes | Record start position | -| limit | int | yes | Limit per page, maximum 500 | -| sort | string | no | Sort the field | -| enable_count | bool | yes | The flag defining Whether to get the the number of query objects. If this flag is true, then the request is to get the quantity. The remaining fields must be initialized, start is 0, and limit is: 0, sort is "" | +| Field | Type | Required | Description | +| ------------ | ------ | -------- | ------------------------------------------------------------ | +| start | int | Yes | Record start position | +| limit | int | Yes | Number of records per page, maximum 500 | +| enable_count | bool | Yes | Flag for whether this request is for obtaining the quantity or details | +| sort | string | No | Sorting field, by adding - in front of the field, such as sort:"-field", it can indicate descending order by field | **Note:** -- `enable_count`If this flag is true, this request is a get quantity. The remaining fields must be initialized, start is - 0, and limit is: 0, sort is "." -- `sort`If the caller does not specify it, the background specifies it as the container cluster ID by default. -- Paging parameters must be set, and the maximum query data at one time does not exceed 500. +- `enable_count` If this flag is true, it means this request is to obtain the quantity. At this time, other fields must be initialized, start is 0, limit is 0, sort is "". +- If `sort` is not specified by the caller, the backend defaults to the container cluster ID. +- Pagination parameters must be set, and the maximum number of queried data at a time should not exceed 500. -### Request Parameters Example +### Request Parameter Example -### Request Details Request Parameters +### Detailed Information Request Parameters ```json { @@ -94,7 +85,7 @@ Assembly rules can refer to: 0 indicates failure error | -| message | string | Error message returned by request failure | -| permission | object | Permission information | -| data | object | Data returned by request | -| request_id | string | Request chain id | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failed error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| data | object | Data returned by the request | +| request_id | string | Request chain ID | #### data | Field | Type | Description | -|-------|-------|---------------------| +| ----- | ----- | ------------------- | | count | int | Number of records | | info | array | Actual cluster data | #### info[x] -| Field | Type | Required | Description | -|-------------------|--------|----------|-----------------------------------------| -| name | string | no | cluster | -| scheduling_engine | string | no | scheduling engine | -| uid | string | no | cluster own ID | -| xid | string | no | associated cluster ID | -| version | string | no | cluster version | -| network_type | string | no | network type | -| region | string | no | the region where the cluster is located | -| vpc | string | no | vpc network | -| network | array | no | cluster network | -| type | string | no | cluster type | +| Field | Type | Description | +| ----------------- | ------ | --------------------- | +| name | string | Cluster name | +| scheduling_engine | string | Scheduling engine | +| uid | string | Cluster's own ID | +| xid | string | Associated cluster ID | +| version | string | Cluster version | +| network_type | string | Network type | +| region | string | Region | +| vpc | string | VPC network | +| network | array | Cluster network | +| type | string | Cluster type | +| environment | string | Environment | +| bk_project_id | string | Project ID | +| bk_project_name | string | Project name | +| bk_project_code | string | Project English name | **Note:** -- If this request is to query details, count is 0. If the query is quantity, info is empty. +- If this request is to query detailed information, count is 0. If it is to query the quantity, info is empty. \ No newline at end of file diff --git a/docs/apidoc/cc/en/list_kube_container.md b/docs/apidoc/cc/en/list_kube_container.md index 14fc86e4a7..8d5c4d10f7 100644 --- a/docs/apidoc/cc/en/list_kube_container.md +++ b/docs/apidoc/cc/en/list_kube_container.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -list kube container (version: v3.12.1+, auth: biz access) +Query Container list (Version: v3.12.1+, Permission: Business access) ### Request Parameters @@ -8,61 +8,56 @@ list kube container (version: v3.12.1+, auth: biz access) #### Interface Parameters -| Field | Type | Required | Description | -|-----------|--------|----------|-----------------------------------------------------------------------------------------------------------------------------------------------------| -| bk_biz_id | int | yes | biz id | -| bk_pod_id | int | yes | pod id | -| filter | object | no | container query filter | -| fields | array | yes | container attribute list, controls which fields in the container will be returned, can speed up the request and reduce network traffic transmission | -| page | object | yes | paging info | +| Field | Type | Required | Description | +| --------- | ------------ | -------- | ------------------------------------------------------------ | +| bk_biz_id | int | Yes | Business ID | +| bk_pod_id | int | Yes | ID of the pod to which the container belongs | +| filter | object | No | Query conditions for the container | +| fields | string array | Yes | List of container properties, controls which fields are returned in the container, speeding up interface requests and reducing network traffic | +| page | object | Yes | Pagination information | -#### filter +#### filter Field Description -This parameter is the filter rule to search for container based on its attribute fields. This parameter supports the -following two filter rules types. The combined filter rules can be nested with the maximum nesting level of 2. The -specific supported filter rule types are as follows: +Filter rules for container properties, used to search for data based on container properties. This parameter supports two types of filter rule types, where combination filter rules can be nested, and at most 2 levels of nesting. The specific supported filter rule types are as follows: -##### combined filter rule +##### Combination filter rules -This filter rule type defines filter rules composed of other rules, the combined rules support logic and/or -relationships +Filter rules composed of other rules, supporting logical AND/OR relationships between rules -| Field | Type | Required | Description | -|-----------|--------|----------|----------------------------------------------------------------------------| -| condition | string | yes | query criteria, support `AND` and `OR` | -| rules | array | yes | query rules, can be of `combined filter rule` or `atomic filter rule` type | +| Field | Type | Required | Description | +| --------- | ------ | -------- | ------------------------------------------------------------ | +| condition | string | Yes | Combined query condition, supports both `AND` and `OR` | +| rules | array | Yes | Query rules, can be of type `Combination filter rules` or `Atomic filter rules` | -##### atomic filter rule +##### Atomic filter rules -This filter rule type defines basic filter rules, which represent rules for filtering a field. Any filter rule is either -directly an atomic filter rule, or a combination of multiple atomic filter rules +Basic filter rules, indicating the rules for filtering a field. Any filter rule is directly an atomic filter rule or is composed of multiple atomic filter rules. -| Field | Type | Required | Description | -|----------|----------------------------------------------------------------------|----------|----------------------------------------------------------------------------------------------------------------------| -| field | string | yes | container's field | -| operator | string | yes | operator, optional values: equal,not_equal,in,not_in,less,less_or_equal,greater,greater_or_equal,between,not_between | -| value | different fields and operators correspond to different value formats | yes | operand | +| Field | Type | Required | Description | +| -------- | ------ | -------- | ------------------------------------------------------------ | +| field | string | Yes | Container field | +| operator | string | Yes | Operator, optional values are equal, not_equal, in, not_in, less, less_or_equal, greater, greater_or_equal, between, not_between | +| value | - | No | Operand, different operators correspond to different value formats | -Assembly rules can refer to: +Assembly rules can be referred to: [Filter README](https://github.com/Tencent/bk-cmdb/blob/master/src/pkg/filter/README.md) -#### page +#### page Field Description -| Field | Type | Required | Description | -|--------------|--------|----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| start | int | yes | Record start position | -| limit | int | yes | Limit per page, maximum 500 | -| sort | string | no | Sort the field | -| enable_count | bool | yes | The flag defining Whether to get the the number of query objects. If this flag is true, then the request is to get the quantity. The remaining fields must be initialized, start is 0, and limit is: 0, sort is "" | +| Field | Type | Required | Description | +| ------------ | ------ | -------- | ------------------------------------------------------------ | +| start | int | Yes | Record start position | +| limit | int | Yes | Number of records per page, maximum 500 | +| sort | string | No | Sorting field | +| enable_count | bool | Yes | Flag for whether this request is for obtaining the quantity or details. If this flag is true, other fields must be initialized. start is 0, limit is 0, sort is "" | **Note:** -- `enable_count`If this flag is true, this request is a get quantity. The remaining fields must be initialized, start is - 0, and limit is: 0, sort is "." -- Paging parameters must be set, and the maximum query data at one time does not exceed 500. +- `enable_count` If this flag is true, it means this request is to obtain the quantity. At this time, other fields must be initialized, start is 0, limit is 0, sort is "". +- Pagination parameters must be set, and the maximum number of queried data at a time should not exceed 500. -### Request Parameters Example +### Request Parameter Example -#### Query Detail Request Parameters Example +#### Detailed Information Request Parameter Example ```json { @@ -93,7 +88,7 @@ Assembly rules can refer to: 0 indicates failure error | -| message | string | Error message returned by request failure | -| permission | object | Permission information | -| request_id | string | Request chain id | -| data | object | Data returned by request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failed error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned by the request | #### data -| Field | Type | Description | -|-------|-------|-----------------------------------------------------------------| -| count | int | Number of containers | -| info | array | Container list, only returns the fields that is set in `fields` | +| Field | Type | Description | +| ----- | ----- | --------------------- | +| count | int | Number of records | +| info | array | Actual container data | #### info[x] -| Field | Type | Description | -|---------------|--------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| name | string | container name | -| container_uid | string | container uid | -| image | string | container image | -| ports | object array | container port information list, format: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#containerport-v1-core | -| args | string array | start arguments | -| started | timestamp | start time | -| limits | object | resource limits, official documentation: https://kubernetes.io/zh/docs/concepts/policy/resource-quotas/ | -| requests | object | resource requests, official documentation: https://kubernetes.io/zh/docs/concepts/policy/resource-quotas/ | -| liveness | object | liveness probe, official documentation: https://kubernetes.io/zh/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ , format: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#probe-v1-core | -| environment | object array | environment variables, official documentation: https://kubernetes.io/zh/docs/tasks/inject-data-application/define-environment-variable-container/ , format: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#envvar-v1-core | -| mounts | object array | volume mounts, official documentation: https://kubernetes.io/zh/docs/tasks/configure-pod-container/configure-volume-storage/ , format: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#volumemount-v1-core | +| Field | Type | Description | +| ------------- | ------------ | ------------------------------------------------------------ | +| name | string | Name | +| container_uid | string | Container UID | +| image | string | Image information | +| ports | object array | Container ports, format: [ContainerPort](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#containerport-v1-core) | +| args | string array | Startup parameters | +| started | timestamp | Startup time | +| limits | object | Resource limits, official documentation: Resource Quotas | +| requests | object | Resource request size, official documentation: Resource Quotas | +| liveness | object | Liveness probe, official documentation: [Configure Liveness, Readiness, and Startup Probes](https://kubernetes.io/zh/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/) , format: [Probe](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#probe-v1-core) | +| environment | object array | Environment variables, official documentation: [Define Environment Variable Container](https://kubernetes.io/zh/docs/tasks/inject-data-application/define-environment-variable-container/) , format: [EnvVar](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#envvar-v1-core) | +| mounts | object array | Volume mounts, official documentation: [Configure Volume Storage](https://kubernetes.io/zh/docs/tasks/configure-pod-container/configure-volume-storage/) , format: [VolumeMount](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#volumemount-v1-core) | \ No newline at end of file diff --git a/docs/apidoc/cc/en/list_kube_namespace.md b/docs/apidoc/cc/en/list_kube_namespace.md index fddd66f7db..6e38de26c0 100644 --- a/docs/apidoc/cc/en/list_kube_namespace.md +++ b/docs/apidoc/cc/en/list_kube_namespace.md @@ -1,67 +1,64 @@ -### Functional description +### Function Description -Query namespace(version: v3.12.1+, auth: biz access) +Query namespace (Version: v3.12.1+, Permission: Business access) -### Request parameters +### Request Parameters {{ common_args_desc }} -#### Interface parameters +#### Interface Parameters -- common fields. +- Common fields: -| field | type | required | description | -|-----------|--------|----------|-----------------------------------------------------------------------------------------------------------------------------------------------| -| bk_biz_id | int | Yes | business id | -| filter | object | no | query criteria | -| fields | array | No | A list of attributes that control which fields are returned in the result, to speed up interface requests and reduce network traffic transfer | -| page | object | yes | paging information | +| Field | Type | Required | Description | +| --------- | ------ | -------- | ------------------------------------------------------------ | +| bk_biz_id | int | Yes | Business ID | +| filter | object | No | Namespace query conditions | +| fields | array | No | Property list, controls which fields are returned in the result to speed up interface requests and reduce network traffic | +| page | object | Yes | Pagination information | -#### filter +#### filter Field Description -This parameter is the filter rule to search for container based on its attribute fields. This parameter supports the -following two filter rules types. The combined filter rules can be nested with the maximum nesting level of 2. The -specific supported filter rule types are as follows: +Filter rules for namespace properties, used to search for data based on namespace properties. This parameter supports two types of filter rule types, where combination filter rules can be nested, and at most 2 levels of nesting. The specific supported filter rule types are as follows: -##### combined filter rule +##### Combination filter rules -This filter rule type defines filter rules composed of other rules, the combined rules support logic and/or -relationships +Filter rules composed of other rules, supporting logical AND/OR relationships between rules -| Field | Type | Required | Description | -|-----------|--------|----------|----------------------------------------------------------------------------| -| condition | string | yes | query criteria, support `AND` and `OR` | -| rules | array | yes | query rules, can be of `combined filter rule` or `atomic filter rule` type | +| Field | Type | Required | Description | +| --------- | ------ | -------- | ------------------------------------------------------------ | +| condition | string | Yes | Combined query condition, supports both `AND` and `OR` | +| rules | array | Yes | Query rules, can be of type `Combination filter rules` or `Atomic filter rules` | -##### atomic filter rule +##### Atomic filter rules -This filter rule type defines basic filter rules, which represent rules for filtering a field. Any filter rule is either -directly an atomic filter rule, or a combination of multiple atomic filter rules +Basic filter rules, indicating the rules for filtering a field. Any filter rule is directly an atomic filter rule or is composed of multiple atomic filter rules. -| Field | Type | Required | Description | -|----------|----------------------------------------------------------------------|----------|----------------------------------------------------------------------------------------------------------------------| -| field | string | yes | namespace's field | -| operator | string | yes | operator, optional values: equal,not_equal,in,not_in,less,less_or_equal,greater,greater_or_equal,between,not_between | -| value | different fields and operators correspond to different value formats | yes | operand | +| Field | Type | Required | Description | +| -------- | ------ | -------- | ------------------------------------------------------------ | +| field | string | Yes | Namespace field | +| operator | string | Yes | Operator, optional values are equal, not_equal, in, not_in, less, less_or_equal, greater, greater_or_equal, between, not_between | +| value | - | No | Operand, different operators correspond to different value formats | -Assembly rules can refer to: +Assembly rules can be referred to: [Filter README](https://github.com/Tencent/bk-cmdb/blob/master/src/pkg/filter/README.md) #### page -| field | type | required | description | -|--------------|--------|----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| start | int | Yes | Record start position | -| limit | int | Yes | Limit the number of entries per page, up to 500 | -| sort | string | No | Sort field | -| enable_count | bool | Yes | A flag for whether to get the number of query objects. If this flag is true then the request is to get the number, the rest of the fields must be initialized, start is 0, limit is :0, sort is "" | +| Field | Type | Required | Description | +| ------------ | ------ | -------- | ------------------------------------------------------------ | +| start | int | Yes | Record start position | +| limit | int | Yes | Number of records per page, maximum 500 | +| sort | string | No | Sorting field | +| enable_count | bool | Yes | Flag for whether this request is for obtaining the quantity or details. If this flag is true, other fields must be initialized. start is 0, limit is 0, sort is "" | **Note:** -- `enable_count`If this flag is true, this request is a get quantity. The remaining fields must be initialized, start is - 0, and limit is: 0, sort is "." -- Paging parameters must be set, and the maximum query data at one time does not exceed 500. +- `enable_count` If this flag is true, it means this request is to obtain the quantity. At this time, other fields must be initialized, start is 0, limit is 0, sort is "". +- Pagination parameters must be set, and the maximum number of queried data at a time should not exceed 500. -### Request Parameters Example +### Request Parameter Example + +### Detailed Information Request Parameter ```json { @@ -97,47 +94,7 @@ Assembly rules can refer to: 0 means failure error. | -| message | string | The error message returned by the failed request. | -| permission | object | Permission information | -| request_id | string | request_chain_id | -| data | object | data returned by the request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failed error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned by the request | #### data -| field | type | description | -|-------|-------|----------------------------------------------------------| -| count | int | Number of records | -| info | array | The actual data, returning only the fields set in fields | +| Field | Type | Description | +| ----- | ----- | ------------------------------------------------------ | +| count | int | Number of records | +| info | array | Actual data, only returns the fields set in the fields | #### info[x] -| field | type | description | -|-----------------|--------|----------------------------------------------| -| name | string | namespace name | -| labels | map | labels | -| resource_quotas | array | namespace CPU and memory requests and limits | - -#### info[x].resource_quotas[x] +| Field | Type | Description | +| --------------- | ------ | -------------------------------------------- | +| name | string | Namespace name | +| labels | map | Labels | +| resource_quotas | array | Namespace CPU and memory requests and limits | -| field | type | description | -|----------------|--------|----------------------------------------------------------------------------------------------------------------------------------------------------| -| hard | object | hard limits required per named resource | -| scopes | array | Quota scopes, with optional values of "Terminating", "NotTerminating", "BestEffort", "NotBestEffort", "PriorityClass", "CrossNamespacePodAffinity" |. -| scope_selector | object | scope selector | +#### resource_quotas[x] -#### info[x].resource_quotas[x].scope_selector +| Field | Type | Description | +| -------------- | ------ | ------------------------------------------------------------ | +| hard | object | Hard limit for each named resource | +| scopes | array | Quota scope, optional values are: "Terminating", "NotTerminating", "BestEffort", "NotBestEffort", "PriorityClass", "CrossNamespacePodAffinity" | +| scope_selector | object | Scope selector | -| field | type | description | -|-------------------|-------|-------------------| -| match_expressions | array | match_expressions | +#### scope_selector -#### info[x].resource_quotas[x].scope_selector.match_expressions[x] +| Field | Type | Description | +| ----------------- | ----- | ----------------- | +| match_expressions | array | Match expressions | -| field | type | description | -|------------|--------|------------------------------------------------------------------------------------------------------------------------------| -| scope_name | array | Quota scope, optional values are: "Terminating", "NotTerminating", "BestEffort", "NotBe | -| operator | string | selector operator,optional values are:"In"、"NotIn"、"Exists"、"DoesNotExist" | -| values | array | string array,if the operator is "In"or "NotIn",can not be null,if the operator is "Exists" or "DoesNotExist",it must be null | - -**Note:** +#### match_expressions[x] -- If this request is to query details, count is 0. If the query is quantity, info is empty. +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| scope_name | array | Quota scope, optional values are: "Terminating", "NotTerminating", "BestEffort", "NotBestEffort", "PriorityClass", "CrossNamespacePodAffinity" | +| operator | string | Selector operator, optional values are: "In", "NotIn", "Exists", "DoesNotExist" | +| values | array | String array. If the operator is "In" or "NotIn", it cannot be empty. If it is "Exists" or "DoesNotExist", it must be empty. | \ No newline at end of file diff --git a/docs/apidoc/cc/en/list_kube_node.md b/docs/apidoc/cc/en/list_kube_node.md index 027fd8ea43..420fc3a016 100644 --- a/docs/apidoc/cc/en/list_kube_node.md +++ b/docs/apidoc/cc/en/list_kube_node.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -list container nodes (v3.12.1+, permission: biz access) +Query container nodes (v3.12.1+, Permission: Business access) ### Request Parameters @@ -8,62 +8,52 @@ list container nodes (v3.12.1+, permission: biz access) #### Interface Parameters -| Field | Type | Required | Description | -|-----------|--------|----------|------------------------------------------------------------------------------------------------| -| bk_biz_id | int | yes | business ID | -| filter | object | no | Container node query scope | -| fields | array | no | The attribute of the container node to be queried, if not written, it means to search all data | -| page | object | yes | Paging condition | +| Field | Type | Required | Description | +| --------- | ------ | -------- | ------------------------------------------------------------ | +| bk_biz_id | int | Yes | Business ID | +| filter | object | No | Container node query scope | +| fields | array | No | Container node properties to be queried. If not specified, all data will be searched. | +| page | object | Yes | Pagination information | #### filter -This parameter is the filter rule to search for container based on its attribute fields. This parameter supports the -following two filter rules types. The combined filter rules can be nested with the maximum nesting level of 2. The -specific supported filter rule types are as follows: +This parameter is a combination of filter rules for container node properties, used to search for container clusters based on container node properties. Combinations support both AND and OR, allowing nesting, with a maximum nesting of 2 levels. -##### combined filter rule +| Field | Type | Required | Description | +| --------- | ------ | -------- | -------------------------------------- | +| condition | string | Yes | Rule operator | +| rules | array | Yes | Filtering rules for the range of nodes | -This filter rule type defines filter rules composed of other rules, the combined rules support logic and/or -relationships +#### rules -| Field | Type | Required | Description | -|-----------|--------|----------|----------------------------------------------------------------------------| -| condition | string | yes | query criteria, support `AND` and `OR` | -| rules | array | yes | query rules, can be of `combined filter rule` or `atomic filter rule` type | +The filtering rule is a triple `field`, `operator`, `value` -##### atomic filter rule +| Field | Type | Required | Description | +| -------- | ------ | -------- | ------------------------------------------------------------ | +| field | string | Yes | Field name | +| operator | string | Yes | Operator, optional values are equal, not_equal, in, not_in, less, less_or_equal, greater, greater_or_equal, between, not_between | +| value | - | No | Operand, different operators correspond to different value formats | -This filter rule type defines basic filter rules, which represent rules for filtering a field. Any filter rule is either -directly an atomic filter rule, or a combination of multiple atomic filter rules - -| Field | Type | Required | Description | -|----------|----------------------------------------------------------------------|----------|----------------------------------------------------------------------------------------------------------------------| -| field | string | yes | node's field | -| operator | string | yes | operator, optional values: equal,not_equal,in,not_in,less,less_or_equal,greater,greater_or_equal,between,not_between | -| value | different fields and operators correspond to different value formats | yes | operand | - -Assembly rules can refer to: +Assembly rules can be referred to: [QueryBuilder README](https://github.com/Tencent/bk-cmdb/blob/master/src/common/querybuilder/README.md) #### page -| Field | Type | Required | Description | -|--------------|--------|----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| start | int | yes | Record start position | -| limit | int | yes | Limit per page, maximum 500 | -| sort | string | no | Sort the field | -| enable_count | bool | yes | The flag defining Whether to get the the number of query objects. If this flag is true, then the request is to get the quantity. The remaining fields must be initialized, start is 0, and limit is: 0, sort is "" | +| Field | Type | Required | Description | +| ------------ | ------ | -------- | ------------------------------------------------------------ | +| start | int | Yes | Record start position | +| limit | int | Yes | Number of records per page, maximum 500 | +| enable_count | bool | Yes | Flag for whether this request is for obtaining the quantity or details. If this flag is true, other fields must be initialized. start is 0, limit is 0, sort is "" | +| sort | string | No | Sorting field, adding a `-` before the field, such as sort: ""-field"", represents sorting the field in descending order | **Note:** -- `enable_count`If this flag is true, this request is a get quantity. The remaining fields must be initialized, start is - 0, and limit is: 0, sort is "." -- `sort`If the caller does not specify it, the background specifies it as the container node ID by default. -- Paging parameters must be set, and the maximum query data at one time does not exceed 500. -- bk_cluster_id and cluster_uid cannot be empty or filled at the same time. +- `enable_count` If this flag is true, it means this request is to obtain the quantity. At this time, other fields must be initialized, start is 0, limit is 0, sort is "". +- If `sort` is not specified by the caller, the backend defaults to the node ID. +- Pagination parameters must be set, and the maximum number of queried data at a time should not exceed 500. -### Request Parameters Example +### Request Parameter Example -### Request Details Request Parameters +### Detailed Information Request Parameter ```json { @@ -100,7 +90,7 @@ Assembly rules can refer to: 0 indicates failure error | -| message | string | Error message returned by request failure | -| permission | object | Permission information | -| data | object | Data returned by request | -| request_id | string | Request chain id | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failed error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| data | object | Data returned by the request | +| request_id | string | Request chain ID | #### data -| Field | Type | Description | -|-------|-------|-------------------| -| count | int | Number of records | -| info | array | Actual node data | +| Field | Type | Description | +| ----- | ----- | --------------------------------- | +| count | int | Number of records | +| info | array | Actual data, details of the nodes | #### info[x] -| Field | Type | Required | Description | -|-------------------|--------|----------|--------------------------------------------------------------------------------------| -| name | string | yes | node name | -| roles | string | no | node roles | -| labels | object | no | label | -| taints | object | no | taints | -| unschedulable | bool | no | Whether to turn off schedulable, true means not schedulable, false means schedulable | -| internal_ip | array | no | internal ip | -| external_ip | array | no | external ip | -| hostname | string | no | hostname | -| runtime_component | string | no | runtime components | -| kube_proxy_mode | string | no | kube-proxy proxy mode | -| pod_cidr | string | no | The allocation range of the Pod address of this node | +| Field | Type | Required | Description | +| ----------------- | ------ | -------- | ------------------------------------------------------------ | +| name | string | No | Node name | +| roles | string | No | Node type | +| labels | object | No | Labels | +| taints | object | No | Taints | +| unschedulable | bool | No | Whether scheduling is closed, true means not schedulable, false means schedulable | +| internal_ip | array | No | Internal IP | +| external_ip | array | No | External IP | +| hostname | string | No | Hostname | +| runtime_component | string | No | Runtime component | +| kube_proxy_mode | string | No | kube-proxy proxy mode | +| pod_cidr | string | No | The allocation range of Pod addresses on this node | **Note:** -- If this request is to query details, count is 0. If the query is quantity, info is empty. - +- If this request is to query detailed information, count is 0. If the query is for quantity, info is empty. \ No newline at end of file diff --git a/docs/apidoc/cc/en/list_kube_pod.md b/docs/apidoc/cc/en/list_kube_pod.md index 20eda01d69..0c81ca80cc 100644 --- a/docs/apidoc/cc/en/list_kube_pod.md +++ b/docs/apidoc/cc/en/list_kube_pod.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -list kube pod (version: v3.12.1+, auth: biz access) +Query Pod list (Version: v3.12.1+, Permission: Business access) ### Request Parameters @@ -8,60 +8,55 @@ list kube pod (version: v3.12.1+, auth: biz access) #### Interface Parameters -| Field | Type | Required | Description | -|-----------|--------|----------|-----------------------------------------------------------------------------------------------------------------------------------------| -| bk_biz_id | int | yes | biz id | -| filter | object | no | pod query filter | -| fields | array | yes | pod attribute list, controls which fields in the pod will be returned, can speed up the request and reduce network traffic transmission | -| page | object | yes | paging info | +| Field | Type | Required | Description | +| --------- | ------ | -------- | ------------------------------------------------------------ | +| bk_biz_id | int | Yes | Business ID | +| filter | object | No | Conditions for querying pods | +| fields | array | Yes | List of pod properties, control which fields are present in the returned result to speed up API requests and reduce network traffic | +| page | object | Yes | Pagination information | -#### Filter +#### filter Field Description -This parameter is the filter rule to search for pod based on its attribute fields. This parameter supports the following -two filter rules types. The combined filter rules can be nested with the maximum nesting level of 2. The specific -supported filter rule types are as follows: +Filter rules for pod properties, used to search data based on pod properties. This parameter supports two types of filter rule types, and combination filter rules can be nested, with a maximum nesting of 2 levels. The specific supported filter rule types are as follows: -##### Combined Filter Rule +##### Combination Filter Rule -This filter rule type defines filter rules composed of other rules, the combined rules support logic and/or -relationships +A filter rule composed of other rules, supporting logical AND/OR relationships between combined rules. -| Field | Type | Required | Description | -|-----------|--------|----------|----------------------------------------------------------------------------| -| condition | string | yes | query criteria, support `AND` and `OR` | -| rules | array | yes | query rules, can be of `Combined Filter Rule` or `Atomic Filter Rule` type | +| Field | Type | Required | Description | +| --------- | ------ | -------- | ------------------------------------------------------------ | +| condition | string | Yes | Combination query conditions, supports `AND` and `OR` | +| rules | array | Yes | Query rules, can be either `Combination Query Parameters` or `Atomic Query Parameters` types | ##### Atomic Filter Rule -This filter rule type defines basic filter rules, which represent rules for filtering a field. Any filter rule is either -directly an atomic filter rule, or a combination of multiple atomic filter rules +Basic filter rule, represents a rule to filter a specific field. Any filter rule is directly an atomic filter rule or is composed of multiple atomic filter rules. -| Field | Type | Required | Description | -|----------|----------------------------------------------------------------------|----------|----------------------------------------------------------------------------------------------------------------------| -| field | string | yes | pod's field | -| operator | string | yes | operator, optional values: equal,not_equal,in,not_in,less,less_or_equal,greater,greater_or_equal,between,not_between | -| value | different fields and operators correspond to different value formats | yes | operand | +| Field | Type | Required | Description | +| -------- | ------------------------------------------------------------ | -------- | ------------------------------------------------------------ | +| field | string | Yes | Field of the pod | +| operator | string | Yes | Operator, optional values are equal, not_equal, in, not_in, less, less_or_equal, greater, greater_or_equal, between, not_between | +| value | Different fields and operators correspond to different value formats | No | Operand, different operators correspond to different value formats | -Assembly rules can refer to: +Assembly rules can be referred to: [Filter README](https://github.com/Tencent/bk-cmdb/blob/master/src/pkg/filter/README.md) -#### Page +#### page Field Description -| Field | Type | Required | Description | -|--------------|--------|----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| start | int | yes | Record start position | -| limit | int | yes | Limit per page, maximum 500 | -| sort | string | no | Sort the field | -| enable_count | bool | yes | The flag defining Whether to get the the number of query objects. If this flag is true, then the request is to get the quantity. The remaining fields must be initialized, start is 0, and limit is: 0, sort is "" | +| Field | Type | Required | Description | +| ------------ | ------ | -------- | ------------------------------------------------------------ | +| start | int | Yes | Record start position | +| limit | int | Yes | Number of records per page, maximum 500 | +| sort | string | No | Sorting field | +| enable_count | bool | Yes | Flag for whether this request is for obtaining the quantity or details. If this flag is true, other fields must be initialized. start is 0, limit is 0, sort is "" | **Note:** -- `enable_count`If this flag is true, this request is a get quantity. The remaining fields must be initialized, start is - 0, and limit is: 0, sort is "." -- Paging parameters must be set, and the maximum query data at one time does not exceed 500. +- `enable_count` If this flag is true, it means this request is to obtain the quantity. At this time, other fields must be initialized, start is 0, limit is 0, sort is "". +- Pagination parameters must be set, and the maximum number of queried data at a time should not exceed 500. -### Request Parameters Example +### Request Parameter Example -#### Query Detail Request Parameters Example +#### Detailed Information Request Parameter Example ```json { @@ -111,7 +106,7 @@ Assembly rules can refer to: 0 indicates failure error | -| message | string | Error message returned by request failure | -| permission | object | Permission information | -| request_id | string | Request chain id | -| data | object | Data returned by request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failed error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned by the request | #### data -| Field | Type | Description | -|-------|-------|-----------------------------------------------------------| -| count | int | Number of pods | -| info | array | Pod list, only returns the fields that is set in `fields` | +| Field | Type | Description | +| ----- | ----- | -------------------------------- | +| count | int | Number of records | +| info | array | Actual data, details of the pods | #### info[x] -| Field | Type | Description | -|----------------|--------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| name | string | pod name | -| priority | int | pod priority | -| labels | string map | pod labels, key and value are all string, official documentation: http://kubernetes.io/docs/user-guide/labels | -| ip | string | pod ip | -| ips | object array | pod ip list, format: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#podip-v1-core | -| volumes | object array | pod volume info list, official documentation: https://kubernetes.io/zh/docs/concepts/storage/volumes/ , format: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#volume-v1-core | -| qos_class | enum | quality of service class, official documentation: https://kubernetes.io/zh-cn/docs/tasks/configure-pod-container/quality-service-pod/ | -| node_selectors | string map | node label selectors, key and value are all string, official documentation: https://kubernetes.io/zh/docs/concepts/scheduling-eviction/assign-pod-node/ | -| tolerations | object array | pod toleration list, format: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#toleration-v1-core | -| operator | string array | pod operator | -| containers | object array | container information list | +| Field | Type | Description | +| -------------- | ------------ | ------------------------------ | +| name | string | Name | +| priority | int | Priority | +| labels | string map | Labels | +| ip | string | Container network IP | +| ips | object array | Array of container network IPs | +| volumes | object array | Used volume information | +| qos_class | enum | Quality of service | +| node_selectors | string map | Node label selector | +| tolerations | object array | Tolerations | +| operator | string array | Pod operator | +| containers | object array | Container data | \ No newline at end of file diff --git a/docs/apidoc/cc/en/list_kube_workload.md b/docs/apidoc/cc/en/list_kube_workload.md index 331dd2655e..2b8e221592 100644 --- a/docs/apidoc/cc/en/list_kube_workload.md +++ b/docs/apidoc/cc/en/list_kube_workload.md @@ -1,70 +1,65 @@ ### Function Description -Query workload (version: v3.12.1+, auth: biz access) +Query Workload (Version: v3.12.1+, Permission: Business access) -### Request parameters +### Request Parameters {{ common_args_desc }} -#### Interface parameters +#### Interface Parameters -- Common fields. +- Common Fields: -| field | type | mandatory | description | -|-----------|--------|-----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| bk_biz_id | int | yes | business id | -| kind | string | yes | workload type, the current built-in workload types are deployment, daemonSet, statefulSet, gameStatefulSet, gameDeployment, cronJob, job, pods (put those who do not pass workload but directly create Pod) | -| filter | object | no | query condition | -| fields | array | No | A list of attributes that control which fields are returned in the result, to speed up interface requests and reduce network traffic transfer | -| page | object | yes | paging information | +| Field | Type | Required | Description | +| --------- | ------ | -------- | ------------------------------------------------------------ | +| bk_biz_id | int | Yes | Business ID | +| kind | string | Yes | Workload type, currently supported workload types are deployment, daemonSet, statefulSet, gameStatefulSet, gameDeployment, cronJob, job, pods (created directly without going through workload) | +| filter | object | No | Workload query conditions | +| fields | array | No | Attribute list, control which fields are present in the returned result to speed up API requests and reduce network traffic | +| page | object | Yes | Pagination information | -#### filter +#### filter Field Description -This parameter is the filter rule to search for container based on its attribute fields. This parameter supports the -following two filter rules types. The combined filter rules can be nested with the maximum nesting level of 2. The -specific supported filter rule types are as follows: +Filter rules for workload properties, used to search data based on workload properties. This parameter supports two types of filter rule types, and combination filter rules can be nested, with a maximum nesting of 2 levels. The specific supported filter rule types are as follows: -##### combined filter rule +##### Combination Filter Rule -This filter rule type defines filter rules composed of other rules, the combined rules support logic and/or -relationships +A filter rule composed of other rules, supporting logical AND/OR relationships between combined rules. -| Field | Type | Required | Description | -|-----------|--------|----------|----------------------------------------------------------------------------| -| condition | string | yes | query criteria, support `AND` and `OR` | -| rules | array | yes | query rules, can be of `combined filter rule` or `atomic filter rule` type | +| Field | Type | Required | Description | +| --------- | ------ | -------- | ------------------------------------------------------------ | +| condition | string | Yes | Combination query conditions, supports `AND` and `OR` | +| rules | array | Yes | Query rules, can be either `Combination Filter Rule` or `Atomic Filter Rule` types | -##### atomic filter rule +##### Atomic Filter Rule -This filter rule type defines basic filter rules, which represent rules for filtering a field. Any filter rule is either -directly an atomic filter rule, or a combination of multiple atomic filter rules +Basic filter rule, represents a rule to filter a specific field. Any filter rule is directly an atomic filter rule or is composed of multiple atomic filter rules. -| Field | Type | Required | Description | -|----------|----------------------------------------------------------------------|----------|----------------------------------------------------------------------------------------------------------------------| -| field | string | yes | workload's field | -| operator | string | yes | operator, optional values: equal,not_equal,in,not_in,less,less_or_equal,greater,greater_or_equal,between,not_between | -| value | different fields and operators correspond to different value formats | yes | operand | +| Field | Type | Required | Description | +| -------- | ------------------------------------------------------------ | -------- | ------------------------------------------------------------ | +| field | string | Yes | Field of the container | +| operator | string | Yes | Operator, optional values are equal, not_equal, in, not_in, less, less_or_equal, greater, greater_or_equal, between, not_between | +| value | Different fields and operators correspond to different value formats | No | Operand, different operators correspond to different value formats | -Assembly rules can refer to: +Assembly rules can be referred to: [Filter README](https://github.com/Tencent/bk-cmdb/blob/master/src/pkg/filter/README.md) -#### page +#### page Field Description -| field | type | required | description | -|--------------|--------|----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| start | int | Yes | Record start position | -| limit | int | Yes | Limit the number of entries per page, up to 500 | -| sort | string | No | Sort field | -| enable_count | bool | Yes | A flag for whether to get the number of query objects. If this flag is true then the request is to get the number, the rest of the fields must be initialized, start is 0, limit is :0, sort is "" | +| Field | Type | Required | Description | +| ------------ | ------ | -------- | ------------------------------------------------------------ | +| start | int | Yes | Record start position | +| limit | int | Yes | Number of records per page, maximum 500 | +| sort | string | No | Sorting field | +| enable_count | bool | Yes | Flag for whether this request is for obtaining the quantity or details. If this flag is true, other fields must be initialized. start is 0, limit is 0, sort is "" | **Note:** -- `enable_count`If this flag is true, this request is a get quantity. The remaining fields must be initialized, start is - 0, and limit is: 0, sort is "." -- Paging parameters must be set, and the maximum query data at one time does not exceed 500. +- `enable_count` If this flag is true, it means this request is to obtain the quantity. At this time, other fields must be initialized, start is 0, limit is 0, sort is "". +- Pagination parameters must be set, and the maximum number of queried data at a time should not exceed 500. -### Example request parameters +### Request Parameter Example -#### Query Detail Request Parameters Example +#### Detailed Information Request Parameter Example ```json { @@ -106,7 +101,7 @@ Assembly rules can refer to: 0 means failure error. | -| message | string | The error message returned by the failed request. | -| permission | object | Permission information | -| request_id | string | request_chain_id | -| data | object | data returned by the request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failed error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned by the request | #### data -| field | type | description | -|-------|-------|----------------------------------------------------------| -| count | int | Number of records | -| info | array | The actual data, returning only the fields set in fields | +| Field | Type | Description | +| ----- | ----- | ------------------------------------- | +| count | int | Number of records | +| info | array | Actual data, details of the workloads | #### info[x] -| Field | Type | Description | -|-------------------------|--------|-----------------------------------------------------------------------------------------------------------------------------------------------------------| -| name | string | workload name | -| labels | map | label | -| selector | object | workload selector | -| replicas | int | number of workload instances | -| strategy_type | string | workload update mechanism | -| min_ready_seconds | int | Specifies the minimum time a newly created Pod will be ready without any container crashes, and only after that time will the Pod be considered available | -| rolling_update_strategy | object | rolling update strategy | +| Field | Type | Description | +| ----------------------- | ------ | ------------------------------------------------------------ | +| name | string | Workload name | +| labels | map | Labels | +| selector | object | Workload selector | +| replicas | int | Number of workload instances | +| strategy_type | string | Workload update mechanism | +| min_ready_seconds | int | Minimum readiness time for newly created Pods in the absence of any container crashes, only Pods that exceed this time are considered available | +| rolling_update_strategy | object | Rolling update strategy | #### selector -| field | type | description | -|-------------------|-------|-------------------| -| match_labels | map | match_by_label | -| match_expressions | array | match expressions | +| Field | Type | Description | +| ----------------- | ----- | --------------------- | +| match_labels | map | Match based on labels | +| match_expressions | array | Matching expressions | #### match_expressions[x] -| field | type | description | -|----------|--------|-------------------------------------------------------------------------------------------------------------------------| -| key | string | key of tag | -| operator | string | operator, optional values: "In", "NotIn", "Exists", "DoesNotExist" | -| values | array | array of strings, cannot be empty if the operator is "In" or "NotIn", must be empty if it is "Exists" or "DoesNotExist" | +| Field | Type | Description | +| -------- | ------ | ------------------------------------------------------------ | +| key | string | Key of the label | +| operator | string | Operator, optional values are "In", "NotIn", "Exists", "DoesNotExist" | +| values | array | String array, if the operator is "In" or "NotIn", it must not be empty. If it is "Exists" or "DoesNotExist", it must be empty | #### rolling_update_strategy -When strategy_type is RollingUpdate, it is not empty, otherwise it is empty. +When strategy_type is RollingUpdate, it is not empty; otherwise, it is empty. -| field | type | description | -|-----------------|--------|-----------------| -| max_unavailable | object | max_unavailable | object -| max_surge | object | max_overflow | +| Field | Type | Description | +| --------------- | ------ | ------------------- | +| max_unavailable | object | Maximum unavailable | +| max_surge | object | Maximum surge | #### max_unavailable -| field | type | description | -|---------|--------|--------------------------------------------------------------| -| type | int | Optional values of 0 (for int types) or 1 (for string types) | -| int_val | int | When type is 0 (for int type), the corresponding int value | -| str_val | string | when type is 1(string type),the corresponding string value | +| Field | Type | Description | +| ------- | ------ | ------------------------------------------------------------ | +| type | int | Optional values are 0 (represents int type) or 1 (represents string type) | +| int_val | int | When type is 0 (represents int type), it corresponds to the int value | +| str_val | string | When type is 1 (represents string type), it corresponds to the string value | #### max_surge -| field | type | description | -|---------|--------|------------------------------------------------------------| -| type | int | optional value of 0 (for int type) or 1 (for string type) | -| int_val | int | When type is 0 (for int type), the corresponding int value | -| str_val | string | when type is 1(string type),the corresponding string value | +| Field | Type | Description | +| ------- | ------ | ------------------------------------------------------------ | +| type | int | Optional values are 0 (represents int type) or 1 (represents string type) | +| int_val | int | When type is 0 (represents int type), it corresponds to the int value | +| str_val | string | When type is 1 (represents string type), it corresponds to the string value | **Note:** -- If this request is to query details, count is 0. If the query is quantity, info is empty. +- If this request is to query detailed information, count is 0; if it is to query the quantity, info is empty. \ No newline at end of file diff --git a/docs/apidoc/cc/en/list_operation_audit.md b/docs/apidoc/cc/en/list_operation_audit.md index 434707b43e..c32648f92a 100644 --- a/docs/apidoc/cc/en/list_operation_audit.md +++ b/docs/apidoc/cc/en/list_operation_audit.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description - Get action Audit log based on condition +Retrieve operation audit logs based on conditions (Permission: Operation audit query permission) ### Request Parameters @@ -8,42 +8,42 @@ #### Interface Parameters -| Field | Type | Required | Description | -|---------------------|------------|--------|-----------------------------| -| page | object | yes | Paging parameter | -| condition | object | no | Operation audit log query criteria | +| Field | Type | Required | Description | +| --------- | ------ | -------- | ------------------------------------ | +| page | object | Yes | Pagination parameters | +| condition | object | No | Operation audit log query conditions | #### page -| Field | Type | Required | Description | -|-----------|------------|--------|----------------------| -| start | int | no | Record start position | -| limit | int | yes | Limit bars per page, Max. 200| -| sort | string | no | Sort field | +| Field | Type | Required | Description | +| ----- | ------ | -------- | --------------------------------------- | +| start | int | No | Record start position | +| limit | int | Yes | Number of records per page, maximum 200 | +| sort | string | No | Sorting field | #### condition -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_biz_id | int | no | Business ID | -| resource_type |string | no | Specific resource type of operation| -| action | array |no | Operation type| -| operation_time | object |yes | Operating time| -| user | string |no | Operator| -| resource_name | string | no | Resource name | -| category | string | no | Type of query | -| fuzzy_query | bool | no | Whether to use fuzzy query to query the resource name is **inefficient and poor in performance**. This field only affects resource_name. This field will be ignored when using condition to perform fuzzy query. Please choose one of the two. | -| condition | array |no| Specify query criteria, which can not be provided at the same time as user and resource_name| +| Field | Type | Required | Description | +| -------------- | ------ | -------- | ------------------------------------------------------------ | +| bk_biz_id | int | No | Business ID | +| resource_type | string | No | Specific resource type of the operation | +| action | array | No | Operation types | +| operation_time | object | Yes | Operation time | +| user | string | No | Operator | +| resource_name | string | No | Resource name | +| category | string | No | Query type | +| fuzzy_query | bool | No | Whether to use fuzzy query on resource name. **Fuzzy queries are inefficient and have poor performance. This field only affects resource_name, and when using the condition method for fuzzy queries, this field will be ignored. Please choose one of the two methods to use.** | +| condition | array | No | Specify query conditions, cannot be provided at the same time as user and resource_name | ##### condition.condition -| Field | Type | Required| Description | -| -------- | ------------ | ---- | ------------------------------------------------------------ | -| field | string | yes | Object,"user" only,"resource_name" | -| operator | string | yes | Operator: in is belongs to, not_in is does not belong to, contains is contains, and field is resource_name. Contains can be used for fuzzy query| -| value | string/array |yes | The value corresponding to the field, in and not_in require array type, and contexts require String type| +| Field | Type | Required | Description | +| -------- | ------------ | -------- | ------------------------------------------------------------ | +| field | string | Yes | Field of the object, only "user" and "resource_name" are supported | +| operator | string | Yes | Operator, "in" means belonging to, "not_in" means not belonging to, "contains" means contains. When field is "resource_name," you can use "contains" for fuzzy queries | +| value | string/array | Yes | Value corresponding to the field, array type is required for "in" and "not_in," string type is required for "contains" | -### Request Parameters Example +### Request Parameter Example ```json { @@ -51,141 +51,142 @@ "bk_app_secret": "xxx", "bk_username": "xxx", "bk_token": "xxx", - "condition":{ - "bk_biz_id":2, - "resource_type":"host", - "action":[ + "condition": { + "bk_biz_id": 2, + "resource_type": "host", + "action": [ "create", "delete" ], - "operation_time":{ - "start":"2020-09-23 00:00:00", - "end":"2020-11-01 23:59:59" + "operation_time": { + "start": "2020-09-23 00:00:00", + "end": "2020-11-01 23:59:59" }, - "user":"admin", - "resource_name":"1.1.1.1", - "category":"host", + "user": "admin", + "resource_name": "1.1.1.1", + "category": "host", "fuzzy_query": false }, - "page":{ - "start":0, - "limit":10, - "sort":"-operation_time" + "page": { + "start": 0, + "limit": 10, + "sort": "-operation_time" } } ``` - ```json { - "condition":{ - "bk_biz_id":2, - "resource_type":"host", - "action":[ + "condition": { + "bk_biz_id": 2, + "resource_type": "host", + "action": [ "create", "delete" ], - "operation_time":{ - "start":"2020-09-23 00:00:00", - "end":"2020-11-01 23:59:59" + "operation_time": { + "start": "2020-09-23 00:00:00", + "end": "2020-11-01 23:59:59" }, - "condition":[ - { - "field":"user", - "operator":"in", - "value":["admin"] - }, - { - "field":"resource_name", - "operator":"in", - "value":["1.1.1.1"] - } + "condition": [ + { + "field": "user", + "operator": "in", + "value": ["admin"] + }, + { + "field": "resource_name", + "operator": "in", + "value": ["1.1.1.1"] + } ], - "category":"host" + "category": "host" }, - "page":{ - "start":0, - "limit":10, - "sort":"-operation_time" + "page": { + "start": 0, + "limit": 10, + "sort": "-operation_time" } } ``` -### Return Result Example +### Response Example ```json { - "result":true, - "code":0, - "message":"success", + "result": true, + "code": 0, + "message": "success", "permission": null, "request_id": "e43da4ef221746868dc4c837d36f3807", - "data":{ - "count":2, - "info":[ + "data": { + "count": 2, + "info": [ { - "id":7, - "audit_type":"", - "bk_supplier_account":"", - "user":"admin", - "resource_type":"host", - "action":"delete", - "operate_from":"", - "operation_detail":null, - "operation_time":"2020-10-09 21:30:51", - "bk_biz_id":1, - "resource_id":4, - "resource_name":"2.2.2.2" + "id": 7, + "audit_type": "", + "bk_supplier_account": "", + "user": "admin", + "resource_type": "host", + "action": "delete", + "operate_from": "", + "operation_detail": null, + "operation_time": "2020-10-09 21:30:51", + "bk_biz_id": 1, + "resource_id": 4, + "resource_name": "2.2.2.2" }, { - "id":2, - "audit_type":"", - "bk_supplier_account":"", - "user":"admin", - "resource_type":"host", - "action":"delete", - "operate_from":"", - "operation_detail":null, - "operation_time":"2020-10-09 17:13:55", - "bk_biz_id":1, - "resource_id":1, - "resource_name":"1.1.1.1" + "id": 2, + "audit_type": "", + "bk_supplier_account": "", + "user": "admin", + "resource_type": "host", + "action": "delete", + "operate_from": "", + "operation_detail": null, + "operation_time": "2020-10-09 17:13:55", + "bk_biz_id": 1, + "resource_id": 1, + "resource_name": "1.1.1.1" } ] } } ``` -### Return Result Parameters Description +### Response Result Explanation + #### response -| Name| Type| Description| -|---|---|---| -| result | bool |Whether the request was successful or not. True: request succeeded;false request failed| -| code | int |Wrong code. 0 indicates success,>0 indicates failure error| -| message | string |Error message returned by request failure| -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request| +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failed error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned by the request | #### data -| Field | Type | Description | -|-----------|-----------|--------------| -| count | int | Number of records | -| info | array | Record information of operation audit| +| Field | Type | Description | +| ----- | ----- | ------------------------------- | +| count | int | Number of records | +| info | array | Operation audit log information | #### info -| Field | Type | Description | -|-----------|-----------|--------------| -| id | int | Audit ID | -| audit_type | string | Operational audit type | -| bk_supplier_account | string | Developer account number | -| user | string | Operator| -| resource_type | string | Resource type | -| action | string | Operation type| -| operate_from | string | Source platform | -| operation_detail | object | Operational details | -| operation_time | string | Operating time| -| bk_biz_id | int | Business ID | -| resource_id | int | Resource id| -| resource_name | string | Resource Name | \ No newline at end of file + +| Field | Type | Description | +| ------------------- | ------ | -------------------- | +| id | int | Audit ID | +| audit_type | string | Operation audit type | +| bk_supplier_account | string | Supplier account | +| user | string | Operator | +| resource_type | string | Resource type | +| action | string | Operation type | +| operate_from | string | Source platform | +| operation_detail | object | Operation details | +| operation_time | string | Operation time | +| bk_biz_id | int | Business ID | +| resource_id | int | Resource ID | +| resource_name | string | Resource name | \ No newline at end of file diff --git a/docs/apidoc/cc/en/list_proc_template.md b/docs/apidoc/cc/en/list_proc_template.md index e2e58e3928..6a1aa61563 100644 --- a/docs/apidoc/cc/en/list_proc_template.md +++ b/docs/apidoc/cc/en/list_proc_template.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Query process template information according to service template ID +Query process template information based on service template ID ### Request Parameters @@ -8,13 +8,13 @@ Query process template information according to service template ID #### Interface Parameters -| Field | Type | Required | Description | -|----------------------|------------|--------|-----------------------| -| bk_biz_id | int | yes | Business ID | -| service_template_id | int |no | At least one of service template ID, service_template_id and process_template_ids| -| process_template_ids | array |no | Array of process template IDs, up to 200; at least one of service_template_id and process_template_ids is passed| +| Field | Type | Required | Description | +| -------------------- | ----- | -------- | ------------------------------------------------------------ | +| bk_biz_id | int | Yes | Business ID | +| service_template_id | int | No | Service template ID, at least one of service_template_id and process_template_ids must be passed | +| process_template_ids | array | No | Array of process template IDs, up to 200, at least one of service_template_id and process_template_ids must be passed | -### Request Parameters Example +### Request Parameter Example ```json { @@ -30,7 +30,7 @@ Query process template information according to service template ID } ``` -### Return Result Example +### Response Example ```json { @@ -39,193 +39,189 @@ Query process template information according to service template ID "message": "success", "permission": null, "request_id": "e43da4ef221746868dc4c837d36f3807", - "data": { - "count": 1, - "info": [ - { - "id": 50, - "bk_process_name": "p1", - "bk_biz_id": 1, - "service_template_id": 51, - "property": { - "proc_num": { - "value": null, - "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": "", - "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 - } + "data": { + "count": 1, + "info": [ + { + "id": 6, + "bk_process_name": "red-1", + "bk_biz_id": 3, + "service_template_id": 5, + "property": { + "proc_num": { + "value": null, + "as_default_value": true + }, + "stop_cmd": { + "value": "", + "as_default_value": true + }, + "restart_cmd": { + "value": "", + "as_default_value": true + }, + "face_stop_cmd": { + "value": "", + "as_default_value": true + }, + "bk_func_name": { + "value": "red-1", + "as_default_value": true + }, + "work_path": { + "value": "", + "as_default_value": true + }, + "priority": { + "value": null, + "as_default_value": true + }, + "reload_cmd": { + "value": "", + "as_default_value": true + }, + "bk_process_name": { + "value": "red-1", + "as_default_value": true + }, + "pid_file": { + "value": "", + "as_default_value": true + }, + "auto_start": { + "value": null, + "as_default_value": null + }, + "bk_start_check_secs": { + "value": null, + "as_default_value": true + }, + "start_cmd": { + "value": "", + "as_default_value": true + }, + "user": { + "value": "", + "as_default_value": true + }, + "timeout": { + "value": null, + "as_default_value": true + }, + "description": { + "value": "", + "as_default_value": true + }, + "bk_start_param_regex": { + "value": "", + "as_default_value": true + }, + "bind_info": { + "value": [ + { + "enable": { + "value": true, + "as_default_value": true }, - "creator": "admin", - "modifier": "admin", - "create_time": "2019-06-19T15:24:04.763+08:00", - "last_time": "2019-06-19T15:24:04.763+08:00", - "bk_supplier_account": "0" - } - ] - } + "ip": { + "value": "1", + "as_default_value": true + }, + "port": { + "value": "9583", + "as_default_value": true + }, + "protocol": { + "value": "1", + "as_default_value": true + }, + "row_id": 1 + } + ], + "as_default_value": true + } + }, + "creator": "admin", + "modifier": "admin", + "create_time": "2023-11-15T02:10:04.619Z", + "last_time": "2023-11-15T02:10:04.619Z", + "bk_supplier_account": "0" + } + ] + }, } ``` -### Return Result Parameters Description +### Response Result Explanation #### response -| Name| Type| Description| -|---|---|---| -| result | bool |Whether the request succeeded or not. True: request succeeded;false request failed| -| code | int |Wrong code. 0 indicates success,>0 indicates failure error| -| message | string |Error message returned by request failure| -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request| - -#### Data field Description - -| Field| Type| Description| -|---|---|---| -|count| int| Total| -|info| array| Return result| - -#### Info Field Description -| Field| Type| Description| -|---|---|---| -|id| int| Process template ID| -|bk_process_name| string| Process template name| -|property| object| Process template properties| -|bk_biz_id| int| Business ID | -|service_template_id| int| Service template ID| -| creator | string | Creator of this data | -| modifier | string | The last person to modify this piece of data | -| create_time | string |Settling time | -| last_time | string |Update time | -| bk_supplier_account | string | Developer account number| +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failed error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned by the request | + +#### data Field Explanation + +| Field | Type | Description | +| ----- | ----- | ------------------- | +| count | int | Number of records | +| info | array | Result of the query | + +#### info Field Explanation + +| Field | Type | Description | +| ------------------- | ------ | --------------------------- | +| id | int | Process template ID | +| bk_process_name | string | Process template name | +| property | object | Process template properties | +| bk_biz_id | int | Business ID | +| service_template_id | int | Service template ID | +| creator | string | Creator of this data | +| modifier | string | Last modifier of this data | +| create_time | string | Creation time | +| last_time | string | Update time | +| bk_supplier_account | string | Supplier account | #### data.info[x].property -Is the value of the as_default_value process based on the template - -| Field| Type| Description| -|---|---|---| -|auto_start| bool| Whether to pull up automatically| -|auto_time_gap| int| Pull up interval| -|bk_biz_id| int| Business ID | -|bk_func_id| string| Function ID| -|bk_func_name| string| Process name| -|bk_process_id| int| Process id| -|bk_process_name| string| Process alias| -|bk_start_param_regex| string| Process start parameters| -|bk_supplier_account| string| Developer account number| -|create_time| string| Settling time| -|description| string| Description| -|face_stop_cmd| string| Forced stop command| -|last_time| string| Update time| -|pid_file| string| PID file path| -|priority| int| Startup priority| -|proc_num| int| Number of starts| -|reload_cmd| string| Process reload command| -|restart_cmd| string| Restart command| -|start_cmd| string| Start command| -|stop_cmd| string| Stop order| -|timeout| int| Operation time-out duration| -|user| string| Start user| -|work_path| string| Working path| -|bind_info| object| Binding information| - -#### data.info [x] .Property.bind .Property.bind info.value [n] Field Description -| Field| Type| Description| -|---|---|---| -|enable| object| Is the port enabled| -|ip| object| Bound ip| -|port| object| Bound port| -|protocol| object| Protocol used| -|row_id| int| Template row index, in-process unique| +as_default_value Whether the value of the process is based on the template + +| Field | Type | Description | +| -------------------- | ------ | ------------------------------ | +| auto_start | bool | Whether to start automatically | +| bk_biz_id | int | Business ID | +| bk_func_name | string | Process name | +| bk_process_id | int | Process ID | +| bk_process_name | string | Process alias | +| bk_start_param_regex | string | Process start parameters | +| bk_supplier_account | string | Supplier account | +| create_time | string | Creation time | +| description | string | Description | +| face_stop_cmd | string | Forced stop command | +| last_time | string | Update time | +| pid_file | string | PID file path | +| priority | int | Start priority | +| proc_num | int | Number of starts | +| reload_cmd | string | Process reload command | +| restart_cmd | string | Restart command | +| start_cmd | string | Start command | +| stop_cmd | string | Stop command | +| timeout | int | Operation timeout duration | +| user | string | Start user | +| work_path | string | Working path | +| bind_info | object | Binding information | + +#### data.info[x].property.bind_info.value[n] Field Explanation + +| Field | Type | Description | +| -------- | ------ | --------------------------------------------- | +| enable | object | Whether the port is enabled | +| ip | object | Bound IP | +| port | object | Bound port | +| protocol | object | Used protocol | +| row_id | int | Template row index, unique within the process | \ No newline at end of file diff --git a/docs/apidoc/cc/en/list_process_detail_by_ids.md b/docs/apidoc/cc/en/list_process_detail_by_ids.md index c3b9771ef6..4a45d4810d 100644 --- a/docs/apidoc/cc/en/list_process_detail_by_ids.md +++ b/docs/apidoc/cc/en/list_process_detail_by_ids.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Query the process details corresponding to the process ID under a business (v3.9.8) +Query details of processes corresponding to process IDs under a certain business (v3.9.8) ### Request Parameters @@ -8,16 +8,15 @@ Query the process details corresponding to the process ID under a business (v3.9 #### Interface Parameters -|Field| Type| Required| Description| -|---|---|---|---| -|bk_biz_id| int| yes | The business ID of the process| -|bk_process_ids| array| yes | Process ID list, up to 500| -|fields| array| No| Process attribute list, which controls which fields are in the process instance information that returns the result, can speed up interface requests and reduce network traffic transmission
If blank, all fields of the process are returned, and bk_process_id is a required field| +| Field | Type | Required | Description | +| -------------- | ----- | -------- | ------------------------------------------------------------ | +| bk_biz_id | int | Yes | Business ID of the process | +| bk_process_ids | array | Yes | List of process IDs, up to 500 | +| fields | array | No | List of process properties, control which fields of process instance information are returned, can speed up the interface request and reduce network traffic transmission
When empty, all fields of the process are returned, bk_process_id is a required returned field | +### Request Parameter Example -### Request Parameters Example - -``` json +```json { "bk_app_code": "esb_test", "bk_app_secret": "xxx", @@ -31,52 +30,111 @@ Query the process details corresponding to the process ID under a business (v3.9 "fields": [ "bk_process_id", "bk_process_name", - "bk_func_id", "bk_func_name" ] } ``` -### Return Result Example -``` json +### Response Example + +```json { "result": true, "code": 0, "message": "success", "permission": null, "request_id": "e43da4ef221746868dc4c837d36f3807", - "data": [ + "data": [ { - "bk_func_id": "", - "bk_func_name": "pr1", - "bk_process_id": 43, - "bk_process_name": "pr1" - }, - { - "bk_func_id": "", - "bk_func_name": "pr2", - "bk_process_id": 44, - "bk_process_name": "pr2" + "auto_start": null, + "bind_info": [ + { + "enable": true, + "ip": "127.0.0.1", + "port": "9898", + "protocol": "1", + "template_row_id": 1 + } + ], + "bk_biz_id": 3, + "bk_created_at": "2023-11-15T10:37:39.384+08:00", + "bk_created_by": "admin", + "bk_func_name": "delete", + "bk_process_id": 57, + "bk_process_name": "delete-aa", + "bk_start_check_secs": null, + "bk_start_param_regex": "", + "bk_supplier_account": "0", + "bk_updated_at": "2023-11-15T17:19:18.1+08:00", + "bk_updated_by": "admin", + "create_time": "2023-11-15T10:37:39.384+08:00", + "description": "", + "face_stop_cmd": "", + "last_time": "2023-11-15T17:19:18.1+08:00", + "pid_file": "", + "priority": null, + "proc_num": null, + "reload_cmd": "", + "restart_cmd": "", + "service_instance_id": 57, + "start_cmd": "", + "stop_cmd": "", + "timeout": null, + "user": "", + "work_path": "" } - ] + ], } ``` -### Return Result Parameters Description +### Response Result Explanation -| Name| Type| Description| -|---|---|--- | -| result | bool |Whether the request was successful or not. True: request succeeded;false request failed| -| code | int |Wrong code. 0 indicates success,>0 indicates failure error| -| message | string |Error message returned by request failure| -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | array |Data returned by request| +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failed error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | array | Data returned by the request | #### data -| Name| Type| Description| -|---|---|--- | -|bk_func_id| string| Function ID| -|bk_func_name| string| Process name| -|bk_process_id| int| Process id| -|bk_process_name| string| Process alias| \ No newline at end of file + +| Field | Type | Description | +| -------------------- | ------ | ------------------------------ | +| auto_start | bool | Whether to start automatically | +| bk_biz_id | int | Business ID | +| bk_func_name | string | Process name | +| bk_process_id | int | Process ID | +| bk_process_name | string | Process alias | +| bk_start_param_regex | string | Process start parameters | +| bk_supplier_account | string | Supplier account | +| create_time | string | Creation time | +| description | string | Description | +| face_stop_cmd | string | Forced stop command | +| last_time | string | Update time | +| pid_file | string | PID file path | +| priority | int | Start priority | +| proc_num | int | Number of starts | +| reload_cmd | string | Process reload command | +| restart_cmd | string | Restart command | +| start_cmd | string | Start command | +| stop_cmd | string | Stop command | +| timeout | int | Operation timeout duration | +| user | string | Start user | +| work_path | string | Working path | +| bk_created_at | string | Creation time | +| bk_created_by | string | Creator | +| bk_updated_at | string | Update time | +| bk_updated_by | string | Updater | +| bind_info | object | Binding information | + +#### data.info.property.bind_info.value Field Explanation + +| Field | Type | Description | +| -------- | ------ | --------------------------------------------- | +| enable | bool | Whether the port is enabled | +| ip | string | Bound IP | +| port | string | Bound port | +| protocol | string | Used protocol | +| row_id | int | Template row index, unique within the process | \ No newline at end of file diff --git a/docs/apidoc/cc/en/list_process_instance.md b/docs/apidoc/cc/en/list_process_instance.md index c7f8c1a8d1..d3292ec63e 100644 --- a/docs/apidoc/cc/en/list_process_instance.md +++ b/docs/apidoc/cc/en/list_process_instance.md @@ -1,4 +1,4 @@ -### Functional description +### Function Description Query process instance list based on service instance ID @@ -8,13 +8,12 @@ Query process instance list based on service instance ID #### Interface Parameters -| Field | Type | Required | Description | -|----------------------|------------|--------|-----------------------| -|bk_biz_id| int| yes | Business ID | -| service_instance_id | int |yes | Service instance ID| +| Field | Type | Required | Description | +| ------------------- | ---- | -------- | ------------------- | +| bk_biz_id | int | Yes | Business ID | +| service_instance_id | int | Yes | Service instance ID | - -### Request Parameters Example +### Request Parameter Example ```python { @@ -27,7 +26,7 @@ Query process instance list based on service instance ID } ``` -### Return Result Example +### Response Example ```python { @@ -85,69 +84,74 @@ Query process instance list based on service instance ID } ``` -### Return Result Parameters Description +### Response Result Explanation #### response -| Name| Type| Description| -|---|---|---| -| result | bool |Whether the request was successful or not. True: request succeeded;false request failed| -| code | int |Wrong code. 0 indicates success,>0 indicates failure error| -| message | string |Error message returned by request failure| -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | array |Data returned by request| - -#### Data field Description - -| Field| Type| Description| -|---|---|---| -|property| object| Process attribute information| -|relation| object| Process and service instance association information| - -#### data [x]. Property Field Description -| Field| Type| Description| -|---|---|---| -|auto_start| bool| Automatically pull up| -|auto_time_gap| int| Pull up interval| -|bk_biz_id| int| Business ID | -|bk_func_id| string| Function ID| -|bk_func_name| string| Process name| -|bk_process_id| int| Process id| -|bk_process_name| string| Process alias| -|bk_start_param_regex| string| Process start parameters| -|bk_supplier_account| string| Developer account number| -|create_time| string| Settling time| -|description| string| Description| -|face_stop_cmd| string| Forced stop command| -|last_time| string| Update time| -|pid_file| string| PID file path| -|priority| int| Startup priority| -|proc_num| int| Number of starts| -|reload_cmd| string| Process reload command| -|restart_cmd| string| Restart command| -|start_cmd| string| Start command| -|stop_cmd| string| Stop order| -|timeout| int| Operation time-out duration| -|user| string| Start user| -|work_path| string| Working path| -|bind_info| object| Binding information| - -#### data [x] .Property.bind .Property.bind info [n] Field Description -| Field| Type| Description| -|---|---|---| -|enable| bool| Is the port enabled| -|ip| string| Bound ip| -|port| string| Bound port| -|protocol| string| Protocol used| -|template_row_id| int| Template row index used for instantiation, unique in process| - -#### data [x]. Recall Field Description -| Field| Type| Description| -|---|---|---| -|bk_biz_id| int| Business ID | -|bk_process_id| int| Process id| -|service_instance_id| int| Service instance id| -|process_template_id| int| Process template id| -|bk_host_id| int| Host id| -|bk_supplier_account| string| Developer account number| \ No newline at end of file +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failed error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | array | Data returned by the request | + +#### data Field Explanation + +| Field | Type | Description | +| -------- | ------ | ------------------------------------------------- | +| property | object | Process property information | +| relation | object | Relationship between process and service instance | + +#### data[x].property Field Explanation + +| Field | Type | Description | +| -------------------- | ------ | ------------------------------ | +| auto_start | bool | Whether to start automatically | +| bk_biz_id | int | Business ID | +| bk_func_name | string | Process name | +| bk_process_id | int | Process ID | +| bk_process_name | string | Process alias | +| bk_start_param_regex | string | Process start parameters | +| bk_supplier_account | string | Supplier account | +| create_time | string | Creation time | +| description | string | Description | +| face_stop_cmd | string | Forced stop command | +| last_time | string | Update time | +| pid_file | string | PID file path | +| priority | int | Start priority | +| proc_num | int | Number of starts | +| reload_cmd | string | Process reload command | +| restart_cmd | string | Restart command | +| start_cmd | string | Start command | +| stop_cmd | string | Stop command | +| timeout | int | Operation timeout duration | +| user | string | Start user | +| work_path | string | Working path | +| bk_created_at | string | Creation time | +| bk_created_by | string | Creator | +| bk_updated_at | string | Update time | +| bk_updated_by | string | Updater | +| bind_info | object | Binding information | + +#### data[x].property.bind_info[n] Field Explanation + +| Field | Type | Description | +| --------------- | ------ | --------------------------------------------- | +| enable | bool | Whether the port is enabled | +| ip | string | Bound IP | +| port | string | Bound port | +| protocol | string | Used protocol | +| template_row_id | int | Template row index, unique within the process | + +#### data[x].relation Field Explanation + +| Field | Type | Description | +| ------------------- | ------ | ------------------- | +| bk_biz_id | int | Business ID | +| bk_process_id | int | Process ID | +| service_instance_id | int | Service instance ID | +| process_template_id | int | Process template ID | +| bk_host_id | int | Host ID | +| bk_supplier_account | string | Supplier account | \ No newline at end of file diff --git a/docs/apidoc/cc/en/list_process_related_info.md b/docs/apidoc/cc/en/list_process_related_info.md index e47355d578..02d07cb584 100644 --- a/docs/apidoc/cc/en/list_process_related_info.md +++ b/docs/apidoc/cc/en/list_process_related_info.md @@ -1,8 +1,8 @@ -### Functional description +### Function Description -Click Five-digit query process instance related information (v3.9.13) +Query process instance information based on five-segment notation (v3.9.13) -- This interface is intended for use by GSEKit and is hidden in the ESB documentation +- This interface is specifically designed for GSEKit use and is hidden in the ESB documentation. ### Request Parameters @@ -10,34 +10,36 @@ Click Five-digit query process instance related information (v3.9.13) #### Interface Parameters -|Field| Type| Required| Description| -|---|---|---|---| -| bk_biz_id | int64 | yes | Business ID | -|bk_set_ids| int64 array| no | The set ID list, if empty, represents any set | -|bk_module_ids| int64 array| no | Module ID list, if empty, it represents any module| -|ids| int64 array| no | Service instance ID list. If empty, it represents any instance| -|bk_process_names| string array| no | List of process names. If empty, it represents any process. This field is mutually exclusive with bk_func_id. Only one of them can be selected `it can not have value at the same time`| -|bk_func_ids| string array| no | Function ID list of process. If empty, it represents any process. bk_process_name `only one of the two can be selected, and can not have value at the same time| -|bk_process_ids| int64 array| no | Process ID list, if empty, represents any process| -|fields| string array| no | Process attribute list, which controls which fields are in the process instance information that returns the result, can speed up interface requests and reduce network traffic transmission
If it is null, all fields of the process are returned, and bk_process_id,bk_process_name and bk_func_id are required fields to be returned| -|page| dict| yes | Paging condition| - -The conditional relationship for these fields is relationship and (&&), and only process instances that meet the criteria you fill in are queried
-For example, if both bk_set_ids and bk_module_ids are filled in, and neither bk_module_ids belongs to bk_set_ids, the query result is empty +| Field | Type | Required | Description | +| ---------------- | ------------ | -------- | ------------------------------------------------------------ | +| bk_biz_id | int64 | Yes | Business ID | +| bk_set_ids | int64 array | No | Cluster ID list, if empty, it represents any cluster | +| bk_module_ids | int64 array | No | Module ID list, if empty, it represents any module | +| ids | int64 array | No | Service instance ID list, if empty, it represents any instance | +| bk_process_names | string array | No | Process name list, if empty, it represents any process | +| bk_process_ids | int64 array | No | Process ID list, if empty, it represents any process | +| fields | string array | No | Process attribute list, controls which fields of process instance information are returned, speeding up interface requests and reducing network traffic
Empty to return all fields of the process, bk_process_id, bk_process_name | +| page | dict | Yes | Paging conditions | -#### page +These fields' conditional relationship is AND, only process instances that simultaneously satisfy the filled conditions will be queried. For example: if both bk_set_ids and bk_module_ids are filled, and bk_module_ids do not belong to bk_set_ids, the query result will be empty. -| Field| Type| Required| Description| -| --- | --- | --- | --- | -| start| int| no | Record start position, default is 0| -| limit| int| yes | Limit bars per page, Max. 500| -| sort | string |no | Sort field,'backward' means reverse order, can only be the field of the process, and sort by bk_process_id by default| +#### page +| Field | Type | Required | Description | +| ----- | ------ | -------- | ------------------------------------------------------------ | +| start | int | No | Record start position, default is 0 | +| limit | int | Yes | Number of records per page, maximum is 500 | +| sort | string | No | Sorting field, '-' indicates descending order, can only be a field of the process, default is sorted by bk_process_id | -### Request Parameters Example +### Request Parameter Example -``` json +```json { + "bk_app_code": "esb_test", + "bk_app_secret": "xxx", + "bk_username": "xxx", + "bk_token": "xxx", + "bk_biz_id": 3, "set": { "bk_set_ids": [ 11, @@ -61,7 +63,6 @@ For example, if both bk_set_ids and bk_module_ids are filled in, and neither bk_ "pr1", "alias_pr2" ], - "bk_func_ids": [], "bk_process_ids": [ 45, 46, @@ -71,7 +72,6 @@ For example, if both bk_set_ids and bk_module_ids are filled in, and neither bk_ "fields": [ "bk_process_id", "bk_process_name", - "bk_func_id", "bk_func_name" ], "page": { @@ -82,8 +82,9 @@ For example, if both bk_set_ids and bk_module_ids are filled in, and neither bk_ } ``` -### Return Result Example -``` json +### Response Example + +```json { "result": true, "code": 0, @@ -104,20 +105,19 @@ For example, if both bk_set_ids and bk_module_ids are filled in, and neither bk_ "host": { "bk_host_id": 4, "bk_cloud_id": 0, - "bk_host_innerip": "192.168.15.22" + "bk_host_innerip": "127.0.0.1", "bk_host_innerip_v6":"1::1", "bk_addressing":"dynamic", "bk_agent_id":"xxxxxx" }, "service_instance": { "id": 4, - "name": "192.168.15.22_pr1_3333" + "name": "127.0.0.1_pr1_3333" }, "process_template": { "id": 48 }, "process": { - "bk_func_id": "", "bk_func_name": "pr1", "bk_process_id": 45, "bk_process_name": "pr1" @@ -136,17 +136,16 @@ For example, if both bk_set_ids and bk_module_ids are filled in, and neither bk_ "host": { "bk_host_id": 4, "bk_cloud_id": 0, - "bk_host_innerip": "192.168.15.22" + "bk_host_innerip": "127.0.0.1" }, "service_instance": { "id": 4, - "name": "192.168.15.22_pr1_3333" + "name": "127.0.0.1_pr1_3333" }, "process_template": { "id": 49 }, "process": { - "bk_func_id": "", "bk_func_name": "pr2", "bk_process_id": 46, "bk_process_name": "alias_pr2" @@ -157,21 +156,92 @@ For example, if both bk_set_ids and bk_module_ids are filled in, and neither bk_ } ``` -### Return Result Parameters Description - -| Name| Type| Description| -|---|---|--- | -| result | bool |Whether the request was successful or not. True: request succeeded;false request failed| -| code | int |Wrong code. 0 indicates success,>0 indicates failure error| -| message | string |Error message returned by request failure| - -- Data field Description - -| Name| Type| Description| -|---|---|--- | -|count| int| Total number of eligible process instances| -|set| object| Set information to which the process belongs | -|module| object| Module information to which the process belongs| -|host| object| Host information to which the process belongs| -|service_instance| object| Service instance information to which the process belongs| -|process| object| Details of the process itself| +### Response Result Explanation + +| Field | Type | Description | +| ------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failed error | +| message | string | Error message returned in case of failure | + +#### data Field Explanation + +| Field | Type | Description | +| ---------------- | ------ | ---------------------------------------------------------- | +| count | int | Total number of process instances that meet the conditions | +| set | object | Cluster information of the process | +| module | object | Module information of the process | +| host | object | Host information of the process | +| service_instance | object | Service instance information of the process | +| process_template | object | Process template information of the process | +| process | object | Detailed information of the process itself | + +#### data.set Field Explanation + +| Field | Type | Description | +| ----------- | ------ | ---------------- | +| bk_set_id | int | Cluster ID | +| bk_set_name | string | Cluster name | +| bk_set_env | string | Environment type | + +#### data.module Field Explanation + +| Field | Type | Description | +| -------------- | ------ | ----------- | +| bk_module_id | int | Module ID | +| bk_module_name | string | Module name | + +#### data.host Field Explanation + +| Field | Type | Description | +| ------------------ | ------ | --------------- | +| bk_host_id | int | Host ID | +| bk_cloud_id | int | Control area ID | +| bk_host_innerip | string | Host inner IP | +| bk_host_innerip_v6 | int | Host inner IPv6 | +| bk_addressing | string | Addressing mode | +| bk_agent_id | string | Agent ID | + +#### data.service_instance Field Explanation + +| Field | Type | Description | +| ---- | ------ | --------------------- | +| id | int | Service instance ID | +| name | string | Service instance name | + +#### data.process_template Field Explanation + +| Field | Type | Description | +| ---- | ---- | ------------------- | +| id | int | Cluster template ID | + +#### data.process Field Explanation + +| Field | Type | Description | +| -------------------- | ------ | ------------------------------ | +| auto_start | bool | Whether to automatically start | +| bk_biz_id | int | Business ID | +| bk_func_name | string | Process name | +| bk_process_id | int | Process ID | +| bk_process_name | string | Process alias | +| bk_start_param_regex | string | Process startup parameters | +| bk_supplier_account | string | Developer account | +| create_time | string | Creation time | +| description | string | Description | +| face_stop_cmd | string | Forced stop command | +| last_time | string | Update time | +| pid_file | string | PID file path | +| priority | int | Startup priority | +| proc_num | int | Number of startups | +| reload_cmd | string | Process reload command | +| restart_cmd | string | Restart command | +| start_cmd | string | Start command | +| stop_cmd | string | Stop command | +| timeout | int | Operation timeout duration | +| user | string | Startup user | +| work_path | string | Working path | +| bk_created_at | string | Creation time | +| bk_created_by | string | Creator | +| bk_updated_at | string | Update time | +| bk_updated_by | string | Updater | +| bind_info | object | Binding information | \ No newline at end of file diff --git a/docs/apidoc/cc/en/list_project.md b/docs/apidoc/cc/en/list_project.md index b4d73d8a03..47b83e231f 100644 --- a/docs/apidoc/cc/en/list_project.md +++ b/docs/apidoc/cc/en/list_project.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -query the project (version: v3.10.23+, permissions: view permission of the project) +Query projects (Version: v3.10.23+, Permission: View permission for the project) ### Request Parameters @@ -8,198 +8,198 @@ query the project (version: v3.10.23+, permissions: view permission of the proje #### Interface Parameters -| Field | Type | Required | Description | -|-----------|------------|--------|---------------------------------------------------------------------------------------------------------------------------------------------| -| filter | object | no | query filter | -| fields | array | no | attribute list, which controls which fields are in the returned result, which can accelerate interface requests and reduce network traffic. | -| page | object | yes | page condition | +- Common Fields: -#### filter +| Field | Type | Required | Description | +| ------ | ------ | -------- | ------------------------------------------------------------ | +| filter | object | No | Query conditions | +| fields | array | No | Property list, controls which fields are returned in the result, speeding up interface requests and reducing network traffic transmission | +| page | object | Yes | Pagination information | -this parameter is a combination of filtering rules for service attribute fields, and is used to search for services according to the service attribute fields. The combination only supports AND operation and can be nested, with a maximum of 2 layers. +#### filter Field Explanation -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| condition | string | yes | Rule operator| -| rules | array |yes | Scope rule for filtering node| +Attribute field filtering rules, used to search data based on attribute fields. This parameter supports the following two types of filtering rules, and combination filtering rules can be nested, with a maximum of two levels. The specific supported filtering rule types are as follows: +##### Combination Filtering Rules -#### rules -The filtering rule is triplet`field`,`operator`,`value` +Filtering rules composed of other rules, supporting logical AND/OR relationships between combined rules -| Name | Type | Required| Default value| Description | -| -------- | ------ | ---- | ------ | ------------------------------------------------------------ | -| field | string |yes | None | Field name| | -| operator | string |yes | None | Operator| Optional values equal,not_equal,in,not_in,less,less_or_equal,greater,greater_or_equal,between,not_between| -| value | - |no | None | Operand| Different values correspond to different value formats | +| Field | Type | Required | Description | +| --------- | ------ | -------- | ------------------------------------------------------------ | +| condition | string | Yes | Combined query condition, supports both `AND` and `OR` | +| rules | array | Yes | Query rules, can be of type `Combination Filtering Rules` or `Atomic Filtering Rules` | -Assembly rules can be found at: https://github.com/Tencent/bk-cmdb/blob/master/src/common/querybuilder/README.md +##### Atomic Filtering Rules -#### page +Basic filtering rules, indicating the rule for filtering a certain field. Any filtering rule is directly an atomic filtering rule or composed of multiple atomic filtering rules + +| Field | Type | Required | Description | +| -------- | ------------------------------------------------------------ | -------- | ------------------------------------------------------------ | +| field | string | Yes | Field of the container | +| operator | string | Yes | Operator, optional values are equal, not_equal, in, not_in, less, less_or_equal, greater, greater_or_equal, between, not_between | +| value | Different field and operator correspond to different value formats | No | Operation value | -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| start | int | yes | Record start position| -| limit | int | yes | Limit bars per page, Max. 500| -| enable_count | bool |yes| Whether this request is a token to obtain quantity or details| -| sort | string |no | Sort the field. By adding sort in front of the field, for example, sort": sort field" can indicate descending order by field field| +Assembly rules can refer to: https://github.com/Tencent/bk-cmdb/blob/master/src/common/querybuilder/README.md +#### page -**Note:** -- `enable_count`If this flag is true, this request is a get quantity. The remaining fields must be initialized, start is 0, and limit is: 0, sort is "." -- `sort`If the caller does not specify it, the background specifies it as the container node ID by default. -- Paging parameters must be set, and the maximum query data at one time does not exceed 500. -- bk_cluster_id and cluster_uid cannot be empty or filled at the same time. +| Field | Type | Required | Description | +| ------------ | ------ | -------- | ------------------------------------------------------------ | +| start | int | Yes | Record start position | +| limit | int | Yes | Number of records per page, maximum is 500 | +| sort | string | No | Sorting field | +| enable_count | bool | Yes | Flag to indicate whether to obtain the number of query objects. If this flag is true, it means that this request is to obtain the count. In this case, other fields must be initialized, start is 0, limit is 0, sort is "" | -### Request Parameters Example +### Request Parameter Example -### Request Details Request Parameters +### Get Detailed Information Request Parameters ```json { - "bk_app_code": "esb_test", - "bk_app_secret": "xxx", - "bk_username": "xxx", - "bk_token": "xxx", - "filter": { - "condition": "AND", - "rules": [ - { - "field": "id", - "operator": "equal", - "value": 1 - }, - { - "field": "bk_status", - "operator": "equal", - "value": "enable" - } - ] - }, - "page": { - "start": 0, - "limit": 10, - "sort": "id", - "enable_count": false - } + "bk_app_code": "esb_test", + "bk_app_secret": "xxx", + "bk_username": "xxx", + "bk_token": "xxx", + "filter": { + "condition": "AND", + "rules": [ + { + "field": "id", + "operator": "equal", + "value": 1 + }, + { + "field": "bk_status", + "operator": "equal", + "value": "enable" + } + ] + }, + "page": { + "start": 0, + "limit": 10, + "sort": "id", + "enable_count": false + } } ``` -### get quantity request parameters +### Get Count Request Example + ```json { - "bk_app_code": "esb_test", - "bk_app_secret": "xxx", - "bk_username": "xxx", - "bk_token": "xxx", - "filter": { - "condition": "AND", - "rules": [ - { - "field": "id", - "operator": "equal", - "value": 1 - }, - { - "field": "bk_status", - "operator": "equal", - "value": "enable" - } - ] - }, - "page": { - "enable_count":true - } + "bk_app_code": "esb_test", + "bk_app_secret": "xxx", + "bk_username": "xxx", + "bk_token": "xxx", + "filter": { + "condition": "AND", + "rules": [ + { + "field": "id", + "operator": "equal", + "value": 1 + }, + { + "field": "bk_status", + "operator": "equal", + "value": "enable" + } + ] + }, + "page": { + "enable_count":true + } } ``` -### Return Result Example +### Response Example + +### Response for Detailed Information Interface -### Details interface response ```json { - "result": true, - "code": 0, - "data": { - "count": 0, - "info": [ - { - "id": 1, - "bk_project_id": "21bf9ef9be7c4d38a1d1f2uc0b44a8f2", - "bk_project_name": "test", - "bk_project_code": "test", - "bk_project_desc": "test project", - "bk_project_type": "mobile_game", - "bk_project_sec_lvl": "public", - "bk_project_owner": "admin", - "bk_project_team": [1, 2], - "bk_status": "enable", - "bk_project_icon": "https://127.0.0.1/file/png/11111", - "bk_supplier_account": "0", - "create_time": "2022-12-22T11:22:17.504+08:00", - "last_time": "2022-12-22T11:23:31.728+08:00" - } - ] - }, - "message": "success", - "permission": null, - "request_id": "87de106ab55549bfbcc46e47ecf5bcc7" + "result": true, + "code": 0, + "data": { + "count": 0, + "info": [ + { + "id": 1, + "bk_project_id": "21bf9ef9be7c4d38a1d1f2uc0b44a8f2", + "bk_project_name": "test", + "bk_project_code": "test", + "bk_project_desc": "test project", + "bk_project_type": "mobile_game", + "bk_project_sec_lvl": "public", + "bk_project_owner": "admin", + "bk_project_team": [1, 2], + "bk_status": "enable", + "bk_project_icon": "https://127.0.0.1/file/png/11111", + "bk_supplier_account": "0", + "create_time": "2022-12-22T11:22:17.504+08:00", + "last_time": "2022-12-22T11:23:31.728+08:00" + } + ] + }, + "message": "success", + "permission": null, + "request_id": "87de106ab55549bfbcc46e47ecf5bcc7" } ``` -### quantity interface response +### Count Response Example + ```json { - "result":true, - "code":0, - "message":"success", - "permission":null, - "data":{ - "count":1, - "info":[ - ] - }, - "request_id": "87de106ab55549bfbcc46e47ecf5bcc7" + "result":true, + "code":0, + "message":"success", + "permission":null, + "data":{ + "count":1, + "info":[ + ] + }, + "request_id": "87de106ab55549bfbcc46e47ecf5bcc7" } ``` -### Return Result Parameters Description +### Response Result Explanation + +#### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request succeeded or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| data | object |Data returned by request | -| request_id | string |Request chain id | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failed error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain id | +| data | object | Data returned by the request | #### data -| Field | Type | Description | -|-----------|-----------|-----------| -| count | int | Number of records| -| info | array | Actual data| +| Field | Type | Description | +| ----- | ----- | --------------------------------------------------------- | +| count | int | Number of records | +| info | array | Actual data, only the fields set in `fields` are returned | #### data.info -| Field | Type | Description | -| ---------------------| ----- |---------------------------------------------------------------------------------------------------------------| -| id | int | Unique identifier of the project in cc | -| bk_project_id | string | project_id | -| bk_project_name | string | project name | -| bk_project_code | string | project english name | -| bk_project_desc | string | project_description | -| bk_project_type | enum | Project type, optional values: "mobile_game", "pc_game", "web_game", "platform_prod", "support_prod", "other" | -| bk_project_sec_lvl | enum | Confidentiality level, optional values: "public", "private", "classified" | -| bk_project_owner | string | project_owner | -| bk_project_team | array | team | -| bk_project_icon | string | Project icon | -| bk_status | string | Project status, optional values: "enabled", "disabled" | -| bk_supplier_account | string | Developer account | -| create_time | string | creation time | -| last_time | string | update_time | - - -**Note:** -- If this request is to query details, count is 0. If the query is quantity, info is empty. +| Field | Type | Description | +| ------------------- | ------ | ------------------------------------------------------------ | +| id | int | Unique identifier for the project in CC | +| bk_project_id | string | Project ID | +| bk_project_name | string | Project name | +| bk_project_code | string | Project code (English name) | +| bk_project_desc | string | Project description | +| bk_project_type | enum | Project type, optional values: "mobile_game" (mobile game), "pc_game" (PC game), "web_game" (web game), "platform_prod" (platform product), "support_prod" (support product), "other" (other) | +| bk_project_sec_lvl | enum | Security level, optional values: "public" (public), "private" (private), "classified" (classified) | +| bk_project_owner | string | Project owner | +| bk_project_team | array | Team to which the project belongs | +| bk_project_icon | string | Project icon | +| bk_status | string | Project status, optional values: "enable" (enabled), "disabled" (disabled) | +| bk_supplier_account | string | Developer account | +| create_time | string | Creation time | +| last_time | string | Update time | \ No newline at end of file diff --git a/docs/apidoc/cc/en/list_quoted_inst.md b/docs/apidoc/cc/en/list_quoted_inst.md index 137197593c..ef24250eea 100644 --- a/docs/apidoc/cc/en/list_quoted_inst.md +++ b/docs/apidoc/cc/en/list_quoted_inst.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -list quoted model instances by condition (version: v3.10.30+, permission: when there is a business id, it is the business access permission of the business, otherwise, it is the view permission of the source model instance.) +Query the list of instances referencing the model (Version: v3.10.30+, Permission: When passing the business id, it means querying the list of instances referencing the model from the perspective of the business. When the model is a business, check the business view permission; otherwise, check the access permission of the corresponding model instances.) ### Request Parameters @@ -8,56 +8,52 @@ list quoted model instances by condition (version: v3.10.30+, permission: when t #### Interface Parameters -| Field | Type | Required | Description | -|----------------|--------|----------|------------------------------------------------------------------------------------------------------------------------------------------------------------| -| bk_biz_id | string | no | business | -| bk_obj_id | string | yes | source model id | -| bk_property_id | string | yes | source model quoted property id | -| filter | object | no | query filter of the quoted instance | -| fields | array | no | quoted instance property list, which controls which fields are in the returned result, which can accelerate interface requests and reduce network traffic. | -| page | object | yes | page condition | +| Field | Type | Required | Description | +| -------------- | ------------ | -------- | ------------------------------------------------------------ | +| bk_biz_id | string | No | Business id | +| bk_obj_id | string | Yes | Source model ID | +| bk_property_id | string | Yes | ID of the property in the source model that references this model | +| filter | object | No | Query conditions for instances referencing this model | +| fields | string array | No | List of properties of instances referencing this model, controls which fields are returned in the result, speeding up interface requests and reducing network traffic transmission | +| page | object | Yes | Pagination information | -#### filter +#### Explanation of the filter Field -This parameter is the filter rule to search for container based on its attribute fields. This parameter supports the -following two filter rules types. The combined filter rules can be nested with the maximum nesting level of 2. The -specific supported filter rule types are as follows: +Filtering rules for attributes of the model being referenced, used to search data based on attribute fields. This parameter supports the following two types of filtering rules, and combination filtering rules can be nested, with a maximum of two levels. The specific supported filtering rule types are as follows: -##### combined filter rule +##### Combination Filtering Rules -This filter rule type defines filter rules composed of other rules, the combined rules support logic and/or -relationships +Filtering rules composed of other rules, supporting logical AND/OR relationships between combined rules -| Field | Type | Required | Description | -|-----------|--------|----------|----------------------------------------------------------------------------| -| condition | string | yes | query criteria, support `AND` and `OR` | -| rules | array | yes | query rules, can be of `combined filter rule` or `atomic filter rule` type | +| Field | Type | Required | Description | +| --------- | ------ | -------- | ------------------------------------------------------------ | +| condition | string | Yes | Combined query condition, supports both `AND` and `OR` | +| rules | array | Yes | Query rules, can be of type `Combination Filtering Rules` or `Atomic Filtering Rules` | -##### atomic filter rule +##### Atomic Filtering Rules -This filter rule type defines basic filter rules, which represent rules for filtering a field. Any filter rule is either -directly an atomic filter rule, or a combination of multiple atomic filter rules +Basic filtering rules, indicating the rule for filtering a certain field. Any filtering rule is directly an atomic filtering rule or composed of multiple atomic filtering rules -| Field | Type | Required | Description | -|----------|----------------------------------------------------------------------|----------|----------------------------------------------------------------------------------------------------------------------| -| field | string | yes | container's field | -| operator | string | yes | operator, optional values: equal,not_equal,in,not_in,less,less_or_equal,greater,greater_or_equal,between,not_between | -| value | different fields and operators correspond to different value formats | yes | operand | +| Field | Type | Required | Description | +| -------- | ------------------------------------------------------------ | -------- | ------------------------------------------------------------ | +| field | string | Yes | Property field of the model being referenced | +| operator | string | Yes | Operator, optional values are equal, not_equal, in, not_in, less, less_or_equal, greater, greater_or_equal, between, not_between | +| value | Different field and operator correspond to different value formats | No | Operation value | -Assembly rules can refer to: +Assembly rules can refer to: https://github.com/TencentBlueKing/bk-cmdb/blob/v3.10.x/pkg/filter/README.md -#### page +#### Explanation of the page Field -| Field | Type | Required | Description | -|--------------|--------|----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| start | int | yes | Record start position | -| limit | int | yes | Limit per page, maximum 500 | -| sort | string | no | Sort the field | -| enable_count | bool | yes | The flag defining Whether to get the the number of query objects. If this flag is true, then the request is to get the quantity. The remaining fields must be initialized, start is 0, and limit is: 0, sort is "" | +| Field | Type | Required | Description | +| ------------ | ------ | -------- | ------------------------------------------------------------ | +| start | int | Yes | Record start position | +| limit | int | Yes | Number of records per page, maximum is 500 | +| sort | string | No | Sorting field | +| enable_count | bool | Yes | Flag to indicate whether to obtain the number of query objects. If this flag is true, it means that this request is to obtain the count. In this case, other fields must be initialized, start is 0, limit is 0, sort is "" | -### Request Parameters Example +### Request Parameter Example -#### Query Detail Request Parameters Example +#### Example of Detailed Information Request Parameters ```json { @@ -107,7 +103,7 @@ Assembly rules can refer to: 0 indicates failure error | -| message | string | Error message returned by request failure | -| permission | object | Permission information | -| request_id | string | Request chain id | -| data | object | Data returned by request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failed error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain id | +| data | object | Data returned by the request | #### data -| Field | Type | Description | -|-------|-------|-----------------------------------------------------------------| -| count | int | Number of containers | -| info | array | Container list, only returns the fields that is set in `fields` | +| Field | Type | Description | +| ----- | ----- | --------------------------------------------------------- | +| count | int | Number of records | +| info | array | Actual data, only the fields set in `fields` are returned | #### info -| Field | Type | Description | -|-------------|--------|-------------------------------------------------------------------------------------------| -| name | string | name, this is only an example, actual fields is defined by quoted model properties | -| description | string | description, this is only an example, actual fields is defined by quoted model properties | +| Field | Type | Description | +| ----------- | ------ | ------------------------------------------------------------ | +| name | string | Name, this is just an example, the actual fields depend on the model properties | +| description | string | Description, this is just an example, the actual fields depend on the model properties | \ No newline at end of file diff --git a/docs/apidoc/cc/en/list_resource_pool_hosts.md b/docs/apidoc/cc/en/list_resource_pool_hosts.md index f87c082499..3c9c659ae9 100644 --- a/docs/apidoc/cc/en/list_resource_pool_hosts.md +++ b/docs/apidoc/cc/en/list_resource_pool_hosts.md @@ -1,51 +1,49 @@ -### Functional description +### Function Description -Query hosts in resource pool +Query hosts in the resource pool (Permission: View permission for hosts in the host pool) ### Request Parameters + {{ common_args_desc }} #### Interface Parameters -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| page | dict | no | Query criteria| -| host_property_filter| object| no | Host attribute combination query criteria| -| fields | array | yes | Host attribute list, which controls which fields are in the host that returns the result, can speed up interface requests and reduce network traffic transmission | +| Field | Type | Required | Description | +| -------------------- | ------ | -------- | ------------------------------------------------------------ | +| page | dict | No | Query conditions | +| host_property_filter | object | No | Combination query conditions for host properties | +| fields | array | No | List of host properties, controls which fields are returned in the result, speeding up interface requests and reducing network traffic transmission. If not filled in, all fields are returned by default. | #### host_property_filter -This parameter is a combination of filtering rules for the host attribute field and is used to search for hosts based on the host attribute field. The combination supports AND and OR, and can be nested, with a maximum of 2 layers. +This parameter is a combination of filtering rules for host property fields, used to search hosts based on host property fields. The combination supports both AND and OR, can be nested, and has a maximum nesting of 2 levels. -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| condition | string | no || -| rules | array | no | Rule| +| Field | Type | Required | Description | +| --------- | ------ | -------- | ----------- | +| condition | string | No | | +| rules | array | No | Rules | #### rules -The filtering rule is a quadruple`field`,`operator`,`value` - -| Name| Type| Required| Default value| Description| Description| -| --- | --- | --- |--- | --- | ---| -| field| string| yes | None| Field name| Field name| -| operator| string| yes | None| Operator| Optional values equal,not_equal,in,not_in,less,less_or_equal,greater,greater_or_equal,between,not_between| -| value| string |no| None| Operand| Different values correspond to different value formats| -Assembly rules can be found at: https://github.com/Tencent/bk-cmdb/blob/master/src/common/querybuilder/README.md +Filtering rules are quadruples `field`, `operator`, `value` +| Field | Type | Required | Description | +| -------- | ------ | -------- | ------------------------------------------------------------ | +| field | string | Yes | Field name | +| operator | string | Yes | Operator, optional values are equal, not_equal, in, not_in, less, less_or_equal, greater, greater_or_equal, between, not_between | +| value | - | No | Operand, different operators correspond to different value formats | +Assembly rules can refer to: https://github.com/Tencent/bk-cmdb/blob/master/src/common/querybuilder/README.md #### page -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| start | int | yes | Record start position| -| limit | int | yes | Limit bars per page, Max. 500| -| sort | string |no | Sort field| - +| Field | Type | Required | Description | +| ----- | ------ | -------- | ------------------------------------------ | +| start | int | Yes | Record start position | +| limit | int | Yes | Number of records per page, maximum is 500 | +| sort | string | No | Sorting field | - -### Request Parameters Example +### Request Parameter Example ```json { @@ -88,7 +86,7 @@ Assembly rules can be found at: https://github.com/Tencent/bk-cmdb/blob/master/s } ``` -### Return Result Example +### Response Example ```json { @@ -112,30 +110,62 @@ Assembly rules can be found at: https://github.com/Tencent/bk-cmdb/blob/master/s } ``` -### Return Result Parameters Description +### Response Result Explanation + #### response -| Name| Type| Description| -|---|---|---| -| result | bool |Whether the request succeeded or not. True: request succeeded;false request failed| -| code | int |Wrong code. 0 indicates success,>0 indicates failure error| -| message | string |Error message returned by request failure| -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | array |Data returned by request| +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failed error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain id | +| data | array | Data returned by the request | #### data -| Field | Type | Description | -|-----------|-----------|-----------| -| count | int | Number of records| -| info | array | Host actual data| +| Field | Type | Description | +| ----- | ----- | -------------------------- | +| count | int | Number of records | +| info | array | Actual data, list of hosts | #### data.info -| Name | Type | Description | -| ---------------- | ------ | ------------------------------- | -| bk_os_type | string |Operating system type| 1:Linux;2:Windows; 3:AIX | -| bk_mac | string |Intranet MAC address | | -| bk_host_innerip | string |Intranet IP | | -| bk_host_id | int | Host ID | | -| bk_cloud_id | int | Cloud area || + +| Field | Type | Description | +| -------------------- | ------ | ------------------------------------ | +| bk_host_name | string | Host name | +| bk_host_innerip | string | Private IP address | +| bk_host_id | int | Host ID | +| bk_cloud_id | int | Control area | +| import_from | string | Host import source, 3 for API import | +| bk_asset_id | string | Fixed asset number | +| bk_cloud_inst_id | string | Cloud host instance ID | +| bk_cloud_vendor | string | Cloud vendor | +| bk_cloud_host_status | string | Cloud host status | +| bk_comment | string | Comment | +| bk_cpu | int | Number of CPU logical cores | +| bk_cpu_architecture | string | CPU architecture | +| bk_cpu_module | string | CPU model | +| bk_disk | int | Disk capacity (GB) | +| bk_host_outerip | string | Host public IP address | +| bk_host_innerip_v6 | string | Host private IPv6 address | +| bk_host_outerip_v6 | string | Host public IPv6 address | +| bk_isp_name | string | ISP name | +| bk_mac | string | Host private MAC address | +| bk_mem | int | Host memory capacity (MB) | +| bk_os_bit | string | Operating system bit number | +| bk_os_name | string | Operating system name | +| bk_os_type | string | Operating system type | +| bk_os_version | string | Operating system version | +| bk_outer_mac | string | Host public MAC address | +| bk_province_name | string | Province | +| bk_service_term | int | Warranty period (years) | +| bk_sla | string | SLA level | +| bk_sn | string | Device SN | +| bk_state | string | Current state | +| bk_state_name | string | Country | +| operator | string | Primary maintainer | +| bk_bak_operator | string | Backup maintainer | + +**Note: The returned values here only explain the system-built attribute fields, and the rest of the returned values depend on the user-defined attribute fields.** \ No newline at end of file diff --git a/docs/apidoc/cc/en/list_service_category.md b/docs/apidoc/cc/en/list_service_category.md index dd44429985..92690231eb 100644 --- a/docs/apidoc/cc/en/list_service_category.md +++ b/docs/apidoc/cc/en/list_service_category.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Query the service classification list. Query according to the business ID, and the common service classification will also be returned +Query the list of service categories, based on the business ID, including commonly used service categories. ### Request Parameters @@ -8,11 +8,11 @@ Query the service classification list. Query according to the business ID, and t #### Interface Parameters -| Field | Type | Required | Description | -|----------------------|------------|--------|-----------------------| -| bk_biz_id | int | yes | Business ID | +| Field | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| bk_biz_id | int | Yes | Business ID | -### Request Parameters Example +### Request Parameter Example ```python { @@ -20,11 +20,11 @@ Query the service classification list. Query according to the business ID, and t "bk_app_secret": "xxx", "bk_username": "xxx", "bk_token": "xxx", - "bk_biz_id": 1, + "bk_biz_id": 1 } ``` -### Return Result Example +### Response Example ```python { @@ -37,7 +37,7 @@ Query the service classification list. Query according to the business ID, and t "count": 20, "info": [ { - "bk_biz_id": 0, + "bk_biz_id": 0, "id": 16, "name": "Apache", "bk_root_id": 14, @@ -46,7 +46,7 @@ Query the service classification list. Query according to the business ID, and t "is_built_in": true }, { - "bk_biz_id": 0, + "bk_biz_id": 0, "id": 19, "name": "Ceph", "bk_root_id": 18, @@ -55,7 +55,7 @@ Query the service classification list. Query according to the business ID, and t "is_built_in": true }, { - "bk_biz_id": 1, + "bk_biz_id": 1, "id": 1, "name": "Default", "bk_root_id": 1, @@ -67,33 +67,33 @@ Query the service classification list. Query according to the business ID, and t } ``` -### Return Result Parameters Description +### Response Result Explanation #### response -| Name| Type| Description| -|---|---|---| -| result | bool |Whether the request succeeded or not. True: request succeeded;false request failed| -| code | int |Wrong code. 0 indicates success,>0 indicates failure error| -| message | string |Error message returned by request failure| -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request| - -#### Data field Description - -| Field| Type| Description| -|---|---|---| -|count| int| Total| -|info| array| Return result| - -#### Info Field Description - -| Field| Type| Description| -|---|---|---| -|id| int| Service class ID| -|name| string| Service class name| -|bk_root_id| int| Root service class ID| -|bk_parent_id| int| Parent service class ID| -|is_built_in| bool| Built-in| -|bk_supplier_account | string |Developer account name| +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failed error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain id | +| data | object | Data returned by the request | + +#### data Field Explanation + +| Field | Type | Description | +| ----- | ----- | ------------------------ | +| count | int | Total number of records | +| info | array | List of returned results | + +#### info Field Explanation + +| Field | Type | Description | +| ------------------- | ------ | -------------------------- | +| id | int | Service category ID | +| name | string | Service category name | +| bk_root_id | int | Root service category ID | +| bk_parent_id | int | Parent service category ID | +| is_built_in | bool | Whether it is built-in | +| bk_supplier_account | string | Supplier account name | \ No newline at end of file diff --git a/docs/apidoc/cc/en/list_service_instance.md b/docs/apidoc/cc/en/list_service_instance.md index 6cfabfdc3d..f790e69093 100644 --- a/docs/apidoc/cc/en/list_service_instance.md +++ b/docs/apidoc/cc/en/list_service_instance.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Query the service instance list according to the service id, or add information such as module id to query +Query service instance list based on business ID, with the option to include module ID and other information in the query. ### Request Parameters @@ -8,25 +8,25 @@ Query the service instance list according to the service id, or add information #### Interface Parameters -| Field | Type | Required | Description | -|----------------------|------------|--------|-----------------------| -| bk_biz_id | int |yes | Business ID | -| bk_module_id | int |no | Module ID| -| selectors | int |no | Label filtering function, operator optional value: `=`,`!=`,` exists`,`!`,` in`,`notin`| -| page | object | No | Paging parameter| -| search_key | string | No | Name filter parameter| +| Field | Type | Required | Description | +| ------------ | --------- | -------- | ------------------------------------------------------------ | +| bk_biz_id | int | Yes | Business ID | +| bk_module_id | int | No | Module ID | +| bk_host_ids | int array | No | List of host IDs, supports up to 1000 host IDs | +| selectors | int | No | Label filtering function, operator options: `=`, `!=`, `exists`, `!`, `in`, `notin` | +| page | object | No | Pagination parameters | +| search_key | string | No | Name filtering parameter, can be filled with characters included in the process name for fuzzy search | #### page -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| start | int | yes | Record start position| -| limit | int | yes | Limit bars per page, Max. 500| +| Field | Type | Required | Description | +| ----- | ---- | -------- | --------------------------------------- | +| start | int | Yes | Record start position | +| limit | int | Yes | Number of records per page, maximum 500 | -### Request Parameters Example +### Request Parameter Example ```python - { "bk_app_code": "esb_test", "bk_app_secret": "xxx", @@ -38,6 +38,7 @@ Query the service instance list according to the service id, or add information "limit": 1 }, "bk_module_id": 56, + "bk_host_ids":[26,10], "search_key": "", "selectors": [{ "key": "key1", @@ -49,10 +50,9 @@ Query the service instance list according to the service id, or add information "values": ["value1", "value2"] }] } - ``` -### Return Result Example +### Response Example ```python { @@ -81,37 +81,37 @@ Query the service instance list according to the service id, or add information } ``` -### Return Result Parameters Description +### Response Result Explanation #### response -| Name| Type| Description| -|---|---|---| -| result | bool |Whether the request was successful or not. True: request succeeded;false request failed| -| code | int |Wrong code. 0 indicates success,>0 indicates failure error| -| message | string |Error message returned by request failure| -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request| - -#### Data field Description - -| Field| Type| Description| -|---|---|---| -|count| integer| Total|| -|info| array| Return result|| - -#### Info Field Description - -| Field| Type| Description| -|---|---|---| -|id| int| Service instance ID| -|name| string| Service instance name| -|bk_biz_id| int| Business ID | -|bk_module_id| int| Module ID| -|bk_host_id| int| Host ID| -| creator | string | Creator of this data | -| modifier | string | The last person to modify this piece of data | -| create_time | string |Settling time | -| last_time | string |Update time | -| bk_supplier_account | string | Developer account number| +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failed error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain id | +| data | object | Data returned by the request | + +#### data Field Explanation + +| Field | Type | Description | +| ----- | ----- | ------------------------ | +| count | int | Total number of records | +| info | array | List of returned results | + +#### info Field Explanation + +| Field | Type | Description | +| ------------------- | ------ | -------------------------- | +| id | int | Service instance ID | +| name | string | Service instance name | +| bk_biz_id | int | Business ID | +| bk_module_id | int | Module ID | +| bk_host_id | int | Host ID | +| creator | string | Creator of this data | +| modifier | string | Last modifier of this data | +| create_time | string | Creation time | +| last_time | string | Update time | +| bk_supplier_account | string | Supplier account | \ No newline at end of file diff --git a/docs/apidoc/cc/en/list_service_instance_by_host.md b/docs/apidoc/cc/en/list_service_instance_by_host.md index 265f43ecbf..f75f88590e 100644 --- a/docs/apidoc/cc/en/list_service_instance_by_host.md +++ b/docs/apidoc/cc/en/list_service_instance_by_host.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Gets a list of service instances bound to the host based on the host id +Retrieve the list of service instances bound to a host based on the host ID. ### Request Parameters @@ -8,20 +8,20 @@ Gets a list of service instances bound to the host based on the host id #### Interface Parameters -| Field | Type | Required | Description | -|----------------------|------------|--------|-----------------------| -| bk_biz_id | int |yes | Business ID | -| bk_host_id | int |yes | Host ID| -| page | object | no | Query criteria| +| Field | Type | Required | Description | +| ---------- | ------ | -------- | ------------------------------------------------------------ | +| bk_biz_id | int | Yes | Business ID | +| bk_host_id | int | Yes | Host ID to retrieve service instance information bound to the host | +| page | object | No | Query conditions | #### page -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| start | int | yes | Record start position| -| limit | int | yes | Limit bars per page, Max. 500| +| Field | Type | Required | Description | +| ----- | ---- | -------- | --------------------------------------- | +| start | int | Yes | Record start position | +| limit | int | Yes | Number of records per page, maximum 500 | -### Request Parameters Example +### Request Parameter Example ```python { @@ -38,7 +38,7 @@ Gets a list of service instances bound to the host based on the host id } ``` -### Return Result Example +### Response Example ```python { @@ -71,38 +71,39 @@ Gets a list of service instances bound to the host based on the host id } ``` -### Return Result Parameters Description +### Response Result Explanation #### response -| Name| Type| Description| -|---|---|---| -| result | bool |Whether the request was successful or not. True: request succeeded;false request failed| -| code | int |Wrong code. 0 indicates success,>0 indicates failure error| -| message | string |Error message returned by request failure| -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request| - -#### Data field Description - -| Field| Type| Description| -|---|---|---| -|count| int| Total| -|info| array| Return result| - -#### Info Field Description - -| Field| Type| Description| -|---|---|---| -|id| int| Service instance ID| -|name| string| Service instance name| -|bk_module_id| int| Model id| -|service_template_id| int| Service template ID| -| labels | map |Tag information| -|bk_host_id| int| Host id| -| creator | string | Creator of this data | -| modifier | string | The last person to modify this piece of data | -| create_time | string |Settling time | -| last_time | string |Update time | -| bk_supplier_account | string | Developer account number| +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failed error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain id | +| data | object | Data returned by the request | + +#### data Field Explanation + +| Field | Type | Description | +| ----- | ----- | ------------------------ | +| count | int | Total number of records | +| info | array | List of returned results | + +#### info Field Explanation + +| Field | Type | Description | +| ------------------- | ------ | -------------------------- | +| id | int | Service instance ID | +| name | string | Service instance name | +| bk_biz_id | int | Business ID | +| bk_module_id | int | Module ID | +| bk_host_id | int | Host ID | +| creator | string | Creator of this data | +| modifier | string | Last modifier of this data | +| create_time | string | Creation time | +| last_time | string | Update time | +| bk_supplier_account | string | Supplier account | +| service_template_id | int | Service template ID | +| labels | map | Label information | \ No newline at end of file diff --git a/docs/apidoc/cc/en/list_service_instance_by_set_template.md b/docs/apidoc/cc/en/list_service_instance_by_set_template.md index 51dc7fac8e..3e2a9ba104 100644 --- a/docs/apidoc/cc/en/list_service_instance_by_set_template.md +++ b/docs/apidoc/cc/en/list_service_instance_by_set_template.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Obtaining the service instance list according to the set template id +Retrieve the list of service instances based on the cluster template ID. ### Request Parameters @@ -8,20 +8,20 @@ Obtaining the service instance list according to the set template id #### Interface Parameters -| Field | Type | Required | Description | -|----------------------|------------|--------|-----------------------| -| bk_biz_id | int |yes | Business ID | -| set_template_id | int |yes | Set template ID | -| page | object | no | Query criteria| +| Field | Type | Required | Description | +| --------------- | ------ | -------- | --------------------- | +| bk_biz_id | int | Yes | Business ID | +| set_template_id | int | Yes | Cluster template ID | +| page | object | Yes | Pagination parameters | #### page -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| start | int | yes | Record start position| -| limit | int | yes | Limit bars per page, Max. 500, suggest 200.| +| Field | Type | Required | Description | +| ----- | ---- | -------- | ------------------------------------------------------------ | +| start | int | Yes | Record start position | +| limit | int | Yes | Number of records per page, maximum 500, recommended to set to 200 | -### Request Parameters Example +### Request Parameter Example ```python { @@ -30,7 +30,7 @@ Obtaining the service instance list according to the set template id "bk_username": "xxx", "bk_token": "xxx", "bk_biz_id": 1, - "set_template_id":1, + "set_template_id": 1, "page": { "start": 0, "limit": 10 @@ -38,7 +38,7 @@ Obtaining the service instance list according to the set template id } ``` -### Return Result Example +### Response Example ```python { @@ -83,39 +83,39 @@ Obtaining the service instance list according to the set template id } ``` -### Return Result Parameters Description +### Response Result Explanation #### response -| Name| Type| Description| -|---|---|---| -| result | bool |Whether the request was successful or not. True: request succeeded;false request failed| -| code | int |Wrong code. 0 indicates success,>0 indicates failure error| -| message | string |Error message returned by request failure| -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request| - -#### Data field Description - -| Field| Type| Description| -|---|---|---| -|count| int| Total| -|info| array| Return result| - -#### Info Field Description - -| Field| Type| Description| -|---|---|---| -|id| int| Service instance ID| -|name| string| Service instance name| -|bk_biz_id| int| Business ID | -|bk_module_id| int| Model id| -|service_template_id| int| Service template ID| -| labels | map |Tag information| -|bk_host_id| int| Host id| -| creator | string | Creator of this data | -| modifier | string | The last person to modify this piece of data | -| create_time | string |Settling time | -| last_time | string |Update time | -| bk_supplier_account | string | Developer account number| +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failed error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain id | +| data | object | Data returned by the request | + +#### data Field Explanation + +| Field | Type | Description | +| ----- | ----- | ------------------------ | +| count | int | Total number of records | +| info | array | List of returned results | + +#### info Field Explanation + +| Field | Type | Description | +| ------------------- | ------ | -------------------------- | +| id | int | Service instance ID | +| name | string | Service instance name | +| bk_biz_id | int | Business ID | +| bk_module_id | int | Module ID | +| bk_host_id | int | Host ID | +| creator | string | Creator of this data | +| modifier | string | Last modifier of this data | +| create_time | string | Creation time | +| last_time | string | Update time | +| bk_supplier_account | string | Supplier account | +| service_template_id | int | Service template ID | +| labels | map | Label information | \ No newline at end of file diff --git a/docs/apidoc/cc/en/list_service_instance_detail.md b/docs/apidoc/cc/en/list_service_instance_detail.md index 7f19af94f9..fe752282fb 100644 --- a/docs/apidoc/cc/en/list_service_instance_detail.md +++ b/docs/apidoc/cc/en/list_service_instance_detail.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Query the service instance list (with process information) according to the service id, and query conditions such as module id can be added +Retrieve a list of service instances (with process information) based on the business ID, with optional additional query conditions such as module ID. ### Request Parameters @@ -8,41 +8,36 @@ Query the service instance list (with process information) according to the serv #### Interface Parameters -| Field | Type | Required | Description | -|----------------------|------------|--------|-----------------------| -| bk_biz_id | int |yes | Business ID | -| bk_module_id | int |no | Module ID| -| bk_host_id | int |no | Host ID, Note: This field is no longer maintained, please use bk_host_list field| -| bk_host_list | array| no | Host ID list| -| service_instance_ids | int |no | Service instance ID list| -| selectors | int |no | Label filtering function, operator optional value: `=`,`!=`,` exists`,`!`,` in`,`notin`| -| page | object |yes | Paging parameter| - -Note: only one of the parameters`bk_host_list` and`bk_host_id` can be effective`bk_host_id`. It is not recommended to use it again. -#### page params - -| Field | Type | Required | Description | -|--------|------------|--------|------------| -|start|int|No|get the data offset location| -|limit|int|Yes|page limit, maximum value is 1000| +| Field | Type | Required | Description | +| -------------------- | ------ | -------- | ------------------------------------------------------------ | +| bk_biz_id | int | Yes | Business ID | +| bk_module_id | int | No | Module ID | +| bk_host_id | int | No | Host ID (Note: This field is no longer maintained; please use the bk_host_list field) | +| bk_host_list | array | No | List of host IDs | +| service_instance_ids | array | No | List of service instance IDs | +| selectors | array | No | Label filter function; operator optional values: `=`, `!=`, `exists`, `!`, `in`, `notin` | +| page | object | Yes | Pagination parameters | + +Note: Only one of the parameters `bk_host_list` and `bk_host_id` can be effective, and it is not recommended to use `bk_host_id` anymore. + #### selectors -| Field | Type | Required | Description | -| -------- | ------ | ---- | ------ | -| key | string |no | Field name| -| operator | string |no | Operator optional value: `=`,`!=`,` exists`,`!`,` in`,`notin` | -| values | - |no| Different values correspond to different value formats | -#### Page field Description +| Field | Type | Required | Description | +| -------- | ------ | -------- | ------------------------------------------------------------ | +| key | string | No | Field name | +| operator | string | No | Operator optional values: `=`, `!=`, `exists`, `!`, `in`, `notin` | +| values | - | No | Different operators correspond to different value formats | -| Field| Type | Required| Description | -| ----- | ------ | ---- | --------------------- | -| start | int | yes | Record start position | -| limit | int | yes | Limit bars per page, Max. 1000| +#### page -### Request Parameters Example +| Field | Type | Required | Description | +| ----- | ---- | -------- | ---------------------------------------- | +| start | int | Yes | Record start position | +| limit | int | Yes | Number of records per page, maximum 1000 | -```python +### Request Parameter Example +```python { "bk_app_code": "esb_test", "bk_app_secret": "xxx", @@ -62,11 +57,9 @@ Note: only one of the parameters`bk_host_list` and`bk_host_id` can be effective` "values": ["value1"] }] } - - ``` -### Return Result Example +### Response Example ```json { @@ -139,95 +132,95 @@ Note: only one of the parameters`bk_host_list` and`bk_host_id` can be effective` ] } } - ``` -### Return Result Parameters Description +### Response Result Explanation #### response -| Name| Type| Description| -|---|---|---| -| result | bool |Whether the request was successful or not. True: request succeeded;false request failed| -| code | int |Wrong code. 0 indicates success,>0 indicates failure error| -| message | string |Error message returned by request failure| -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request| - -#### Data field Description - -| Field| Type| Description| -|---|---|---| -|count| int| Total| -|info| array| Return result| - -#### Data.info Field Description - -| Field| Type| Description| -|---|---|---| -|id| integer| Service instance ID|| -|name| array| Service instance name|| -|service_template_id| int| Service template ID|| -|bk_host_id| int| Host ID|| -|bk_host_innerip| string| Host IP|| -|bk_module_id| integer| Module ID|| -|creator| string| Founder|| -|modifier| string| Modified by|| -|create_time| string| Settling time|| -|last_time| string| Repair time|| -|bk_supplier_account| string| Vendor ID|| -|service_category_id| integer| Service class ID|| -|process_instances| Array| Process instance information| Including| -|bk_biz_id| int| Service ID| Business ID | -|process_instances.process| object| Process instance details| Process properties field| -|process_instances.relation| object| Process instance association information| Such as host ID, proces template ID| - -#### Data.info.process_instances [x] .process .process description -| Field| Type| Description| -|---|---|---| -|auto_start| bool| Whether to pull up automatically| -|auto_time_gap| int| Pull up interval| -|bk_biz_id| int| Business ID | -|bk_func_id| string| Function ID| -|bk_func_name| string| Process name| -|bk_process_id| int| Process id| -|bk_process_name| string| Process alias| -|bk_start_param_regex| string| Process start parameters| -|bk_supplier_account| string| Developer account number| -|create_time| string| Settling time| -|description| string| Description| -|face_stop_cmd| string| Forced stop command| -|last_time| string| Update time| -|pid_file| string| PID file path| -|priority| int| Startup priority| -|proc_num| int| Number of starts| -|reload_cmd| string| Process reload command| -|restart_cmd| string| Restart command| -|start_cmd| string| Start command| -|stop_cmd| string| Stop order| -|timeout| int| Operation time-out duration| -|user| string| Start user| -|work_path| string| Working path| -|bind_info| object| Binding information| - -#### Data.info.process_instances [x] .process.bind .process.bind info [n] Field Description -| Field| Type| Description| -|---|---|---| -|enable| bool| Is the port enabled| -|ip| string| Bound ip| -|port| string| Bound port| -|protocol| string| Protocol used| -|template_row_id| int| Template row index used for instantiation, unique in process| - -#### Data.info.process_instances [x]. Relationfield description -| Field| Type| Description| -|---|---|---| -|bk_biz_id| int| Business ID | -|bk_process_id| int| Process id| -|service_instance_id| int| Service instance id| -|process_template_id| int| Process template id| -|bk_host_id| int| Host id| -|bk_supplier_account| string| Developer account number| - - +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failed error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain id | +| data | object | Data returned by the request | + +#### data Field Explanation + +| Field | Type | Description | +| ----- | ----- | ------------------------ | +| count | int | Total number of records | +| info | array | List of returned results | + +#### info Field Explanation + +| Field | Type | Description | +| -------------------------- | ------ | ------------------------------------------------------------ | +| id | int | Service instance ID | +| name | array | Service instance name | +| service_template_id | int | Service template ID | +| bk_host_id | int | Host ID | +| bk_host_innerip | string | Host IP | +| bk_module_id | int | Module ID | +| creator | string | Creator of this data | +| modifier | string | Last modifier of this data | +| create_time | string | Creation time | +| last_time | string | Update time | +| bk_supplier_account | string | Supplier account | +| service_category_id | int | Service category ID | +| process_instances | array | Process instance information | +| bk_biz_id | int | Business ID | +| process_instances.process | object | Process instance details, process attribute fields | +| process_instances.relation | object | Relationship information of the process instance, such as host ID, process template ID | + +#### data.info.process_instances[x].process Field Explanation + +| Field | Type | Description | +| -------------------- | ------ | ------------------------------ | +| auto_start | bool | Whether to start automatically | +| auto_time_gap | int | Startup interval | +| bk_biz_id | int | Business ID | +| bk_func_id | string | Function ID | +| bk_func_name | string | Process name | +| bk_process_id | int | Process ID | +| bk_process_name | string | Process alias | +| bk_start_param_regex | string | Process startup parameters | +| bk_supplier_account | string | Supplier account | +| create_time | string | Creation time | +| description | string | Description | +| face_stop_cmd | string | Force stop command | +| last_time | string | Update time | +| pid_file | string | PID file path | +| priority | int | Startup priority | +| proc_num | int | Number of startups | +| reload_cmd | string | Process reload command | +| restart_cmd | string | Restart command | +| start_cmd | string | Start command | +| stop_cmd | string | Stop command | +| timeout | int | Operation timeout duration | +| user | string | Start user | +| work_path | string | Working directory | +| bind_info | object | Binding information | + +#### data.info.process_instances[x].process.bind_info Field Explanation + +| Field | Type | Description | +| --------------- | ------ | --------------------------------------------- | +| enable | bool | Whether the port is enabled | +| ip | string | Bound IP | +| port | string | Bound port | +| protocol | string | Used protocol | +| template_row_id | int | Template row index, unique within the process | + +#### data.info.process_instances[x].relation Field Explanation + +| Field | Type | Description | +| ------------------- | ------ | ------------------- | +| bk_biz_id | int | Business ID | +| bk_process_id | int | Process ID | +| service_instance_id | int | Service instance ID | +| process_template_id | int | Process template ID | +| bk_host_id | int | Host ID | +| bk_supplier_account | string | Supplier account | \ No newline at end of file diff --git a/docs/apidoc/cc/en/list_service_template.md b/docs/apidoc/cc/en/list_service_template.md index 30f0dd0f94..62c3d7107d 100644 --- a/docs/apidoc/cc/en/list_service_template.md +++ b/docs/apidoc/cc/en/list_service_template.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Query the service template list according to the service id, and add the service classification id for further query +Retrieve a list of service templates based on the business ID, with an option to further filter by service category ID. ### Request Parameters @@ -8,22 +8,24 @@ Query the service template list according to the service id, and add the service #### Interface Parameters -| Field | Type | Required | Description | -|----------------------|------------|--------|-----------------------| -| bk_biz_id | int | yes | Business ID | -| service_category_id | int |no | Service class ID| -| search | string |no | Query by service template name. It is blank by default| -| is_exact | bool |no | Whether to exactly match the service template name. The default value is no. It is used in combination with the search parameter. It is valid when the search parameter is not empty (v3.9.19) | +| Field | Type | Required | Description | +| -------------------- | --------- | -------- | ------------------------------------------------------------ | +| bk_biz_id | int | Yes | Business ID | +| service_category_id | int | No | Service category ID | +| search | string | No | Search by service template name; default is empty | +| is_exact | bool | No | Whether to match the service template name exactly; default is false. Effective when used in conjunction with the search parameter (v3.9.19) | +| service_template_ids | int array | No | Service template IDs | +| page | object | Yes | Pagination parameters | #### page -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| start | int | yes | Record start position| -| limit | int | yes | Limit bars per page, Max. 500| -| sort | string |no | Sort field| +| Field | Type | Required | Description | +| ----- | ------ | -------- | --------------------------------------- | +| start | int | Yes | Record start position | +| limit | int | Yes | Number of records per page, maximum 500 | +| sort | string | No | Sorting field | -### Request Parameters Example +### Request Parameter Example ```json { @@ -33,6 +35,7 @@ Query the service template list according to the service id, and add the service "bk_token": "xxx", "bk_biz_id": 1, "service_category_id": 1, + "service_template_ids":[5,6], "search": "test2", "is_exact": true, "page": { @@ -43,7 +46,7 @@ Query the service template list according to the service id, and add the service } ``` -### Return Result Example +### Response Example ```json { @@ -64,43 +67,45 @@ Query the service template list according to the service id, and add the service "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" + "bk_supplier_account": "0", + "host_apply_enabled": false } ] } } ``` -### Return Result Parameters Description +### Response Result Explanation #### response -| Name| Type| Description| -|---|---|---| -| result | bool |Whether the request succeeded or not. True: request succeeded;false request failed| -| code | int |Wrong code. 0 indicates success,>0 indicates failure error| -| message | string |Error message returned by request failure| -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request| - -#### Data field Description - -| Field| Type| Description| -|---|---|---| -|count| int| Total|| -|info| array| Return result|| - -#### Info Field Description - -| Field| Type| Description| -|---|---|---| -|bk_biz_id| int| Business ID || -|id| int| Service template ID|| -|name| array| Service template name|| -|service_category_id| integer| Service class ID|| -|creator| string| Founder|| -|modifier| string| Modified by|| -|create_time| string| Settling time|| -|last_time| string| Repair time|| -|bk_supplier_account| string| Vendor ID|| +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failed error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain id | +| data | object | Data returned by the request | + +#### data Field Explanation + +| Field | Type | Description | +| ----- | ----- | ------------------------ | +| count | int | Total number of records | +| info | array | List of returned results | + +#### info Field Explanation + +| Field | Type | Description | +| ------------------- | ------- | ---------------------------------------------------------- | +| bk_biz_id | int | Business ID | +| id | int | Service template ID | +| name | array | Service template name | +| service_category_id | integer | Service category ID | +| creator | string | Creator of this data | +| modifier | string | Last modifier of this data | +| create_time | string | Creation time | +| last_time | string | Update time | +| bk_supplier_account | string | Supplier account | +| host_apply_enabled | bool | Whether to enable automatic application of host properties | \ No newline at end of file diff --git a/docs/apidoc/cc/en/list_service_template_difference.md b/docs/apidoc/cc/en/list_service_template_difference.md index a95987f5e3..f3528463f2 100644 --- a/docs/apidoc/cc/en/list_service_template_difference.md +++ b/docs/apidoc/cc/en/list_service_template_difference.md @@ -1,8 +1,8 @@ -### Functional description +### Function Description -List the differences between service templates and service instances (v3.9.19) +List the differences between service templates and service instances (v3.9.19). -- This interface is intended for use by GSEKit and is hidden in the ESB documentation +- This interface is specifically designed for GSEKit and is in a hidden state in the ESB documentation. ### Request Parameters @@ -10,18 +10,18 @@ List the differences between service templates and service instances (v3.9.19) #### Interface Parameters -|Field| Type| Required| Description| -|---|---|---|---| -| bk_biz_id | int64 | yes | Business ID | -|bk_module_ids| int64 array| no | Module ID list, no more than 20| -|service_template_ids| int64 array| no | List of service template IDs, up to 20| -|is_partial| bool| yes | If true, use service_template_ids parameter to return the state of service_template; When false, returns the status of the module using the bk_module_ids parameter| +| Field | Type | Required | Description | +| -------------------- | ----------- | -------- | ------------------------------------------------------------ | +| bk_biz_id | int64 | Yes | Business ID | +| bk_module_ids | int64 array | No | List of module IDs, up to 20 | +| service_template_ids | int64 array | No | List of service template IDs, up to 20 | +| is_partial | bool | Yes | When true, use the `service_template_ids` parameter to return the status of service templates; when false, use the `bk_module_ids` parameter to return the status of modules | - -### Request Parameters Example +### Request Parameter Example - Example 1 -``` json + +```json { "bk_app_code": "esb_test", "bk_app_secret": "xxx", @@ -35,8 +35,10 @@ List the differences between service templates and service instances (v3.9.19) "is_partial": true } ``` + - Example 2 -``` + +```json { "bk_biz_id": 3, "bk_module_ids": [ @@ -47,9 +49,11 @@ List the differences between service templates and service instances (v3.9.19) } ``` -### Return Result Example +### Response Example + - Example 1 -``` json + +```json { "result": true, "code": 0, @@ -70,8 +74,10 @@ List the differences between service templates and service instances (v3.9.19) } } ``` + - Example 2 -``` + +```json { "result": true, "code": 0, @@ -92,34 +98,34 @@ List the differences between service templates and service instances (v3.9.19) } ``` -### Return Result Parameters Description +### Response Result Explanation -| Name| Type| Description| -|---|---|--- | -| result | bool |Whether the request was successful or not. True: request succeeded;false request failed| -| code | int |Wrong code. 0 indicates success,>0 indicates failure error| -| message | string |Error message returned by request failure| -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request| +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failed error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain id | +| data | object | Data returned by the request | -- Data field Description +- data Field Explanation -| Name| Type| Description| -|---|---|--- | -|service_templates| object array| Service template Info list| -|modules| object array| Module info list| +| Field | Type | Description | +| ----------------- | ------------ | ------------------------------------ | +| service_templates | object array | List of service template information | +| modules | object array | List of module information | -- Service_templates Field Description +- service_templates Field Explanation -| Name| Type| Description| -|---|---|--- | -|service_template_id| int| Service template ID| -|need_sync| bool| Is there any difference between the service instance and the service template under the module to which the service template applies| +| Field | Type | Description | +| ------------------- | ---- | ------------------------------------------------------------ | +| service_template_id | int | Service template ID | +| need_sync | bool | Whether there are differences between service instances and service templates under the module where the service template is applied | -- Modules Field Description +- modules Field Explanation -| Name| Type| Description| -|---|---|--- | -|bk_module_id| int| Module ID| -|need_sync| bool| Is there any difference between service instance and service template under module| +| Field | Type | Description | +| ------------ | ---- | ------------------------------------------------------------ | +| bk_module_id | int | Module ID | +| need_sync | bool | Whether there are differences between service instances and service templates under the module | \ No newline at end of file diff --git a/docs/apidoc/cc/en/list_service_template_sync_status.md b/docs/apidoc/cc/en/list_service_template_sync_status.md index ce21cca111..688dd09ce4 100644 --- a/docs/apidoc/cc/en/list_service_template_sync_status.md +++ b/docs/apidoc/cc/en/list_service_template_sync_status.md @@ -1,6 +1,6 @@ -Functional description +### Function Description -Example Query the synchronization status of a service template(v3.12.3+, permission: biz access) +Query the synchronization status of service templates (Version: v3.12.3+, Permission: Business Access). ### Request Parameters @@ -8,13 +8,13 @@ Example Query the synchronization status of a service template(v3.12.3+, permiss #### Interface Parameters -| Field | Type | Required | Description | -|---------------------|-------|----------|-------------------------------------------------------------------| -| bk_biz_id | int | yes | Business ID | -| service_template_id | int | yes | Service template ID | -| bk_module_ids | array | yes | List of module ids whose synchronization status you want to query | +| Field | Type | Required | Description | +| ------------------- | ----- | -------- | -------------------------------------------------- | +| bk_biz_id | int | Yes | Business ID | +| service_template_id | int | Yes | Service template ID | +| bk_module_ids | array | Yes | List of module IDs to query synchronization status | -### Request Parameters Example +### Request Parameter Example ```json { @@ -32,7 +32,7 @@ Example Query the synchronization status of a service template(v3.12.3+, permiss } ``` -### Return Result Example +### Response Example ```json { @@ -67,33 +67,32 @@ Example Query the synchronization status of a service template(v3.12.3+, permiss } ``` -### Return Result Parameters Description +### Response Result Explanation #### response -| Name | Type | Description | -|------------|--------|-----------------------------------------------------------------------------------------| -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed | -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string | Error message returned by request failure | -| permission | object | Permission information | -| request_id | string | Request chain id | -| data | array | Data returned by request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failed error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain id | +| data | array | Data returned by the request | #### data -| Name | Type | Description | -|-------------|--------|--------------------------------------------------| -| bk_inst_id | int | Instance id, where is the module ID | -| status | string | Synchronous status | -| creator | string | The creator of a synchronization task | -| create_time | string | The create time of the synchronization task | -| last_time | string | The last update time of the synchronization task | - -**Synchronization status declaration**: An instance has six states: need_sync, new, waiting, executing, finished, and -failure,among: - -- **need_sync** Indicates to be synchronized -- **new/waiting/executing** Indicates synchronization -- **finished** Indicates synchronization complete -- **failure** Indicates synchronization failure +| Field | Type | Description | +| ----------- | ------ | -------------------------------------------- | +| bk_inst_id | int | Instance ID, in this case, the module ID | +| status | string | Synchronization status | +| creator | string | Creator of the synchronization task | +| create_time | string | Creation time of the synchronization task | +| last_time | string | Last update time of the synchronization task | + +**Explanation of Synchronization Status**: There are 6 statuses for instances, including need_sync, new, waiting, executing, finished, and failure. Among them: + +- **need_sync**: Awaiting synchronization +- **new/waiting/executing**: Synchronization in progress +- **finished**: Synchronization completed +- **failure**: Synchronization failed \ No newline at end of file diff --git a/docs/apidoc/cc/en/list_set_template.md b/docs/apidoc/cc/en/list_set_template.md index 0ae7cef7c7..0ce15dd8c9 100644 --- a/docs/apidoc/cc/en/list_set_template.md +++ b/docs/apidoc/cc/en/list_set_template.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Query set template by business id +Query cluster templates based on business ID. ### Request Parameters @@ -8,22 +8,21 @@ Query set template by business id #### Interface Parameters -| Field | Type | Required| Description | -| ------------------- | ------ | ---- | -------------- | -| bk_biz_id | int | yes | Business ID | -| set_template_ids | array |no | Set template ID array | -| page | object |no | Paging information | +| Field | Type | Required | Description | +| ---------------- | ------ | -------- | ----------------------------- | +| bk_biz_id | int | Yes | Business ID | +| set_template_ids | array | No | Array of cluster template IDs | +| page | object | No | Pagination information | -#### Page field Description +#### Explanation of the page field -| Field| Type | Required| Description | -| ----- | ------ | ---- | --------------------- | -| start | int | no | Record start position | -| limit | int | no | Limit bars per page, Max. 1000| -| sort | string |no | Sort field,'inverted' for reverse order| +| Field | Type | Required | Description | +| ----- | ------ | -------- | --------------------------------------------- | +| start | int | No | Starting position of the record | +| limit | int | No | Number of records per page, maximum 1000 | +| sort | string | No | Sorting field, '-' indicates descending order | - -### Request Parameters Example +### Request Parameter Example ```json { @@ -42,7 +41,7 @@ Query set template by business id } ``` -### Return Result Example +### Response Example ```json { @@ -79,35 +78,35 @@ Query set template by business id } ``` -### Return Result Parameters Description +### Response Result Explanation #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------------ | -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | - -#### Data field Description - -| Field| Type| Description | -| ----- | ----- | -------- | -| count | int | Total | -| info | array |Return result| - -#### Info Field Description - -| Field | Type | Description | -| ------------------- | ------ | ------------ | -| id | int | Set template ID | -| name | array |Set template name| -| bk_biz_id | int | Business ID | -| creator | string |Creator | -| modifier | string |Last modified by| -| create_time | string |Settling time | -| last_time | string |Update time | -| bk_supplier_account | string |Developer account number | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failed error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain id | +| data | object | Data returned by the request | + +#### data + +| Field | Type | Description | +| ----- | ----- | ---------------- | +| count | int | Total count | +| info | array | Returned results | + +#### info + +| Field | Type | Description | +| ------------------- | ------ | --------------------- | +| id | int | Cluster template ID | +| name | array | Cluster template name | +| bk_biz_id | int | Business ID | +| creator | string | Creator | +| modifier | string | Last modifier | +| create_time | string | Creation time | +| last_time | string | Update time | +| bk_supplier_account | string | Supplier account | \ No newline at end of file diff --git a/docs/apidoc/cc/en/list_set_template_related_service_template.md b/docs/apidoc/cc/en/list_set_template_related_service_template.md index 359f7e01bd..3de596bb14 100644 --- a/docs/apidoc/cc/en/list_set_template_related_service_template.md +++ b/docs/apidoc/cc/en/list_set_template_related_service_template.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -According to the service id and the set template id, obtaining a service template list of a set template under the specified service +Retrieve a list of service templates for a specified business and cluster template ID. ### Request Parameters @@ -8,12 +8,12 @@ According to the service id and the set template id, obtaining a service templat #### Interface Parameters -| Field | Type | Required | Description | -|---------------------|------------|--------|-----------------------------| -| set_template_id | int |yes | Set template ID | -| bk_biz_id | int | yes | Business ID | +| Field | Type | Required | Description | +| --------------- | ---- | -------- | ------------------- | +| set_template_id | int | Yes | Cluster template ID | +| bk_biz_id | int | Yes | Business ID | -### Request Parameters Example +### Request Parameter Example ```json { @@ -26,7 +26,7 @@ According to the service id and the set template id, obtaining a service templat } ``` -### Return Result Example +### Response Example ```json { @@ -45,7 +45,8 @@ According to the service id and the set template id, obtaining a service templat "modifier": "admin", "create_time": "2020-05-15T14:14:57.691Z", "last_time": "2020-05-15T14:14:57.691Z", - "bk_supplier_account": "0" + "bk_supplier_account": "0", + "host_apply_enabled": false }, { "bk_biz_id": 3, @@ -56,33 +57,35 @@ According to the service id and the set template id, obtaining a service templat "modifier": "admin", "create_time": "2020-05-15T14:19:09.813Z", "last_time": "2020-05-15T14:19:09.813Z", - "bk_supplier_account": "0" + "bk_supplier_account": "0", + "host_apply_enabled": false } ] } ``` -### Return Result Parameters Description +### Response Result Explanation -| Name| Type| Description| -|---|---|---| -| result | bool |Whether the request was successful or not. True: request succeeded;false request failed| -| code | int |Wrong code. 0 indicates success,>0 indicates failure error| -| message | string |Error message returned by request failure| -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | array| Data returned by request| +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failed error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain id | +| data | array | Data returned by the request | -Data field Description: +#### data -| Name| Type| Description| -|---|---|---| -| bk_biz_id | int | Business ID | -| id | int | Service template ID | -| name | string |Service template name| -| service_category_id | int | Service class ID | -| creator | string |Creator | -| modifier | string |Last modified by| -| create_time | string |Settling time | -| last_time | string |Update time | -| bk_supplier_account | string |Developer account number | +| Field | Type | Description | +| ------------------- | ------ | ---------------------------------------------------------- | +| bk_biz_id | int | Business ID | +| id | int | Service template ID | +| name | string | Service template name | +| service_category_id | int | Service category ID | +| creator | string | Creator | +| modifier | string | Last modifier | +| create_time | string | Creation time | +| last_time | string | Update time | +| bk_supplier_account | string | Supplier account | +| host_apply_enabled | bool | Whether to enable automatic application of host properties | \ No newline at end of file diff --git a/docs/apidoc/cc/en/push_host_identifier.md b/docs/apidoc/cc/en/push_host_identifier.md index 5b76a92691..c20f28b297 100644 --- a/docs/apidoc/cc/en/push_host_identifier.md +++ b/docs/apidoc/cc/en/push_host_identifier.md @@ -1,6 +1,6 @@ -### Function description +### Function Description -push the host identity to the machine and return the gse task id of this task,according to this task, id can go to gse to query the push result of the task.(v3.10.18+, for machines in business, business access is required, and for machines in host pool, host pool host editing permission is required) +Push host identity information to the machines and return the task ID of this GSE task. You can use this GSE task ID to query the results of the push task in GSE. (v3.10.18+, for hosts in a business, business access permission is required, for hosts in a host pool, host pool host editing permission is required) ### Request Parameters @@ -8,11 +8,11 @@ push the host identity to the machine and return the gse task id of this task, #### Interface Parameters -| field | type | required | description | -| ---- | ---- | ---- | ---------- | -| bk_host_ids | array | Yes | Array of host ids, the number cannot exceed 200 | +| Field | Type | Required | Description | +| ----------- | ----- | -------- | ---------------------------- | +| bk_host_ids | array | Yes | Array of host IDs, up to 200 | -### Request Parameters Example +### Request Parameter Example ```json { @@ -20,11 +20,11 @@ push the host identity to the machine and return the gse task id of this task, "bk_app_secret": "xxx", "bk_username": "xxx", "bk_token": "xxx", - "bk_host_ids": [1,2] + "bk_host_ids": [1, 2] } ``` -### Return Result Example +### Response Example ```json { @@ -45,26 +45,29 @@ push the host identity to the machine and return the gse task id of this task, } ``` -### Return Result Parameter Description +### Response Result Explanation #### response -| name | type | description | -| ------- | ------ | ------------------------------------------ | -| result | bool | Whether the request was successful or not. true:request successful; false request failed. -| code | int | The error code. 0 means success, >0 means failure error. -| message | string | The error message returned by the failed request. -| permission | object | Permission information | -| request_id | string | request_chain_id | -| data | object | The data returned by the request. - -#### data Field Description -| name | type | description | -| ------- | ------ | ------------------------------------------ | -| task_id | string | task_id,this id is the task_id from the gse | - -#### host_infos Field Description -| name | type | description | -| ------- | ------ | ------------------------------------------ | -| bk_host_id | int |host id | -| identification | string |the identity of the pushed host in the task | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failed error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain id | +| data | object | Data returned by the request | + +#### data + +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| task_id | string | Task ID, this ID is the task_id on the GSE side | +| host_infos | array | Host information pushed in the task, only contains information of successfully pushed hosts | + +#### host_infos + +| Field | Type | Description | +| -------------- | ------ | -------------------------------------- | +| bk_host_id | int | Host ID | +| identification | string | Identification of the host in the task | \ No newline at end of file diff --git a/docs/apidoc/cc/en/remove_label_from_service_instance.md b/docs/apidoc/cc/en/remove_label_from_service_instance.md index c62e560b11..ea9419dd2a 100644 --- a/docs/apidoc/cc/en/remove_label_from_service_instance.md +++ b/docs/apidoc/cc/en/remove_label_from_service_instance.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Remove the tag from the service instance under the specified service according to the service id, the service instance id, and the tag to be removed +Remove tags from specified service instances under the specified business based on the business ID, service instance ID, and the tags to be removed. (Permission: Service instance deletion permission) ### Request Parameters @@ -8,14 +8,13 @@ Remove the tag from the service instance under the specified service according t #### Interface Parameters -| Field | Type | Required | Description | -|----------------------|------------|--------|-----------------------| -| instance_ids | array | Yes | service inscc/apidocs/en/list_service_instance_detail.mdtances ID array, the max length is 500 | -| keys | array | Yes | key of lables to be remove | -| bk_biz_id | int |yes | Business ID | +| Field | Type | Required | Description | +| ------------ | ----- | -------- | --------------------------------------------------- | +| bk_biz_id | int | Yes | Business ID | +| instance_ids | array | Yes | List of service instance IDs, with a maximum of 500 | +| keys | array | Yes | List of tag keys to be removed | - -### Request Parameters Example +### Request Parameter Example ```python { @@ -29,7 +28,7 @@ Remove the tag from the service instance under the specified service according t } ``` -### Return Result Example +### Response Example ```python { @@ -42,15 +41,15 @@ Remove the tag from the service instance under the specified service according t } ``` -### Return Result Parameters Description +### Response Result Explanation #### response -| Name| Type| Description| -|---|---|---| -| result | bool |Whether the request was successful or not. True: request succeeded;false request failed| -| code | int |Wrong code. 0 indicates success,>0 indicates failure error| -| message | string |Error message returned by request failure| -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request| +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failed error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain id | +| data | object | Data returned by the request | \ No newline at end of file diff --git a/docs/apidoc/cc/en/resource_watch.md b/docs/apidoc/cc/en/resource_watch.md index 54e0933750..e8faa598de 100644 --- a/docs/apidoc/cc/en/resource_watch.md +++ b/docs/apidoc/cc/en/resource_watch.md @@ -1,34 +1,17 @@ -### Functional description +### Function Description -Monitor events generated by system resource change (v3.8 and above) +Listen to events generated by changes in system resources (Version: v3.8 and above, Permissions: Different permissions based on the type of resource being listened to, including: host event listening, host relationship event listening, business event listening, set event listening, module data listening, process data listening, model instance event listening, custom topology level event listening, instance association event listening, business set event listening, control area event listening, container cluster event listening, container node event listening, container namespace event listening, container workload event listening, container Pod event listening, project event listening) +**The main features of this watch function include:** -**The key features of this watch feature include:** - - -* Provide users with highly available data change watch services for a limited period of time (currently 3 hours, may be adjusted, do not rely on this time). - - -* Within a limited time, the user can perform event backtracking or data tracing according to the cursor of the previous event, which is applicable to abnormal data backtracking or system change for data supplementary entry. - - -* It supports backtracking of change data according to time point, backtracking of change data according to cursor, and data change watch from current time point. - - -* Support the ability to watch according to event type, including add, delete, and modify. The event contains the full amount of data. - - -* Event watch capability to support host-to-host relationship data changes. - - -* The design of short and long chain is adopted. When the user watches events through the cursor, if there is no event, the session connection will be maintained, and if there is an event change within 20s, the event will be directly pushed back. Avoid the continuous request of the user, and ensure that the user can get the changed data in time. - - -* Support batch event watch capability to improve system throughput. - - -* Support customized event data fields of interest to meet users "lightweight watch needs. - +- Provide users with highly available data change watch services within a limited time (currently 3 hours, subject to change, do not rely on this time). +- Within a limited time, users can use the cursor of their last event to trace events or fetch data, suitable for abnormal data tracing or data supplementation due to system changes. +- Support tracing changes in data based on a specific time point, support tracing changes based on a cursor, and support watching data changes from the current time point. +- Support the ability to watch events based on event types, including add, update, and delete. The event contains the full data. +- Support the ability to watch changes in host and host relationship data. +- Adopt a short-long chain design. When a user watches events using a cursor, if there are no events, the session connection will be maintained. If there are events within 20 seconds, the events will be directly pushed back, avoiding continuous user requests and ensuring that users can get change data in a timely manner. +- Support batch event watching to improve system throughput. +- Support customizing the fields of event data to be monitored, meeting the lightweight watch needs of users. ### Request Parameters @@ -36,190 +19,185 @@ Monitor events generated by system resource change (v3.8 and above) #### Interface Parameters -| Field | Type | Required | Description | -| ------------------- | -------------- | ------ |-------------------------| -| bk_event_types | array string |no | Event type, if filled in, it is only concerned with events of this type. The optional values are: create/update/delete. For example, if you use create, you only focus on new events for that resource. If it is not filled in blank, it is all concerned.| -| bk_fields | array string | It depends.| List of fields to be returned in the returned event. Currently, this field is required for monitoring host resource and can not be blank. Host relationship can be blank. If left blank, all fields are returned by default. | -| bk_start_from | Int64 | no | The start time of the listening event, which is the number of seconds in Unix time, that is, the total number of seconds from 0:00:00 on January 1,1970 to the point in time you want to watch. | -| bk_cursor | string | no | The cursor that listens for events represents the address of the event to start or continue watch, and the system returns the next event, or batch of events, for this cursor. | -| bk_resource | string | yes | The type of resource to listen on, with enumerated values: host, host_relation, biz, set, module, process, object_instance, mainline_instance, biz_set, biz_set_relation, plat, project。Where host represents a host Detail Event, host_recall represents a relationship event of the host, biz represents a Service detail event, set represents a set Detail Event, module represents a module Detail Event, process represents a process Detail Event, object_instance represents a general model instance event, mainline_instance represents a mainline model instance event, biz_set represents a service set event, and biz_set_recall represents a relationship event between a service set and a service, plat represents a cloud area detail event, project represents a project detail event. | -| bk_supplier_account | string | yes | Developer account number| -| bk_filter | object | no | Filter condition| -**Note: the biz_set_recall event will be triggered when adding, deleting and updating the bk_scope field of a business set, and when adding, deleting and updating a business involves a change in the business set relationship. The event type (bk_event_type) of all business set relationship events is update. The event details will return the ID of the business set whose relationship has changed and the list of all business IDs contained in the business set. When the event is triggered by a service set deletion event, the service ID list in the returned event details is empty** +| Field | Type | Required | Description | +| ------------------- | ---------------- | --------------------- | ------------------------------------------------------------ | +| bk_event_types | array of strings | No | Event types, if specified, only pay attention to events of this type. Possible values: create (new)/update (update)/delete (delete). If used, only pay attention to events of adding resources. If not filled, pay attention to all events. | +| bk_fields | array of strings | Depending on the case | List of fields that need to be returned in the event. Currently, for listening to host resources, this field is required and cannot be empty. It can be empty for host relationships. If empty, all fields are returned by default. | +| bk_start_from | Int64 | No | The start time of listening to events. This value is the number of seconds from UTC 1970-01-01 00:00:00 to the total seconds of the time you want to watch. | +| bk_cursor | string | No | The cursor of listening to events, representing the event address to start or continue watching. The system will return the next or a batch of events of this cursor. | +| bk_resource | string | Yes | The type of resource to be listened to, with possible values: host, host_relation, biz, set, module, process, object_instance, mainline_instance, biz_set, biz_set_relation, plat, project. Among them, host represents the details event of the host, host_relation represents the relationship event of the host, biz represents the details event of the business, set represents the details event of the set, module represents the details event of the module, process represents the details event of the process, object_instance represents the event of the general model instance, mainline_instance represents the event of the mainline model instance, biz_set represents the event of the business set, biz_set_relation represents the relationship event of the business set and the business, plat represents the event of the control area, project represents the event of the project. | +| bk_supplier_account | string | Yes | Developer account. | +| bk_filter | object | No | Filter conditions. | -#### bk_filter +**Note: The biz_set_relation event will be triggered when the "bk_scope" field of the business set is added, deleted, or updated, and when the relationship changes related to the business set are added, deleted, or updated. The event type (bk_event_type) of all business set relationship events is update, and the event details will return the ID of the business set that has changed and the list of all business IDs included in the business set. When the event is triggered by the deletion event of the business set, the list of business IDs in the event details is empty.** -| Field | Type | Required | Description | -| ------------------- | -------------- | ------ | ------------------------------------------------------------ | -| bk_sub_resource | string | no | The subordinate resource type to be monitored, which can only be used when bk_resource is object_instance or mainline_instance, and represents the bk_obj_id of the model to be monitored| +#### bk_filter +| Field | Type | Required | Description | +| --------------- | ------ | -------- | ------------------------------------------------------------ | +| bk_sub_resource | string | No | The type of the subordinate resource to be listened to, which is only supported when bk_resource is object_instance or mainline_instance, representing the bk_obj_id of the model that needs to be listened to. | -### Request Parameters Example +### Request Parameter Example Host: ```json { - "bk_app_code": "esb_test", - "bk_app_secret": "xxx", - "bk_username": "xxx", - "bk_token": "xxx", - "bk_event_types": ["create","update","delete"], - "bk_fields": ["bk_host_innerip", "bk_mac"], - "bk_start_from": 12345678999, - "bk_cursor": "MQ0yDTE1ODkyMDcyODENMQ01ZWI3ZWZjNTBiOTA5ZTYyMGFmYWQzZGY=", - "bk_resource": "host" + "bk_app_code": "esb_test", + "bk_app_secret": "xxx", + "bk_username": "xxx", + "bk_token": "xxx", + "bk_event_types": ["create", "update", "delete"], + "bk_fields": ["bk_host_innerip", "bk_mac"], + "bk_start_from": 12345678999, + "bk_cursor": "MQ0yDTE1ODkyMDcyODENMQ01ZWI3ZWZjNTBiOTA5ZTYyMGFmYWQzZGY=", + "bk_resource": "host" } - ``` -Common model instance: +General model instance: ```json { - "bk_event_types": [], - "bk_fields": ["bk_inst_id", "bk_inst_name"], - "bk_start_from": 12345678999, - "bk_cursor": "MQ0yDTE1ODkyMDcyODENMQ01ZWI3ZWZjNTBiOTA5ZTYyMGFmYWQzZGY=", - "bk_resource": "object_instance", - "bk_filter": { - "bk_sub_resource": "xxx" - }, - "bk_supplier_account": "0" + "bk_event_types": [], + "bk_fields": ["bk_inst_id", "bk_inst_name"], + "bk_start_from": 12345678999, + "bk_cursor": "MQ0yDTE1ODkyMDcyODENMQ01ZWI3ZWZjNTBiOTA5ZTYyMGFmYWQzZGY=", + "bk_resource": "object_instance", + "bk_filter": { + "bk_sub_resource": "xxx" + }, + "bk_supplier_account": "0" } - ``` -## Return parameter +## Return Parameters ```json { - "result": true, - "code": 0, - "message": "success", - "permission": null, - "request_id": "e43da4ef221746868dc4c837d36f3807", - "data": { - "bk_watched": true, - "bk_events": [ - { - "bk_cursor": "MQ0yDTE1ODkyMDcyODENMQ01ZWI3ZWZjNTBiOTA5ZTYyMGFmYWQzZGY=", - "bk_resource": "host", - "bk_event_type": "update", - "bk_detail": { - "bk_cpu": 2 - } - }, - { - "bk_cursor": "MQ0yDTE1ODkzNDExMDcNMQ01ZWI3ZWZjNTBiOTA5ZTYyMGFmYWQzZGY=", - "bk_resource": "host", - "bk_event_type": "update", - "bk_detail": { - "bk_cpu": 2 - } - } - ] - } + "result": true, + "code": 0, + "message": "success", + "permission": null, + "request_id": "e43da4ef221746868dc4c837d36f3807", + "data": { + "bk_watched": true, + "bk_events": [ + { + "bk_cursor": "MQ0yDTE1ODkyMDcyODENMQ01ZWI3ZWZjNTBiOTA5ZTYyMGFmYWQzZGY=", + "bk_resource": "host", + "bk_event_type": "update", + "bk_detail": { + "bk_cpu": 2 + } + }, + { + "bk_cursor": "MQ0yDTE1ODkzNDExMDcNMQ01ZWI3ZWZjNTBiOTA5ZTYyMGFmYWQzZGY=", + "bk_resource": "host", + "bk_event_type": "update", + "bk_detail": { + "bk_cpu": 2 + } + } + ] + } } - ``` -### Return Result Parameters Description +### Return Result Explanation #### response -| Name| Type| Description| -|---|---|---| -| result | bool |Whether the request was successful or not. True: request succeeded;false request failed| -| code | int |Wrong code. 0 indicates success,>0 indicates failure error| -| message | string |Error message returned by request failure| -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | Array |Event data details are an ordered array, and the event at the end of the array is a new event. | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failed error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain id | +| data | Array | Event data details, an ordered array, and the events at the end of the array are new events. | -- Data data description +- data Data Description -| Name | Type | Description | -| ---------- | ---------------- | ------------------------------------------------------------ | -| bk_watched | bool | Whether an event was heard, true: Event heard;false: Event not monitored | -| bk_events |Details of events monitored| The maximum length of the monitored Event Details list is 200, which may be adjusted in the future. Please do not rely on this length. | +| Field | Type | Description | +| ---------- | ----- | ------------------------------------------------------------ | +| bk_watched | bool | Whether events have been listened to. true: listened to events; false: did not listen to events | +| bk_events | array | List of event details, with a maximum length of 200, and the length may be adjusted later, do not rely on this length. | -- bk_events data description +- bk_events Data Description -| Name | Type | Description | -| ------------- | ----------- | ------------------------------------------------------------ | -| bk_cursor | string | Represents the cursor value of the current resource event that the caller can use to get the next event after the event| -| bk_resource | enum string |The resource type corresponding to this event | -| bk_event_type | enum string |The event type corresponding to the event, and the enumeration value is: Create/update/delete. | -| bk_detail | object | The detail data of the corresponding resource of the event, and the corresponding detail is different for different resources. | +| Field | Type | Description | +| ------------- | ------ | ------------------------------------------------------------ | +| bk_cursor | string | Represents the cursor value of the current resource event. The calling party can use this cursor to get the next event after this event. | +| bk_resource | string | The resource type corresponding to this event. | +| bk_event_type | string | The event type corresponding to this event, with possible values: create (new)/update (update)/delete (delete). | +| bk_detail | object | The detailed data of the resource corresponding to this event, and the details are different for different resources. | -#### Host_recall resource bk_detail field data example: -```json +#### host_relation resource bk_detail field data example: +```json { - "bk_biz_id" : 1, - "bk_host_id" : 2, - "bk_module_id" : 3, - "bk_set_id" : 4, - "bk_supplier_account" : "0" + "bk_biz_id" : 1, + "bk_host_id" : 2, + "bk_module_id" : 3, + "bk_set_id" : 4, + "bk_supplier_account" : "0" } ``` -#### Host resource bk_detail field data example: +#### host resource bk_detail field data example: + ```json { - "bk_host_name" : "hostname", - "bk_mem" : null, - "bk_cloud_id" : 0, - "operator" : "user", - "bk_cpu" : null, - "bk_mac" : "", - "bk_host_innerip" : "192.168.1.1", - "bk_supplier_account" : "0", - .... + "bk_host_name" : "hostname", + "bk_mem" : null, + "bk_cloud_id" : 0, + "operator" : "user", + "bk_cpu" : null, + "bk_mac" : "", + "bk_host_innerip" : "192.168.1.1", + "bk_supplier_account" : "0", + .... } ``` -#### biz_set_recall resource bk_detail field data example: +#### biz_set_relation resource bk_detail field data example: + ```json { - "bk_biz_set_id": 1, - "bk_biz_ids": [1 ,2, 3] + "bk_biz_set_id": 1, + "bk_biz_ids": [1 ,2, 3] } ``` -- biz_set_recall resource bk_detail data description - -| Name | Type | Description | -| ------------- | --------- | -------------------------------------- | -| bk_biz_set_id | int | Business set ID whose relationship between business set and business has changed| -| bk_biz_ids | int array |ID list of all business included in the business set | - - -### Operating instructions - -Flow of use of this interface: +- biz_set_relation resource bk_detail data description -1. Determine the initial monitoring mode, which can be: +| Field | Type | Description | +| ------------- | --------- | ------------------------------------------------------------ | +| bk_biz_set_id | int | The ID of the business set where the relationship between the business set and the business has changed | +| bk_biz_ids | int array | List of IDs of all businesses included in the business set | -- 1.1 specify a time to listen for events +### Usage Instructions -- 1.2 specify the current time to start listening for events +The usage process of this interface: -- 1.3 specify to start listening for events with the cursor bk_cursor position +1. Determine the start listening method, which can be: - After confirmation, a request is initiated. +- 1.1 Specify to start listening from a certain time -2. CMDB returns a list of events that meet your expectations: -- 2.1: if bk_watchd is ture, it indicates that the event has been monitored. bk_events is the event details list. The caller can take the cursor of the last event in the array and continue to watch the next time in the way in Step 1.3. -- 2.2: if bk_watched is false, it indicates that no event is monitored. There is only one event in bk_watched. Use the watched of this event to perform the next watch. +- 1.2 Specify to start listening from the current time -**note**: +- 1.3 Specify the cursor bk_cursor to start listening to events -The event has an expiration time, currently 3 hours. If it expires, the event will be released and the expired cursor will expire. You can re-watch in two ways: + After determining, initiate the request. -1. Specify a time to start listening for event -2. Specify that current time to start listening for event +1. CMDB returns a list of events that meet your expectations: + - 2.1: If bk_watched is true, it means that events have been listened to. bk_events contains a list of event details. The caller can take the cursor of the last event in the array and continue with the next watch using the method in 1.3. + - 2.2: If bk_watched is false, it means that events have not been listened to. bk_events contains only one event. Take the cursor of this event for the next watch. +**Note:** +This event has an expiration time, currently 3 hours. If it expires, the event will be released, and the cursor of the expired event will also become invalid. You can re-watch in two ways: +1. Specify to start listening from a certain time +2. Specify to start listening from the current time \ No newline at end of file diff --git a/docs/apidoc/cc/en/search_classifications.md b/docs/apidoc/cc/en/search_classifications.md index 2cb8987a65..05c6a61fca 100644 --- a/docs/apidoc/cc/en/search_classifications.md +++ b/docs/apidoc/cc/en/search_classifications.md @@ -1,4 +1,4 @@ -### Functional description +### Function Description Query model classification @@ -8,12 +8,13 @@ Query model classification #### Interface Parameters -| Field | Type | Required | Description | -|----------------------|------------|--------|-----------------------| +| Field | Type | Required | Description | +| ----- | ---- | -------- | ----------- | +| | | | | -### Request Parameters Example +### Request Parameter Example -``` python +```python { "bk_app_code": "esb_test", "bk_app_secret": "xxx", @@ -25,7 +26,6 @@ Query model classification ### Return Result Example ```python - { "result": true, "code": 0, @@ -36,7 +36,7 @@ Query model classification { "bk_classification_icon": "icon-cc-business", "bk_classification_id": "bk_host_manage", - "bk_classification_name": "hosts manage", + "bk_classification_name": "主机管理", "bk_classification_type": "inner", "bk_supplier_account": "0", "id": 1 @@ -45,25 +45,26 @@ Query model classification } ``` -### Return Result Parameters Description +### Return Result Parameter Explanation + #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------------ | -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failed error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain id | +| data | object | Request returned data | #### data -| Field | Type | Description | -|------------------------|----------|-----------------------------------------------------------------------------------------------| -| bk_classification_id | string | Classification ID, English description for internal use of the system | -| bk_classification_name | string | Class name | -| bk_classification_type | string | Used to classify a classification (for example: Internal code is built-in classification, empty string is user-defined classification) | -| bk_classification_icon | string | Icon of model classification, value can be referred to, value can be referred to [(classIcon.json)](resource_define/classIcon.json)| -| id | int | Data record ID | -| bk_supplier_account| string| Developer account| \ No newline at end of file +| Field | Type | Description | +| ---------------------- | ------ | ------------------------------------------------------------ | +| bk_classification_id | string | Classification ID, used for internal use in the system in English description | +| bk_classification_name | string | Classification name | +| bk_classification_type | string | Used to classify the classification (such as: inner code for built-in classification, empty string for custom classification) | +| bk_classification_icon | string | Icon of the model classification, the value can refer to [(classIcon.json)](https://chat.openai.com/c/resource_define/classIcon.json) | +| id | int | Data record ID | +| bk_supplier_account | string | Developer account | \ No newline at end of file diff --git a/docs/apidoc/cc/en/search_cloud_area.md b/docs/apidoc/cc/en/search_cloud_area.md index 1fcce8401f..5b463e86cf 100644 --- a/docs/apidoc/cc/en/search_cloud_area.md +++ b/docs/apidoc/cc/en/search_cloud_area.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Query cloud region +Query control area (Permission: control area view permission) ### Request Parameters @@ -8,29 +8,28 @@ Query cloud region #### Interface Parameters -| Field | Type | Required | Description | -|----------------------|------------|--------|-------------| -|condition| object| no | Query criteria| -| page| object| yes | Paging information| - +| Field | Type | Required | Description | +| --------- | ------ | -------- | ------------------ | +| condition | object | No | Query conditions | +| page | object | Yes | Paging information | #### condition -| Field | Type | Required | Description | -|----------------------|------------|--------|-------------| -|bk_cloud_id| int| no | Cloud area ID | -|bk_cloud_name| string| no | Cloud area name | -#### Page field Description +| Field | Type | Required | Description | +| ------------- | ------ | -------- | ----------------- | +| bk_cloud_id | int | No | Control area ID | +| bk_cloud_name | string | No | Control area name | -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -|start| int| no | Get data offset position| -|limit| int| yes | Limit on the number of data pieces in the past, 200 is recommended| +#### page Field Description +| Field | Type | Required | Description | +| ----- | ---- | -------- | ------------------------------------------------ | +| start | int | No | Data offset position | +| limit | int | Yes | Number of data restrictions, recommended for 200 | -### Request Parameters Example +### Request Parameter Example -``` python +```python { "bk_app_code": "esb_test", @@ -39,7 +38,7 @@ Query cloud region "bk_token": "xxx", "condition": { "bk_cloud_id": 12, - "bk_cloud_name" "aws", + "bk_cloud_name": "aws" }, "page":{ "start":0, @@ -74,32 +73,31 @@ Query cloud region } ``` -### Return Result Parameters Description +### Return Result Parameter Explanation + #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------------ | -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failed error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain id | +| data | object | Request returned data | #### data -| Name| Type| Description| -|---|---|---| -| count| int| Number of records| -| info| array |List information of queried cloud area| - -#### Data.info Field Description: -| Name| Type| Description| -|---|---|---| -| bk_cloud_id | int |Cloud area ID| -| bk_cloud_name | string |Cloud area name| -| create_time | string |Settling time| -| last_time | string |Last modified time| - +| Field | Type | Description | +| ----- | ----- | --------------------------------------- | +| count | int | Number of records | +| info | array | Information about the control area list | +#### data.info Field Description: +| Field | Type | Description | +| ------------- | ------ | ---------------------- | +| bk_cloud_id | int | Control area ID | +| bk_cloud_name | string | Control area name | +| create_time | string | Creation time | +| last_time | string | Last modification time | \ No newline at end of file diff --git a/docs/apidoc/cc/en/search_dynamic_group.md b/docs/apidoc/cc/en/search_dynamic_group.md index 2ffe2dda44..57c7c7dd9f 100644 --- a/docs/apidoc/cc/en/search_dynamic_group.md +++ b/docs/apidoc/cc/en/search_dynamic_group.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Query dynamic group list (V3.9.6) +Query dynamic group list (Version: v3.9.6, Permission: Business access permission) ### Request Parameters @@ -8,22 +8,22 @@ Query dynamic group list (V3.9.6) #### Interface Parameters -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_biz_id | int | yes | Business ID | -| condition | object | no | Query condition: the condition field is the attribute field of the user-defined query, which can be create_user, modify_user, name| -| disable_counter | bool |no | Return total number of records; default| -| page | object | yes | Paging settings| +| Field | Type | Required | Description | +| --------------- | ------ | -------- | ------------------------------------------------------------ | +| bk_biz_id | int | Yes | Business ID | +| condition | object | No | Query conditions, the condition field is the attribute field for custom queries, which can be create_user, modify_user, name | +| disable_counter | bool | No | Whether to not return the total number of records, default is to return | +| page | object | Yes | Paging settings | #### page -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| start | int | yes | Record start position| -| limit | int | yes | Limit bars per page, Max. 200| -| sort | string |no | Retrieve sort, by default by creation time| +| Field | Type | Required | Description | +| ----- | ------ | -------- | ------------------------------------------------------ | +| start | int | Yes | Record start position | +| limit | int | Yes | Number of restrictions per page, maximum is 200 | +| sort | string | No | Retrieval sorting, default is to sort by creation time | -### Request Parameters Example +### Request Parameter Example ```json { @@ -107,50 +107,51 @@ Query dynamic group list (V3.9.6) } ``` -### Return result parameter +### Return Result Parameter Explanation + #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------------ | -| result | bool | Whether the request succeeded or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failed error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain id | +| data | object | Request returned data | #### data -| Field | Type | Description | -|-----------|-----------|-----------| -| count | int |The total number of records that can be matched by the current rule (used for pre-paging by the caller, the actual number of returns from a single request and whether all data are pulled are subject to the number of JSON Array parsing)| -| info | array | Custom query data| +| Field | Type | Description | +| ----- | ----- | ------------------------------------------------------------ | +| count | int | Total number of records that the current rule can match (used for the caller to pre-pagination, the actual number of returns and whether the data is completely pulled as JSON Array parsing quantity is subject to) | +| info | array | Custom query data | #### data.info -| Field | Type | Description | -|-----------|------------|-----------| -| bk_biz_id | int | Business ID | -| id | string |Dynamic grouping pk ID| -| name | string |Dynamic group naming| -| bk_obj_id | string |The target resource object type of dynamic grouping can be host,set at present| -| info | object |Dynamic grouping information| -| last_time | string |Update time| -| modify_user | string |Modifier| -| create_time | string |Settling time| -| create_user | string |Creator| +| Field | Type | Description | +| ----------- | ------ | ------------------------------------------------------------ | +| bk_biz_id | int | Business ID | +| id | string | Dynamic group primary key ID | +| name | string | Dynamic group naming | +| bk_obj_id | string | Target resource object type of dynamic group, can be host, set | +| info | object | Dynamic group information | +| last_time | string | Update time | +| modify_user | string | Modifier | +| create_time | string | Creation time | +| create_user | string | Creator | #### data.info.info.condition -| Field | Type | Description | -|-----------|-----------|------------| -| bk_obj_id | string | Object name, which can be set,module,host| -| condition | array | Query criteria| +| Field | Type | Description | +| --------- | ------ | ------------------------------------- | +| bk_obj_id | string | Object name, can be set, module, host | +| condition | array | Query condition | #### data.info.info.condition.condition -| Field | Type | Description | -|-----------|------------|---------------| -| field | string | Fields of the object| -| operator | string | Operator, op values are eq(equal)/ne(unequal)/in(of)/nin(not of)/like(fuzzy match)| -| value | object | The value for the field| +| Field | Type | Description | +| -------- | ------ | ------------------------------------------------------------ | +| field | string | Object field | +| operator | string | Operator, op value is eq (equal) / ne (not equal) / in (belongs to) / nin (does not belong to) / like (fuzzy match) | +| value | object | Value corresponding to the field | \ No newline at end of file diff --git a/docs/apidoc/cc/en/search_host_lock.md b/docs/apidoc/cc/en/search_host_lock.md index bf666a5f88..b226d225bb 100644 --- a/docs/apidoc/cc/en/search_host_lock.md +++ b/docs/apidoc/cc/en/search_host_lock.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Query host locks from host id list (v3.8.6) +Query host locks based on host ID list (Version: v3.8.6, Permission: Business host edit permission) ### Request Parameters @@ -8,12 +8,11 @@ Query host locks from host id list (v3.8.6) #### Interface Parameters -| Field | Type | Required | Description | -|---------------------|-------------|--------|----------------------------------| -|id_list| array| yes | Host ID list| +| Field | Type | Required | Description | +| ------- | ----- | -------- | ------------ | +| id_list | array | Yes | Host ID list | - -### Request Parameters Example +### Request Parameter Example ```python { @@ -28,7 +27,6 @@ Query host locks from host id list (v3.8.6) ### Return Result Example ```python - { "result": true, "code": 0, @@ -42,19 +40,21 @@ Query host locks from host id list (v3.8.6) } ``` -### Return Result Parameters Description +### Return Result Parameter Explanation + #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------------ | -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failed error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain id | +| data | object | Request returned data | #### data -| Field | Type | Description | -|-----------|-----------|--------------| -| data |object| The data returned by the request, key is ID, and value is locked| + +| Field | Type | Description | +| ----- | ------ | ------------------------------------------------------------ | +| data | object | Data returned by the request, where the key is ID, and the value is whether it is locked | \ No newline at end of file diff --git a/docs/apidoc/cc/en/search_hostidentifier.md b/docs/apidoc/cc/en/search_hostidentifier.md index 0dadf7d554..958663cc52 100644 --- a/docs/apidoc/cc/en/search_hostidentifier.md +++ b/docs/apidoc/cc/en/search_hostidentifier.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Query host identity based on criteria +Query host identity based on conditions ### Request Parameters @@ -8,29 +8,27 @@ Query host identity based on criteria #### Interface Parameters -| Field| Type| Required| Description | -| ---- | ---- | ---- | ---------- | -| ip | object |no | Host ip query criteria| -| page | object |no | Paging query criteria | +| Field | Type | Required | Description | +| ----- | ------ | -------- | --------------------------- | +| ip | object | No | Host IP query conditions | +| page | object | No | Pagination query conditions | #### ip -| Field | Type | Required| Description | -| ----------- | ------- | ---- | ---------- | -| data | array |no | Host ip list| -| bk_cloud_id | int | no | Cloud area ID | +| Field | Type | Required | Description | +| ----------- | ----- | -------- | --------------- | +| data | array | No | Host IP list | +| bk_cloud_id | int | No | Control area ID | #### page -| Field| Type | Required| Description | -| ----- | ------ | ---- | ------------------------ | -| start | int | yes | Record start position | -| limit | int | yes | Limit the number of bars per page, with a maximum of 500| -| sort | string |no | Sort field | +| Field | Type | Required | Description | +| ----- | ------ | -------- | ------------------------------------- | +| start | int | Yes | Record start position | +| limit | int | Yes | Each page limit, maximum value is 500 | +| sort | string | No | Sorting field | - - -### Request Parameters Example +### Request Parameter Example ```json { @@ -112,76 +110,77 @@ Query host identity based on criteria } ``` -### Return Result Parameters Description +### Return Result Parameter Explanation + #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------------ | -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failed error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain id | +| data | object | Request returned data | #### data -| Field| Type| Description | -| ----- | ----- | ------------ | -| count | int | Number of records | -| info | array |Host identity data| +| Field | Type | Description | +| ----- | ----- | ------------------ | +| count | int | Record count | +| info | array | Host identity data | #### data.info[n] -| Field | Type | Description | -| ------------------- | ------ | ----------------------------------- | -| bk_host_id | int | Host ID | -| bk_supplier_account | string |Developer account number | -| bk_cloud_id | int | Cloud area ID | -| bk_host_innerip | string |Intranet IP | -| bk_os_type | string |Operating system type | -| associations | dict | Host mainline Association, key is the module ID to which the host belongs| -| process | array |Host proces information | +| Field | Type | Description | +| ------------------- | ------ | ------------------------------------------------------------ | +| bk_host_id | int | Host ID | +| bk_supplier_account | string | Developer account | +| bk_cloud_id | int | Control area ID | +| bk_host_innerip | string | Intranet IP | +| bk_os_type | string | Operating system type | +| associations | dict | Host mainline association, key is the module ID to which the host belongs | +| process | array | Host process information | #### data.info[n].associations -| Field | Type | Description | -| ----------------- | ------ | ------------------------------------- | -| bk_biz_id | int | The business ID to which the host belongs | -| bk_set_id | int | The set ID to which the host belongs | -| bk_module_id | int | Module ID to which the host belongs | -| layer | dict | Custom hierarchy info | + +| Field | Type | Description | +| ------------ | ---- | ------------------------------------ | +| bk_biz_id | int | Business ID of the host | +| bk_set_id | int | Cluster ID to which the host belongs | +| bk_module_id | int | Module ID to which the host belongs | +| layer | dict | Custom level information | #### data.info[n].associations.layer -| Field | Type | Description | -| ------------ | ------ | ------------------ | -| bk_inst_id | int | Custom hierarchy instance ID | -| bk_inst_name | string |Custom hierarchy instance name| -| bk_obj_id | int | Custom hierarchy model ID | -| child | dict | Custom hierarchy info | +| Field | Type | Description | +| ------------ | ------ | -------------------------- | +| bk_inst_id | int | Custom level instance ID | +| bk_inst_name | string | Custom level instance name | +| bk_obj_id | int | Custom level model ID | +| child | dict | Custom level information | #### data.info[n].process -| Field | Type | Description | -| -------------------- | ------ | ------------------------------------------------------------ | -| bk_process_id | int | Process ID | -| bk_process_name | string |Process name | -| bind_ip | string |Binding IP:1/2/3/4(1: 127.0.0.1,2: 0.0.0.0, 3: IP of the first intranet,4: First extranet IP)| -| port | string |Host port | -| protocol | enum | Protocol:1/2(1:tcp, 2: udp) | -| bk_func_id | int | Function ID | -| bk_func_name | string |Process alias | -| bk_start_param_regex | string |Process start parameters | -| bind_modules | array |Module array for process binding | -| bind_info | array |Process binding information | - - - -#### data.info [n] .process.bind .process.bind info [x] description -| Field | Type | Description | +| Field | Type | Description | | -------------------- | ------ | ------------------------------------------------------------ | -|enable| bool| Is the port enabled|| -|ip| string| Bound ip|| -|port| string| Bound port|| -|protocol| string| Protocol used|| -|template_row_id| int| Template row index used for instantiation, unique in process| \ No newline at end of file +| bk_process_id | int | Process ID | +| bk_process_name | string | Process name | +| bind_ip | string | Bound IP:1/2/3/4(1:127.0.0.1,2:0.0.0.0,3:First Intranet IP,4:First External IP) | +| port | string | Host port | +| protocol | enum | Protocol:1/2(1:tcp, 2:udp) | +| bk_func_id | int | Function ID | +| bk_func_name | string | Process alias | +| bk_start_param_regex | string | Process startup parameters | +| bind_modules | array | Array of modules bound by the process | +| bind_info | array | Process binding information | + +#### data.info[n].process.bind_info[x] Description + +| Field | Type | Description | +| --------------- | ------ | ------------------------------------------------------------ | +| enable | bool | Whether the port is enabled | +| ip | string | Bound IP | +| port | string | Bound port | +| protocol | string | Used protocol | +| template_row_id | int | Template row index used for instantiation, unique within the process | \ No newline at end of file diff --git a/docs/apidoc/cc/en/search_inst.md b/docs/apidoc/cc/en/search_inst.md index 4ff01b1c2f..0738879c24 100644 --- a/docs/apidoc/cc/en/search_inst.md +++ b/docs/apidoc/cc/en/search_inst.md @@ -1,8 +1,8 @@ -### Functional description +### Function Description -Query model instance according to Association relation instance +Query model instances based on association relationship instances (Permission: Model Instance Query Permission) -- This interface is only applicable to custom hierarchical model and general model instances, and is not applicable to model instances such as business, set, module, host, etc +- This interface is only applicable to custom hierarchical models and general model instances, not applicable to business, cluster, module, host, etc. ### Request Parameters @@ -10,48 +10,48 @@ Query model instance according to Association relation instance #### Interface Parameters -| Field | Type | Required | Description | -|---------------------|------------|--------|-----------------------------| -| bk_obj_id | string | yes | Model ID | -| page | object | yes | Paging parameter | -| condition | object | no | Model instance query criteria with Association relationship | -| time_condition | object | no | Query criteria for querying model instances by time| -| fields | object | no | Specifies the field returned by the query model instance, where key is the model ID and value is the model attribute field to be returned by the query model| +| Field | Type | Required | Description | +| -------------- | ------ | -------- | ------------------------------------------------------------ | +| bk_obj_id | string | Yes | Model ID | +| page | object | Yes | Pagination parameters | +| condition | object | No | Query conditions for model instances with association relationships | +| time_condition | object | No | Query conditions for model instances based on time | +| fields | object | No | Specify the fields to be returned for the queried model instances, where the key is the model ID, and the value is the model property fields to be returned | #### page -| Field | Type | Required | Description | -|-----------|------------|--------|----------------------| -| start | int | yes | Record start position | -| limit | int | yes | Limit bars per page, Max. 200| -| sort | string | no | Sort field | +| Field | Type | Required | Description | +| ----- | ------ | -------- | ------------------------------------- | +| start | int | Yes | Record start position | +| limit | int | Yes | Each page limit, maximum value is 200 | +| sort | string | No | Sorting field | #### condition -The user in the example is the model -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| field | string | yes | The value is the field name of the model | -| operator |string | yes | Value is: $regex $eq $ne | -| value | string | yes | The value corresponding to the model attribute name of the field configuration | +In the example, user is the model + +| Field | Type | Required | Description | +| -------- | ------ | -------- | -------------------------------------------------------- | +| field | string | Yes | The field value is the field name of the model | +| operator | string | Yes | The value is: $regex $eq $ne | +| value | string | Yes | The value corresponding to the field configured by field | #### time_condition -| Field | Type | Required| Description | -|-------|--------|-----|--------------------| -| oper | string |yes| Operator, currently only and is supported| -| rules | array |yes| Time query criteria | +| Field | Type | Required | Description | +| ----- | ------ | -------- | ------------------------------------- | +| oper | string | Yes | Operator, currently only supports and | +| rules | array | Yes | Time query conditions | #### rules -| Field | Type | Required| Description | -|-------|--------|-----|----------------------------------| -| field | string |yes| The value is the field name of the model | -| start | string |yes| Start time in the format yyyy MM dd hh: mm:ss| -| end | string |yes| End time in the format yyyy MM dd hh: mm:ss| - +| Field | Type | Required | Description | +| ----- | ------ | -------- | --------------------------------------------- | +| field | string | Yes | The value is the field name of the model | +| start | string | Yes | Start time, in the format yyyy-MM-dd hh:mm:ss | +| end | string | Yes | End time, in the format yyyy-MM-dd hh:mm:ss | -### Request Parameters Example +### Request Parameter Example ```json { @@ -124,21 +124,31 @@ The user in the example is the model } ``` -### Return Result Parameters Description +### Return Result Parameter Explanation + #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------------ | -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failed error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain id | +| data | object | Request returned data | #### data -| Field | Type | Description | -|-----------|-----------|--------------| -| count | int | Number of records | -| info | array | Model instance actual data| +| Field | Type | Description | +| ----- | ----- | ------------------------------ | +| count | int | Record count | +| info | array | Actual data of model instances | + +#### data.info[n] + +| Field | Type | Description | +| ------------ | ------ | ------------- | +| bk_asset_id | string | Asset ID | +| bk_inst_id | int | Instance ID | +| bk_inst_name | string | Instance name | +| bk_obj_id | string | Model ID | \ No newline at end of file diff --git a/docs/apidoc/cc/en/search_inst_association_topo.md b/docs/apidoc/cc/en/search_inst_association_topo.md index 3329baa8dc..a112c64837 100644 --- a/docs/apidoc/cc/en/search_inst_association_topo.md +++ b/docs/apidoc/cc/en/search_inst_association_topo.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Query instance Association topology +Query instance association topology ### Request Parameters @@ -8,15 +8,14 @@ Query instance Association topology #### Interface Parameters -| Field | Type | Required| Description| -| ------------------- | ------ | ---- | ---- | -| bk_obj_id | string |yes | Model id | -| bk_inst_id | int | yes | Instance id | +| Field | Type | Required | Description | +| ---------- | ------ | -------- | ----------- | +| bk_obj_id | string | Yes | Model ID | +| bk_inst_id | int | Yes | Instance ID | +### Request Parameter Example -### Request Parameters Example - -``` python +```python { "bk_app_code": "esb_test", "bk_app_secret": "xxx", @@ -27,7 +26,6 @@ Query instance Association topology } ``` - ### Return Result Example ```python @@ -63,37 +61,38 @@ Query instance Association topology } ``` -### Return Result Parameters Description +### Return Result Parameter Explanation + #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------------ | -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failed error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain id | +| data | object | Request returned data | #### data -| Field | Type | Description | -| ------------ | ------------ | ------------------------------ | -| bk_inst_id | int | Instance ID | -| bk_inst_name | string | The name the instance is used to present | -| bk_obj_icon | string | The name of the model icon | -| bk_obj_id | string | Model ID | -| bk_obj_name | string | The name the model is used to present | -| children | object array |The set of all associated instances in this model| -| count | int | Children contains the number of nodes | +| Field | Type | Description | +| ------------ | ------------ | ------------------------------------------------------ | +| bk_inst_id | int | Instance ID | +| bk_inst_name | string | Display name of the instance | +| bk_obj_icon | string | Icon name of the model | +| bk_obj_id | string | Model ID | +| bk_obj_name | string | Display name of the model | +| children | object array | Collection of all instances associated with this model | +| count | int | Number of nodes in children | #### children -| Field | Type | Description | -|-------------|--------|--------------------| -|bk_inst_id | int | Instance ID | -|bk_inst_name | string |The name the instance is used to present| -|bk_obj_icon | string |The name of the model icon | -|bk_obj_id | string |Model ID | -|bk_obj_name | string |The name the model is used to present| -|asso_id | string |Association id| +| Field | Type | Description | +| ------------ | ------ | ---------------------------- | +| bk_inst_id | int | Instance ID | +| bk_inst_name | string | Display name of the instance | +| bk_obj_icon | string | Icon name of the model | +| bk_obj_id | string | Model ID | +| bk_obj_name | string | Display name of the model | +| asso_id | string | Association ID | \ No newline at end of file diff --git a/docs/apidoc/cc/en/search_inst_asst_object_inst_base_info.md b/docs/apidoc/cc/en/search_inst_asst_object_inst_base_info.md index 883bdd26d3..1b260e15ea 100644 --- a/docs/apidoc/cc/en/search_inst_asst_object_inst_base_info.md +++ b/docs/apidoc/cc/en/search_inst_asst_object_inst_base_info.md @@ -1,40 +1,36 @@ +### Function Description - -### Functional description - -Query instance Association model instance basic information +Query basic information of instance-associated model instances ### Request Parameters {{ common_args_desc }} - #### Interface Parameters -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| fields | array | no | Specify the fields to query. The parameter is any attribute of the business. If you do not fill in the field information, the system will return all the fields of the business| -| condition | object | no | Query criteria| -| page | object | no | Paging condition| +| Field | Type | Required | Description | +| --------- | ------ | -------- | ------------------------------------------------------------ | +| fields | array | No | Specify the fields to be queried. The parameter can be any attribute of the business. If the field information is not filled in, the system will return all fields of the business | +| condition | object | Yes | Query conditions | +| page | object | No | Pagination conditions | #### condition -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_obj_id | string | yes | Instance model ID| -| bk_inst_id| int | yes | Instance ID| -|association_obj_id| string| yes | The model ID of the associated object, which returns the instance basic data (bk_inst_id,bk_inst_name) associated with the bk_inst_id instance of the Association_obj_id model| -|is_target_object| bool |no| Whether bk_obj_id is the target model, the default is false, the source model in the Association relationship, otherwise, it is the target model| +| Field | Type | Required | Description | +| ------------------ | ------ | -------- | ------------------------------------------------------------ | +| bk_obj_id | string | Yes | Model ID of the instance | +| bk_inst_id | int | Yes | Instance ID | +| association_obj_id | string | Yes | Model ID of the associated object. Returns the basic data (bk_inst_id, bk_inst_name) of instances associated with association_obj_id model and bk_inst_id instance | +| is_target_object | bool | No | Whether bk_obj_id is the target model. Default is false, which means it is the source model in the association relationship; otherwise, it is the target model | #### page -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| start | int | no | Record start position, default 0| -| limit | int | no | Limit bars per page, default 20, maximum 200| +| Field | Type | Required | Description | +| ----- | ---- | -------- | ------------------------------------------------------------ | +| start | int | No | Record start position, default value is 0 | +| limit | int | No | Number of records per page, default value is 20, maximum is 200 | - -### Request Parameters Example +### Request Parameter Example ```python { @@ -58,7 +54,6 @@ Query instance Association model instance basic information ### Return Result Example ```python - { "result": true, "code": 0, @@ -77,42 +72,43 @@ Query instance Association model instance basic information } ``` -### Return Result Parameters Description +### Return Result Parameter Explanation + #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------------ | -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failed error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain id | +| data | object | Request returned data | #### data -| Name| Type| Description| -|---|---|---| -| count| int| Number of records| -| info| object array |Model ID of associated object, instance basic data of instance associated model (bk_inst_id,bk_inst_name)| -| page| object| Paging information| +| Field | Type | Description | +| ----- | ------------ | ------------------------------------------------------------ | +| count | int | Number of records | +| info | object array | Model ID of the associated object. Basic data of instances associated with the instance model (bk_inst_id, bk_inst_name) | +| page | object | Pagination information | -#### Data.info Field Description: -| Name| Type| Description| -|---|---|---| -| bk_inst_id | int |Instance ID| -| bk_inst_name | string |Instance name| +#### data.info Field Explanation: -##### Data.info.BK_inst_id, data.info.BK_inst_name field descriptions +| Field | Type | Description | +| ------------ | ------ | ------------- | +| bk_inst_id | int | Instance ID | +| bk_inst_name | string | Instance name | -Values corresponding to bk_inst_id, bk_inst_name for different models +##### data.info.bk_inst_id, data.info.bk_inst_name Field Explanation -| Model | bk_inst_id | bk_inst_name | -|---|---|---| -|Business| bk_biz_id | bk_biz_name| -|Set| bk_set_id | bk_set_name| -|Module| bk_module_id | bk_module_name| -|Process| bk_process_id | bk_process_name| -|Host| bk_host_id | bk_host_inner_ip| -|Universal model| bk_inst_id | bk_inst_name| +Values corresponding to different model bk_inst_id, bk_inst_name +| Model | bk_inst_id | bk_inst_name | +| ------------ | ------------- | ---------------- | +| Business | bk_biz_id | bk_biz_name | +| Cluster | bk_set_id | bk_set_name | +| Module | bk_module_id | bk_module_name | +| Process | bk_process_id | bk_process_name | +| Host | bk_host_id | bk_host_inner_ip | +| Common Model | bk_inst_id | bk_inst_name | \ No newline at end of file diff --git a/docs/apidoc/cc/en/search_instance_associations.md b/docs/apidoc/cc/en/search_instance_associations.md index da72b5aa0c..7680b698b9 100644 --- a/docs/apidoc/cc/en/search_instance_associations.md +++ b/docs/apidoc/cc/en/search_instance_associations.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -General model instance relation query (v3.10.1+) +General Model Instance Relationship Query (Version: v3.10.1+, Permission: Model Instance Query Permission) ### Request Parameters @@ -8,40 +8,40 @@ General model instance relation query (v3.10.1+) #### Interface Parameters -| Field | Type | Required | Description | -|------------|---------|------|-----------------------------------------------------------------------------------------------------------------| -| bk_biz_id | int |no| Business ID, which is required for mainline model query | -| bk_obj_id | string |yes| Model ID | -| conditions | object |no| Combined query criteria: AND and OR are supported for combination, and can be nested up to 3 layers. Each layer supports 20 OR criteria at most. If this parameter is not specified, it means all matches (i.e., Contexts are null).| -| fields | array | no | Specify the fields to be returned. Fields that do not exist will be ignored. If not specified, all fields will be returned (returning all fields will affect performance, and it is recommended to return on demand). | -| page | object |yes| Paging settings | +| Field | Type | Required | Description | +| ---------- | ------ | -------- | ------------------------------------------------------------ | +| bk_biz_id | int | No | Business ID, required for mainline model query | +| bk_obj_id | string | Yes | Model ID | +| conditions | object | No | Combined query conditions, supports both AND and OR, can be nested, supports up to 3 layers, each OR condition supports up to 20, not specifying this parameter means matching all (i.e., conditions is null) | +| fields | array | No | Specify the fields to be returned. Fields that are not available will be ignored. If not specified, all fields will be returned (returning all fields will affect performance, it is recommended to return as needed) | +| page | object | Yes | Pagination settings | #### conditions -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| condition | string |yes | Rule operator| -| rules | array |yes | Scope condition rule for selected business| +| Field | Type | Required | Description | +| --------- | ------ | -------- | ----------------------------------------------- | +| condition | string | Yes | Rule operator | +| rules | array | Yes | Range condition rules for the selected business | #### conditions.rules -| Field | Type| Required| Description | -|----------|--------|------|-----------------------------------------------------------------------------------------------------------| -| field | string |yes| Condition field, optional value id, bk_inst_id, bk_obj_id, bk_Asst_inst_id, bk_Asst_obj_id, bk_obj_Asst_id, bk_Asst_id | -| operator | string |yes| Operator, optional values equal,not_equal,in,not_in,less,less_or_equal,greater,greater_or_equal,between,not_between, etc| -| value | - |no| The expected value of the condition field. Different values correspond to different value formats. The array type value supports up to 500 elements | +| Field | Type | Required | Description | +| -------- | ------ | -------- | ------------------------------------------------------------ | +| field | string | Yes | Condition field, optional values are id, bk_inst_id, bk_obj_id, bk_asst_inst_id, bk_asst_obj_id, bk_obj_asst_id, bk_asst_id | +| operator | string | Yes | Operator, optional values are equal,not_equal,in,not_in,less,less_or_equal,greater,greater_or_equal,between,not_between, etc. | +| value | - | No | Expected value of the condition field, different operators correspond to different value formats, array type values support up to 500 elements | -For details of assembly rules, please refer to https: //github.com/Tencent/bk-cmdb/blob/master/src/common/querybuilder/README.md +Detailed assembly rules can be referred to: [bk-cmdb query builder](https://github.com/Tencent/bk-cmdb/blob/master/src/common/querybuilder/README.md) #### page -| Field| Type| Required| Description | -|-------|--------|------|------------------------------------------------------------------| -| start | int | yes | Record start position | -| limit | int | yes | Limit bars per page, Max. 500 | -| sort | string |no| Retrieve sort, following mongordb semantic format {KEY}:{ORDER}, sorted by creation time by default| +| Field | Type | Required | Description | +| ----- | ------ | -------- | ------------------------------------------------------------ | +| start | int | Yes | Record start position | +| limit | int | Yes | Number of records per page, default is 500 | +| sort | string | No | Retrieval sorting, follow the MongoDB semantic format {KEY}:{ORDER}, default sorting is by creation time | -### Request Parameters Example +### Request Parameter Example ```json { @@ -112,33 +112,31 @@ For details of assembly rules, please refer to https: //github.com/Tencent/bk-cm } ``` -### Return result parameter +### Return Result Parameter Explanation #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failed error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain id | +| data | object | Request returned data | #### data -| Field| Type| Description | -|------|-------|-------------------------------------| -| info | array |map array format, which returns instance data that meets the condition| +| Field | Type | Description | +| ----- | ----- | ------------------------------------------------------------ | +| info | array | Map array format, returning instance data that meets the conditions | #### info -| Field| Type| Description | -|------|-------|-------------------------------------| -| bk_inst_id | int |Source model instance id| -| bk_asst_inst_id| int| Target model instance id| -| bk_asst_obj_id| string| Association relation target model id| -| bk_asst_id| string| Association type id| -| bk_obj_asst_id| string| Auto-generated model association id| - - +| Field | Type | Description | +| --------------- | ------ | -------------------------------------------- | +| bk_inst_id | int | Source model instance id | +| bk_asst_inst_id | int | Target model instance id | +| bk_asst_obj_id | string | Associated object model id | +| bk_asst_id | string | Associated type id | +| bk_obj_asst_id | string | Automatically generated model association id | \ No newline at end of file diff --git a/docs/apidoc/cc/en/search_object_attribute.md b/docs/apidoc/cc/en/search_object_attribute.md index 97892ee5b2..b1c7944c89 100644 --- a/docs/apidoc/cc/en/search_object_attribute.md +++ b/docs/apidoc/cc/en/search_object_attribute.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -You can query object model properties based on model id or business id with optional parameters +You can use optional parameters to query object model properties based on the model id or business id (Permission: Model View Permission) ### Request Parameters @@ -8,15 +8,14 @@ You can query object model properties based on model id or business id with opti #### Interface Parameters -| Field | Type | Required | Description | -|---------------------|------------|--------|-----------------------------| -|bk_obj_id | string | no | Model ID | -| bk_biz_id | int | no | Business id: after setting, the query result contains the business user-defined field| +| Field | Type | Required | Description | +| --------- | ------ | -------- | ------------------------------------------------------------ | +| bk_obj_id | string | Yes | Model ID | +| bk_biz_id | int | No | Business id, if set, the query result contains business custom fields | +### Request Parameter Example -### Request Parameters Example - -``` python +```python { "bk_app_code": "esb_test", "bk_app_secret": "xxx", @@ -27,11 +26,9 @@ You can query object model properties based on model id or business id with opti } ``` - ### Return Result Example ```python - { "result": true, "code": 0, @@ -58,10 +55,10 @@ You can query object model properties based on model id or business id with opti "option": "", "placeholder": "", "bk_property_group": "default", - "bk_property_group_name": "Basic Info", + "bk_property_group_name": "基础信息", "bk_property_id": "bk_process_name", "bk_property_index": 0, - "bk_property_name": "Process name", + "bk_property_name": "进程名称", "bk_property_type": "singlechar", "bk_supplier_account": "0", "unit": "" @@ -72,7 +69,7 @@ You can query object model properties based on model id or business id with opti "bk_supplier_account": "0", "bk_obj_id": "process", "bk_property_id": "biz_custom_field", - "bk_property_name": "Business Custom Fields", + "bk_property_name": "业务自定义字段", "bk_property_group": "biz_custom_group", "bk_property_index": 4, "unit": "", @@ -90,61 +87,47 @@ You can query object model properties based on model id or business id with opti "creator": "admin", "create_time": "2020-03-25 17:12:08", "last_time": "2020-03-25 17:12:08", - "bk_property_group_name": "Business Custom Grouping" + "bk_property_group_name": "业务自定义分组" } ] } ``` -### Return Result Parameters Description +### Return Result Parameter Explanation + #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------------ | -| result | bool | Whether the request succeeded or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failed error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain id | +| data | object | Request returned data | #### data -| Field | Type | Description | -|---------------------|--------------|------------------------------------------------------------| -| creator | string | The creator of the data | -| description | string | Description information of data | -| editable | bool | Indicates whether the data is editable | -| isonly | bool | Show uniqueness | -| ispre | bool | True: preset field,false: Non-built-in field | -| isreadonly | bool | True: read-only, false: Not read-only | -| isrequired | bool | True: required, false: Optional | -| option | string | User-defined content, stored content and format determined by the caller | -| unit | string | Unit | -| placeholder | string | Placeholder | -| bk_property_group | string | Name of the field column | -| bk_obj_id | string | Model ID | -| bk_supplier_account | string | Developer account number | -| bk_property_id | string | The property ID of the model | -| bk_property_name | string | Model property name, used to show | -| bk_property_type | string | The data type of the defined attribute field used to store the data (singlechar,longchar,int,enum,date,time,objUser,singleasst,multiasst,timezone,bool)| -| bk_asst_obj_id | string | This field must be set if there are other models associated with it, otherwise it is not required| -| bk_biz_id | int | Business id of business custom field | -| create_time | string |Settling time | -| last_time | string |Update time | -| id | int | The id value of the query object | -#### bk_property_type - -| Identification | Name | -|------------|----------| -| singlechar |Short character | -| longchar | Long character | -| int | Reshaping | -| enum | Enumeration type| -| date | Date | -| time | Time | -| objuser | User | -| singleasst |Simple correlation | -| multiasst |Multiple correlation | -| timezone | Time zone | -| bool | Bull | +| Field | Type | Description | +| ------------------- | ------ | ------------------------------------------------------------ | +| creator | string | Creator of the data | +| description | string | Description information of the data | +| editable | bool | Indicates whether the data is editable | +| isonly | bool | Indicates uniqueness of the data | +| ispre | bool | true: pre-installed field, false: non-built-in field | +| isreadonly | bool | true: read-only, false: non-read-only | +| isrequired | bool | true: required, false: optional | +| option | string | User-defined content, the content and format stored is determined by the caller | +| unit | string | Unit | +| placeholder | string | Placeholder | +| bk_property_group | string | Name of the field column | +| bk_obj_id | string | Model ID | +| bk_supplier_account | string | Vendor account | +| bk_property_id | string | Model property ID | +| bk_property_name | string | Model property name used for display | +| bk_property_type | string | Defined property field for storing data types (singlechar(short character), longchar(long character), int(integer), enum(enum type), date(date), time(time), objuser(user), enummulti(enum multiple), enumquote(enum reference), timezone(timezone), bool(boolean), organization(organization)) | +| bk_asst_obj_id | string | If there is a relationship with other models, this field must be set, otherwise it does not need to be set | +| bk_biz_id | int | Business id of business custom field | +| create_time | string | Creation time | +| last_time | string | Update time | +| id | int | Query object id value | \ No newline at end of file diff --git a/docs/apidoc/cc/en/search_object_instances.md b/docs/apidoc/cc/en/search_object_instances.md index f5063702f0..db82690581 100644 --- a/docs/apidoc/cc/en/search_object_instances.md +++ b/docs/apidoc/cc/en/search_object_instances.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -General model instance query (v3.10.1+) +General model instance query (Version: v3.10.1+, Permission: Model instance query permission) ### Request Parameters @@ -8,64 +8,63 @@ General model instance query (v3.10.1+) #### Interface Parameters -| Field | Type | Required | Description | -|------------|--------|------|-----------------------------------------------------------------------------------------------------------------| -| bk_obj_id | string |yes| Model ID | -| conditions | object |no| Combined query criteria. Combination supports AND and OR, and can be nested up to 3 levels. Each level supports up to 20 OR criteria. If this parameter is not specified, it means all matches (i.e. Contexts are null).| -| time_condition | object | no | Query criteria for querying model instances by time| -| fields | array |no| Specify the fields to be returned. Fields that do not exist will be ignored. If not specified, all fields will be returned (returning all fields will affect performance, and it is recommended to return on demand). | -| page | object |yes| Paging settings | +| Field | Type | Required | Description | +| -------------- | ------ | -------- | ------------------------------------------------------------ | +| bk_obj_id | string | Yes | Model ID | +| conditions | object | No | Combined query conditions, supports AND and OR, can be nested, up to 3 levels of nesting, each OR condition supports up to 20 conditions, not specifying this parameter means matching all (i.e., conditions is null) | +| time_condition | object | No | Query conditions for model instances based on time | +| fields | array | No | Specify the fields to be returned. Fields that are not available will be ignored. If not specified, all fields will be returned (returning all fields will impact performance, it is recommended to return as needed) | +| page | object | Yes | Pagination settings | #### conditions -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| condition | string |yes | Rule operator| -| rules | array | yes | Scope condition rule for selected business| +| Field | Type | Required | Description | +| --------- | ------ | -------- | ------------------------------------------------ | +| condition | string | Yes | Rule operator | +| rules | array | Yes | Range conditions for the selected business scope | #### conditions.rules -| Field | Type| Required| Description | -|----------|--------|------|-----------------------------------------------------------------------------------------------------------| -| field | string |yes| Condition field | -| operator | string |yes| Operator, optional values equal,not_equal,in,not_in,less,less_or_equal,greater,greater_or_equal,between,not_between, etc| -| value | - |no| The expected value of the condition field. Different values correspond to different value formats. The array type value supports up to 500 elements | +| Field | Type | Required | Description | +| -------- | ------ | -------- | ------------------------------------------------------------ | +| field | string | Yes | Condition field | +| operator | string | Yes | Operator, optional values: equal, not_equal, in, not_in, less, less_or_equal, greater, greater_or_equal, between, not_between, etc. | +| value | - | No | Expected value of the condition field. Different operators correspond to different value formats. The maximum number of elements for array type values is 500 | -For details of assembly rules, please refer to: https: //github.com/Tencent/bk-cmdb/blob/master/src/common/querybuilder/README.md +Detailed assembly rules can be found here: [querybuilder](https://github.com/Tencent/bk-cmdb/blob/master/src/common/querybuilder/README.md) #### time_condition -| Field | Type | Required| Description | -|-------|--------|-----|--------------------| -| oper | string |yes| Operator, currently only and is supported| -| rules | array |yes| Time query criteria | +| Field | Type | Required | Description | +| ----- | ------ | -------- | --------------------------------------- | +| oper | string | Yes | Operator, currently only supports 'and' | +| rules | array | Yes | Time query conditions | #### time_condition.rules -| Field | Type | Required| Description | -|-------|--------|-----|----------------------------------| -| field | string |yes| The value is the field name of the model | -| start | string |yes| Start time in the format yyyy MM dd hh: mm:ss| -| end | string |yes| End time in the format yyy MM dd hh: mm:ss| +| Field | Type | Required | Description | +| ----- | ------ | -------- | --------------------------------------- | +| field | string | Yes | Value is the field name of the model | +| start | string | Yes | Start time, format: yyyy-MM-dd hh:mm:ss | +| end | string | Yes | End time, format: yyyy-MM-dd hh:mm:ss | #### page -| Field| Type| Required| Description | -|-------|--------|------|------------------------------------------------------------------| -| start | int | yes | Record start position | -| limit | int | yes | Limit bars per page, Max. 500 | -| sort | string |no| Retrieve sort, following mongordb semantic format {KEY}:{ORDER}, sorted by creation time by default| +| Field | Type | Required | Description | +| ----- | ------ | -------- | ------------------------------------------------------------ | +| start | int | Yes | Record start position | +| limit | int | Yes | Page limit, maximum 500 | +| sort | string | No | Retrieval sorting, follow the MongoDB semantic format {KEY}:{ORDER}, default sorting by creation time | ### Request Parameters Example -```json -{ - "bk_app_code":"code", - "bk_app_secret":"secret", +```json{ + "bk_app_code": "code", + "bk_app_secret": "secret", "bk_username": "xxx", - "bk_token":"xxxx", - "bk_obj_id":"bk_switch", - "conditions":{ + "bk_token": "xxxx", + "bk_obj_id": "bk_switch", + "conditions": { "condition": "AND", "rules": [ { @@ -100,18 +99,18 @@ For details of assembly rules, please refer to: https: //github.com/Tencent/bk-c } ] }, - "fields":[ + "fields": [ "bk_inst_id", "bk_inst_name" ], - "page":{ - "start":0, - "limit":500 + "page": { + "start": 0, + "limit": 500 } } ``` -### Return Result Example +### Response Example ```json { @@ -131,27 +130,28 @@ For details of assembly rules, please refer to: https: //github.com/Tencent/bk-c } ``` -### Return result parameter +### Response Parameters Description #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request succeeded or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request was successful. true: success; false: failure | +| code | int | Error code. 0 indicates success, >0 indicates a failure error | +| message | string | Error message returned for a failed request | +| data | object | Data returned by the request | +| permission | object | Permission information | +| request_id | string | Request chain ID | #### data -| Field| Type| Description | -|------|-------|-------------------------------------| -| info | array |map array format, which returns instance data that meets the condition| +| Field | Type | Description | +| ----- | ----- | ------------------------------------------------------------ | +| info | array | Map array format, returning instance data that meets the conditions | #### info -| Field| Type| Description | -|------|-------|-------------------------------------| -| bk_inst_id | int |Instance id| -| bk_inst_name | string |Instance name| + +| Field | Type | Description | +| ------------ | ------ | ------------- | +| bk_inst_id | int | Instance ID | +| bk_inst_name | string | Instance name | \ No newline at end of file diff --git a/docs/apidoc/cc/en/search_object_topo.md b/docs/apidoc/cc/en/search_object_topo.md index 34a085e9fe..1365be0dbc 100644 --- a/docs/apidoc/cc/en/search_object_topo.md +++ b/docs/apidoc/cc/en/search_object_topo.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Query general model topology by classification ID of object model +Query the topology of a common model through the classification ID of the object model (Permission: Model Topology View Edit Permission) ### Request Parameters @@ -8,12 +8,11 @@ Query general model topology by classification ID of object model #### Interface Parameters -| Field | Type | Required | Description | -|----------------------|------------|--------|------------------------------------------| -| bk_classification_id |string | yes | The classification ID of the object model, which can only be named by English letter sequence| +| Field | Type | Required | Description | +| -------------------- | ------ | -------- | ------------------------------------------------------------ | +| bk_classification_id | string | Yes | Classification ID of the object model, can only be named with alphabetical sequence | - -### Request Parameters Example +### Request Parameter Example ```python { @@ -28,7 +27,6 @@ Query general model topology by classification ID of object model ### Return Result Example ```python - { "result": true, "code": 0, @@ -41,7 +39,7 @@ Query general model topology by classification ID of object model "from": { "bk_classification_id": "bk_host_manage", "bk_obj_id": "host", - "bk_obj_name": "Host", + "bk_obj_name": "主机", "position": "{\"bk_host_manage\":{\"x\":-357,\"y\":-344},\"lhmtest\":{\"x\":163,\"y\":75}}", "bk_supplier_account": "0" }, @@ -51,7 +49,7 @@ Query general model topology by classification ID of object model "to": { "bk_classification_id": "bk_network", "bk_obj_id": "bk_switch", - "bk_obj_name": "Switch", + "bk_obj_name": "交换机", "position": "{\"bk_network\":{\"x\":-172,\"y\":-160}}", "bk_supplier_account": "0" } @@ -60,33 +58,35 @@ Query general model topology by classification ID of object model } ``` -### Return Result Parameters Description +### Return Result Parameter Explanation + #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------------ | -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failed error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain id | +| data | object | Request returned data | #### data -| Field | Type | Description | -|------------|-----------|------------------------------------| -| arrows | string | Take to (one-way) or to,from (two-way)| -| label_name | string | The name of the Association | -| label | string | Indicates by which field From is associated with To | -| from | string | The English id of the object model, the initiator of the topological relationship| -| to | string | The English ID of the object model, the termination party of the topological relationship| +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| arrows | string | Value can be "to" (unidirectional) or "to,from" (bidirectional) | +| label_name | string | Name of the relationship | +| label | string | Indicates through which field From is related to To | +| from | string | English id of the object model, the initiator of the topological relationship | +| to | string | English ID of the object model, the terminator of the topological relationship | #### from、to -| Field | Type | Description | -|------------|-----------|------------------------------------| -|bk_classification_id| string| Class ID| -| bk_obj_id | string | Model id| -| bk_obj_name | string | Model name| -| bk_supplier_account | string |Developer account number | -| position | json object string |Coordinates for front-end presentation | + +| Field | Type | Description | +| -------------------- | ------------------ | -------------------------------------- | +| bk_classification_id | string | Classification ID | +| bk_obj_id | string | Model ID | +| bk_obj_name | string | Model name | +| bk_supplier_account | string | Vendor account | +| position | json object string | Coordinates used for front-end display | \ No newline at end of file diff --git a/docs/apidoc/cc/en/search_objects.md b/docs/apidoc/cc/en/search_objects.md index d5ae15981d..0bd9641511 100644 --- a/docs/apidoc/cc/en/search_objects.md +++ b/docs/apidoc/cc/en/search_objects.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Query model based on optional criteria +Query models based on optional conditions (Permission: Model View Permission) ### Request Parameters @@ -8,15 +8,16 @@ Query model based on optional criteria #### Interface Parameters -| Field | Type | Required | Description | -|----------------------|------------|--------|----------------------------------------------------------| -| creator | string | no | Creator of this data | -| modifier | string | no | The last person to modify this piece of data | -| bk_classification_id | string | no | The classification ID of the object model, which can only be named by English letter sequence | -| bk_obj_id | string | no | The ID of the object model, which can only be named in English letter sequence | -| bk_obj_name | string | no | The name of the object model, for presentation, can be used in any language that humans can read| +| Field | Type | Required | Description | +| -------------------- | ------ | -------- | ------------------------------------------------------------ | +| creator | string | No | Creator of this data | +| modifier | string | No | Last modifier of this data | +| bk_classification_id | string | No | Classification ID of the object model, can only be named with alphabetical sequence | +| bk_obj_id | string | No | ID of the object model, can only be named with alphabetical sequence | +| bk_obj_name | string | No | Name of the object model, used for display, can be any language readable by humans | +| obj_sort_number | int | No | Sorting order of the object model under the corresponding model group | -### Request Parameters Example +### Request Parameter Example ```python { @@ -27,15 +28,15 @@ Query model based on optional criteria "creator": "user", "modifier": "user", "bk_classification_id": "test", - "bk_obj_id": "biz" - "bk_obj_name": "aaa" + "bk_obj_id": "biz", + "bk_obj_name": "aaa", + "obj_sort_number": 1 } ``` ### Return Result Example ```python - { "result": true, "code": 0, @@ -57,37 +58,40 @@ Query model based on optional criteria "bk_obj_id": "XX", "bk_obj_name": "XXX", "position": "{\"test_obj\":{\"x\":-253,\"y\":137}}", - "bk_supplier_account": "0" + "bk_supplier_account": "0", + "obj_sort_number": 1 } ] } ``` -### Return Result Parameters Description +### Return Result Parameter Explanation + #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------------ | -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failed error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain id | +| data | object | Request returned data | #### data -| Field | Type | Description | -|----------------------|--------------------|------------------------------------------------------------------------------------------------| -| id | int | ID of the data record | -| creator | string | Creator of this data | -| modifier | string | The last person to modify this piece of data | -| bk_classification_id | string | The classification ID of the object model, which can only be named by English letter sequence | -| bk_obj_id | string | The ID of the object model, which can only be named by English letter sequence | -| bk_obj_name | string | The name of the object model, used to show | -| bk_supplier_account | string | Developer account number | -| bk_ispaused | bool | Disable, true or false | -| ispre | bool | Predefined, true or false | -| bk_obj_icon | string | ICON information of object model, used for front-end display, and the value can be referred to [(modleIcon.json)](/static/esb/api_docs/res/cc/modleIcon.json)| -| position | json object string |Coordinates for front-end presentation | -| description | string | Description information of data | +| Field | Type | Description | +| -------------------- | ------------------ | ------------------------------------------------------------ | +| id | int | Data record ID | +| creator | string | Creator of this data | +| modifier | string | Last modifier of this data | +| bk_classification_id | string | Classification ID of the object model, can only be named with alphabetical sequence | +| bk_obj_id | string | ID of the object model, can only be named with alphabetical sequence | +| bk_obj_name | string | Name of the object model, used for display | +| bk_supplier_account | string | Vendor account | +| bk_ispaused | bool | Whether it is paused, true or false | +| ispre | bool | Whether it is predefined, true or false | +| bk_obj_icon | string | ICON information of the object model, used for front-end display, values can refer to [(modleIcon.json)](https://chat.openai.com/static/esb/api_docs/res/cc/modleIcon.json) | +| position | json object string | Coordinates used for front-end display | +| description | string | Description of the data | +| obj_sort_number | int | Sorting order of the object model under the corresponding model group | \ No newline at end of file diff --git a/docs/apidoc/cc/en/search_related_inst_asso.md b/docs/apidoc/cc/en/search_related_inst_asso.md index ecb70fb01b..b5721946af 100644 --- a/docs/apidoc/cc/en/search_related_inst_asso.md +++ b/docs/apidoc/cc/en/search_related_inst_asso.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description - Query all Association relationships of an instance (including the case that it is the original model of Association relationship and the target model of Association relationship) +Query all relationships of a certain instance (including its situation as the original model and the target model of the relationship, Permission: Model Instance Query Permission) ### Request Parameters @@ -8,23 +8,22 @@ #### Interface Parameters -| Field | Type | Required| Description | -| ---------- | ------ | ---- | --------------------- | -| bk_inst_id | int | yes | Instance id | -| bk_obj_id | string |yes | Model id | -| fields | array |yes | Fields to be returned | -| start | int | no | Record start position | -| limit | int | no | Page size, maximum 500. | +| Field | Type | Required | Description | +| ---------- | ------ | -------- | -------------------------------- | +| bk_inst_id | int | Yes | Instance ID | +| bk_obj_id | string | Yes | Model ID | +| fields | array | Yes | Fields to be returned | +| start | int | No | Record start position | +| limit | int | No | Page size, maximum value is 500. | #### page -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| start | int | yes | Record start position| -| limit | int | yes | Limit bars per page, Max. 200| +| Field | Type | Required | Description | +| ----- | ---- | -------- | ------------------------------------------ | +| start | int | Yes | Record start position | +| limit | int | Yes | Number of records per page, maximum is 200 | - -### Request Parameters Example +### Request Parameter Example ```json { @@ -84,26 +83,27 @@ } ``` -### Return Result Parameters Description +### Return Result Parameter Explanation + #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------------ | -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failed error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain id | +| data | object | Request returned data | #### data -| Name | Type | Description | -| :-------------- | :----- | :----------------------- | -| id | int64 |Association id | -| bk_inst_id | int64 |Source model instance id | -| bk_obj_id | string |Association relationship source model id | -| bk_asst_inst_id | int64 |Association relation target model id | -| bk_asst_obj_id | string |Target model instance id | -| bk_obj_asst_id | string |Auto-generated model association id| -| bk_asst_id | string |Relationship name | \ No newline at end of file +| Field | Type | Description | +| :-------------- | :----- | :-------------------------------------------- | +| id | int64 | Relationship ID | +| bk_inst_id | int64 | Source model instance ID | +| bk_obj_id | string | Source model ID | +| bk_asst_inst_id | int64 | Target model instance ID | +| bk_asst_obj_id | string | Target model ID | +| bk_obj_asst_id | string | Automatically generated model relationship ID | +| bk_asst_id | string | Relationship name | \ No newline at end of file diff --git a/docs/apidoc/cc/en/search_subscription.md b/docs/apidoc/cc/en/search_subscription.md index cc9098bcfa..58070472df 100644 --- a/docs/apidoc/cc/en/search_subscription.md +++ b/docs/apidoc/cc/en/search_subscription.md @@ -1,4 +1,4 @@ -### Functional description +### Function Description Query event subscription @@ -8,26 +8,26 @@ Query event subscription #### Interface Parameters -| Field | Type | Required | Description | -|---------------------|------------|--------|-----------------------------| -| page | object | no | Paging parameter | -| condition | object | no | Query criteria | +| Field | Type | Required | Description | +| --------- | ------ | -------- | --------------------- | +| page | object | No | Pagination parameters | +| condition | object | No | Query conditions | #### page -| Field | Type | Required | Description | -|-----------|------------|--------|----------------------| -| start | int | yes | Record start position | -| limit | int | yes | Limit bars per page, Max. 200| -| sort | string | no | Sort field | +| Field | Type | Required | Description | +| ----- | ------ | -------- | ------------------------------------------ | +| start | int | Yes | Record start position | +| limit | int | Yes | Number of records per page, maximum is 200 | +| sort | string | No | Sorting field | #### condition -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| subscription_name |string | yes | This is sample data only and needs to be set as a field for the query| +| Field | Type | Required | Description | +| ----------------- | ------ | -------- | ------------------------------------------------------------ | +| subscription_name | string | Yes | Subscription name (this is just an example data, it should be set to the field to be queried) | -### Request Parameters Example +### Request Parameter Example ```python { @@ -81,36 +81,39 @@ Query event subscription } ``` -### Return Result Parameters Description +### Return Result Parameter Explanation + #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------------ | -| result | bool | Whether the request succeeded or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failed error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain id | +| data | object | Request returned data | #### data -| Field | Type | Description | -|-------|--------------|------------------| -| count | int | Number of records | -| info | array |Detailed list of event subscriptions| + +| Field | Type | Description | +| ----- | ----- | ----------------------------------- | +| count | int | Number of records | +| info | array | Details list of event subscriptions | #### info -| Field | Type | Description | -|----------------------|-----------|--------------------------------------------| -| subscription_id | int | Subscription ID | -| subscription_name | string | Subscription name | -| system_name | string | System name | -| callback_url | string | Callback address | -| confirm_mode | string | Callback success confirmation mode, optional: httpstatus,regular| -| confirm_pattern | string | Callback success flag | -| subscription_form | string | Subscriptions, separated by "," | -| timeout | int | Timeout in seconds | -| operator | int | The person who last updated this piece of data | -| last_time | int | Update time | -| statistics.total | int | Total push | -| statistics.failure | int | Number of push failures | \ No newline at end of file + +| Field | Type | Description | +| ------------------ | ------ | ------------------------------------------------------------ | +| subscription_id | int | Subscription ID | +| subscription_name | string | Subscription name | +| system_name | string | System name | +| callback_url | string | Callback URL | +| confirm_mode | string | Callback success confirmation mode, optional: httpstatus, regular | +| confirm_pattern | string | Callback success flag | +| subscription_form | string | Subscription form, separated by "," | +| timeout | int | Timeout, unit: seconds | +| operator | int | Last updated by | +| last_time | int | Update time | +| statistics.total | int | Total number of pushes | +| statistics.failure | int | Number of failed pushes | \ No newline at end of file diff --git a/docs/apidoc/cc/en/subscribe_event.md b/docs/apidoc/cc/en/subscribe_event.md index a6244e52ea..dce5c87018 100644 --- a/docs/apidoc/cc/en/subscribe_event.md +++ b/docs/apidoc/cc/en/subscribe_event.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Subscription event +Subscribe to events ### Request Parameters @@ -8,17 +8,17 @@ Subscription event #### Interface Parameters -| Field | Type | Required | Description | -|---------------------|------------|--------|--------------------------------------------------| -| subscription_name | string | yes | Name of subscription | -| system_name | string | yes | The name of the system to which the event is subscribed | -| callback_url | string | yes | Callback function | -| confirm_mode | string | yes | Event sending success verification mode, optional 1 HttpStatus, 2 regular| -| confirm_pattern | string | yes | HttpStatus or regular for callback | -| subscription_form | string | yes | Subscribed events, separated by commas | -| timeout | int | yes | Send event timeout | +| Field | Type | Required | Description | +| ----------------- | ------ | -------- | ------------------------------------------------------------ | +| subscription_name | string | Yes | Name of the subscription | +| system_name | string | Yes | Name of the system for subscribed events | +| callback_url | string | Yes | Callback function | +| confirm_mode | string | Yes | Event send success verification mode, optional: 1-httpstatus, 2-regular | +| confirm_pattern | string | Yes | callback's httpstatus or regular expression | +| subscription_form | string | Yes | Subscribed events, separated by commas | +| timeout | int | Yes | Timeout for sending events | -### Request Parameters Example +### Request Parameter Example ```python { @@ -39,7 +39,6 @@ Subscription event ### Return Result Example ```python - { "result": true, "code": 0, @@ -52,20 +51,21 @@ Subscription event } ``` -### Return Result Parameters Description +### Return Result Parameter Explanation + #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------------ | -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failed error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain id | +| data | object | Request returned data | #### data -| Field | Type | Description | -|-----------------|---------|------------------| -| subscription_id | int | Subscription ID for the new subscription| +| Field | Type | Description | +| --------------- | ---- | ------------------------------------------------ | +| subscription_id | int | Subscription ID for the newly added subscription | \ No newline at end of file diff --git a/docs/apidoc/cc/en/sync_service_template_to_service_instance.md b/docs/apidoc/cc/en/sync_service_template_to_service_instance.md index 82cb57917b..3b7440f176 100644 --- a/docs/apidoc/cc/en/sync_service_template_to_service_instance.md +++ b/docs/apidoc/cc/en/sync_service_template_to_service_instance.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Synchronize the service template information to the corresponding service instance(v3.12.3+, permission: service instance create, edit, and delete permission) +Synchronize service template information to the corresponding service instances (Version: v3.12.3+, Permission: Create, edit, delete permissions for service instances) ### Request Parameters @@ -8,13 +8,13 @@ Synchronize the service template information to the corresponding service instan #### Interface Parameters -| Field | Type | Required | Description | -|---------------------|-------|----------|------------------------------------------| -| bk_biz_id | int | yes | Business ID | -| service_template_id | int | yes | Service template ID | -| bk_module_ids | array | yes | ID list of the module to be synchronized | +| Field | Type | Required | Description | +| ------------------- | ----- | -------- | ------------------------------------- | +| bk_biz_id | int | Yes | Business ID | +| service_template_id | int | Yes | Service template ID | +| bk_module_ids | array | Yes | List of module IDs to be synchronized | -### Request Parameters Example +### Request Parameter Example ```json { @@ -43,15 +43,15 @@ Synchronize the service template information to the corresponding service instan } ``` -### Return Result Parameters Description +### Return Result Parameter Explanation #### response -| Name | Type | Description | -|------------|--------|-----------------------------------------------------------------------------------------| -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed | -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string | Error message returned by request failure | -| permission | object | Permission information | -| request_id | string | Request chain id | -| data | object | Data returned by request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failed error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain id | +| data | object | Request returned data | \ No newline at end of file diff --git a/docs/apidoc/cc/en/sync_set_template_to_set.md b/docs/apidoc/cc/en/sync_set_template_to_set.md index 6159e0c5a6..96bc0affab 100644 --- a/docs/apidoc/cc/en/sync_set_template_to_set.md +++ b/docs/apidoc/cc/en/sync_set_template_to_set.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Synchronize that set template unde the specified service to the set according to the service id, the clust template id and the set id list to be synchronized +Synchronize cluster templates to clusters based on business ID, cluster template ID, and a list of clusters to be synchronized (Permission: Cluster editing permission) ### Request Parameters @@ -8,14 +8,13 @@ Synchronize that set template unde the specified service to the set according to #### Interface Parameters -| Field | Type | Required| Description | -| -------------------- | ------ | ---- | ------------- | -| bk_biz_id | int | yes | Business ID | -| set_template_id | int | yes | Set template ID | -| bk_set_ids | array |yes | List of set IDs to be synchronized | +| Field | Type | Required | Description | +| --------------- | ----- | -------- | ----------------------------------- | +| bk_biz_id | int | Yes | Business ID | +| set_template_id | int | Yes | Cluster template ID | +| bk_set_ids | array | Yes | List of clusters to be synchronized | - -### Request Parameters Example +### Request Parameter Example ```json { @@ -43,15 +42,15 @@ Synchronize that set template unde the specified service to the set according to } ``` -### Return Result Parameters Description +### Return Result Parameter Explanation #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failed error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain id | +| data | object | Request returned data | \ No newline at end of file diff --git a/docs/apidoc/cc/en/transfer_host_across_biz.md b/docs/apidoc/cc/en/transfer_host_across_biz.md index 1c6050f401..916d3fc7ed 100644 --- a/docs/apidoc/cc/en/transfer_host_across_biz.md +++ b/docs/apidoc/cc/en/transfer_host_across_biz.md @@ -1,22 +1,23 @@ -### Functional description +### Function Description -transfer hosts from one business to another business. can only transfer hosts between resource sets(v3.10.27+, permissions: host transferred to other business) +Transfer hosts across businesses. You can only transfer hosts from the source business's idle host pool cluster to the target business's idle host pool cluster (Version: v3.10.27+, Permission: Transfer hosts to another business) ### Request Parameters -#### General Parameters +#### Common Parameters + {{ common_args_desc }} #### Interface Parameters -| Field | Type | Required | Description | -| ------------- | ----- | -------- | ------------------------------------------------- | -| src_bk_biz_id | int | Yes | the source business id these hosts belongs to | -| bk_host_id | array | Yes | to be transfered hosts id list, max length is 500 | -| dst_bk_biz_id | int | Yes | the target business id | -| bk_module_id | int | Yes | the target module id,must be one of idle set's module | +| Field | Type | Required | Description | +| ------------- | ----- | -------- | ------------------------------------------------------------ | +| src_bk_biz_id | int | Yes | The business ID to which the hosts to be transferred belong | +| bk_host_id | array | Yes | List of host IDs to be transferred, with a maximum length of 500 | +| dst_bk_biz_id | int | Yes | The business ID to which the hosts will be transferred | +| bk_module_id | int | Yes | The module ID to which the hosts will be transferred. This module ID must be under the idle host pool set. | -### Request Parameters Example +### Request Parameter Example ```json { @@ -46,14 +47,15 @@ transfer hosts from one business to another business. can only transfer hosts be } ``` -### Return result parameter description +### Return Result Parameter Explanation + #### response -| name | type | description | -| ------- | ------ | ------------------------------------- | -| result | bool | The success or failure of the request. true: the request was successful; false: the request failed.| -| code | int | The error code. 0 means success, >0 means failure error.| -| message | string | The error message returned by the failed request.| -| permission | object | Permission information | -| request_id | string | request_chain_id | -| data | object | data returned by the request| +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failed error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain id | +| data | object | Request returned data | \ No newline at end of file diff --git a/docs/apidoc/cc/en/transfer_host_to_recyclemodule.md b/docs/apidoc/cc/en/transfer_host_to_recyclemodule.md index 9212083cbe..f4c334572d 100644 --- a/docs/apidoc/cc/en/transfer_host_to_recyclemodule.md +++ b/docs/apidoc/cc/en/transfer_host_to_recyclemodule.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Submit to the host to the module to be recovered of the service +Submit hosts to the business's pending recycle module (Permission: Service Instance Edit Permission) ### Request Parameters @@ -8,14 +8,14 @@ Submit to the host to the module to be recovered of the service #### Interface Parameters -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_biz_id | int | yes | Business ID | -| bk_set_id | int | And bk_module_id at least | Set ID | -| bk_module_id | int | And bk_set_id fill in at least one | Module ID | -| bk_host_id | array | yes | Host ID| +| Field | Type | Required | Description | +| ------------ | ----- | --------------------------------------------------------- | ----------- | +| bk_biz_id | int | Yes | Business ID | +| bk_set_id | int | At least one of bk_set_id and bk_module_id must be filled | Cluster ID | +| bk_module_id | int | At least one of bk_set_id and bk_module_id must be filled | Module ID | +| bk_host_id | array | Yes | Host ID | -### Request Parameters Example +### Request Parameter Example ```python { @@ -36,7 +36,6 @@ Submit to the host to the module to be recovered of the service ### Return Result Example ```python - { "result": true, "code": 0, @@ -46,15 +45,16 @@ Submit to the host to the module to be recovered of the service "data": null } ``` -### Return Result Parameters Description + +### Return Result Parameter Explanation #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | \ No newline at end of file +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failed error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain id | +| data | object | Request returned data | \ No newline at end of file diff --git a/docs/apidoc/cc/en/transfer_sethost_to_idle_module.md b/docs/apidoc/cc/en/transfer_sethost_to_idle_module.md index 238a0c8063..b353508a0c 100644 --- a/docs/apidoc/cc/en/transfer_sethost_to_idle_module.md +++ b/docs/apidoc/cc/en/transfer_sethost_to_idle_module.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -According to the service id, the set id and the module id, the host computer under the designated service set module is uploaded to the idle machine module of the service +Transfer hosts to the business's idle module under the specified business cluster and module (Permission: Service Instance Edit Permission) ### Request Parameters @@ -8,14 +8,13 @@ According to the service id, the set id and the module id, the host computer und #### Interface Parameters -| Field | Type | Required | Description | -|---------------|------------|----------|----------| -| bk_biz_id | int | yes | Business ID | -| bk_set_id | int | yes | Set id | -| bk_module_id | int | yes | Module id | +| Field | Type | Required | Description | +| ------------ | ---- | -------- | ----------- | +| bk_biz_id | int | Yes | Business ID | +| bk_set_id | int | Yes | Cluster ID | +| bk_module_id | int | Yes | Module ID | - -### Request Parameters Example +### Request Parameter Example ```python { @@ -32,26 +31,25 @@ According to the service id, the set id and the module id, the host computer und ### Return Result Example ```python - { "result": true, "code": 0, - "message": "", + "message": "success", "permission": null, "request_id": "e43da4ef221746868dc4c837d36f3807", - "data": "sucess" + "data": null } ``` -### Return Result Parameters Description +### Return Result Parameter Explanation #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failed error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain id | +| data | object | Request returned data | \ No newline at end of file diff --git a/docs/apidoc/cc/en/unbind_host_agent.md b/docs/apidoc/cc/en/unbind_host_agent.md index 84705a6eb0..3db405ee7f 100644 --- a/docs/apidoc/cc/en/unbind_host_agent.md +++ b/docs/apidoc/cc/en/unbind_host_agent.md @@ -1,25 +1,25 @@ -### Functional description +### Function Description -Unbind agent to host (v3.10.25+). +Unbind agent from host (Version: v3.10.25+, Permission: Host AgentID Management Permission) ### Request Parameters {{ common_args_desc }} -#### Interface Parameters +### Request Parameters -| Field | Type | Required | Description | -| ----- | ------------ | -------- | ------------------------------------------------------------- | -| list | object array | yes | list of host IDs and agent IDs to bind, maximum length is 200 | +| Field | Type | Required | Description | +| ----- | ----- | -------- | ---------------------------------------------------- | +| list | array | Yes | List of host IDs and agent IDs to unbind (up to 200) | -#### list +### list -| Field | Type | Required | Description | -| ----------- | ------ | -------- | --------------------- | -| bk_host_id | int | yes | host ID to bind agent | -| bk_agent_id | string | yes | agent ID to bind host | +| Field | Type | Required | Description | +| ----------- | ------ | -------- | ------------------------------ | +| bk_host_id | int | Yes | Host ID of the agent to unbind | +| bk_agent_id | string | Yes | Agent ID to unbind | -### Request Parameters Example +### Request Parameter Example ```json { @@ -52,13 +52,14 @@ Unbind agent to host (v3.10.25+). } ``` +### Return Result Parameter Explanation + #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| data | object |Data returned by request | -| permission | object |Permission information | -| request_id | string |Request chain id | \ No newline at end of file +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failed error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain id | \ No newline at end of file diff --git a/docs/apidoc/cc/en/unsubcribe_event.md b/docs/apidoc/cc/en/unsubcribe_event.md index f767091f0b..1434609aa9 100644 --- a/docs/apidoc/cc/en/unsubcribe_event.md +++ b/docs/apidoc/cc/en/unsubcribe_event.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Unsubscribe event +Unsubscribe from an event ### Request Parameters @@ -8,11 +8,11 @@ Unsubscribe event #### Interface Parameters -| Field | Type | Required | Description | -|--------------------|------------|--------|------------| -|subscription_id | int | yes | Subscription ID | +| Field | Type | Required | Description | +| --------------- | ---- | -------- | --------------- | +| subscription_id | int | Yes | Subscription ID | -### Request Parameters Example +### Request Parameter Example ```python { @@ -20,33 +20,32 @@ Unsubscribe event "bk_app_secret": "xxx", "bk_username": "xxx", "bk_token": "xxx", - "subscription_id":1 + "subscription_id": 1 } ``` ### Return Result Example ```python - { "result": true, "code": 0, "message": "", "permission": null, "request_id": "e43da4ef221746868dc4c837d36f3807", - "data":"success" + "data": "success" } ``` -### Return Result Parameters Description +### Return Result Parameter Explanation #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failed error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain id | +| data | object | Data returned by the request | \ No newline at end of file diff --git a/docs/apidoc/cc/en/update_biz_custom_field.md b/docs/apidoc/cc/en/update_biz_custom_field.md index ff6445ead0..cdbd5a2c11 100644 --- a/docs/apidoc/cc/en/update_biz_custom_field.md +++ b/docs/apidoc/cc/en/update_biz_custom_field.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Update business custom model properties +Update custom model attributes for a business (Permission: Business custom field editing permission) ### Request Parameters @@ -8,40 +8,24 @@ Update business custom model properties #### Interface Parameters -| Field | Type | Required | Description | -|---------------------|---------|--------|-----------------------------------------| -| id | int | yes | Record ID of the target data | -| bk_biz_id | int | yes | Business ID | -| description | string |no | Description information of data | -| isonly | bool | no | Show uniqueness | -| isreadonly | bool | no | Indicates whether it is read-only | -| isrequired | bool | no | Indicates whether it is required | -| bk_property_group | string |no | Name of the field column | -| option | object |no | User-defined content, stored content and format determined by the caller, take digital content as an example ({"min": 1,"max":2})| -| bk_property_name | string |no | Model property name, used to show | -| bk_property_type | string |no | The data type of the defined attribute field used to store the data (singlechar,longchar,int,enum,date,time,objUser,singleasst,multiasst,timezone,bool)| -| unit | string |no | Unit | -| placeholder | string |no | Placeholder | -| bk_asst_obj_id | string |no | This field must be set if there are other models associated with it, otherwise it is not required| - -#### bk_property_type - -| Identification | Name | -|------------|----------| -| singlechar |Short character | -| longchar | Long character | -| int | Reshaping | -| enum | Enumeration type| -| date | Date | -| time | Time | -| objuser | User | -| singleasst |Simple correlation | -| multiasst |Multiple correlation | -| timezone | Time zone | -| bool | Bull | - - -### Request Parameters Example +| Field | Type | Required | Description | +| ----------------- | --------------------------------------------------- | -------- | ------------------------------------------------------------ | +| id | int | Yes | Record ID of the target data | +| bk_biz_id | int | Yes | Business ID | +| description | string | No | Description of the data | +| isonly | bool | No | Indicates uniqueness | +| isreadonly | bool | No | Indicates if it is read-only | +| isrequired | bool | No | Indicates if it is required | +| bk_property_group | string | No | Name of the field column | +| option | object | No | User-defined content, the format and content are determined by the caller, using numeric content as an example (`{"min":1,"max":2}`) | +| bk_property_name | string | No | Model attribute name for display | +| unit | string | No | Unit | +| bk_property_type | string | Yes | Defined property field for storing data types (`singlechar(short string),longchar(long string),int(integer),enum(enum type),date(date),time(time),objuser(user),enummulti(multi-select enum),enumquote(enum reference),timezone(timezone),bool(boolean),organization(organization)`) | +| placeholder | string | No | Placeholder | +| bk_asst_obj_id | string | No | If there is a relationship with other models, then this field must be set; otherwise, it does not need to be set | +| default | Depends on the type specified by `bk_property_type` | No | Default value | + +### Request Parameter Example ```json { @@ -50,19 +34,19 @@ Update business custom model properties "bk_app_secret": "xxx", "bk_username": "xxx", "bk_token": "xxx", - "id":1, + "id": 1, "bk_biz_id": 2, - "description":"test", - "placeholder":"test", - "unit":"1", - "isonly":false, - "isreadonly":false, - "isrequired":false, - "bk_property_group":"default", - "option":{"min":1,"max":4}, - "bk_property_name":"aaa", - "bk_property_type":"int", - "bk_asst_obj_id":"0" + "description": "test", + "placeholder": "test", + "unit": "1", + "isonly": false, + "isreadonly": false, + "isrequired": false, + "bk_property_group": "default", + "option": {"min":1,"max":4}, + "bk_property_name": "aaa", + "bk_property_type": "int", + "bk_asst_obj_id": "0" } ``` @@ -79,15 +63,15 @@ Update business custom model properties } ``` -### Return Result Parameters Description +### Return Result Parameter Explanation #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failed error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain id | +| data | object | Data returned by the request | \ No newline at end of file diff --git a/docs/apidoc/cc/en/update_business_enable_status.md b/docs/apidoc/cc/en/update_business_enable_status.md index c1498e98cc..c6185f87eb 100644 --- a/docs/apidoc/cc/en/update_business_enable_status.md +++ b/docs/apidoc/cc/en/update_business_enable_status.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Modify business enabling status according to business id and status value +Modify the business enable status based on the business ID and status value (Permission: Business archive permission) ### Request Parameters @@ -8,12 +8,12 @@ Modify business enabling status according to business id and status value #### Interface Parameters -| Field | Type | Required | Description | -|---------------------|------------|--------|------------| -| bk_biz_id | int | yes | Business ID | -| flag | string | yes | Enabled status, disabled or enable| +| Field | Type | Required | Description | +| --------- | ------ | -------- | -------------------------------------------- | +| bk_biz_id | int | Yes | Business ID | +| flag | string | Yes | Enable status, either "disabled" or "enable" | -### Request Parameters Example +### Request Parameter Example ```python { @@ -29,25 +29,25 @@ Modify business enabling status according to business id and status value ### Return Result Example ```python - { "result": true, "code": 0, - "message": "", + "message": "success", "permission": null, "request_id": "e43da4ef221746868dc4c837d36f3807", "data": "success" } ``` -### Return Result Parameters Description + +### Return Result Parameter Explanation #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request succeeded or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | \ No newline at end of file +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failed error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain id | +| data | object | Data returned by the request | \ No newline at end of file diff --git a/docs/apidoc/cc/en/update_classification.md b/docs/apidoc/cc/en/update_classification.md index fb5574536c..c422a7037a 100644 --- a/docs/apidoc/cc/en/update_classification.md +++ b/docs/apidoc/cc/en/update_classification.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Update model classification +Update model classification (Permission: Model group editing permission) ### Request Parameters @@ -8,16 +8,13 @@ Update model classification #### Interface Parameters -| Field | Type | Required | Description | -|------------------------|----------|--------|--------------------------------------------| -| id | int | no | Record ID of the target data as a condition for the update operation | -| bk_classification_name | string | no | Class name| -| bk_classification_icon | string | no | Icon of model classification, value can be referred to, value can be referred to [(classIcon.json)](resource_define/classIcon.json)| +| Field | Type | Required | Description | +| ---------------------- | ------ | -------- | ------------------------------------------------------------ | +| id | int | No | The record ID of the target data, used as a condition for the update operation | +| bk_classification_name | string | No | Classification name | +| bk_classification_icon | string | No | Model classification icon, the value can refer to [(classIcon.json)](https://chat.openai.com/c/resource_define/classIcon.json) | - - - -### Request Parameters Example +### Request Parameter Example ```python { @@ -34,7 +31,6 @@ Update model classification ### Return Result Example ```python - { "result": true, "code": 0, @@ -45,15 +41,15 @@ Update model classification } ``` -### Return Result Parameters Description +### Return Result Parameter Explanation #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failed error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain id | +| data | object | Data returned by the request | \ No newline at end of file diff --git a/docs/apidoc/cc/en/update_cloud_area.md b/docs/apidoc/cc/en/update_cloud_area.md index 7fc35b9264..bd31eb41c6 100644 --- a/docs/apidoc/cc/en/update_cloud_area.md +++ b/docs/apidoc/cc/en/update_cloud_area.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Update cloud area +Update control area (Permission: Control area editing permission) ### Request Parameters @@ -8,49 +8,46 @@ Update cloud area #### Interface Parameters -| Field | Type | Required | Description | -|----------------------|------------|--------|-------------| -| bk_cloud_id | int | yes | Cloud area ID | +| Field | Type | Required | Description | +| ------------- | ------ | -------- | ----------------- | +| bk_cloud_id | int | Yes | Control area ID | +| bk_cloud_name | string | No | Control area name | +### Request Parameter Example -### Request Parameters Example - -``` json +```json { "bk_app_code": "esb_test", "bk_app_secret": "xxx", "bk_username": "xxx", "bk_token": "xxx", "bk_cloud_id": 5, - "bk_cloud_name": "Cloud area 1" + "bk_cloud_name": "Control Area 1" } - ``` ### Return Result Example - ```json { "result": true, "code": 0, - "message": "", + "message": "success", "permission": null, "request_id": "e43da4ef221746868dc4c837d36f3807", "data": "success" } - ``` -### Return Result Parameters Description +### Return Result Parameter Explanation #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failed error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain id | +| data | object | Data returned by the request | \ No newline at end of file diff --git a/docs/apidoc/cc/en/update_dynamic_group.md b/docs/apidoc/cc/en/update_dynamic_group.md index 9880e9caec..43042333eb 100644 --- a/docs/apidoc/cc/en/update_dynamic_group.md +++ b/docs/apidoc/cc/en/update_dynamic_group.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Update dynamic grouping (V3.9.6) +Update dynamic group (Version: v3.9.6, Permission: Dynamic group editing permission) ### Request Parameters @@ -8,30 +8,30 @@ Update dynamic grouping (V3.9.6) #### Interface Parameters -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_biz_id | int | yes | Business ID | -| id | string |yes | Primary key ID| -| bk_obj_id | string |no | The target resource object type of dynamic grouping can be host, set at present. When updating rules, both this field and info field shall be provided.| -| info | object |no | General query criteria| -| name | string |no | Dynamic group name| +| Field | Type | Required | Description | +| --------- | ------ | -------- | ------------------------------------------------------------ | +| bk_biz_id | int | Yes | Business ID | +| id | string | Yes | Primary key ID | +| bk_obj_id | string | No | Target resource object type of dynamic group, can be host, set. When updating rules, both this field and the info field must be provided | +| info | object | No | General query conditions | +| name | string | No | Dynamic group name | #### info.condition -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_obj_id | string | yes | Conditional object resource type, info.conditon supported for dynamic grouping of host type: set,module,host; Info.conditions supported for dynamic grouping of type set: set| -| condition | array | yes | Query criteria| +| Field | Type | Required | Description | +| --------- | ------ | -------- | ------------------------------------------------------------ | +| bk_obj_id | string | Yes | Type of condition object resource, host type dynamic group supports info.conditon:set,module,host; set type dynamic group supports info.condition:set | +| condition | array | Yes | Query condition | #### info.condition.condition -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| field | string | yes | The fields of the object| -| operator | string | yes | Operator with op values eq(equal)/ne(unequal)/in(of)/nin(not of)| -| value | object | yes | The value corresponding to the field| +| Field | Type | Required | Description | +| -------- | ------ | -------- | ------------------------------------------------------------ | +| field | string | Yes | Object field | +| operator | string | Yes | Operator, op value can be eq (equal) / ne (not equal) / in (belongs to) / nin (does not belong to) | +| value | object | Yes | Field corresponding value | -### Request Parameters Example +### Request Parameter Example ```json { @@ -93,15 +93,15 @@ Update dynamic grouping (V3.9.6) } ``` -### Return Result Parameters Description +### Return Result Parameter Explanation #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request succeeded or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failed error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain id | +| data | object | Data returned by the request | \ No newline at end of file diff --git a/docs/apidoc/cc/en/update_event_subscribe.md b/docs/apidoc/cc/en/update_event_subscribe.md index 0b2400aa38..08fea0a4bd 100644 --- a/docs/apidoc/cc/en/update_event_subscribe.md +++ b/docs/apidoc/cc/en/update_event_subscribe.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Modify Subscription +Modify subscription ### Request Parameters @@ -8,20 +8,19 @@ Modify Subscription #### Interface Parameters -| Field | Type | Required | Description | -|------------------------|----------|--------|--------------------------------------------------| -| bk_supplier_account | string | yes | Developer account number | -| subscription_id | int | yes | Subscription ID | -| subscription_name | string | yes | The name of the subscription | -| system_name | string | yes | The name of the system to which the event is subscribed | -| callback_url | string | yes | Callback function | -| confirm_mode | string | yes | Event sending success verification mode, optional 1 HttpStatus, 2 regular| -| confirm_pattern | string | yes | HttpStatus or regular for callback | -| subscription_form | string | yes | Subscribed events, separated by commas | -| timeout | int | yes | Send event timeout | +| Field | Type | Required | Description | +| ------------------- | ------ | -------- | ------------------------------------------------------------ | +| bk_supplier_account | string | Yes | Developer account | +| subscription_id | int | Yes | Subscription ID | +| subscription_name | string | Yes | Name of the subscription | +| system_name | string | Yes | Name of the system for subscription events | +| callback_url | string | Yes | Callback function | +| confirm_mode | string | Yes | Event sending success verification mode, optional 1-httpstatus,2-regular | +| confirm_pattern | string | Yes | Callback httpstatus or regular expression | +| subscription_form | string | Yes | Events for subscription, separated by commas | +| timeout | int | Yes | Timeout for sending events | - -### Request Parameters Example +### Request Parameter Example ```python { @@ -44,7 +43,6 @@ Modify Subscription ### Return Result Example ```python - { "result": true, "code": 0, @@ -55,15 +53,15 @@ Modify Subscription } ``` -### Return Result Parameters Description +### Return Result Parameter Explanation #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request succeeded or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request is successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failed error | +| message | string | Error message returned in case of failure | +| permission | object | Permission information | +| request_id | string | Request chain id | +| data | object | Data returned by the request | \ No newline at end of file diff --git a/docs/apidoc/cc/en/update_host_cloud_area_field.md b/docs/apidoc/cc/en/update_host_cloud_area_field.md index 8e763d5385..a245aee5fe 100644 --- a/docs/apidoc/cc/en/update_host_cloud_area_field.md +++ b/docs/apidoc/cc/en/update_host_cloud_area_field.md @@ -70,7 +70,7 @@ Update the host's cloud area field based on the host id list and cloud area i #### response -| Name | Type | Description | +| Field | Type | Description | | ------- | ------ | ------------------------------------- | | result | bool | Whether the request was successful or not. True: request succeeded;false request failed| | code | int | Wrong code. 0 indicates success,>0 indicates failure error | diff --git a/docs/apidoc/cc/en/update_inst.md b/docs/apidoc/cc/en/update_inst.md index 1f6c10c38f..a2fe106d07 100644 --- a/docs/apidoc/cc/en/update_inst.md +++ b/docs/apidoc/cc/en/update_inst.md @@ -1,8 +1,8 @@ -### Functional description +### Function Description -Update object instance +Update Object Instance (Permission: Model Instance Editing Permission) -- This interface is only applicable to user-defined hierarchical model and general model instances, not applicable to model instances such as business, set, module, host, etc +- This interface is only applicable to custom hierarchical models and general model instances, not applicable to model instances such as business, cluster, module, host, etc. ### Request Parameters @@ -10,21 +10,16 @@ Update object instance #### Interface Parameters -| Field | Type | Required | Description | -|---------------------|------------|--------|----------------------------------| -| bk_obj_id | string | yes | Model ID | -| bk_inst_id | int | yes | Instance ID| -| bk_inst_name | string | no | Instance name, or any other custom field | -| bk_biz_id | int | no | Business ID, which must be transferred when deleting a user-defined mainline level model instance| +| Field | Type | Required | Description | +| ------------ | ------ | -------- | ------------------------------------------------------------ | +| bk_obj_id | string | Yes | Model ID | +| bk_inst_id | int | Yes | Instance ID | +| bk_inst_name | string | No | Instance name, can also be other custom fields | +| bk_biz_id | int | No | Business ID, required when deleting custom mainline hierarchical model instances | - Note: If the operation is a user-defined mainline hierarchy model instance and permission Center is used, for the version with CMDB less than 3.9, the metadata parameter containing the service id of the instance needs to be transferred. Otherwise, the permission Center authentication will fail. The format is -"metadata": { - "label": { - "bk_biz_id": "64" - } -} +Note: When operating on custom mainline hierarchical model instances, and if using Permission Center, for CMDB versions less than 3.9, the metadata parameter containing the business id of the instance must be passed, otherwise it will result in Permission Center authentication failure. The format is "metadata": { "label": { "bk_biz_id": "64" } } -### Request Parameters Example (generic example) +### Request Parameters Example (Generic Instance Example) ```json { @@ -39,29 +34,28 @@ Update object instance } ``` -### Return Result Example +### Response Example ```json - { "result": true, "code": 0, - "message": "", + "message": "success", "permission": null, "request_id": "e43da4ef221746868dc4c837d36f3807", - "data": "success" + "data": null } ``` -### Return Result Parameters Description +### Response Parameters Description #### response -| Name| Type| Description| -|---|---|---| -| result | bool |Whether the request was successful or not. True: request succeeded;false request failed| -| code | int |Wrong code. 0 indicates success,>0 indicates failure error| -| message | string |Error message returned by request failure| -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |No data return| +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request was successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failure | +| message | string | Error message returned in case of request failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | No data returned | \ No newline at end of file diff --git a/docs/apidoc/cc/en/update_kube_cluster_type.md b/docs/apidoc/cc/en/update_kube_cluster_type.md index 787e126ea8..1562ad2364 100644 --- a/docs/apidoc/cc/en/update_kube_cluster_type.md +++ b/docs/apidoc/cc/en/update_kube_cluster_type.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -update container cluster type (v3.12.1+, permission: kube cluster editing permissions) +Update Container Cluster Type (v3.12.1+, Permission: Container Cluster Editing Permission) ### Request Parameters @@ -8,11 +8,11 @@ update container cluster type (v3.12.1+, permission: kube cluster editing permis #### Interface Parameters -| Field | Type | Required | Description | -|-----------|--------|----------|--------------------------------------------------------| -| bk_biz_id | int | yes | business ID | -| id | int | yes | unique ID of the cluster in cmdb | -| type | string | yes | cluster type. enum: INDEPENDENT_CLUSTER, SHARE_CLUSTER | +| Field | Type | Required | Description | +| --------- | ------ | -------- | ------------------------------------------------------------ | +| bk_biz_id | int | Yes | Business ID | +| id | int | Yes | Unique ID list of clusters in CMDB | +| type | string | Yes | Cluster type. Enumerated values: INDEPENDENT_CLUSTER (Independent Cluster), SHARE_CLUSTER (Shared Cluster) | ### Request Parameters Example @@ -28,10 +28,10 @@ update container cluster type (v3.12.1+, permission: kube cluster editing permis } ``` -### Return Result Example +### Response Example ```json - { +{ "result": true, "code": 0, "message": "success", @@ -41,15 +41,13 @@ update container cluster type (v3.12.1+, permission: kube cluster editing permis } ``` -### Return Result Parameters Description - -#### response +### Response Parameters Description -| Name | Type | Description | -|------------|--------|-----------------------------------------------------------------------------------------| -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed | -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string | Error message returned by request failure | -| permission | object | Permission information | -| request_id | string | Request chain id | -| data | object | Data returned by request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request was successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failure | +| message | string | Error message returned in case of request failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | No data returned | \ No newline at end of file diff --git a/docs/apidoc/cc/en/update_object.md b/docs/apidoc/cc/en/update_object.md index 79c0ea13b4..e584ff1d04 100644 --- a/docs/apidoc/cc/en/update_object.md +++ b/docs/apidoc/cc/en/update_object.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Update model definition +Update Model Definition (Permission: Model Editing Permission) ### Request Parameters @@ -8,16 +8,15 @@ Update model definition #### Interface Parameters -| Field | Type | Required | Description | -|---------------------|--------------------|--------|-----------------------------------------| -| id | int | no | The ID of the object model as a condition for the update operation | -| modifier | string | no | The last person to modify this piece of data | -| bk_classification_id| string | yes | The classification ID of the object model, which can only be named by English letter sequence| -| bk_obj_name | string | no | The name of the object model | -| bk_obj_icon | string | no | ICON information of object model, used for front-end display, value can be referred to [(modleIcon.json)](/static/esb/api_docs/res/cc/modleIcon.json)| -| position | json object string |no | Coordinates for front-end presentation | - - +| Field | Type | Required | Description | +| -------------------- | ------------------ | -------- | ------------------------------------------------------------ | +| id | int | No | ID of the object model, used as a condition for the update operation | +| modifier | string | No | Last modifier of this data | +| bk_classification_id | string | Yes | Classification ID of the object model, can only be named with an alphabetical sequence | +| bk_obj_name | string | No | Name of the object model | +| bk_obj_icon | string | No | ICON information of the object model, used for frontend display, values can be referred to [(modleIcon.json)](https://chat.openai.com/static/esb/api_docs/res/cc/modleIcon.json) | +| position | json object string | No | Coordinates for frontend display | +| obj_sort_number | int | No | Sorting number of the object model under its model group; when updating this value, if the set value exceeds the maximum value of this value in the group model, the updated value will be the maximum value plus one. For example, if the set value is 999, and the current maximum value of this value in the group model is 6, then the updated value will be set to 7 | ### Request Parameters Example @@ -32,33 +31,33 @@ Update model definition "bk_classification_id": "cc_test", "bk_obj_name": "cc2_test_inst", "bk_obj_icon": "icon-cc-business", - "position":"{\"ff\":{\"x\":-863,\"y\":1}}" + "position":"{\"ff\":{\"x\":-863,\"y\":1}}", + "obj_sort_number": 1 } ``` -### Return Result Example +### Response Example ```python - { "result": true, "code": 0, - "message": "", + "message": "success", "permission": null, "request_id": "e43da4ef221746868dc4c837d36f3807", - "data": "success" + "data": null } ``` -### Return Result Parameters Description +### Response Parameters Description #### response -| Name| Type| Description| -|---|---|---| -| result | bool |Whether the request was successful or not. True: request succeeded;false request failed| -| code | int |Wrong code. 0 indicates success,>0 indicates failure error| -| message | string |Error message returned by request failure| -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |No data return| +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request was successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failure | +| message | string | Error message returned in case of request failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | No data returned | \ No newline at end of file diff --git a/docs/apidoc/cc/en/update_object_attribute.md b/docs/apidoc/cc/en/update_object_attribute.md index b02a8f42fe..80cf61b3fc 100644 --- a/docs/apidoc/cc/en/update_object_attribute.md +++ b/docs/apidoc/cc/en/update_object_attribute.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Update object model properties +Update Object Model Property (Permission: Model Editing Permission) ### Request Parameters @@ -8,38 +8,21 @@ Update object model properties #### Interface Parameters -| Field | Type | Required | Description | -|---------------------|---------|--------|-----------------------------------------| -| id | int | yes | Record ID of the target data | -| description | string |no | Description information of data | -| isonly | bool | no | Show uniqueness | -| isreadonly | bool | no | Indicates whether it is read-only | -| isrequired | bool | no | Indicates whether it is required | -| bk_property_group | string |no | Name of the field column | -| option | string |no | User-defined content, stored content and format determined by the caller, take digital content as an example ({"min":"1","max":"2"})| -| bk_property_name | string |no | Model property name, used to show | -| bk_property_type | string |no | The data type of the defined attribute field used to store the data (singlechar,longchar,int,enum,date,time,objUser,singleasst,multiasst,timezone,bool)| -| unit | string |no | Unit | -| placeholder | string |no | Placeholder | -| ismultiple | bool |no | Whether multiple choices are allowed, where the field type is singlechar, longchar, int, float, enum, date, time, timezone, bool, and the list, temporarily does not support multiple choices. When creating an attribute, the field type is the above type, and the ismultiple parameter can not be passed. The default is false. If you pass true, you will be prompted that the type does not support multiple choices. enummulti, enumquote , user and organization fields support multiple choices, among which the user field and organization field are true by default | -| default | object |no | Add a default value to the attribute. When updating, the default value is passed according to the actual type of the field. If you want to set the default value of the empty field, you need to pass default: null | - -#### bk_property_type - -| Identification | Name | -|------------|----------| -| singlechar |Short character | -| longchar | Long character | -| int | Reshaping | -| enum | Enumeration type| -| date | Date | -| time | Time | -| objuser | User | -| enummulti |Enumerate multiple | -| enumquote |Enumeration References | -| timezone | Time zone | -| bool | Bull | -| organization | Organization | +| Field | Type | Required | Description | +| ----------------- | ------ | -------- | ------------------------------------------------------------ | +| id | int | Yes | Record ID of the target data | +| description | string | No | Description information of the data | +| isonly | bool | No | Indicates uniqueness | +| isreadonly | bool | No | Indicates whether it is read-only | +| isrequired | bool | No | Indicates whether it is required | +| bk_property_group | string | No | Name of the field column | +| option | string | No | User-defined content, the content and format stored are determined by the caller. For example, using numeric content ({"min":"1","max":"2"}) | +| bk_property_name | string | No | Model property name, used for display | +| unit | string | No | Unit | +| bk_property_type | string | Yes | Defined property field for storing data type (singlechar (short character), longchar (long character), int (integer), enum (enumeration type), date (date), time (time), objuser (user), enummulti (enumeration multiple), enumquote (enumeration reference), timezone (time zone), bool (boolean), organization (organization)) | +| placeholder | string | No | Placeholder | +| ismultiple | bool | No | Whether it can be selected multiple times. For field types such as short character, long character, number, floating point, enumeration, date, time, time zone, boolean, multiple selection is not supported temporarily. When updating the property, if the field type is one of the above types, ismultiple cannot be updated to true. If updated to true, it will prompt that this type does not support multiple selection temporarily. Enumeration multiple selection, enumeration reference, user, organization fields support multiple selection. | +| default | object | No | Add a default value to the attribute. When updating, the value of default is passed according to the actual type of the field. If you want to clear the default value of the field, you need to pass default: null | ### Request Parameters Example @@ -67,7 +50,7 @@ Update Default Value Scenario } ``` -Do not update default value scenarios +Do Not Update Default Value Scenario ```python { @@ -90,7 +73,7 @@ Do not update default value scenarios } ``` -Empty default value scenario +Clear Default Value Scenario ```python { @@ -114,30 +97,28 @@ Empty default value scenario } ``` - - -### Return Result Example +### Response Example ```python - { "result": true, "code": 0, - "message": "", + "message": "success", "permission": null, "request_id": "e43da4ef221746868dc4c837d36f3807", - "data": "success" + "data": null } ``` -### Return Result Parameters Description + +### Response Parameters Description #### response -| Name| Type| Description| -|---|---|---| -| result | bool |Whether the request succeeded or not. True: request succeeded;false request failed| -| code | int |Wrong code. 0 indicates success,>0 indicates failure error| -| message | string |Error message returned by request failure| -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |No data return| +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request was successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failure | +| message | string | Error message returned in case of request failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | No data returned | \ No newline at end of file diff --git a/docs/apidoc/cc/en/update_proc_template.md b/docs/apidoc/cc/en/update_proc_template.md index 0e69f11c21..136f555525 100644 --- a/docs/apidoc/cc/en/update_proc_template.md +++ b/docs/apidoc/cc/en/update_proc_template.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Update process template information +Update Process Template Information (Permission: Service Template Editing Permission) ### Request Parameters @@ -8,65 +8,54 @@ Update process template information #### Interface Parameters -| Field | Type | Required | Description | -|----------------------|------------|--------|-----------------------| -| process_template_id | int |yes | Process template ID| -| process_property | object |yes | Process template field information to update| +| Field | Type | Required | Description | +| ------------------- | ------ | -------- | ------------------------------------------------------------ | +| process_template_id | int | Yes | Process template ID | +| process_property | object | Yes | Information of fields in the process template that need to be updated | -#### The fields where process_property can appear +#### Fields that can appear in process_property Note: -as_default_value: Is the value of the process based on the template -Value: the value of the process. Different field types are different +as_default_value: Whether the value of the process is based on the template value: The value of the process, different field types have different types -| Field | Type | Required | Description | -|----------------------|------------|--------|-----------------------| -|proc_num| object| no |{"value": null, "as_default_value": False}, value type is numeric| -|stop_cmd| object| no |{"value": "","as_default_value": False}, the value type is a string| -|restart_cmd| object| no |{"value": "","as_default_value": False}, the value type is a string| -|face_stop_cmd| object| no |{"value": "","as_default_value": False}, the value type is a string| -|bk_func_name| object| no |{"value": "a7","as_default_value": True}}, value type is string| -|work_path| object| no |{"value": "","as_default_value": False}, the value type is a string| -|priority| object| no |{"value": null,"as_default_value": False}, value type is numeric| -|reload_cmd| object| no |{"value": "","as_default_value": False}, the value type is a string| -|bk_process_name| object| no |{"value": "a7","as_default_value": True}}, value type is string| -|pid_file| object| no |{"value": "","as_default_value": False}, value type is a string| -|auto_start| object| no |{"value": null,"as_default_value": Null}}, value type is boolean| -|auto_time_gap| object| no |{"value": null,"as_default_value": False}, value type is numeric| -|start_cmd| object| no |{"value": "","as_default_value": False}, the value type is a string| -|bk_func_id| object| no |{"value": "","as_default_value": False} the value type is a string| -|user| object| no |{"value": "","as_default_value": False}, the value type is a string| -|timeout| object| no |{"value": null,"as_default_value": False}, value type is numeric| -|description| object| no |{"value": "1","as_default_value": True}}, value type is string| -|bk_start_param_regex| object| no |{"value": "","as_default_value": False}, the value type is a string| -|bind_info| object| no |{"value":[],,"as_default_value": True }, see access_property.bind_info.value n for details of value[]| +| Field | Type | Required | Description | +| -------------------- | ------ | -------- | ------------------------------------------------------------ | +| proc_num | object | No | {"value": null, "as_default_value": false}, value type is number | +| stop_cmd | object | No | {"value": "","as_default_value": false}, value type is string | +| restart_cmd | object | No | {"value": "","as_default_value": false}, value type is string | +| face_stop_cmd | object | No | {"value": "","as_default_value": false}, value type is string | +| bk_func_name | object | No | {"value": "a7","as_default_value": true}}, value type is string | +| work_path | object | No | {"value": "","as_default_value": false}, value type is string | +| priority | object | No | {"value": null,"as_default_value": false}, value type is number | +| reload_cmd | object | No | {"value": "","as_default_value": false}, value type is string | +| bk_process_name | object | No | {"value": "a7","as_default_value": true}}, value type is string | +| pid_file | object | No | {"value": "","as_default_value": false}, value type is string | +| auto_start | object | No | {"value": null,"as_default_value": null}}, value type is boolean | +| auto_time_gap | object | No | {"value": null,"as_default_value": false}, value type is number | +| start_cmd | object | No | {"value": "","as_default_value": false}, value type is string | +| bk_func_id | object | No | {"value": "","as_default_value": false} value type is string | +| user | object | No | {"value": "","as_default_value": false}, value type is string | +| timeout | object | No | {"value": null,"as_default_value": false}, value type is number | +| description | object | No | {"value": "1","as_default_value": true}}, value type is string | +| bk_start_param_regex | object | No | {"value": "","as_default_value": false}, value type is string | +| bind_info | object | No | {"value":[],"as_default_value": true }, value detailed information see process_property.bind_info.value[n] | - -#### Process_property.bind_info.value [n] fields that can appear +#### Fields that can appear in process_property.bind_info.value[n] Note: -When modifying bind_info, you must first obtain the bind_info content of the original process, then modify it on the existing bind_info of the process, and transfer the modified content to the modification structure. - -Note: - -as_default_value: Is the value of the process based on the template -Value: value of process. Different field types are different - -| Field | Type | Required | Description | -|----------------------|------------|--------|-----------------------| -|enable| object| no |{"value": false,"as_default_value": True}, value type is boolean| -|ip| object| no |{"value": "1","as_default_value": True}, the value type is a string| -|port| object| no |{"value": "100","as_default_value": True}, the value type is a string| -|protocol| object| no |{"value": "1","as_default_value": True},, value type is a string| -|row_id| int| no | Unique representation id, new row can be set to empty, update must keep the original value| - - - - +When modifying bind_info, you must first obtain the content of the original process's bind_info, then modify the existing bind_info of the process, and pass the modified content to the modification structure. +as_default_value: Whether the value of the process is based on the template value: The value of the process, different field types have different types +| Field | Type | Required | Description | +| -------- | ------ | -------- | ------------------------------------------------------------ | +| enable | object | No | {"value": false,"as_default_value": true}, value type is boolean | +| ip | object | No | {"value": "1","as_default_value": true}, value type is string | +| port | object | No | {"value": "100","as_default_value": true}, value type is string | +| protocol | object | No | {"value": "1","as_default_value": true}, value type is string | +| row_id | int | No | Unique identifier id, new rows can be set to null, and must maintain the original value for updates | ### Request Parameters Example @@ -179,7 +168,7 @@ Value: value of process. Different field types are different } ``` -### Return Result Example +### Response Example ```json { @@ -300,30 +289,30 @@ Value: value of process. Different field types are different } ``` -### Return Result Parameters Description +### Response Parameters Description #### response -| Name| Type| Description| -|---|---|---| -| result | bool |Whether the request succeeded or not. True: request succeeded;false request failed| -| code | int |Wrong code. 0 indicates success,>0 indicates failure error| -| message | string |Error message returned by request failure| -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Updated process template information| +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request was successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failure | +| message | string | Error message returned in case of request failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Updated process template information | -#### Data field Description +#### Explanation of the data field -| Name| Type| Description| -|---|---|---| -| id | int |Data id| -| bk_process_name | string |Process alias| -| bk_biz_id | int| Business ID | -| service_template_id | int |Service template id| -| property |object |Attribute| -| creator | string | Creator of this data | -| modifier | string | The last person to modify this piece of data | -| create_time | string |Settling time | -| last_time | string |Update time | -| bk_supplier_account | string | Developer account number| +| Field | Type | Description | +| ------------------- | ------ | -------------------------- | +| id | int | Data ID | +| bk_process_name | string | Process alias | +| bk_biz_id | int | Business ID | +| service_template_id | int | Service template ID | +| property | object | Properties | +| creator | string | Creator of this data | +| modifier | string | Last modifier of this data | +| create_time | string | Creation time | +| last_time | string | Update time | +| bk_supplier_account | string | Supplier account | \ No newline at end of file diff --git a/docs/apidoc/cc/en/update_process_instance.md b/docs/apidoc/cc/en/update_process_instance.md index 8e59cb05e6..5f729c254f 100644 --- a/docs/apidoc/cc/en/update_process_instance.md +++ b/docs/apidoc/cc/en/update_process_instance.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Batch update process information +Batch Update Process Information (Permission: Service Instance Editing Permission) ### Request Parameters @@ -8,35 +8,36 @@ Batch update process information #### Interface Parameters -| Field | Type | Required | Description | -|----------------------|------------|--------|-----------------------| -| processes | array | Yes | process info, the max length is 100 | -| bk_biz_id | int |yes | Business ID | +| Field | Type | Required | Description | +| --------- | ----- | -------- | ---------------------------------------- | +| processes | array | Yes | Process information, maximum 100 entries | +| bk_biz_id | int | Yes | Business ID | -#### Processes Field Description -| Field| Type| Description| -|---|---|---| -|process_template_id| int| Process template id| -|auto_start| bool| Whether to pull up automatically| -|auto_time_gap| int| Pull up interval| -|bk_biz_id| int| Business ID | -|bk_func_id| string| Function ID| -|bk_func_name| string| Process name| -|bk_process_id| int| Process id| -|bk_process_name| string| Process alias| -|bk_supplier_account| string| Developer account number| -|face_stop_cmd| string| Forced stop command| -|pid_file| string| PID file path| -|priority| int| Startup priority| -|proc_num| int| Number of starts| -|reload_cmd| string| Process reload command| -|restart_cmd| string| Restart command| -|start_cmd| string| Start command| -|stop_cmd| string| Stop order| -|timeout| int| Operation time-out duration| -|user| string| Start user| -|work_path| string| Working path| -|process_info| object| Process information| +#### Explanation of the processes field + +| Field | Type | Required | Description | +| ------------------- | ------ | -------- | ------------------------------ | +| process_template_id | int | No | Process template ID | +| auto_start | bool | No | Whether to start automatically | +| auto_time_gap | int | No | Time gap for automatic start | +| bk_biz_id | int | No | Business ID | +| bk_func_id | string | No | Function ID | +| bk_func_name | string | No | Process name | +| bk_process_id | int | No | Process ID | +| bk_process_name | string | No | Process alias | +| bk_supplier_account | string | No | Supplier account | +| face_stop_cmd | string | No | Forced stop command | +| pid_file | string | No | PID file path | +| priority | int | No | Startup priority | +| proc_num | int | No | Number of processes to start | +| reload_cmd | string | No | Process reload command | +| restart_cmd | string | No | Restart command | +| start_cmd | string | No | Start command | +| stop_cmd | string | No | Stop command | +| timeout | int | No | Operation timeout duration | +| user | string | No | Startup user | +| work_path | string | No | Working directory | +| process_info | object | No | Process information | ### Request Parameters Example @@ -83,7 +84,7 @@ Batch update process information } ``` -### Return Result Example +### Response Example ```python { @@ -96,16 +97,15 @@ Batch update process information } ``` -### Return Result Parameters Description +### Response Parameters Description #### response -| Name| Type| Description| -|---|---|---| -| result | bool |Whether the request succeeded or not. True: request succeeded;false request failed| -| code | int |Wrong code. 0 indicates success,>0 indicates failure error| -| message | string |Error message returned by request failure| -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request| - +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request was successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failure | +| message | string | Error message returned in case of request failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned by the request | \ No newline at end of file diff --git a/docs/apidoc/cc/en/update_project_id.md b/docs/apidoc/cc/en/update_project_id.md index 5400fc9a88..4aa96d3635 100644 --- a/docs/apidoc/cc/en/update_project_id.md +++ b/docs/apidoc/cc/en/update_project_id.md @@ -1,21 +1,20 @@ -### Function description +### Function Description -update the project id. This API is a dedicated interface for BCS to migrate project data. Do not use it on other platforms (version: v3.10.23+, permissions: update permissions of the project) +Update Project ID. This interface is dedicated to BCS for project data migration. Other platforms should not use it (Version: v3.10.23+, Permission: Project Update Permission) -### Request parameters +### Request Parameters {{ common_args_desc }} +#### Interface Parameters -#### Interface parameters +| Field | Type | Required | Description | +| ------------- | ------ | -------- | ---------------------------------------------------------- | +| id | int | Yes | Unique identifier of the project in cc | +| bk_project_id | string | Yes | The final value that needs to be updated for bk_project_id | -| field | type | required | description | -|---------------|--------|----------|-----------------------------------------------------| -| id | int | yes | The unique identification of the project's id in cc | -| bk_project_id | string | yes | The final value of bk_project_id to be updated | +### Request Parameters Example - -### Request parameter examples ```json { "bk_app_code":"esb_test", @@ -27,7 +26,7 @@ update the project id. This API is a dedicated interface for BCS to migrate proj } ``` -### Return Result Example +### Response Example ```json { @@ -40,14 +39,15 @@ update the project id. This API is a dedicated interface for BCS to migrate proj } ``` -### Return result parameter description +### Response Parameters Description + #### response -| name | type | description | -| ------- | ------ | ------------------------------------- | -| result | bool | The success or failure of the request. true: the request was successful; false: the request failed.| -| code | int | The error code. 0 means success, >0 means failure error.| -| message | string | The error message returned by the failed request.| -| permission | object | Permission information | -| request_id | string | request_chain_id | -| data | object | data returned by the request| +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request was successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failure | +| message | string | Error message returned in case of request failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Data returned by the request | \ No newline at end of file diff --git a/docs/apidoc/cc/en/update_service_category.md b/docs/apidoc/cc/en/update_service_category.md index bb70248622..b9781d0a13 100644 --- a/docs/apidoc/cc/en/update_service_category.md +++ b/docs/apidoc/cc/en/update_service_category.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Update service template information (currently only name field can be updated) +Update service category (Currently, only the name field can be updated. Permission: Service Category Editing Permission) ### Request Parameters @@ -8,11 +8,11 @@ Update service template information (currently only name field can be updated) #### Interface Parameters -| Field | Type | Required | Description | -|----------------------|------------|--------|-----------------------| -| id | int |yes | Service template ID| -| name | string |yes | Service template name| -| bk_biz_id | int | yes | Business ID | +| Field | Type | Required | Description | +| --------- | ------ | -------- | --------------------- | +| id | int | Yes | Service category ID | +| name | string | Yes | Service category name | +| bk_biz_id | int | Yes | Business ID | ### Request Parameters Example @@ -28,36 +28,48 @@ Update service template information (currently only name field can be updated) } ``` -### Return Result Example +### Response Example ```python { - "result": true, - "code": 0, - "message": "success", - "permission": null, - "request_id": "e43da4ef221746868dc4c837d36f3807", - "data": { - "bk_biz_id": 1, - "id": 3, - "name": "222", - "root_id": 3, - "bk_supplier_account": "0", - "is_built_in": false - } + "result": true, + "code": 0, + "message": "success", + "permission": null, + "request_id": "f87f975a8f4a44ddbf6606ec432741a6", + "data": { + "bk_biz_id": 3, + "id": 22, + "name": "api", + "bk_root_id": 21, + "bk_parent_id": 21, + "bk_supplier_account": "0", + "is_built_in": false + } } ``` -### Return Result Parameters Description +### Response Parameters Description #### response -| Name| Type| Description| -|---|---|---| -| result | bool |Whether the request was successful or not. True: request succeeded;false request failed| -| code | int |Wrong code. 0 indicates success,>0 indicates failure error| -| message | string |Error message returned by request failure| -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Updated service classification information| +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request was successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failure | +| message | string | Error message returned in case of request failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Updated service category information | +#### data + +| Field | Type | Description | +| ------------------- | ------ | -------------------------------- | +| bk_biz_id | int | Business ID | +| id | int | Service category ID | +| name | string | Service category name | +| bk_root_id | int | Root service category ID | +| bk_parent_id | int | Parent service category ID | +| bk_supplier_account | string | Operator account | +| is_built_in | bool | Whether it is a built-in service | \ No newline at end of file diff --git a/docs/apidoc/cc/en/update_service_template.md b/docs/apidoc/cc/en/update_service_template.md index 6e7b2787c4..badb3a9883 100644 --- a/docs/apidoc/cc/en/update_service_template.md +++ b/docs/apidoc/cc/en/update_service_template.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Update service template information +Update service template information (Permission: Service Template Editing Permission) ### Request Parameters @@ -8,12 +8,12 @@ Update service template information #### Interface Parameters -| Field | Type | Required | Description | -|----------------------|------------|--------|-----------------------| -| name | string |And service_category_id are required, or both | Service template name| -| service_category_id | int |And name are required, or both | Service class id| -| id | int |yes | Service template ID| -| bk_biz_id | int | yes | Business ID | +| Field | Type | Required | Description | +| ------------------- | ------ | ------------------------------------------------------------ | --------------------- | +| name | string | Either `service_category_id` or `name` is required, both can be filled | Service template name | +| service_category_id | int | Either `service_category_id` or `name` is required, both can be filled | Service category ID | +| id | int | Yes | Service template ID | +| bk_biz_id | int | Yes | Business ID | ### Request Parameters Example @@ -30,7 +30,7 @@ Update service template information } ``` -### Return Result Example +### Response Example ```python { @@ -48,34 +48,36 @@ Update service template information "modifier": "admin", "create_time": "2019-06-05T11:22:22.951+08:00", "last_time": "2019-06-05T11:22:22.951+08:00", - "bk_supplier_account": "0" + "bk_supplier_account": "0", + "host_apply_enabled": false } } ``` -### Return Result Parameters Description +### Response Parameters Description #### response -| Name| Type| Description| -|---|---|---| -| result | bool |Whether the request was successful or not. True: request succeeded;false request failed| -| code | int |Wrong code. 0 indicates success,>0 indicates failure error| -| message | string |Error message returned by request failure| -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Updated service template information| +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request was successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failure | +| message | string | Error message returned in case of request failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Updated service template information | -#### Data field Description +#### data -| Field | Type | Description | -| ------------------- | ------ | ------------ | -| id | int | Service template ID | -| name | string |Service template name| -| bk_biz_id | int | Business ID | -| service_category_id | int | Service class id| -| creator | string |Creator | -| modifier | string |Last modified by| -| create_time | string |Settling time | -| last_time | string |Update time | -| bk_supplier_account | string |Developer account number | +| Field | Type | Description | +| ------------------- | ------ | ----------------------------------------------------- | +| id | int | Service template ID | +| name | string | Service template name | +| bk_biz_id | int | Business ID | +| service_category_id | int | Service category ID | +| creator | string | Creator | +| modifier | string | Last modifier | +| create_time | string | Creation time | +| last_time | string | Last update time | +| bk_supplier_account | string | Supplier account | +| host_apply_enabled | bool | Whether to enable host property automatic application | \ No newline at end of file diff --git a/docs/apidoc/cc/en/update_set_template.md b/docs/apidoc/cc/en/update_set_template.md index 45c7c36aa8..a108f6890f 100644 --- a/docs/apidoc/cc/en/update_set_template.md +++ b/docs/apidoc/cc/en/update_set_template.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -According to the service id and the set template id, edit the set template under the specified service +Edit the specified cluster template under a business based on the business ID and cluster template ID (Permission: Cluster Template Editing Permission) ### Request Parameters @@ -8,13 +8,12 @@ According to the service id and the set template id, edit the set template under #### Interface Parameters -| Field | Type | Required | Description | -| -------------------- | ------ | ----- | -------------- | -| bk_biz_id | int | yes | Business ID | -| set_template_id | int | yes | Set template ID | -| name | string |Either service_template_ids or service_template_ids is required, or both| Set template name | -| service_template_ids | array |And name are required, or both| Service template ID list| - +| Field | Type | Required | Description | +| -------------------- | ------ | ------------------------------------------------------------ | ---------------------------- | +| bk_biz_id | int | Yes | Business ID | +| set_template_id | int | Yes | Cluster template ID | +| name | string | Either `service_template_ids` or `name` is required, both can be filled | Cluster template name | +| service_template_ids | array | Either `service_template_ids` or `name` is required, both can be filled | List of service template IDs | ### Request Parameters Example @@ -31,7 +30,7 @@ According to the service id and the set template id, edit the set template under } ``` -### Return Result Example +### Response Example ```json { @@ -54,29 +53,29 @@ According to the service id and the set template id, edit the set template under } ``` -### Return Result Parameters Description +### Response Parameters Description #### response -| Name | Type | Description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request was successful or not. True: request succeeded;false request failed| -| code | int | Wrong code. 0 indicates success,>0 indicates failure error | -| message | string |Error message returned by request failure | -| permission | object |Permission information | -| request_id | string |Request chain id | -| data | object |Data returned by request | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request was successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failure | +| message | string | Error message returned in case of request failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Request returned data | -#### Data field Description +#### data -| Field | Type | Description | -| ------------------- | ------ | ------------ | -| id | int | Set template ID | -| name | string |Set template name| -| bk_biz_id | int | Business ID | -| version | int | Set template version | -| creator | string |Creator | -| modifier | string |Last modified by| -| create_time | string |Settling time | -| last_time | string |Update time | -| bk_supplier_account | string |Developer account number | +| Field | Type | Description | +| ------------------- | ------ | ------------------------ | +| id | int | Cluster template ID | +| name | string | Cluster template name | +| bk_biz_id | int | Business ID | +| version | int | Cluster template version | +| creator | string | Creator | +| modifier | string | Last modifier | +| create_time | string | Creation time | +| last_time | string | Last update time | +| bk_supplier_account | string | Supplier account | \ No newline at end of file diff --git a/docs/apidoc/esb-cc/en/add_host_to_resource.md b/docs/apidoc/esb-cc/en/add_host_to_resource.md index 6299477dc7..5f554693ee 100644 --- a/docs/apidoc/esb-cc/en/add_host_to_resource.md +++ b/docs/apidoc/esb-cc/en/add_host_to_resource.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -add host to resource +Add hosts to the resource pool (Permission: Host Pool Host Creation Permission) ### Request Parameters @@ -8,19 +8,55 @@ add host to resource #### Interface Parameters -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_supplier_account | string | No | supplier account code | -| host_info | dict | Yes | host info | -| bk_biz_id | int | No | Business ID | +| Field | Type | Required | Description | +| ------------------- | ------ | -------- | ----------------- | +| bk_supplier_account | string | No | Developer account | +| host_info | dict | Yes | Host information | +| bk_biz_id | int | No | Business ID | #### host_info -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_host_innerip | string | Yes | host inner ip | -| import_from | string | Yes | host import source | -| bk_cloud_id | int | Yes | Cloud area ID | +| Field | Type | Required | Description | +| -------------------- | ------ | -------- | ------------------------------------------------------------ | +| bk_host_innerip | string | Yes | Host's inner IP address | +| import_from | string | No | Host import source, 3 for API import | +| bk_cloud_id | int | No | Managed area ID, not filled in to add to the default area 0 | +| bk_addressing | string | No | Addressing mode, default to static addressing mode if not filled in (static) | +| bk_host_name | string | No | Host name | +| bk_asset_id | string | No | Fixed asset number | +| bk_created_at | string | No | Creation time | +| bk_updated_at | string | No | Update time | +| bk_created_by | string | No | Creator | +| bk_updated_by | string | No | Last updater | +| bk_cloud_inst_id | string | No | Cloud host instance ID | +| bk_cloud_vendor | string | No | Cloud vendor | +| bk_cloud_host_status | string | No | Cloud host status | +| bk_comment | string | No | Comment | +| bk_cpu | int | No | Number of CPU logical cores | +| bk_cpu_architecture | string | No | CPU architecture | +| bk_cpu_module | string | No | CPU model | +| bk_disk | int | No | Disk capacity (GB) | +| bk_host_outerip | string | No | Host's outer IP address | +| bk_host_innerip_v6 | string | No | Host's inner IPv6 address | +| bk_host_outerip_v6 | string | No | Host's outer IPv6 address | +| bk_isp_name | string | No | ISP name | +| bk_mac | string | No | Host's inner MAC address | +| bk_mem | int | No | Host's memory capacity (MB) | +| bk_os_bit | string | No | Operating system bit number | +| bk_os_name | string | No | Operating system name | +| bk_os_type | string | No | Operating system type | +| bk_os_version | string | No | Operating system version | +| bk_outer_mac | string | No | Host's outer MAC address | +| bk_province_name | string | No | Province where the host is located | +| bk_service_term | int | No | Warranty period | +| bk_sla | string | No | SLA level | +| bk_sn | string | No | Device SN | +| bk_state | string | No | Current status | +| bk_state_name | string | No | Country where the host is located | +| operator | string | No | Main maintainer | +| bk_bak_operator | string | No | Backup maintainer | + +**Note: The input parameters here only explain the required and system-built parameters. The rest of the parameters to be filled in depend on the host's property fields defined by the user. Refer to the configuration of the host's property fields for the setting of parameter values.** ### Request Parameters Example @@ -30,40 +66,86 @@ add host to resource "bk_app_secret": "xxx", "bk_username": "xxx", "bk_token": "xxx", - "bk_supplier_account": "123456789", + "bk_supplier_account": "0", + "bk_biz_id": 3, "host_info": { "0": { - "bk_host_innerip": "10.0.0.1", + "bk_host_innerip": "127.0.0.1", + "bk_host_name": "host02", "bk_cloud_id": 0, - "import_from": "3" + "import_from": "3", + "bk_addressing": "dynamic", + "bk_asset_id":"udschdfhebv", + "bk_created_at": "", + "bk_updated_at": "", + "bk_created_by": "admin", + "bk_updated_by": "admin", + "bk_cloud_inst_id": "1", + "bk_cloud_vendor": "15", + "bk_cloud_host_status":"2", + "bk_comment": "canway-host", + "bk_cpu": 8, + "bk_cpu_architecture": "x86", + "bk_cpu_module": "Intel(R) X87", + "bk_disk": 195, + "bk_host_outerip": "12.0.0.1", + "bk_host_innerip_v6": "0000:0000:0000:0000:0000:0000:0000:0234", + "bk_host_outerip_v6": "0000:0000:0000:0000:0000:0000:0000:0345", + "bk_isp_name": "1", + "bk_mac": "00:00:00:00:00:02", + "bk_mem": 32155, + "bk_os_bit": "64-bit", + "bk_os_name": "linux redhat", + "bk_os_type": "1", + "bk_os_version": "7.8", + "bk_outer_mac": "00:00:00:00:00:02", + "bk_province_name": "110000", + "bk_service_term": 6, + "bk_sla": "1", + "bk_sn": "abcdsd3252425", + "bk_state": "测试中", + "bk_state_name": "CN", + "operator": "admin", + "bk_bak_operator": "admin" } } } ``` -### Return Result Example +In the example, "0" in host_info indicates the row number, which can be increased sequentially. -```python +### Response Example +```python { "result": true, "code": 0, "message": "", "permission": null, "request_id": "e43da4ef221746868dc4c837d36f3807", - "data": {} + "data": { + "success": [ + "0" + ] + } } ``` -### Return Result Parameters Description +### Response Parameters Description #### 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 | -| permission | object | permission Information | -| request_id | string | request chain id | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request was successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failure | +| message | string | Error message returned in case of request failure | +| data | object | Request returned data | +| permission | object | Permission information | +| request_id | string | Request chain ID | + +#### data + +| Field | Type | Description | +| ------- | ----- | ---------------------- | +| success | array | Successful row numbers | \ No newline at end of file diff --git a/docs/apidoc/esb-cc/en/create_business.md b/docs/apidoc/esb-cc/en/create_business.md index e3a9725715..3ed24bacdb 100644 --- a/docs/apidoc/esb-cc/en/create_business.md +++ b/docs/apidoc/esb-cc/en/create_business.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -New business +Create a new business (Permission: Business Creation Permission) ### Request Parameters @@ -8,24 +8,30 @@ New business #### Interface Parameters -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_supplier_account | string | No | supplier account code | -| data | dict | Yes | Data | +| Field | Type | Required | Description | +| ------------------- | ------ | -------- | ----------------- | +| bk_supplier_account | string | No | Developer account | +| data | dict | Yes | Business data | #### data -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_biz_name | string | Yes | Business Name | -| bk_biz_maintainer | string | Yes | the maintainers | -| bk_biz_productor | string | Yes | the productor | -| bk_biz_developer | string | Yes | the developer | -| bk_biz_tester | string | Yes | the tester | -| time_zone | string | Yes | time zone | -| language | string | Yes | language: "1" represent Chinese, "2" represent English | - -**Note: The input parameters here only describe the required parameters and the built-in parameters of the system. The other parameters that need to be filled in depend on the attribute fields defined by the user.** +| Field | Type | Required | Description | +| ----------------- | ------ | -------- | ------------------------------------------------------- | +| bk_biz_name | string | Yes | Business name | +| bk_biz_maintainer | string | Yes | Operation and maintenance personnel | +| bk_biz_productor | string | No | Product personnel | +| bk_biz_developer | string | No | Development personnel | +| bk_biz_tester | string | No | Test personnel | +| operator | string | No | Operator | +| bk_created_at | string | No | Creation time | +| bk_updated_at | string | No | Update time | +| bk_created_by | string | No | Creator | +| bk_updated_by | string | No | Last updater | +| life_cycle | string | No | Lifecycle: Testing (1), Live (2, default), Shutdown (3) | +| time_zone | string | No | Time zone | +| language | string | No | Language, "1" for Chinese, "2" for English | + +**Note: The input parameters here only explain the required and system-built parameters. The rest of the parameters to be filled in depend on the user's own defined attribute fields.** ### Request Parameters Example @@ -37,73 +43,85 @@ New business "bk_token": "xxx", "bk_supplier_account": "123456789", "data": { - "bk_biz_name": "cc_app_test", + "bk_biz_name": "main-a1", "bk_biz_maintainer": "admin", "bk_biz_productor": "admin", "bk_biz_developer": "admin", "bk_biz_tester": "admin", "time_zone": "Asia/Shanghai", - "language": "1" + "bk_created_at": "", + "bk_updated_at": "", + "bk_created_by": "admin", + "bk_updated_by": "admin", + "language": "1", + "operator": "admin", + "life_cycle": "2" } } ``` -### Return Result Example +### Response Example ```python - { "result": true, "code": 0, - "message": "", + "message": "success", "permission": null, "request_id": "e43da4ef221746868dc4c837d36f3807", "data": { "bk_biz_developer": "admin", - "bk_biz_id": 8852, + "bk_biz_id": 5, "bk_biz_maintainer": "admin", - "bk_biz_name": "cc_app_test", + "bk_biz_name": "main-a1", "bk_biz_productor": "admin", "bk_biz_tester": "admin", + "bk_created_at": "2023-11-14T16:51:02.168+08:00", + "bk_created_by": "admin", "bk_supplier_account": "0", - "create_time": "2022-02-22T20:10:14.295+08:00", + "bk_updated_at": "2023-11-14T16:51:02.168+08:00", + "create_time": "2023-11-14T16:51:02.168+08:00", "default": 0, "language": "1", - "last_time": "2022-02-22T20:10:14.295+08:00", + "last_time": "2023-11-14T16:51:02.168+08:00", "life_cycle": "2", - "operator": null, + "operator": "admin", "time_zone": "Asia/Shanghai" } } ``` -### Return Result Parameters Description + +### Response Parameters Description #### response -| name | type | description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request was successful or not. true:request successful; false request failed. -| code | int | The error code. 0 means success, >0 means failure error. -| message | string | The error message returned by the failed request. -| data | object | The data returned by the request. -| permission | object | Permission information | -| request_id | string | Request chain id | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request was successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failure | +| message | string | Error message returned in case of request failure | +| data | object | Request returned data | +| permission | object | Permission information | +| request_id | string | Request chain ID | #### data -| field | type | description | -| -----------|-----------|--------------| -| bk_biz_id | int | business id | -| bk_biz_name | string | business name | -| bk_biz_maintainer | string | Operations and maintenance personnel | -| bk_biz_productor | string | Product Personnel | -| bk_biz_developer | string | Developer | -| bk_biz_tester | string | Testers | -| time_zone | string | time zone | -| language | string | language, "1" for Chinese, "2" for English | -| bk_supplier_account | string | Developer account | -| create_time | string | Create time | -| last_time | string | update_time | -|default | int | Indicates business type | -| operator | string | Primary maintainer | -|life_cycle |string | business_cycle | +| Field | Type | Description | +| ------------------- | ------ | ------------------------------------------ | +| bk_biz_id | int | Business ID | +| bk_biz_name | string | Business name | +| bk_biz_maintainer | string | Operation and maintenance personnel | +| bk_biz_productor | string | Product personnel | +| bk_biz_developer | string | Development personnel | +| bk_biz_tester | string | Test personnel | +| time_zone | string | Time zone | +| language | string | Language, "1" for Chinese, "2" for English | +| bk_supplier_account | string | Developer account | +| create_time | string | Creation time | +| last_time | string | Update time | +| default | int | Business type | +| operator | string | Main maintainer | +| life_cycle | string | Business lifecycle | +| bk_created_at | string | Creation time | +| bk_updated_at | string | Update time | +| bk_created_by | string | Creator | \ No newline at end of file diff --git a/docs/apidoc/esb-cc/en/create_module.md b/docs/apidoc/esb-cc/en/create_module.md index c882f47516..c9cf1c8905 100644 --- a/docs/apidoc/esb-cc/en/create_module.md +++ b/docs/apidoc/esb-cc/en/create_module.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -create module +Create a module (Permission: Business Topology Creation Permission) ### Request Parameters @@ -8,19 +8,28 @@ create module #### Interface Parameters -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_supplier_account | string | No | supplier account code | -| bk_biz_id | int | Yes | Business ID | -| bk_set_id | int | Yes | the set id | -| data | dict | Yes | Data | +| Field | Type | Required | Description | +| ------------------- | ------ | -------- | ----------------- | +| bk_supplier_account | string | No | Developer account | +| bk_biz_id | int | Yes | Business ID | +| bk_set_id | int | Yes | Cluster id | +| data | dict | Yes | Business data | #### data -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_parent_id | int | Yes | the parent inst id | -| bk_module_name | string | Yes | Module name | +| Field | Type | Required | Description | +| --------------- | ------ | -------- | ------------------------------------------------------------ | +| bk_parent_id | int | Yes | The ID of the parent instance node, the last level instance node of the current instance node, in the topology structure, for modules, it generally refers to the bk_set_id of the set | +| bk_module_name | string | Yes | Module name | +| bk_module_type | string | No | Module type | +| operator | string | No | Main maintainer | +| bk_bak_operator | string | No | Backup maintainer | +| bk_created_at | string | No | Creation time | +| bk_updated_at | string | No | Update time | +| bk_created_by | string | No | Creator | +| bk_updated_by | string | No | Last updater | + +**Note: The input parameters here only explain the required and system-built parameters. The rest of the parameters to be filled in depend on the user's own defined attribute fields. The parameter values are set according to the configuration of the module's attribute fields.** ### Request Parameters Example @@ -31,76 +40,90 @@ create module "bk_username": "xxx", "bk_token": "xxx", "bk_supplier_account": "123456789", - "bk_biz_id": 1, - "bk_set_id": 10, + "bk_biz_id": 3, + "bk_set_id": 4, "data": { - "bk_parent_id": 10, - "bk_module_name": "test" + "bk_parent_id": 4, + "bk_module_name": "redis-1", + "bk_module_type": "2", + "operator": "admin", + "bk_bak_operator": "admin", + "bk_created_at": "", + "bk_updated_at": "", + "bk_created_by": "admin", + "bk_updated_by": "admin" } } ``` -### Return Result Example +### Response Example ```python - { "result": true, "code": 0, - "message": "", + "message": "success", "permission": null, "request_id": "e43da4ef221746868dc4c837d36f3807", "data": { - "bk_bak_operator": null, - "bk_biz_id": 1, - "bk_module_id": 37825, - "bk_module_name": "test", - "bk_module_type": "1", - "bk_parent_id": 10, - "bk_set_id": 10, + "bk_bak_operator": "admin", + "bk_biz_id": 3, + "bk_created_at": "2023-11-14T17:11:21.225+08:00", + "bk_created_by": "admin", + "bk_module_id": 20, + "bk_module_name": "redis-1", + "bk_module_type": "2", + "bk_parent_id": 4, + "bk_set_id": 4, "bk_supplier_account": "0", - "create_time": "2022-02-22T20:25:19.049+08:00", + "bk_updated_at": "2023-11-14T17:11:21.225+08:00", + "create_time": "2023-11-14T17:11:21.225+08:00", "default": 0, "host_apply_enabled": false, - "last_time": "2022-02-22T20:25:19.049+08:00", - "operator": null, + "last_time": "2023-11-14T17:11:21.225+08:00", + "operator": "admin", "service_category_id": 2, "service_template_id": 0, "set_template_id": 0 - } + }, } ``` -### Return Result Parameters Description + +### Response Parameters Description #### response -| name | type | description | -| ------- | ------ | ------------------------------------- | -| result | bool | Whether the request was successful or not. true:request successful; false request failed. -| code | int | The error code. 0 means success, >0 means failure error. -| message | string | The error message returned by the failed request. -| data | object | The data returned by the request. -| permission | object | Permission information | -| request_id | string | Request chain id | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request was successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failure | +| message | string | Error message returned in case of request failure | +| data | object | Request returned data | +| permission | object | Permission information | +| request_id | string | Request chain ID | #### data -| field | type | description | -| -----------|-----------|--------------| -| bk_bak_operator | string | backup maintainer | -| bk_module_id | int | model id | -|bk_biz_id | int | business id| -| bk_module_id | int | module id | -| bk_module_name | string | module name | -|bk_module_type|string|module type| -|bk_parent_id|int|the id of the parent| -| bk_set_id | int | set id | -| bk_supplier_account | string | developer_account | -| create_time | string | creation_time | -| last_time | string | update_time | -|default | int | Indicates the module type | -| host_apply_enabled |bool | whether to enable automatic application of host attributes | -| operator | string | primary maintainer | -|service_category_id|int|service category id| -|service_template_id|int|service template id| -| set_template_id | int | set template id | +| Field | Type | Description | +| ------------------- | ------- | ---------------------------------------------------------- | +| bk_bak_operator | string | Backup maintainer | +| bk_module_id | int | Module ID | +| bk_biz_id | int | Business ID | +| bk_module_id | int | Module ID | +| bk_module_name | string | Module name | +| bk_module_type | string | Module type | +| bk_parent_id | int | Parent node ID | +| bk_set_id | int | Cluster id | +| bk_supplier_account | string | Developer account | +| create_time | string | Creation time | +| last_time | string | Update time | +| default | int | Module type | +| host_apply_enabled | bool | Whether to enable automatic application of host attributes | +| operator | string | Main maintainer | +| service_category_id | integer | Service category ID | +| service_template_id | int | Service template ID | +| set_template_id | int | Cluster template ID | +| bk_created_at | string | Creation time | +| bk_updated_at | string | Update time | +| bk_created_by | string | Creator | +| bk_updated_by | string | Last updater | \ No newline at end of file diff --git a/docs/apidoc/esb-cc/en/create_set.md b/docs/apidoc/esb-cc/en/create_set.md index b75daf6632..22029e4fef 100644 --- a/docs/apidoc/esb-cc/en/create_set.md +++ b/docs/apidoc/esb-cc/en/create_set.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -create set +Create a cluster (Permission: Business Topology Creation Permission) ### Request Parameters @@ -8,22 +8,31 @@ create set #### Interface Parameters -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_supplier_account | string | No | supplier account code | -| bk_biz_id | int | Yes | Business ID | -| data | dict | Yes | data | +| Field | Type | Required | Description | +| ------------------- | ------ | -------- | ----------------- | +| bk_supplier_account | string | No | Developer account | +| bk_biz_id | int | Yes | Business ID | +| data | dict | Yes | Cluster data | #### data -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_parent_id | int | Yes | the parent inst identifier | -| bk_set_name | string | Yes | set name | -| default | int | No | 0-normal set, 1-built-in set, default is 0 | -| set_template_id | int | No | set template ID, required when need to create set using set template | - -**Note: Other optional fields are defined by the model** +| Field | Type | Required | Description | +| ----------------- | ------ | -------- | ------------------------------------------------------------ | +| bk_parent_id | int | Yes | The ID of the parent instance node, the last level instance node of the current instance node, in the topology structure, for sets, it generally refers to the business ID | +| bk_set_name | string | Yes | Cluster name | +| default | int | No | 0-ordinary cluster, 1-built-in module collection, default is 0 | +| set_template_id | int | No | Cluster template ID, required when creating a cluster through a cluster template | +| bk_capacity | int | No | Design capacity | +| description | string | No | Remark, description of the data | +| bk_set_desc | string | No | Cluster description | +| bk_set_env | string | No | Environment type: test(1), experience(2), formal(3, default) | +| bk_service_status | string | No | Service status: open(1, default), close(2) | +| bk_created_at | string | No | Creation time | +| bk_updated_at | string | No | Update time | +| bk_created_by | string | No | Creator | +| bk_updated_by | string | No | Last updater | + +**Note: The input parameters here only explain the required and system-built parameters. The rest of the parameters to be filled in depend on the user's own defined attribute fields. The parameter values are set according to the configuration of the cluster's attribute fields.** ### Request Parameters Example @@ -36,75 +45,87 @@ create set "bk_supplier_account": "123456789", "bk_biz_id": 1, "data": { - "bk_parent_id": 1, - "bk_set_name": "test-set", - "bk_set_desc": "test-set", + "bk_parent_id": 3, + "bk_set_name": "set_a1", + "set_template_id": 0, + "default": 0, "bk_capacity": 1000, - "description": "description", - "set_template_id": 1 + "bk_set_desc": "test-set", + "bk_set_env": "1", + "bk_service_status": "1", + "bk_created_at": "", + "bk_updated_at": "", + "bk_created_by": "admin", + "bk_updated_by": "admin" } } ``` -### Return Result Example +### Response Example ```python - { "result": true, "code": 0, - "message": "", + "message": "success", "permission": null, "request_id": "e43da4ef221746868dc4c837d36f3807", - "data": { - "bk_biz_id": 11, + "data": { + "bk_biz_id": 3, "bk_capacity": 1000, - "bk_parent_id": 11, + "bk_created_at": "2023-11-14T17:30:43.048+08:00", + "bk_created_by": "admin", + "bk_parent_id": 3, "bk_service_status": "1", "bk_set_desc": "test-set", - "bk_set_env": "3", - "bk_set_id": 4780, - "bk_set_name": "test-set", + "bk_set_env": "1", + "bk_set_id": 10, + "bk_set_name": "set_a1", "bk_supplier_account": "0", - "create_time": "2022-02-22T20:34:01.386+08:00", + "bk_updated_at": "2023-11-14T17:30:43.048+08:00", + "create_time": "2023-11-14T17:30:43.048+08:00", "default": 0, - "description": "description", - "last_time": "2022-02-22T20:34:01.386+08:00", - "set_template_id": 11, + "description": "", + "last_time": "2023-11-14T17:30:43.048+08:00", + "set_template_id": 0, "set_template_version": null - } + } } ``` -### Return Result Parameters Description +### Response Parameters Description #### response -| name | type | description | -| ------- | ------ | ------------------------------------- | -| result | bool | The success or failure of the request. true: the request was successful; false: the request failed. -| code | int | The error code. 0 means success, >0 means failure error. -| message | string | The error message returned by the failed request. -| data | object | The data returned by the request. -| permission | object | Permission information | -| request_id | string | Request chain id | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request was successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failure | +| message | string | Error message returned in case of request failure | +| data | object | Request returned data | +| permission | object | Permission information | +| request_id | string | Request chain ID | #### data -| field | type | description | -| -----------|-----------|--------------| -| bk_biz_id | int | business_id | -| bk_capacity | int | design_capacity | -|bk_parent_id | int | ID of the parent node | -| bk_set_id | int | cluster_id | -| bk_service_status | string | Service status:1/2(1:open,2:closed) | -|bk_set_desc|string|cluster_description| -| bk_set_env | string | Environment type:1/2/3(1:test,2:experience,3:official) | -|bk_set_name|string|cluster_name| -| create_time | string | creation time | -| last_time | string | update_time | -| bk_supplier_account | string | developer_account | -| default | int | 0-general cluster, 1-built-in module set, default is 0 | -| description | string | Description information for the data | -| set_template_version | array | The current version of the cluster template | -| set_template_id| int | Cluster template ID | +| Field | Type | Description | +| -------------------- | ------ | ------------------------------------------------------------ | +| bk_biz_id | int | Business ID | +| bk_capacity | int | Design capacity | +| bk_parent_id | int | Parent node ID | +| bk_set_id | int | Cluster ID | +| bk_service_status | string | Service status: 1/2 (1: open, 2: close) | +| bk_set_desc | string | Cluster description | +| bk_set_env | string | Environment type: 1/2/3 (1: test, 2: experience, 3: formal) | +| bk_set_name | string | Cluster name | +| create_time | string | Creation time | +| last_time | string | Update time | +| bk_supplier_account | string | Developer account | +| default | int | 0-ordinary cluster, 1-built-in module collection, default is 0 | +| description | string | Data description information | +| set_template_version | array | Current version of the cluster template | +| set_template_id | int | Cluster template ID | +| bk_created_at | string | Creation time | +| bk_updated_at | string | Update time | +| bk_created_by | string | Creator | +| bk_updated_by | string | Last updater | \ No newline at end of file diff --git a/docs/apidoc/esb-cc/en/delete_host.md b/docs/apidoc/esb-cc/en/delete_host.md index 8a59bb527f..5cbaf93271 100644 --- a/docs/apidoc/esb-cc/en/delete_host.md +++ b/docs/apidoc/esb-cc/en/delete_host.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -delete host +Delete Host (Permission: Host Pool Host Deletion Permission) ### Request Parameters @@ -8,10 +8,10 @@ delete host #### Interface Parameters -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_supplier_account | string | No | supplier account code | -| bk_host_id | string | Yes | host id join by "," | +| Field | Type | Required | Description | +| ------------------- | ------ | -------- | ---------------------------------------- | +| bk_supplier_account | string | No | Developer account | +| bk_host_id | string | Yes | Host ID, separated by commas if multiple | ### Request Parameters Example @@ -22,33 +22,32 @@ delete host "bk_username": "xxx", "bk_token": "xxx", "bk_supplier_account": "123456789", - "bk_host_id": "1,2,3", + "bk_host_id": "1,2,3" } ``` -### Return Result Example +### Response Example ```python - { "result": true, "code": 0, - "message": "", + "message": "success", "permission": null, "request_id": "e43da4ef221746868dc4c837d36f3807", "data": null } ``` -### Return Result Parameters Description +### Response Parameters Description #### 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 | -| permission | object | permission Information | -| request_id | string | request chain id | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request was successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failure | +| message | string | Error message returned in case of request failure | +| data | object | Request returned data | +| permission | object | Permission information | +| request_id | string | Request chain ID | \ No newline at end of file diff --git a/docs/apidoc/esb-cc/en/delete_module.md b/docs/apidoc/esb-cc/en/delete_module.md index a2e6935a86..a27167ce55 100644 --- a/docs/apidoc/esb-cc/en/delete_module.md +++ b/docs/apidoc/esb-cc/en/delete_module.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Delete module +Delete Module (Permission: Business Topology Deletion Permission) ### Request Parameters @@ -8,12 +8,12 @@ Delete module #### Interface Parameters -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_supplier_account | string | No | supplier account code | -| bk_biz_id | int | Yes | the business id | -| bk_set_id | int | Yes | the set id | -| bk_module_id | int | Yes | module ID | +| Field | Type | Required | Description | +| ------------------- | ------ | -------- | ----------------- | +| bk_supplier_account | string | No | Developer account | +| bk_biz_id | int | Yes | Business ID | +| bk_set_id | int | Yes | Cluster ID | +| bk_module_id | int | Yes | Module ID | ### Request Parameters Example @@ -30,29 +30,28 @@ Delete module } ``` -### Return Result Example +### Response Example ```python - { "result": true, "code": 0, - "message": "", + "message": "success", "permission": null, "request_id": "e43da4ef221746868dc4c837d36f3807", - "data": {} + "data": null } ``` -### Return Result Parameters Description +### Response Parameters Description #### 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 | -| permission | object | permission Information | -| request_id | string | request chain id | \ No newline at end of file +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request was successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failure | +| message | string | Error message returned in case of request failure | +| data | object | Request returned data | +| permission | object | Permission information | +| request_id | string | Request chain ID | \ No newline at end of file diff --git a/docs/apidoc/esb-cc/en/delete_set.md b/docs/apidoc/esb-cc/en/delete_set.md index 071cd47167..ab29dc1d7d 100644 --- a/docs/apidoc/esb-cc/en/delete_set.md +++ b/docs/apidoc/esb-cc/en/delete_set.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Delete set +Delete Cluster (Permission: Business Topology Deletion Permission) ### Request Parameters @@ -8,11 +8,11 @@ Delete set #### Interface Parameters -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_supplier_account | string | No | supplier account code | -| bk_biz_id | int | Yes | the business id | -| bk_set_id | int | Yes | the set id | +| Field | Type | Required | Description | +| ------------------- | ------ | -------- | ----------------- | +| bk_supplier_account | string | No | Developer account | +| bk_biz_id | int | Yes | Business ID | +| bk_set_id | int | Yes | Cluster ID | ### Request Parameters Example @@ -28,28 +28,28 @@ Delete set } ``` -### Return Result Example +### Response Example ```python { "result": true, "code": 0, - "message": "", + "message": "success", "permission": null, "request_id": "e43da4ef221746868dc4c837d36f3807", - "data": {} + "data": null } ``` -### Return Result Parameters Description +### Response Parameters Description #### 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 | -| permission | object | permission Information | -| request_id | string | request chain id | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request was successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failure | +| message | string | Error message returned in case of request failure | +| data | object | Request returned data | +| permission | object | Permission information | +| request_id | string | Request chain ID | \ No newline at end of file diff --git a/docs/apidoc/esb-cc/en/get_host_base_info.md b/docs/apidoc/esb-cc/en/get_host_base_info.md index 6328372202..1ba7a96597 100644 --- a/docs/apidoc/esb-cc/en/get_host_base_info.md +++ b/docs/apidoc/esb-cc/en/get_host_base_info.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -get host base info +Get Host Basic Information Details (Permission: Host Pool Host View Permission) ### Request Parameters @@ -8,10 +8,10 @@ get host base info #### Interface Parameters -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_supplier_account | string | No | supplier account code | -| bk_host_id | int | Yes | Host ID(as is bk_host_id) | +| Field | Type | Required | Description | +| ------------------- | ------ | -------- | --------------------------------------------------------- | +| bk_supplier_account | string | No | Developer account | +| bk_host_id | int | Yes | Host identity ID, i.e., the value of the bk_host_id field | ### Request Parameters Example @@ -26,49 +26,52 @@ get host base info } ``` -### Return Result Example +### Response Example ```python - { "result": true, "code": 0, - "message": "", - "permission": null, - "request_id": "e43da4ef221746868dc4c837d36f3807", + "message": "success", "data": [ { "bk_property_id": "bk_host_name", "bk_property_name": "host name", "bk_property_value": "centos7" }, + ...... { "bk_property_id": "bk_host_id", "bk_property_name": "host ID", "bk_property_value": "10000" } - ] + ], + "permission": null, + "request_id": "c11aasdadadadsadasdadasd1111ds" } ``` -### Return Result Parameters Description +### Response Parameters Description #### 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 | -| permission | object | permission Information | -| request_id | string | request chain id | - +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request was successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failure | +| message | string | Error message returned in case of request failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Request returned data | #### data -| Field | Type | Description | -|-----------|-----------|-----------| -| bk_property_id | string | property ID | -| bk_property_name | string | property name | -| bk_property_value | string | property value | +| Field | Type | Description | +| ----------------- | ------ | -------------- | +| bk_property_id | string | Property ID | +| bk_property_name | string | Property name | +| bk_property_value | string | Property value | + +**Note** + +- If the host's property field is of table type, the returned bk_property_value is null. To query the value of the table type field, use the list_quoted_inst interface. Documentation link: [list_quoted_inst](https://github.com/TencentBlueKing/bk-cmdb/blob/v3.12.x/docs/apidoc/cc/zh_hans/list_quoted_inst.md) \ No newline at end of file diff --git a/docs/apidoc/esb-cc/en/search_biz_inst_topo.md b/docs/apidoc/esb-cc/en/search_biz_inst_topo.md index 1a58f871e3..89d3787137 100644 --- a/docs/apidoc/esb-cc/en/search_biz_inst_topo.md +++ b/docs/apidoc/esb-cc/en/search_biz_inst_topo.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -query business instance topology +Query Business Instance Topology ### Request Parameters @@ -8,11 +8,11 @@ query business instance topology #### Interface Parameters -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_supplier_account | string | No | supplier account code | -| bk_biz_id | int | Yes | the business id | -| level | int | No | the topology level, read full topology when set to -1 | +| Field | Type | Required | Description | +| ------------------- | ------ | -------- | ------------------------------------------------------------ | +| bk_supplier_account | string | No | Developer account | +| bk_biz_id | int | Yes | Business ID | +| level | int | No | Topology level index, index value starts from 0, default is 2. When set to -1, the complete business instance topology will be read. | ### Request Parameters Example @@ -27,7 +27,7 @@ query business instance topology } ``` -### Return Result Example +### Response Example ```python { @@ -42,12 +42,14 @@ query business instance topology "bk_inst_name": "blueking", "bk_obj_id": "biz", "bk_obj_name": "business", + "default": 0, "child": [ { "bk_inst_id": 3, "bk_inst_name": "job", "bk_obj_id": "set", "bk_obj_name": "set", + "default": 0, "child": [ { "bk_inst_id": 5, @@ -64,37 +66,39 @@ query business instance topology } ``` -### Return Result Parameters Description +### Response Parameters Description #### 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 | -| permission | object | permission Information | -| request_id | string | request chain id | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request was successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failure | +| message | string | Error message returned in case of request failure | +| permission | object | Permission information | +| request_id | string | Request chain ID | +| data | object | Request returned data | #### data -| Field | Type | Description | -|-----------|-----------|-----------| -| bk_inst_id | int | the inst ID | -| bk_inst_name | string | the name of the instance is used to display | -| bk_obj_icon | string | the object's icon | -| bk_obj_id | string | Object ID | -| bk_obj_name | string | the name of the object is used to display | -| child | array | Collection of all instances under the current node | +| Field | Type | Description | +| ------------ | ------ | ------------------------------------------------------------ | +| bk_inst_id | int | Instance ID | +| bk_inst_name | string | Name used for displaying the instance | +| bk_obj_icon | string | Model icon name | +| bk_obj_id | string | Model ID | +| bk_obj_name | string | Name used for displaying the model | +| child | array | Collection of all instances under the current node | +| default | int | 0-ordinary cluster, 1-built-in module collection, default is 0 | #### child -| Field | Type | Description | -|-----------|-----------|-----------| -| bk_inst_id | int | the inst ID | -| bk_inst_name | string | the name of the instance is used to display | -| bk_obj_icon | string | the object's icon | -| bk_obj_id | string | Object ID | -| bk_obj_name | string | the name of the object is used to display | -| child | array | Collection of all instances under the current node | +| Field | Type | Description | +| ------------ | ------ | ------------------------------------------------------------ | +| bk_inst_id | int | Instance ID | +| bk_inst_name | string | Name used for displaying the instance | +| bk_obj_icon | string | Model icon name | +| bk_obj_id | string | Model ID | +| bk_obj_name | string | Name used for displaying the model | +| child | array | Collection of all instances under the current node | +| default | int | 0-ordinary cluster, 1-built-in module collection, default is 0 | \ No newline at end of file diff --git a/docs/apidoc/esb-cc/en/search_business.md b/docs/apidoc/esb-cc/en/search_business.md index 5edb98d13a..456a300d6b 100644 --- a/docs/apidoc/esb-cc/en/search_business.md +++ b/docs/apidoc/esb-cc/en/search_business.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -search the business +Query Business (Permission: Business Query Permission) ### Request Parameters @@ -8,82 +8,90 @@ search the business #### Interface Parameters -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_supplier_account | string | No | supplier account code | -| fields | array | No | need to show | -| condition | dict | No | search condition, legach field, please do not use this any more, use biz_property_filter instead | -| biz_property_filter | dict | No | business property filter | -| page | dict | No | page condition | - -Note: a business has two status: normal or archived. -- search a archived business,please add rules `bk_data_status:disabled` to condition field. -- search a normal business,please do not add filed `bk_data_status` in condition , or add rule `bk_data_status: {"$ne":disabled"}` to condition. -- only one of `biz_property_filter` and `condition` parameters can take effect, and `condition` is not recommended to continue to use it. -- the number of array class elements involved in the parameter `biz_property_filter` shall not exceed 500. - the number of `rules` involved in the parameter `biz_property_filter` does not exceed 20. - the nesting level of parameter `biz_property_filter` shall not exceed 3 levels. +| Field | Type | Required | Description | +| ------------------- | ------ | -------- | ------------------------------------------------------------ | +| bk_supplier_account | string | No | Developer account | +| fields | array | No | Specify the fields to query. If not filled in, the system will return all fields of the business | +| condition | dict | No | Query conditions, parameters for any property of the business. If not written, it means to search all data. (Legacy field, please do not continue to use, please use biz_property_filter) | +| biz_property_filter | object | No | Business attribute combination query conditions | +| page | dict | No | Paging conditions | + +Note: Businesses are divided into two types, non-archived businesses and archived businesses. + +- To query archived businesses, add the condition `bk_data_status:disabled` in the condition. +- To query non-archived businesses, do not include the field "bk_data_status" or add the condition `bk_data_status: {"$ne": "disabled"}` in the condition. +- Only one of the parameters `biz_property_filter` and `condition` can be effective, and it is not recommended to continue using the parameter `condition`. +- The number of array elements involved in the parameter `biz_property_filter` does not exceed 500. The number of `rules` involved in the parameter `biz_property_filter` does not exceed 20. The nesting level of the parameter `biz_property_filter` does not exceed 3. + +#### biz_property_filter + +| Field | Type | Required | Description | +| --------- | ------ | -------- | ----------------------------------- | +| condition | string | Yes | Aggregation condition | +| rules | array | Yes | Rules for the aggregation condition | + +#### rules + +| Field | Type | Required | Description | +| -------- | ------ | -------- | ----------- | +| field | string | Yes | Field | +| operator | string | Yes | Operator | +| value | object | Yes | Value | #### 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 | +| Field | Type | Required | Description | +| ----- | ------ | -------- | ------------------------------------------------------------ | +| start | int | Yes | Record start position | +| limit | int | Yes | Limit per page, maximum 200 | +| sort | string | No | Sorting field. Adding "-" in front of the field, such as sort: "-field", represents sorting by field in descending order | ### Request Parameters Example ```python { - "bk_app_code":"esb_test", - "bk_app_secret":"xxx", + "bk_app_code": "esb_test", + "bk_app_secret": "xxx", "bk_username": "xxx", - "bk_token":"xxx", - "bk_supplier_account":"123456789", - "fields":[ - "bk_biz_id", - "bk_biz_name" - ], - "biz_property_filter":{ - "condition":"AND", - "rules":[ + "bk_token": "xxx", + "bk_supplier_account": "123456789", + "fields": ["bk_biz_id", "bk_biz_name"], + "biz_property_filter": { + "condition": "AND", + "rules": [ { - "field":"bk_biz_maintainer", - "operator":"equal", - "value":"admin" + "field": "bk_biz_maintainer", + "operator": "equal", + "value": "admin" }, { - "condition":"OR", - "rules":[ + "condition": "OR", + "rules": [ { - "field":"bk_biz_name", - "operator":"in", - "value":[ - "test" - ] + "field": "bk_biz_name", + "operator": "in", + "value": ["test"] }, { - "field":"bk_biz_id", - "operator":"equal", - "value":0 + "field": "bk_biz_id", + "operator": "equal", + "value": 1 } ] } ] }, - "page":{ - "start":0, - "limit":10, - "sort":"" + "page": { + "start": 0, + "limit": 10, + "sort": "" } } ``` -### Return Result Example +### Response Example ```python - { "result": true, "code": 0, @@ -103,30 +111,46 @@ Note: a business has two status: normal or archived. } ``` -### Return Result Parameters Description +### Response Parameters Description #### 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 | -| permission | object | permission Information | -| request_id | string | request chain id | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request was successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failure | +| message | string | Error message returned in case of request failure | +| data | object | Request returned data | +| permission | object | Permission information | +| request_id | string | Request chain ID | #### data -| Field | Type | Description | -|-----------|-----------|-----------| -| count | int | the num of record | -| info | array | business info | +| Field | Type | Description | +| ----- | ----- | --------------------------- | +| count | int | Number of records | +| info | array | Actual data of the business | #### info -| Field | Type | Description | -|-----------|-----------|-----------| -| bk_biz_id | int | business id | -| bk_biz_name | string | business name | -|default | int | indicates the type of business | +| Field | Type | Description | +| ------------------- | ------ | ------------------------------------------ | +| bk_biz_id | int | Business ID | +| bk_biz_name | string | Business name | +| bk_biz_maintainer | string | Operation and maintenance personnel | +| bk_biz_productor | string | Product personnel | +| bk_biz_developer | string | Developer | +| bk_biz_tester | string | Tester | +| time_zone | string | Time zone | +| language | string | Language, "1" for Chinese, "2" for English | +| bk_supplier_account | string | Developer account | +| create_time | string | Creation time | +| last_time | string | Update time | +| default | int | Business type | +| operator | string | Main maintainer | +| life_cycle | string | Business life cycle | +| bk_created_at | string | Creation time | +| bk_updated_at | string | Update time | +| bk_created_by | string | Creator | + +**Note: The return value here only describes the system's built-in property fields. The rest of the return value depends on the user-defined property fields.** \ No newline at end of file diff --git a/docs/apidoc/esb-cc/en/search_module.md b/docs/apidoc/esb-cc/en/search_module.md index 04c259d0c4..c012aa5452 100644 --- a/docs/apidoc/esb-cc/en/search_module.md +++ b/docs/apidoc/esb-cc/en/search_module.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -search module +Query Module ### Request Parameters @@ -8,22 +8,22 @@ search module #### Interface Parameters -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_supplier_account | string | No | supplier account code | -| bk_biz_id | int | Yes | the business id | -| bk_set_id | int | No | Set ID | -| fields | array | Yes | search fields | -| condition | dict | Yes | search condition | -| page | dict | Yes | page condition | +| Field | Type | Required | Description | +| ------------------- | ------ | -------- | ------------------------------------------------------------ | +| bk_supplier_account | string | No | Developer account | +| bk_biz_id | int | Yes | Business ID | +| bk_set_id | int | No | Cluster ID | +| fields | array | Yes | Query fields, fields come from the attributes defined in the module | +| condition | dict | Yes | Query condition, fields come from the attributes defined in the module | +| page | dict | Yes | Paging condition | #### page -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| start | int | Yes | start record | -| limit | int | Yes | page limit | -| sort | string | No | the field for sort | +| Field | Type | Required | Description | +| ----- | ------ | -------- | --------------------- | +| start | int | Yes | Record start position | +| limit | int | Yes | Limit per page | +| sort | string | No | Sorting field | ### Request Parameters Example @@ -49,13 +49,13 @@ search module } ``` -### Return Result Example +### Response Example ```json { "result": true, "code": 0, - "message": "", + "message": "success", "permission": null, "request_id": "e43da4ef221746868dc4c837d36f3807", "data": { @@ -76,30 +76,49 @@ search module } ``` -### Return Result Parameters Description +### Response Parameters Description #### 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 | -| permission | object | permission Information | -| request_id | string | request chain id | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request was successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failure | +| message | string | Error message returned in case of request failure | +| data | object | Request returned data | +| permission | object | Permission information | +| request_id | string | Request chain ID | #### data -| Field | Type | Description | -|-----------|-----------|-----------| -| count | int | the data item count | -| info | array | the data result array | +| Field | Type | Description | +| ----- | ----- | ------------------------------------------------------------ | +| count | int | Number of data elements | +| info | array | Result set, where all fields are attributes defined in the module | #### info -| Field | Type | Description | -|-----------|-----------|-----------| -| bk_module_name | string | module name | -| bk_set_id | int | set id | -|default | int | indicates the module type | \ No newline at end of file +| Field | Type | Description | +| ------------------- | ------- | ---------------------------------------------------------- | +| bk_module_name | string | Module name | +| bk_set_id | int | Cluster ID | +| default | int | Module type | +| bk_bak_operator | string | Backup maintenance person | +| bk_module_id | int | Model ID | +| bk_biz_id | int | Business ID | +| bk_module_id | int | Module ID to which the host belongs | +| bk_module_type | string | Module type | +| bk_parent_id | int | Parent node ID | +| bk_supplier_account | string | Developer account | +| create_time | string | Creation time | +| last_time | string | Update time | +| host_apply_enabled | bool | Whether to enable automatic application of host properties | +| operator | string | Main maintainer | +| service_category_id | integer | Service category ID | +| service_template_id | int | Service template ID | +| set_template_id | int | Cluster template ID | +| bk_created_at | string | Creation time | +| bk_updated_at | string | Update time | +| bk_created_by | string | Creator | + +**Note: The return value here only describes the system's built-in property fields. The rest of the return value depends on the user-defined property fields.** \ No newline at end of file diff --git a/docs/apidoc/esb-cc/en/search_set.md b/docs/apidoc/esb-cc/en/search_set.md index 0796edd538..e0c631d779 100644 --- a/docs/apidoc/esb-cc/en/search_set.md +++ b/docs/apidoc/esb-cc/en/search_set.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -search set +Query Cluster ### Request Parameters @@ -8,21 +8,21 @@ search set #### Interface Parameters -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_supplier_account | string | No | supplier account code | -| bk_biz_id | int | Yes | the business id | -| fields | array | Yes | search fields | -| condition | dict | Yes | search condition | -| page | dict | Yes | page condition | +| Field | Type | Required | Description | +| ------------------- | ------ | -------- | ------------------------------------------------------------ | +| bk_supplier_account | string | No | Developer account | +| bk_biz_id | int | Yes | Business ID | +| fields | array | Yes | Query fields, all fields are attributes defined in the set, including preset fields and user-defined fields | +| condition | dict | Yes | Query condition, all fields are attributes defined in the set, including preset fields and user-defined fields | +| page | dict | Yes | Paging condition | #### 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 | +| Field | Type | Required | Description | +| ----- | ------ | -------- | --------------------- | +| start | int | Yes | Record start position | +| limit | int | Yes | Limit per page | +| sort | string | No | Sorting field | ### Request Parameters Example @@ -33,6 +33,7 @@ search set "bk_username": "xxx", "bk_token": "xxx", "bk_supplier_account": "123456789", + "bk_biz_id": 2, "fields": [ "bk_set_name" ], @@ -47,14 +48,13 @@ search set } ``` -### Return Result Example +### Response Example ```python - { "result": true, "code": 0, - "message": "", + "message": "success", "permission": null, "request_id": "e43da4ef221746868dc4c837d36f3807", "data": { @@ -69,29 +69,47 @@ search set } ``` -### Return Result Parameters Description +### Response Parameters Description #### 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 | -| permission | object | permission Information | -| request_id | string | request chain id | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request was successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failure | +| message | string | Error message returned in case of request failure | +| data | object | Request returned data | +| permission | object | Permission information | +| request_id | string | Request chain ID | #### data -| Field | Type | Description | -|-----------|-----------|-----------| -| count | int | the data item count | -| info | array | the data result array | +| Field | Type | Description | +| ----- | ----- | ------------------------------------------------------------ | +| count | int | Number of data elements | +| info | array | Result set, where all fields are attributes defined in the set | #### info -| Field | Type | Description | -|-----------|-----------|-----------| -| bk_set_name | int | set name | -|default | int | indicates the module type | \ No newline at end of file +| Field | Type | Description | +| -------------------- | ------ | ---------------------------------------------------------- | +| bk_set_name | string | Cluster name | +| default | int | 0-normal cluster, 1-built-in module set, default is 0 | +| bk_biz_id | int | Business ID | +| bk_capacity | int | Design capacity | +| bk_parent_id | int | Parent node ID | +| bk_set_id | int | Cluster ID | +| bk_service_status | string | Service status: 1/2(1: open, 2: closed) | +| bk_set_desc | string | Cluster description | +| bk_set_env | string | Environment type: 1/2/3(1: test, 2: experience, 3: formal) | +| create_time | string | Creation time | +| last_time | string | Update time | +| bk_supplier_account | string | Developer account | +| description | string | Description of the data | +| set_template_version | array | Current version of cluster template | +| set_template_id | int | Cluster template ID | +| bk_created_at | string | Creation time | +| bk_updated_at | string | Update time | +| bk_created_by | string | Creator | + +**Note: The return value here only describes the system's built-in property fields. The rest of the return value depends on the user-defined property fields.** \ No newline at end of file diff --git a/docs/apidoc/esb-cc/en/transfer_host_module.md b/docs/apidoc/esb-cc/en/transfer_host_module.md index de8f32f03a..016db43c30 100644 --- a/docs/apidoc/esb-cc/en/transfer_host_module.md +++ b/docs/apidoc/esb-cc/en/transfer_host_module.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -transfer host to module in biz +Host Transfer to Module within Business (Permission: Service Instance Edit Permission) ### Request Parameters @@ -8,13 +8,13 @@ transfer host to module in biz #### Interface Parameters -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_supplier_account | string | No | supplier account code | -| bk_biz_id | int | Yes | Business ID | -| bk_host_id | array | Yes | Host ID | -| bk_module_id | array | Yes | Module ID | -| is_increment | bool | Yes | cover or pursue, true will cover | +| Field | Type | Required | Description | +| ------------------- | ------ | -------- | ------------------------------------------------------------ | +| bk_supplier_account | string | No | Developer account | +| bk_biz_id | int | Yes | Business ID | +| bk_host_id | array | Yes | Host ID | +| bk_module_id | array | Yes | Module ID | +| is_increment | bool | No | Whether to cover or append, will delete the original relationship. True is to append, false is to cover, not filling in is default to false | ### Request Parameters Example @@ -37,29 +37,28 @@ transfer host to module in biz } ``` -### Return Result Example +### Response Example ```python - { "result": true, "code": 0, - "message": "", + "message": "success", "permission": null, "request_id": "e43da4ef221746868dc4c837d36f3807", - "data": {} + "data": null } ``` -### Return Result Parameters Description +### Response Parameters Description #### 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 | -| permission | object | permission Information | -| request_id | string | request chain id | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request was successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failure | +| message | string | Error message returned in case of request failure | +| data | object | Request returned data | +| permission | object | Permission information | +| request_id | string | Request chain ID | \ No newline at end of file diff --git a/docs/apidoc/esb-cc/en/transfer_host_to_faultmodule.md b/docs/apidoc/esb-cc/en/transfer_host_to_faultmodule.md index 3334219d52..26ad2e2845 100644 --- a/docs/apidoc/esb-cc/en/transfer_host_to_faultmodule.md +++ b/docs/apidoc/esb-cc/en/transfer_host_to_faultmodule.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -transfer host to fault module +Transfer Hosts to the Fault Module within Business (Permission: Service Instance Edit Permission) ### Request Parameters @@ -8,11 +8,11 @@ transfer host to fault module #### Interface Parameters -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_supplier_account | string | No | supplier account code | -| bk_biz_id | int | Yes | Business ID | -| bk_host_id | array | Yes | Host ID | +| Field | Type | Required | Description | +| ------------------- | ------ | -------- | ----------------- | +| bk_supplier_account | string | No | Developer account | +| bk_biz_id | int | Yes | Business ID | +| bk_host_id | array | Yes | Host ID | ### Request Parameters Example @@ -31,28 +31,28 @@ transfer host to fault module } ``` -### Return Result Example +### Response Example ```python - { "result": true, "code": 0, - "message": "", + "message": "success", "permission": null, "request_id": "e43da4ef221746868dc4c837d36f3807", - "data": {} + "data": null } ``` -### Return Result Parameters Description + +### Response Parameters Description #### 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 | -| permission | object | permission Information | -| request_id | string | request chain id | \ No newline at end of file +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request was successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failure | +| message | string | Error message returned in case of request failure | +| data | object | Request returned data | +| permission | object | Permission information | +| request_id | string | Request chain ID | \ No newline at end of file diff --git a/docs/apidoc/esb-cc/en/transfer_host_to_idlemodule.md b/docs/apidoc/esb-cc/en/transfer_host_to_idlemodule.md index cc4bb2ec66..49f99d13ec 100644 --- a/docs/apidoc/esb-cc/en/transfer_host_to_idlemodule.md +++ b/docs/apidoc/esb-cc/en/transfer_host_to_idlemodule.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -transfer host to idle module +Transfer Hosts to the Idle Module within Business (Permission: Service Instance Edit Permission) ### Request Parameters @@ -8,11 +8,11 @@ transfer host to idle module #### Interface Parameters -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_supplier_account | string | No | supplier account code | -| bk_biz_id | int | Yes | Business ID | -| bk_host_id | array | Yes | Host ID | +| Field | Type | Required | Description | +| ------------------- | ------ | -------- | ----------------- | +| bk_supplier_account | string | No | Developer account | +| bk_biz_id | int | Yes | Business ID | +| bk_host_id | array | Yes | Host ID | ### Request Parameters Example @@ -31,28 +31,28 @@ transfer host to idle module } ``` -### Return Result Example +### Response Example ```python - { "result": true, "code": 0, - "message": "", + "message": "success", "permission": null, "request_id": "e43da4ef221746868dc4c837d36f3807", - "data": {} + "data": null } ``` -### Return Result Parameters Description + +### Response Parameters Description #### 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 | -| permission | object | permission Information | -| request_id | string | request chain id | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request was successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failure | +| message | string | Error message returned in case of request failure | +| data | object | Request returned data | +| permission | object | Permission information | +| request_id | string | Request chain ID | \ No newline at end of file diff --git a/docs/apidoc/esb-cc/en/transfer_host_to_resourcemodule.md b/docs/apidoc/esb-cc/en/transfer_host_to_resourcemodule.md index afb1998c22..d65aac9280 100644 --- a/docs/apidoc/esb-cc/en/transfer_host_to_resourcemodule.md +++ b/docs/apidoc/esb-cc/en/transfer_host_to_resourcemodule.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -transfer host to resource module +Return Hosts to the Resource Pool (Permission: Host Return to Host Pool Permission) ### Request Parameters @@ -8,12 +8,14 @@ transfer host to resource module #### Interface Parameters -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_supplier_account | string | No | supplier account code | -| bk_biz_id | int | Yes | Business ID | -| bk_module_id | int | No | Module ID of the resource pool directory to transfer host to, default to the resource directory | -| bk_host_id | array | Yes | Host ID | +| Field | Type | Required | Description | +| ------------------- | ------ | -------- | ------------------------------------------------------------ | +| bk_supplier_account | string | No | Developer account | +| bk_biz_id | int | Yes | Business ID | +| bk_module_id | int | No | Directory ID to which the hosts are transferred, default is the directory of idle hosts in the host pool | +| bk_host_id | array | Yes | Host ID | + +**Note: Only hosts under the business idle host pool can be returned.** ### Request Parameters Example @@ -33,28 +35,28 @@ transfer host to resource module } ``` -### Return Result Example +### Response Example ```python - { "result": true, "code": 0, - "message": "", + "message": "success", "permission": null, "request_id": "e43da4ef221746868dc4c837d36f3807", - "data": {} + "data": null } ``` -### Return Result Parameters Description + +### Response Parameters Description #### 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 | -| permission | object | permission Information | -| request_id | string | request chain id | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request was successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failure | +| message | string | Error message returned in case of request failure | +| data | object | Request returned data | +| permission | object | Permission information | +| request_id | string | Request chain ID | \ No newline at end of file diff --git a/docs/apidoc/esb-cc/en/transfer_resourcehost_to_idlemodule.md b/docs/apidoc/esb-cc/en/transfer_resourcehost_to_idlemodule.md index d36e1382af..9cc816048d 100644 --- a/docs/apidoc/esb-cc/en/transfer_resourcehost_to_idlemodule.md +++ b/docs/apidoc/esb-cc/en/transfer_resourcehost_to_idlemodule.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -transfer resource host to idle module +Allocate Hosts from the Resource Pool to the Business Idle Host Module (Permission: Allocate Hosts from Host Pool to Business Permission) ### Request Parameters @@ -8,11 +8,11 @@ transfer resource host to idle module #### Interface Parameters -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_supplier_account | string | No | supplier account code | -| bk_biz_id | int | Yes | Business ID | -| bk_host_id | array | Yes | Host ID | +| Field | Type | Required | Description | +| ------------------- | ------ | -------- | ----------------- | +| bk_supplier_account | string | No | Developer account | +| bk_biz_id | int | Yes | Business ID | +| bk_host_id | array | Yes | Host ID | ### Request Parameters Example @@ -31,28 +31,28 @@ transfer resource host to idle module } ``` -### Return Result Example +### Response Example ```python - { "result": true, "code": 0, - "message": "", + "message": "success", "permission": null, "request_id": "e43da4ef221746868dc4c837d36f3807", - "data": {} + "data": null } ``` -### Return Result Parameters Description + +### Response Parameters Description #### 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 | -| permission | object | permission Information | -| request_id | string | request chain id | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request was successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failure | +| message | string | Error message returned in case of request failure | +| data | object | Request returned data | +| permission | object | Permission information | +| request_id | string | Request chain ID | \ No newline at end of file diff --git a/docs/apidoc/esb-cc/en/update_business.md b/docs/apidoc/esb-cc/en/update_business.md index 0d2e1ce0c3..e2dd8f9a96 100644 --- a/docs/apidoc/esb-cc/en/update_business.md +++ b/docs/apidoc/esb-cc/en/update_business.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -update the business +Update Business Information (Permission: Business Edit Permission) ### Request Parameters @@ -8,23 +8,26 @@ update the business #### Interface Parameters -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_supplier_account | string | No | supplier account code | -| bk_biz_id | int | Yes | the business id | -| data | dict | Yes | Data | +| Field | Type | Required | Description | +| ------------------- | ------ | -------- | ----------------- | +| bk_supplier_account | string | No | Developer account | +| bk_biz_id | int | Yes | Business ID | +| data | dict | Yes | Business data | #### data -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_biz_name | string | No | Business Name | -| bk_biz_developer | string | No | the developer | -| bk_biz_maintainer | string | No | the maintainers | -| bk_biz_productor | string | No | the productor | -| bk_biz_tester | string | No | the tester | +| Field | Type | Required | Description | +| ----------------- | ------ | -------- | ------------------------------------------------------- | +| bk_biz_name | string | No | Business name | +| bk_biz_developer | string | No | Developer | +| bk_biz_maintainer | string | No | Maintainer | +| bk_biz_productor | string | No | Productor | +| bk_biz_tester | string | No | Tester | +| operator | string | No | Operator | +| life_cycle | string | No | Life cycle: Testing(1), Online(2, default), Shutdown(3) | +| language | string | No | Language, "1" for Chinese, "2" for English | -**Note: The input parameters here only describe the required parameters and the built-in parameters of the system. The other parameters that need to be filled in depend on the attribute fields defined by the user.** +**Note: The data parameter here only explains the system-built editable parameters, and the rest of the parameters to be filled depend on the user's own defined attribute fields.** ### Request Parameters Example @@ -42,33 +45,35 @@ update the business "bk_biz_productor": "admin", "bk_biz_developer": "admin", "bk_biz_tester": "admin", + "language": "1", + "operator": "admin", + "life_cycle": "2" } } ``` -### Return Result Example +### Response Example ```python - { "result": true, "code": 0, - "message": "", + "message": "success", "permission": null, "request_id": "e43da4ef221746868dc4c837d36f3807", - "data": {} + "data": null } ``` -### Return Result Parameters Description +### Response Parameters Description #### 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 | -| permission | object | permission Information | -| request_id | string | request chain id | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request was successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failure | +| message | string | Error message returned in case of request failure | +| data | object | Request returned data | +| permission | object | Permission information | +| request_id | string | Request chain ID | \ No newline at end of file diff --git a/docs/apidoc/esb-cc/en/update_host.md b/docs/apidoc/esb-cc/en/update_host.md index 06a3417d7e..8621277ada 100644 --- a/docs/apidoc/esb-cc/en/update_host.md +++ b/docs/apidoc/esb-cc/en/update_host.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -Update host property +Update Host Properties (Permission: For hosts already assigned to a business, business host editing permission is required. For host pool hosts, host pool host editing permission is required) ### Request Parameters @@ -8,19 +8,41 @@ Update host property #### Interface Parameters -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_supplier_account | string | No | supplier account code | -| bk_host_id | string | Yes | host ID | -| data | dict | No | host data | +| Field | Type | Required | Description | +| ------------------- | ------ | -------- | ---------------------------- | +| bk_supplier_account | string | No | Developer account | +| bk_host_id | string | Yes | Host ID, separated by commas | +| data | dict | No | Host data | #### data -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_host_name | string | No | host name | - -**Note: The fields entered are the properties defined by the host** +| Field | Type | Required | Description | +| ------------------- | ------ | -------- | ------------------------- | +| bk_host_name | string | No | Host name | +| bk_comment | string | No | Comment | +| bk_cpu | int | No | CPU logical cores | +| bk_cpu_architecture | string | No | CPU architecture | +| bk_cpu_module | string | No | CPU model | +| bk_disk | int | No | Disk capacity (GB) | +| bk_host_outerip | string | No | Host outer IP | +| bk_host_outerip_v6 | string | No | Host outer IPv6 | +| bk_isp_name | string | No | ISP name | +| bk_mac | string | No | Host inner MAC address | +| bk_mem | int | No | Host memory capacity (MB) | +| bk_os_bit | string | No | Operating system bit | +| bk_os_name | string | No | Operating system name | +| bk_os_type | string | No | Operating system type | +| bk_os_version | string | No | Operating system version | +| bk_outer_mac | string | No | Host outer MAC address | +| bk_province_name | string | No | Province name | +| bk_sla | string | No | SLA level | +| bk_sn | string | No | Device SN | +| bk_state | string | No | Current state | +| bk_state_name | string | No | Country | +| operator | string | No | Main maintainer | +| bk_bak_operator | string | No | Backup maintainer | + +**Note: The data parameter here only explains the system-built editable parameters, and the rest of the parameters to be filled depend on the user's own defined attribute fields.** ### Request Parameters Example @@ -33,34 +55,55 @@ Update host property "bk_supplier_account": "123456789", "bk_host_id": "1,2,3", "data": { - "bk_host_name": "test" + "bk_host_name": "test", + "bk_comment": "canway-host-101", + "bk_cpu": 16, + "bk_cpu_architecture": "arm", + "bk_cpu_module": "Intel(R) 2.00GHz", + "bk_disk": 120, + "bk_host_outerip": "12.0.0.3", + "bk_host_outerip_v6": "0000:0000:0000:0000:0000:0000:0000:0248", + "bk_isp_name": "3", + "bk_mac": "00:00:00:00:00:56", + "bk_mem": 36666, + "bk_os_bit": "32-bit", + "bk_os_name": "ubuntu", + "bk_os_type": "4", + "bk_os_version": "7.9.1", + "bk_outer_mac": "00:00:00:00:00:56", + "bk_province_name": "440000", + "bk_sla": "2", + "bk_sn": "abcd3252425", + "bk_state": "Backup", + "bk_state_name": "BE", + "operator": "admin", + "bk_bak_operator": "admin" } } ``` -### Return Result Example +### Response Example ```python - { "result": true, "code": 0, - "message": "", + "message": "success", "permission": null, "request_id": "e43da4ef221746868dc4c837d36f3807", - "data": {} + "data": null } ``` -### Return Result Parameters Description +### Response Parameters Description #### 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 | -| permission | object | permission Information | -| request_id | string | request chain id | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request was successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failure | +| message | string | Error message returned in case of request failure | +| data | object | Request returned data | +| permission | object | Permission information | +| request_id | string | Request chain ID | \ No newline at end of file diff --git a/docs/apidoc/esb-cc/en/update_module.md b/docs/apidoc/esb-cc/en/update_module.md index ee3ece73b5..4d52d6c84a 100644 --- a/docs/apidoc/esb-cc/en/update_module.md +++ b/docs/apidoc/esb-cc/en/update_module.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -update module +Update Module (Permission: Business Topology Editing Permission) ### Request Parameters @@ -8,21 +8,24 @@ update module #### Interface Parameters -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_supplier_account | string | No | supplier account code | -| bk_biz_id | int | Yes | the business id | -| bk_set_id | int | Yes | the set id | -| bk_module_id | int | Yes | module ID | -| data | dict | Yes | module data | +| Field | Type | Required | Description | +| ------------------- | ------ | -------- | ----------------- | +| bk_supplier_account | string | No | Developer account | +| bk_biz_id | int | Yes | Business ID | +| bk_set_id | int | Yes | Cluster ID | +| bk_module_id | int | Yes | Module ID | +| data | dict | Yes | Module data | #### data -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_module_name | string | No | Module name | +| Field | Type | Required | Description | +| --------------- | ------ | -------- | ----------------- | +| bk_module_name | string | No | Module name | +| bk_module_type | string | No | Module type | +| operator | string | No | Main maintainer | +| bk_bak_operator | string | No | Backup maintainer | -**Note: The fields entered are the properties defined by the module.** +**Note: The data parameter here only explains the system-built editable parameters, and the rest of the parameters to be filled depend on the user's own defined attribute fields. Modules created through service templates can only be modified through service templates.** ### Request Parameters Example @@ -37,34 +40,36 @@ update module "bk_set_id": 1, "bk_module_id": 1, "data": { - "bk_module_name": "test" + "bk_module_name": "test", + "bk_module_type": "1", + "operator": "admin", + "bk_bak_operator": "admin" } } ``` -### Return Result Example +### Response Example ```python - { "result": true, "code": 0, - "message": "", + "message": "success", "permission": null, "request_id": "e43da4ef221746868dc4c837d36f3807", - "data": {} + "data": null } ``` -### Return Result Parameters Description +### Response Parameters Description #### 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 | -| permission | object | permission Information | -| request_id | string | request chain id | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request was successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failure | +| message | string | Error message returned in case of request failure | +| data | object | Request returned data | +| permission | object | Permission information | +| request_id | string | Request chain ID | \ No newline at end of file diff --git a/docs/apidoc/esb-cc/en/update_set.md b/docs/apidoc/esb-cc/en/update_set.md index 3325fd3078..aca50f9053 100644 --- a/docs/apidoc/esb-cc/en/update_set.md +++ b/docs/apidoc/esb-cc/en/update_set.md @@ -1,6 +1,6 @@ -### Functional description +### Function Description -update set +Update Cluster (Permission: Business Topology Editing Permission) ### Request Parameters @@ -8,21 +8,27 @@ update set #### Interface Parameters -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_supplier_account | string | No | supplier account code | -| bk_biz_id | int | Yes | the business id | -| bk_set_id | int | Yes | the set id | -| data | dict | No | data | +| Field | Type | Required | Description | +| ------------------- | ------ | -------- | ----------------- | +| bk_supplier_account | string | No | Developer account | +| bk_biz_id | int | Yes | Business ID | +| bk_set_id | int | Yes | Cluster ID | +| data | dict | No | Cluster data | #### data -| Field | Type | Required | Description | -|-----------|------------|--------|------------| -| bk_parent_id | int | No | the parent inst identifier | -| bk_set_name | string | No | set name | +| Field | Type | Required | Description | +| ----------------- | ------ | -------- | ------------------------------------------------------------ | +| bk_set_name | string | No | Cluster name | +| default | int | No | 0 - Normal cluster, 1 - Built-in module set, default is 0 | +| set_template_id | int | No | Cluster template ID, required when creating a cluster through a cluster template | +| bk_capacity | int | No | Design capacity | +| description | string | No | Remarks, description of data | +| bk_set_desc | string | No | Cluster description | +| bk_set_env | string | No | Environment type: Test (1), Experience (2), Formal (3, default) | +| bk_service_status | string | No | Service status: Open (1, default), Close (2) | -**Note: User-defined fields can also be passed in as parameters** +**Note: The data parameter here only explains the system-built editable parameters, and the rest of the parameters to be filled depend on the user's own defined attribute fields. Clusters created through cluster templates can only be modified through cluster templates.** ### Request Parameters Example @@ -36,34 +42,39 @@ update set "bk_biz_id": 1, "bk_set_id": 1, "data": { - "bk_set_name": "test" + "bk_set_name": "test", + "default": 0, + "bk_capacity": 500, + "bk_set_desc": "Cluster description", + "description": "Cluster remarks", + "bk_set_env": "3", + "bk_service_status": "1" } } ``` -### Return Result Example +### Response Example ```python - { "result": true, "code": 0, - "message": "", + "message": "success", "permission": null, "request_id": "e43da4ef221746868dc4c837d36f3807", - "data": {} + "data": null } ``` -### Return Result Parameters Description +### Response Parameters Description #### 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 | -| permission | object | permission Information | -| request_id | string | request chain id | +| Field | Type | Description | +| ---------- | ------ | ------------------------------------------------------------ | +| result | bool | Whether the request was successful. true: successful; false: failed | +| code | int | Error code. 0 indicates success, >0 indicates failure | +| message | string | Error message returned in case of request failure | +| data | object | Request returned data | +| permission | object | Permission information | +| request_id | string | Request chain ID | \ No newline at end of file