diff --git a/paas2/VERSION b/paas2/VERSION index 76b1342bf..f9b5a4a5a 100644 --- a/paas2/VERSION +++ b/paas2/VERSION @@ -1 +1 @@ -2.13.30 +2.13.31 diff --git a/paas2/esb/components/bk/apisv2/bk_paas/apidocs/en/get_app_info.md b/paas2/esb/components/bk/apisv2/bk_paas/apidocs/en/get_app_info.md index 7734c06ee..44030ae8e 100644 --- a/paas2/esb/components/bk/apisv2/bk_paas/apidocs/en/get_app_info.md +++ b/paas2/esb/components/bk/apisv2/bk_paas/apidocs/en/get_app_info.md @@ -41,3 +41,19 @@ get application info, bulk supported ] } ``` + +### Return Result Description + +| Field | Type | Description | +|-----------|----------|-----------| +| result | bool | return result, true for success, false for failure | +| code | int | return code, 0 for success, other values for failure | +| message | string | error message | +| data | list | result data, details are described below | + +#### data + +| Field | Type | Description | +|-----------|----------|-----------| +| bk_app_code | string | application code | +| bk_app_name | string | application name | diff --git a/paas2/esb/components/bk/apisv2/bk_paas/apidocs/zh_hans/get_app_info.md b/paas2/esb/components/bk/apisv2/bk_paas/apidocs/zh_hans/get_app_info.md index 22074d6ab..647e24933 100644 --- a/paas2/esb/components/bk/apisv2/bk_paas/apidocs/zh_hans/get_app_info.md +++ b/paas2/esb/components/bk/apisv2/bk_paas/apidocs/zh_hans/get_app_info.md @@ -41,3 +41,19 @@ ] } ``` + +### 返回结果参数说明 + +| 字段 | 类型 | 描述 | +|-----------|----------|-----------| +| result | bool | 返回结果,true 为成功,false 为失败 | +| code | int | 返回码,0 表示成功,其它值表示失败 | +| message | string | 错误信息 | +| data | list | 结果数据,详细信息请见下面说明 | + +#### data + +| 字段 | 类型 | 描述 | +|-----------|----------|-----------| +| bk_app_code | string | 应用编码 | +| bk_app_name | string | 应用名称 | diff --git a/paas2/esb/components/confapis/cc/apidocs/en/create_business_set.md b/paas2/esb/components/confapis/cc/apidocs/en/create_business_set.md new file mode 100644 index 000000000..3407fe46a --- /dev/null +++ b/paas2/esb/components/confapis/cc/apidocs/en/create_business_set.md @@ -0,0 +1,116 @@ +### Functional description + +create business set(v3.10.12+) + + +### Request Parameters + +{{ common_args_desc }} + + +#### General Parameters + +| Field | Type | Required | Description | +|-----------|------------|--------|---------------------------| +| bk_biz_set_attr | object | Yes | business set model field| +| 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 | the maintainers | +| bk_biz_set_desc | string | No | business description | + +#### bk_scope + +| Field | Type | Required | Description | +|-----------|------------|--------|------------| +| match_all | bool | Yes | selected business line tags| +| filter | object | No | scope conditions for the selected business| + +#### filter + +- This parameter is a combination of business attribute field filtering rules, which is used to search for business based on business attribute fields. Combinations only support AND operations and can be nested up to 2 levels. + +| Field | Type | Required | Description | +|-----------|------------|--------|------------| +| 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,in | +| value | - | No | values's format depend on operator | + +**Note:** + +- The input here only describes the required and built-in parameters for the `bk_biz_set_attr` parameter, and the other parameters that need to be filled depend on the attribute fields defined by the user. +- when 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` is empty. If the `match_all` field is false, + `filter` needs to be non-null and the user needs to explicitly specify choice of business +- The selected business type must be enum or organization. + +### Request Parameters Example + +```python +{ + "bk_app_code":"esb_test", + "bk_app_secret":"xxx", + "bk_username":"xxx", + "bk_token":"xxx", + "bk_biz_set_attr":{ + "bk_biz_set_name":"biz_set", + "bk_biz_set_desc":"xxx", + "biz_set_maintainer":"xxx" + }, + "bk_scope":{ + "match_all":false, + "filter":{ + "condition":"AND", + "rules":[ + { + "field":"bk_sla", + "operator":"equal", + "value":"2" + }, + { + "field":"life_cycle", + "operator":"equal", + "value":1 + } + ] + } + } +} +``` + +### Return Result Example + +```python + +{ + "result":true, + "code":0, + "message":"success", + "permission":null, + "data":5, + "request_id": "dsda1122adasadadada2222" +} +``` +### Return Result 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 | +| permission | object | permission info | +| data | int | business set id | +| request_id | string | request chain id | diff --git a/paas2/esb/components/confapis/cc/apidocs/en/delete_business_set.md b/paas2/esb/components/confapis/cc/apidocs/en/delete_business_set.md new file mode 100644 index 000000000..cdec9961d --- /dev/null +++ b/paas2/esb/components/confapis/cc/apidocs/en/delete_business_set.md @@ -0,0 +1,52 @@ +### Functional description + +delete business set(v3.10.12+) + +### Request Parameters + +{{ common_args_desc }} + +#### General Parameters + +| Field | Type | Required | Description | +|-----------|------------|--------|------------| +| bk_biz_set_ids | array | Yes |business set id list | + +### Request Parameters Example + +```python +{ + "bk_app_code":"esb_test", + "bk_app_secret":"xxx", + "bk_username":"xxx", + "bk_token":"xxx", + "bk_biz_set_ids":[ + 10, + 12 + ] +} +``` + +### Return Result Example + +```python +{ + "result": true, + "code": 0, + "message": "", + "permission":null, + "data": {}, + "request_id": "dsda1122adasadadada2222" +} +``` +### Return Result 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 | +| permission | object | permission info | +| data | object | response data | +| request_id | string | request chain id | diff --git a/paas2/esb/components/confapis/cc/apidocs/en/resource_watch.md b/paas2/esb/components/confapis/cc/apidocs/en/resource_watch.md index 0cb0651cb..ab936465c 100644 --- a/paas2/esb/components/confapis/cc/apidocs/en/resource_watch.md +++ b/paas2/esb/components/confapis/cc/apidocs/en/resource_watch.md @@ -15,10 +15,12 @@ watch and get the change of a kind of resource's event. | bk_fields | array string | Depends on resource | the resource event fields you want to return, the host resource need to be set. | | bk_start_from | Int64 | No | watch from a unix seconds time, It is the number of seconds that have elapsed since the Unix epoch, minus leap seconds; | | bk_cursor | string | No | a cursor to represent the event you are watched at, you can use a cursor to watch the next event after it. | -| bk_resource | string | Yes | resource you can watch, now is host, host_relation, biz, set, module, process, object_instance, mainline_instance. "host" means a host's detail info, "host_relation" means host's relation with biz, set and module, "biz" means a biz's detail info, "set" means a set's detail info, "module" means a module's detail info, "process" means a process's detail info, object_instance means common object instance event, mainline_instance means mainline object instance event. | +| bk_resource | string | Yes | resource you can watch, now is host, host_relation, biz, set, module, process, object_instance, mainline_instance, biz_set, biz_set_relation. "host" means a host's detail info, "host_relation" means host's relation with biz, set and module, "biz" means a biz's detail info, "set" means a set's detail info, "module" means a module's detail info, "process" means a process's detail info, "object_instance" means common object instance event, "mainline_instance" means mainline object instance event, "biz_set" means biz set event info, "biz_set_relation" means biz set to biz relation event info. | | bk_supplier_account | string | Yes | supplier account | | bk_filter | object | No | filter condition | +**Note: The biz_set_relation event will be triggered when biz set is added, deleted or its "bk_scope" field is updated, and when biz is added, deleted or updated which results in its relationship with biz set changed. The event detail includes the ID of the biz set whose relation changed and all of the biz IDs it contains after the change** + #### bk_filter | Field | Type | Required | Description | @@ -145,6 +147,21 @@ common object instance: } ``` +#### biz_set_relation resource details example: +```json +{ + "bk_biz_set_id": 1, + "bk_biz_ids": [1 ,2, 3] +} +``` + +- biz_set_relation resource bk_detail description + +| Field | Type | Description | +| ------------- | --------- | ----------------------------------------------- | +| bk_biz_set_id | int | ID of the biz set whose relation to biz changes | +| bk_biz_ids | int array | all of the biz ID list that biz set contains | + ### Usage description @@ -175,4 +192,3 @@ the event's expired time is 3h at now. if event is expire, then it will be remov - diff --git a/paas2/esb/components/confapis/cc/apidocs/en/search_biz_in_business_set.md b/paas2/esb/components/confapis/cc/apidocs/en/search_biz_in_business_set.md new file mode 100644 index 000000000..a97a07197 --- /dev/null +++ b/paas2/esb/components/confapis/cc/apidocs/en/search_biz_in_business_set.md @@ -0,0 +1,149 @@ +### Functional description + +search business in business set(v3.10.12+) + +### Request Parameters + +{{ common_args_desc }} + +#### General Parameters + +| Field | Type | Required | Description | +|-----------|------------|--------|------------| +| bk_biz_set_id | int | Yes | business set id | +| filter | object | No | business attribute combination query condition| +| fields | array | No | fields of object,the parameter is any attribute of the business. if the field information is not filled in, return all the fields of the business| +| page | object | Yes | page information | + +#### filter +- query conditions. Combination supports both AND and OR. Can be nested up to 2 levels. + +| Field | Type | Required | Description | +|-----------|------------|--------|------------| +| condition | string | Yes | rule operator| +| rules | array | Yes | filter business scope rules| + + +#### rules +- the filter rule is the triple `field`, `operator`, `value` + +| Field | Type | Required | Description | +| -------- | ------ | ---- |----------------------------------------------------------- | +| field | string | Yes | | +| operator | string | Yes | 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 | + +condition rules detail: + +#### page + +| Field | Type | Required | Description | +|-----------|------------|--------|------------| +| start | int | Yes | start record | +| limit | int | Yes | page size, maximum is 500. | +| enable_count | bool | Yes | whether to get the flag of the number of query objects| +| sort | string | No |sort field, by adding - in front of the field, such as sort:"-field" can indicate descending order by field field | + +**Note:** +- `enable_count` If this flag is then the request is to get the count. At this time, the rest of the fields must be true, start is 0, limit: 0, and sort is "". + +### Request Parameters Example + +```python +{ + "bk_app_code":"esb_test", + "bk_app_secret":"xxx", + "bk_username":"xxx", + "bk_token":"xxx", + "bk_biz_set_id":2, + "filter":{ + "condition":"AND", + "rules":[ + { + "field":"xxx", + "operator":"equal", + "value":"xxx" + }, + { + "field":"xxx", + "operator":"in", + "value":[ + "xxx" + ] + } + ] + }, + "fields":[ + "bk_biz_id", + "bk_biz_name" + ], + "page":{ + "start":0, + "limit":10, + "enable_count":false, + "sort":"bk_biz_id" + } +} +``` + +### Return Result Example + +```python + +{ + "result": true, + "code": 0, + "message": "", + "permission":null, + "data": { + "count": 0, + "info": [ + { + "bk_biz_id": 1, + "bk_biz_name": "xxx" + } + ] + }, + "request_id": "dsda1122adasadadada2222" +} +``` + +### Return Search Business Number Result Example + +```python +{ + "result":true, + "code":0, + "message":"", + "permission":null, + "data":{ + "count":10, + "info":[ + + ] + }, + "request_id": "dsda1122adasadadada2222" +} +``` + +### Return Result 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 | +| permission | object | permission info | +| data | object | response data | +| request_id | string | request chain id | + +#### data + +| Field | Type | Description | +|-----------|-----------|-----------| +| count | int | the num of record | +| info | array | business info | + +**Note:** +- if the request is to query detailed information, then count is 0. If the query is for quantity, then info is empty. diff --git a/paas2/esb/components/confapis/cc/apidocs/en/search_business_set.md b/paas2/esb/components/confapis/cc/apidocs/en/search_business_set.md new file mode 100644 index 000000000..00a8cb410 --- /dev/null +++ b/paas2/esb/components/confapis/cc/apidocs/en/search_business_set.md @@ -0,0 +1,243 @@ +### Functional description + +search business set(v3.10.12+) + +### Request Parameters + +{{ common_args_desc }} + +#### General Parameters + +| Field | Type | Required | Description | +|-----------|------------|--------|------------| +| bk_biz_set_filter | object | No | business set condition scope| +| time_condition | object | No | query condition, the parameter is any attribute of the business, if not written, it means to search all data| +| fields | array | No | fields of object,the parameter is any attribute of the business. if the field information is not filled in, return all the fields of the business | +| page | object | Yes | page condition | + +#### bk_biz_set_filter + +- This parameter is a combination of service set attribute field filtering rules, which is used to search for service sets +based on service set attribute fields. The combination supports AND and OR, and allows nesting, up to 2 levels of nesting. + +| Field | Type | Required | Description | +|-----------|------------|--------|------------| +| condition | string | Yes | rule operator| +| rules | array | Yes | filter business scope rules| + + +#### rules +- the filter rule is the triple `field`, `operator`, `value` + +| Field | Type | Required | Description | +| -------- | ------ | ---- | ------------------------------------------------------------ | +| field | string | Yes | | +| operator | string | Yes | 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 | + +condition rules detail: + +#### time_condition + +| Field | Type | Required | Description | +|-------|--------|-----|--------------------| +| oper | string | Yes | operator,only `and` is supported | +| rules | array | Yes | time query condition | + +#### rules + +| Field | Type | Required | Description | +|-------|--------|-----|----------------------------------| +| field | string | Yes | value of model field | +| start | string | Yes | start time in the form of yyyy-MM-dd hh:mm:ss | +| end | string | Yes | end time in the form of yyyy-MM-dd hh:mm:ss | + +#### page + +| Field | Type | Required | Description | +|-----------|------------|--------|------------| +| start | int | Yes | start record | +| limit | int | Yes | page limit, max is 500 | +| enable_count | bool | Yes | whether to get the flag of the number of query objects | +| sort | string | No | sort field, by adding - in front of the field, such as sort:"-field" can indicate descending order by field field | + +**Note:** +- `enable_count` If this flag is then the request is to get the count. At this time, the rest of the fields must be true, start is 0, limit: 0, and sort is "". +- `sort` If the caller does not specify it, the background defaults to the business set ID. + +### Request Parameters Example + +```python +{ + "bk_app_code":"esb_test", + "bk_app_secret":"xxx", + "bk_username":"xxx", + "bk_token":"xxx", + "biz_set_filter":{ + "condition":"AND", + "rules":[ + { + "field":"bk_biz_set_id", + "operator":"equal", + "value":10 + }, + { + "field":"bk_biz_set_maintainer", + "operator":"equal", + "value":"admin" + } + ] + }, + "time_condition":{ + "oper":"and", + "rules":[ + { + "field":"create_time", + "start":"2021-05-13 01:00:00", + "end":"2021-05-14 01:00:00" + } + ] + }, + "fields": [ + "bk_biz_id" + ], + "page":{ + "start":0, + "limit":500, + "enable_count":false, + "sort":"bk_biz_set_id" + } +} +``` + +### Return Result Example +```python + +{ + "result":true, + "code":0, + "message":"success", + "permission":null, + "data":{ + "count":0, + "info":[ + { + "bk_biz_set_id":10, + "bk_biz_set_name":"biz_set", + "bk_biz_set_desc":"dba", + "biz_set_maintainer":"tom", + "create_time":"2021-09-06T08:10:50.168Z", + "last_time":"2021-10-15T02:30:01.867Z", + "bk_scope":{ + "match_all":true + } + }, + { + "bk_biz_set_id":11, + "bk_biz_set_name":"biz_set1", + "bk_biz_set_desc":"dba", + "biz_set_maintainer":"tom", + "create_time":"2021-09-06T08:10:50.168Z", + "last_time":"2021-10-15T02:30:01.867Z", + "bk_scope":{ + "match_all":false, + "filter":{ + "condition":"AND", + "rules":[ + { + "field":"bk_sla", + "operator":"equal", + "value":"2" + }, + { + "field":"bk_biz_maintainer", + "operator":"equal", + "value":"admin" + } + ] + } + } + } + ] + }, + "request_id": "dsda1122adasadadada2222" +} +``` + +### Return Search Business Number Result Example +```python +{ + "result":true, + "code":0, + "message":"success", + "permission":null, + "data":{ + "count":2, + "info":[ + ] + }, + "request_id": "dsda1122adasadadada2222" +} +``` + +### Return Result 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 | +| permission | object | permission info | +| data | object | response data | +| request_id | string | request chain id | + +#### data + +| Field | Type | Description | +|-----------|-----------|-----------| +| count | int | the num of record | +| info | array | business set info | + +#### info + +| Field | Type | Required | Description | +|-----------|------------|--------|------------------| +| bk_biz_set_id | int | Yes | business set ID| +| create_time | string | No | business set create time| +| last_time | string | No | business set update time| +| bk_biz_set_name | string | Yes | business set name| +| bk_biz_maintainer | string | No | the maintainers | +| bk_biz_set_desc | string | No | business description | +| bk_scope | object | No | business set selected business scope | + +#### bk_scope + +| Field | Type | Required | Description | +|-----------|------------|--------|------------| +| match_all | bool | Yes | selected business line tags| +| filter | object | No | scope conditions for the selected business| + +#### filter + +- This parameter is a combination of business attribute field filtering rules, which is used to search for business based on business attribute fields. Combinations only support AND operations and can be nested up to 2 levels. + +| Field | Type | Required | Description | +|-----------|------------|--------|------------| +| 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,in | +| value | - | No | values's format depend on operator | + +**Note:** + +- The input here only describes the required and built-in parameters for the `info` parameter, and the other parameters that need to be filled depend on the attribute fields defined by the user. +- if the request is to query detailed information, then count is 0. If the query is for quantity, then info is empty. + diff --git a/paas2/esb/components/confapis/cc/apidocs/en/search_business_set_topo.md b/paas2/esb/components/confapis/cc/apidocs/en/search_business_set_topo.md new file mode 100644 index 000000000..5b484b7e7 --- /dev/null +++ b/paas2/esb/components/confapis/cc/apidocs/en/search_business_set_topo.md @@ -0,0 +1,79 @@ +### Functional description + + +search business set topology(v3.10.12+) + +### Request Parameters + +{{ common_args_desc }} + +#### General 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 model that needs to be queried| +| bk_parent_id | int | Yes | the parent ID of the model that needs to be queried | + +### Request Parameters Example + +```json +{ + "bk_app_code":"esb_test", + "bk_app_secret":"xxx", + "bk_username":"xxx", + "bk_token":"xxx", + "bk_biz_set_id":3, + "bk_parent_obj_id":"bk_biz_set_obj", + "bk_parent_id":344 +} +``` + +### Return Result Example + +```json +{ + "result":true, + "code":0, + "message":"", + "permission":null, + "data":[ + { + "bk_obj_id":"bk_biz_set_obj", + "bk_inst_id":5, + "bk_inst_name":"xxx", + "default":0 + }, + { + "bk_obj_id":"bk_biz_set_obj", + "bk_inst_id":6, + "bk_inst_name":"xxx", + "default":0 + } + ], + "request_id": "dsda1122adasadadada2222" +} +``` + +### Return Result 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 | +| permission | object | permission info | +| data | array | response data | +| request_id | string | request chain id | + +#### data + +| 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 | + + diff --git a/paas2/esb/components/confapis/cc/apidocs/en/update_business_set.md b/paas2/esb/components/confapis/cc/apidocs/en/update_business_set.md new file mode 100644 index 000000000..bbbd1366c --- /dev/null +++ b/paas2/esb/components/confapis/cc/apidocs/en/update_business_set.md @@ -0,0 +1,119 @@ +### Functional description + +update business set info(v3.10.12+) + +### Request Parameters + +{{ common_args_desc }} + +#### General Parameters + +| Field | Type | Required | Description | +|-----------|------------|--------|------------| +| bk_biz_set_ids | array | Yes | business set id list | +| data | object | Yes | business set data| + +#### data + +| Field | Type | Required | Description | +|-----------|------------|--------|------------| +| bk_biz_set_attr | object | No | Business Set Model Fields | +| bk_scope | object | No | Selected business area | + +#### bk_biz_set_attr + +| Field | Type | Required | Description | +|-----------|------------|--------|------------| +| bk_biz_set_name | string | Yes | business set name| +| bk_biz_maintainer | string | No | the maintainers | +| bk_biz_set_desc | string | No | business set description | + +#### bk_scope + +| Field | Type | Required | Description | +|-----------|------------|--------|------------| +| match_all | bool | Yes | Selected business line tags| +| filter | object| No | Scope conditions for the selected business | + +#### filter + +This parameter is a combination of service attribute field filtering rules, which is used to search for services based on service attribute fields. Combinations only support AND operations and can be nested up to 2 levels. + +| Field | Type | Required | Description | +|-----------|------------|--------|------------| +| condition | string | Yes |rule operator| +| rules | array | Yes |Scope condition rules for the selected business | + + +#### rules + +| Field | Type | Required | Description | +| -------- | ------ | ---- | ------------------------------------------------------------ | +| field | string | Yes | field name | +| operator | string | Yes | available values: equal,in | +| value | - | No | values's format depend on operator | + + +**Note:** +- The input parameters here only describe the required and built-in parameters of the system, and the other parameters that need to be filled depend on the attribute fields defined by the user. +- Changes to `bk_biz_set_name` and `bk_scope` fields are not allowed under batch scenarios (the number of IDs in bk_biz_set_ids is greater than 1). +- The maximum number for each batch update is 200. + +### Request Parameters Example + +```python +{ + "bk_app_code":"esb_test", + "bk_app_secret":"xxx", + "bk_username":"xxx", + "bk_token":"xxx", + "bk_biz_set_ids":[ + 2 + ], + "data":{ + "bk_biz_set_attr":{ + "bk_biz_set_desc":"xxx", + "biz_set_maintainer":"xxx" + }, + "bk_scope":{ + "match_all":false, + "filter":{ + "condition":"AND", + "rules":[ + { + "field":"bk_sla", + "operator":"equal", + "value":"2" + } + ] + } + } + } +} +``` + +### Return Result Example + +```python + +{ + "result": true, + "code": 0, + "message": "", + "permission":null, + "data": {}, + "request_id": "dsda1122adasadadada2222" +} +``` + +### Return Result 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 | +| permission | object | permission info | +| data | object | response data | +| request_id | string | request chain id | diff --git a/paas2/esb/components/confapis/cc/apidocs/zh_hans/create_business_set.md b/paas2/esb/components/confapis/cc/apidocs/zh_hans/create_business_set.md new file mode 100644 index 000000000..f88cc3401 --- /dev/null +++ b/paas2/esb/components/confapis/cc/apidocs/zh_hans/create_business_set.md @@ -0,0 +1,112 @@ +### 功能描述 + +新建业务集(v3.10.12+) + +### 请求参数 + +{{ common_args_desc }} + + +#### 接口参数 + +| 字段 | 类型 | 必选 | 描述 | +|-----------|------------|--------|------------| +| bk_biz_set_attr | object | 是 | 业务集模型字段| +| bk_scope | object | 是 | 所选业务范围 | + +#### bk_biz_set_attr + +| 字段 | 类型 | 必选 | 描述 | +|-----------|------------|--------|------------| +| bk_biz_set_name | string | 是 | 业务集名称| +| bk_biz_maintainer | string | 否 | 运维人员 | +| bk_biz_set_desc | string | 否 | 业务集描述 | + +#### bk_scope + +| 字段 | 类型 | 必选 | 描述 | +|-----------|------------|--------|------------| +| match_all | bool | 是 | 所选业务范围标记| +| filter | object | 否 | 所选业务的范围条件 | + +#### filter + +该参数为业务属性字段过滤规则的组合,用于根据业务属性字段搜索业务。组合仅支持AND操作,可以嵌套,最多嵌套2层。 + +| 字段 | 类型 | 必选 | 描述 | +|-----------|------------|--------|------------| +| condition | string | 是 | 规则操作符| +| rules | array | 是 | 所选业务的范围条件规则 | + + +#### rules + +| 名称 | 类型 | 必填 | 默认值 | 说明 | Description | +| -------- | ------ | ---- | ------ | ------ | ------------------------------------------------------------ | +| field | string | 是 | 无 | 字段名 | | +| operator | string | 是 | 无 | 操作符 | 可选值 equal,in | +| value | - | 否 | 无 | 操作数 | 不同的operator对应不同的value格式 | + +**注意:** +- 此处的输入针对`bk_biz_set_attr`参数仅对必填以及系统内置的参数做了说明,其余需要填写的参数取决于用户自己定义的属性字段 +- `bk_scope`中`match_all`字段是true的时候表示业务集的所选业务范围是全部,此时参数`filter`为空。如果`match_all`字段是false,`filter`需要非空,用户需要显式的指 +定业务的选择范围 +- 业务集中所选业务属性圈定类型是组织和枚举 +### 请求参数示例 + +```python +{ + "bk_app_code":"esb_test", + "bk_app_secret":"xxx", + "bk_username":"xxx", + "bk_token":"xxx", + "bk_biz_set_attr":{ + "bk_biz_set_name":"biz_set", + "bk_biz_set_desc":"xxx", + "biz_set_maintainer":"xxx" + }, + "bk_scope":{ + "match_all":false, + "filter":{ + "condition":"AND", + "rules":[ + { + "field":"bk_sla", + "operator":"equal", + "value":"3" + }, + { + "field":"life_cycle", + "operator":"equal", + "value":1 + } + ] + } + } +} +``` + +### 返回结果示例 + +```python + +{ + "result":true, + "code":0, + "message":"success", + "permission":null, + "data":5, + "request_id": "dsda1122adasadadada2222" +} +``` +### 返回结果参数说明 +#### response + +| 名称 | 类型 | 描述 | +| ------- | ------ | ------------------------------------- | +| result | bool | 请求成功与否。true:请求成功;false请求失败 | +| code | int | 错误编码。 0表示success,>0表示失败错误 | +| message | string | 请求失败返回的错误信息 | +| permission | object | 权限信息 | +| data | int | 创建的业务集id | +| request_id | string | 请求链id | diff --git a/paas2/esb/components/confapis/cc/apidocs/zh_hans/delete_business_set.md b/paas2/esb/components/confapis/cc/apidocs/zh_hans/delete_business_set.md new file mode 100644 index 000000000..b653bbdc8 --- /dev/null +++ b/paas2/esb/components/confapis/cc/apidocs/zh_hans/delete_business_set.md @@ -0,0 +1,52 @@ +### 功能描述 + +删除业务集(v3.10.12+) + +### 请求参数 + +{{ common_args_desc }} + +#### 接口参数 + +| 字段 | 类型 | 必选 | 描述 | +|-----------|------------|--------|------------| +| bk_biz_set_ids | array | 是 | 业务集ID列表 | + +### 请求参数示例 + +```python +{ + "bk_app_code":"esb_test", + "bk_app_secret":"xxx", + "bk_username":"xxx", + "bk_token":"xxx", + "bk_biz_set_ids":[ + 10, + 12 + ] +} +``` + +### 返回结果示例 + +```python +{ + "result": true, + "code": 0, + "message": "", + "permission":null, + "data": {}, + "request_id": "dsda1122adasadadada2222" +} +``` +### 返回结果参数说明 +#### response + +| 名称 | 类型 | 描述 | +| ------- | ------ | ------------------------------------- | +| result | bool | 请求成功与否。true:请求成功;false请求失败 | +| code | int | 错误编码。 0表示success,>0表示失败错误 | +| message | string | 请求失败返回的错误信息 | +| permission | object | 权限信息 | +| data | object | 请求返回的数据 | +| request_id | string | 请求链id | diff --git a/paas2/esb/components/confapis/cc/apidocs/zh_hans/resource_watch.md b/paas2/esb/components/confapis/cc/apidocs/zh_hans/resource_watch.md index 9f2b312b1..c4d0548c2 100644 --- a/paas2/esb/components/confapis/cc/apidocs/zh_hans/resource_watch.md +++ b/paas2/esb/components/confapis/cc/apidocs/zh_hans/resource_watch.md @@ -42,10 +42,12 @@ | bk_fields | array string | 看情况 | 返回的事件中需要返回的字段列表,目前监听主机资源该字段为必填字段,不能置空,主机关系可以置空。置空则默认为返回所有字段。 | | bk_start_from | Int64 | 否 | 监听事件的起始时间,该值为unix time的秒数,即为从UTC1970年1月1日0时0分0秒起至你要watch的时间点的总秒数。 | | bk_cursor | string | 否 | 监听事件的游标,代表了要开始或者继续watch(监听)的事件地址,系统会返回这个游标的下一个、或一批事件。 | -| bk_resource | string | 是 | 要监听的资源类型,枚举值为:host, host_relation, biz, set, module, process, object_instance, mainline_instance。其中host代表主机详情事件,host_relation代表主机的关系事件,biz代表业务详情事件,set代表集群详情事件,module代表模块详情事件,process代表进程详情事件,object_instance代表通用模型实例事件,mainline_instance代表主线模型实例事件。 | +| bk_resource | string | 是 | 要监听的资源类型,枚举值为:host, host_relation, biz, set, module, process, object_instance, mainline_instance, biz_set, biz_set_relation。其中host代表主机详情事件,host_relation代表主机的关系事件,biz代表业务详情事件,set代表集群详情事件,module代表模块详情事件,process代表进程详情事件,object_instance代表通用模型实例事件,mainline_instance代表主线模型实例事件,biz_set代表业务集事件,biz_set_relation代表业务集和业务的关系事件。 | | bk_supplier_account | string | 是 | 开发商账号 | | bk_filter | object | 否 | 过滤条件 | +**注: biz_set_relation事件会在业务集的新增、删除和更新"bk_scope"字段时和业务的新增、删除、更新涉及到业务集关系变更时触发。事件详情中会返回关系发生了变更的业务集的ID和该业务集所包含的所有业务ID列表** + #### bk_filter | 字段 | 类型 | 必选 | 描述 | @@ -156,10 +158,6 @@ ```json { - "bk_app_code": "esb_test", - "bk_app_secret": "xxx", - "bk_username": "xxx", - "bk_token": "xxx", "bk_biz_id" : 1, "bk_host_id" : 2, "bk_module_id" : 3, @@ -183,6 +181,20 @@ } ``` +#### biz_set_relation资源 bk_detail字段数据示例: +```json +{ + "bk_biz_set_id": 1, + "bk_biz_ids": [1 ,2, 3] +} +``` + +- biz_set_relation资源 bk_detail数据描述 + +| 名称 | 类型 | 描述 | +| ------------- | --------- | -------------------------------------- | +| bk_biz_set_id | int | 业务集和业务的关系发生了变化的业务集ID | +| bk_biz_ids | int array | 该业务集所包含的所有业务的ID列表 | ### 使用说明 diff --git a/paas2/esb/components/confapis/cc/apidocs/zh_hans/search_biz_in_business_set.md b/paas2/esb/components/confapis/cc/apidocs/zh_hans/search_biz_in_business_set.md new file mode 100644 index 000000000..79cf0a2e6 --- /dev/null +++ b/paas2/esb/components/confapis/cc/apidocs/zh_hans/search_biz_in_business_set.md @@ -0,0 +1,159 @@ +### 功能描述 + +查询业务集中的业务(v3.10.12+) + +### 请求参数 + +{{ common_args_desc }} + +#### 接口参数 + +| 字段 | 类型 | 必选 | 描述 | +|-----------|------------|--------|------------| +| bk_biz_set_id | int | 是 | 业务集ID | +| filter | object | 否 | 业务属性组合查询条件 | +| fields | array | 否 | 指定查询的字段,参数为业务的任意属性,如果不填写字段信息,系统会返回业务的所有字段 | +| page | object | 是 | 分页条件 | + +#### filter + +查询条件。组合支持AND 和 OR 两种方式。可以嵌套,最多嵌套2层。 + +| 字段 | 类型 | 必选 | 描述 | +|-----------|------------|--------|------------| +| condition | string | 是 | 规则操作符| +| rules | array | 是 | 过滤业务的范围规则 | + + +#### rules +过滤规则为三元组 `field`, `operator`, `value` + +| 名称 | 类型 | 必填 | 默认值 | 说明 | Description | +| -------- | ------ | ---- | ------ | ------ | ------------------------------------------------------------ | +| field | string | 是 | 无 | 字段名 | | +| operator | string | 是 | 无 | 操作符 | 可选值 equal,not_equal,in,not_in,less,less_or_equal,greater,greater_or_equal,between,not_between | +| value | - | 否 | 无 | 操作数 | 不同的operator对应不同的value格式 | + +组装规则可参考: + +#### page + +| 字段 | 类型 | 必选 | 描述 | +|-----------|------------|--------|------------| +| start | int | 是 | 记录开始位置 | +| limit | int | 是 | 每页限制条数,最大500 | +| enable_count | bool | 是 | 是否获取查询对象数量的标记 | +| sort | string | 否 | 排序字段,通过在字段前面增加 -,如 sort:"-field" 可以表示按照字段 field降序 | + +**注意:** +- `enable_count` 如果此标记为true那么表示此次请求是获取数量。此时其余字段必须为初始化值,start为0,limit为:0, sort为""。 + +### 请求参数示例 + +```python +{ + "bk_app_code":"esb_test", + "bk_app_secret":"xxx", + "bk_username":"xxx", + "bk_token":"xxx", + "bk_biz_set_id":2, + "filter":{ + "condition":"AND", + "rules":[ + { + "field":"xxx", + "operator":"equal", + "value":"xxx" + }, + { + "field":"xxx", + "operator":"in", + "value":[ + "xxx" + ] + } + ] + }, + "fields":[ + "bk_biz_id", + "bk_biz_name" + ], + "page":{ + "start":0, + "limit":10, + "enable_count":false, + "sort":"bk_biz_id" + } +} +``` + +### 详细信息返回结果示例 + +```python + +{ + "result": true, + "code": 0, + "message": "", + "permission":null, + "data": { + "count": 0, + "info": [ + { + "bk_biz_id": 1, + "bk_biz_name": "xxx" + } + ] + }, + "request_id": "dsda1122adasadadada2222" +} +``` + +### 查询业务数量的返回结果示例 + +```python +{ + "result":true, + "code":0, + "message":"", + "permission":null, + "data":{ + "count":10, + "info":[ + + ] + }, + "request_id": "dsda1122adasadadada2222" +} +``` + +### 返回结果参数说明 +#### response + +| 名称 | 类型 | 描述 | +| ------- | ------ | ------------------------------------- | +| result | bool | 请求成功与否。true:请求成功;false请求失败 | +| code | int | 错误编码。 0表示success,>0表示失败错误 | +| message | string | 请求失败返回的错误信息 | +| permission | object | 权限信息 | +| data | object | 请求返回的数据 | +| request_id | string | 请求链id | + +#### data + +| 字段 | 类型 | 描述 | +|-----------|-----------|-----------| +| count | int | 记录条数 | +| info | array | 业务实际数据 | + + +#### info + +| 字段 | 类型 | 描述 | +|-----------|-----------|-----------| +| bk_biz_id | int | 业务ID | +| bk_biz_name | string | 业务名称 | + + +**注意:** +- 如果本次请求是查询详细信息那么count为0,如果查询的是数量,那么info为空。 diff --git a/paas2/esb/components/confapis/cc/apidocs/zh_hans/search_business_set.md b/paas2/esb/components/confapis/cc/apidocs/zh_hans/search_business_set.md new file mode 100644 index 000000000..62ea24e88 --- /dev/null +++ b/paas2/esb/components/confapis/cc/apidocs/zh_hans/search_business_set.md @@ -0,0 +1,242 @@ +### 功能描述 + +查询业务集(v3.10.12+) + +### 请求参数 + +{{ common_args_desc }} + +#### 接口参数 + +| 字段 | 类型 | 必选 | 描述 | +|-----------|------------|--------|------------| +| bk_biz_set_filter | object | 否 | 业务集条件范围 | +| time_condition | object | 否 | 业务集时间范围 | +| fields | array | 否 | 查询条件,参数为业务的任意属性,如果不写代表搜索全部数据 | +| page | object | 是 | 分页条件 | + +#### bk_biz_set_filter + +该参数为业务集属性字段过滤规则的组合,用于根据业务集属性字段搜索业务集。组合支持AND 和 OR 两种方式,允许嵌套,最多嵌套2层。 + +| 字段 | 类型 | 必选 | 描述 | +|-----------|------------|--------|------------| +| condition | string | 是 | 规则操作符| +| rules | array | 是 | 过滤业务的范围规则 | + + +#### rules +过滤规则为三元组 `field`, `operator`, `value` + +| 名称 | 类型 | 必填 | 默认值 | 说明 | Description | +| -------- | ------ | ---- | ------ | ------ | ------------------------------------------------------------ | +| field | string | 是 | 无 | 字段名 | | +| operator | string | 是 | 无 | 操作符 | 可选值 equal,not_equal,in,not_in,less,less_or_equal,greater,greater_or_equal,between,not_between | +| value | - | 否 | 无 | 操作数 | 不同的operator对应不同的value格式 | + +组装规则可参考: + +#### time_condition + +| 字段 | 类型 | 必选 | 描述 | +|-------|--------|-----|--------------------| +| oper | string | 是 | 操作符,目前只支持and | +| rules | array | 是 | 时间查询条件 | + +#### rules + +| 字段 | 类型 | 必选 | 描述 | +|-------|--------|-----|----------------------------------| +| field | string | 是 | 取值为模型的字段名 | +| start | string | 是 | 起始时间,格式为yyyy-MM-dd hh:mm:ss | +| end | string | 是 | 结束时间,格式为yyyy-MM-dd hh:mm:ss | + +#### page + +| 字段 | 类型 | 必选 | 描述 | +|-----------|------------|--------|------------| +| start | int | 是 | 记录开始位置 | +| limit | int | 是 | 每页限制条数,最大500 | +| enable_count | bool | 是 | 本次请求是否为获取数量还是详情的标记 | +| sort | string | 否 | 排序字段,通过在字段前面增加 -,如 sort:"-field" 可以表示按照字段 field降序 | + +**注意:** +- `enable_count` 如果此标记为true,表示此次请求是获取数量。此时其余字段必须为初始化值,start为0,limit为:0, sort为""。 +- `sort`如果调用方没有指定,后台默认指定为业务集ID。 + +### 请求参数示例 + +```python +{ + "bk_app_code":"esb_test", + "bk_app_secret":"xxx", + "bk_username":"xxx", + "bk_token":"xxx", + "biz_set_filter":{ + "condition":"AND", + "rules":[ + { + "field":"bk_biz_set_id", + "operator":"equal", + "value":10 + }, + { + "field":"bk_biz_set_maintainer", + "operator":"equal", + "value":"admin" + } + ] + }, + "time_condition":{ + "oper":"and", + "rules":[ + { + "field":"create_time", + "start":"2021-05-13 01:00:00", + "end":"2021-05-14 01:00:00" + } + ] + }, + "fields": [ + "bk_biz_id" + ], + "page":{ + "start":0, + "limit":500, + "enable_count":false, + "sort":"bk_biz_set_id" + } +} +``` + +### 返回结果示例 + +### 详细信息接口响应 +```python + +{ + "result":true, + "code":0, + "message":"success", + "permission":null, + "data":{ + "count":0, + "info":[ + { + "bk_biz_set_id":10, + "bk_biz_set_name":"biz_set", + "bk_biz_set_desc":"dba", + "biz_set_maintainer":"tom", + "create_time":"2021-09-06T08:10:50.168Z", + "last_time":"2021-10-15T02:30:01.867Z", + "bk_scope":{ + "match_all":true + } + }, + { + "bk_biz_set_id":11, + "bk_biz_set_name":"biz_set1", + "bk_biz_set_desc":"dba", + "biz_set_maintainer":"tom", + "create_time":"2021-09-06T08:10:50.168Z", + "last_time":"2021-10-15T02:30:01.867Z", + "bk_scope":{ + "match_all":false, + "filter":{ + "condition":"AND", + "rules":[ + { + "field":"bk_sla", + "operator":"equal", + "value":"3" + }, + { + "field":"bk_biz_maintainer", + "operator":"equal", + "value":"admin" + } + ] + } + } + } + ] + }, + "request_id": "dsda1122adasadadada2222" +} +``` + +### 业务集数量接口响应 +```python +{ + "result":true, + "code":0, + "message":"success", + "permission":null, + "data":{ + "count":2, + "info":[ + ] + }, + "request_id": "dsda1122adasadadada2222" +} +``` + +### 返回结果参数说明 +#### response + +| 名称 | 类型 | 描述 | +| ------- | ------ | ------------------------------------- | +| result | bool | 请求成功与否。true:请求成功;false请求失败 | +| code | int | 错误编码。 0表示success,>0表示失败错误 | +| message | string | 请求失败返回的错误信息 | +| permission | object | 权限信息 | +| data | object | 请求返回的数据 | +| request_id | string | 请求链id | + +#### data + +| 字段 | 类型 | 描述 | +|-----------|-----------|-----------| +| count | int | 记录条数 | +| info | array | 业务实际数据 | + +#### info + +| 字段 | 类型 | 必选 | 描述 | +|-----------|------------|--------|------------| +| bk_biz_set_id | int | 是 | 业务集ID| +| create_time | string | 否 | 业务集创建时间| +| last_time | string | 否 | 业务集修改时间| +| bk_biz_set_name | string | 是 | 业务集名称| +| bk_biz_maintainer | string | 否 | 运维人员 | +| bk_biz_set_desc | string | 否 | 业务集描述 | +| bk_scope | object | 否 | 业务集所选业务范围 | + +#### bk_scope + +| 字段 | 类型 | 必选 | 描述 | +|-----------|------------|--------|------------| +| match_all | bool | 是 | 所选业务范围标记| +| filter | object | 否 | 所选业务的范围条件 | + +#### filter + +该参数为业务属性字段过滤规则的组合,用于根据业务属性字段搜索业务。组合仅支持AND操作,可以嵌套,最多嵌套2层。 + +| 字段 | 类型 | 必选 | 描述 | +|-----------|------------|--------|------------| +| condition | string | 是 | 规则操作符| +| rules | array | 是 | 所选业务的范围条件规则 | + + +#### rules + +| 名称 | 类型 | 必填 | 默认值 | 说明 | Description | +| -------- | ------ | ---- | ------ | ------ | ------------------------------------------------------------ | +| field | string | 是 | 无 | 字段名 | | +| operator | string | 是 | 无 | 操作符 | 可选值 equal,in | +| value | - | 否 | 无 | 操作数 | 不同的operator对应不同的value格式 | + +**注意:** +- 如果本次请求是查询详细信息那么count为0,如果查询的是数量,那么info为空。 +- 此处的输入针对`info`参数仅对必填以及系统内置的参数做了说明,其余需要填写的参数取决于用户自己定义的属性字段 diff --git a/paas2/esb/components/confapis/cc/apidocs/zh_hans/search_business_set_topo.md b/paas2/esb/components/confapis/cc/apidocs/zh_hans/search_business_set_topo.md new file mode 100644 index 000000000..8b58302be --- /dev/null +++ b/paas2/esb/components/confapis/cc/apidocs/zh_hans/search_business_set_topo.md @@ -0,0 +1,78 @@ +### 功能描述 + +查询业务集拓扑(v3.10.12+) + +### 请求参数 + +{{ common_args_desc }} + +#### 接口参数 + +| 字段 | 类型 | 必选 | 描述 | +|-----------|------------|--------|------------| +| bk_biz_set_id | int | 是 | 业务集ID | +| bk_parent_obj_id | string | 是 | 需要查询模型的parent对象ID | +| bk_parent_id | int | 是 | 需要查询模型的parent ID | + +### 请求参数示例 + +```json +{ + "bk_app_code":"esb_test", + "bk_app_secret":"xxx", + "bk_username":"xxx", + "bk_token":"xxx", + "bk_biz_set_id":3, + "bk_parent_obj_id":"bk_biz_set_obj", + "bk_parent_id":344 +} +``` + +### 返回结果示例 + +```json +{ + "result":true, + "code":0, + "message":"", + "permission":null, + "data":[ + { + "bk_obj_id":"bk_biz_set_obj", + "bk_inst_id":5, + "bk_inst_name":"xxx", + "default":0 + }, + { + "bk_obj_id":"bk_biz_set_obj", + "bk_inst_id":6, + "bk_inst_name":"xxx", + "default":0 + } + ], + "request_id": "dsda1122adasadadada2222" +} +``` + +### 返回结果参数说明 +#### response + +| 名称 | 类型 | 描述 | +| ------- | ------ | ------------------------------------- | +| result | bool | 请求成功与否。true:请求成功;false请求失败 | +| code | int | 错误编码。 0表示success,>0表示失败错误 | +| message | string | 请求失败返回的错误信息 | +| permission | object | 权限信息 | +| data | array | 请求返回的数据 | +| request_id | string | 请求链id | + +#### data + +| 名称 | 类型 | 描述 | +| ------- | ------ | --------------- | +| bk_obj_id | string | 模型对象ID | +| bk_inst_id | int | 模型实例ID | +| bk_inst_name | string | 模型实例名称 | +| default | int | 模型实例分类 | + + diff --git a/paas2/esb/components/confapis/cc/apidocs/zh_hans/update_business_set.md b/paas2/esb/components/confapis/cc/apidocs/zh_hans/update_business_set.md new file mode 100644 index 000000000..b2df700bb --- /dev/null +++ b/paas2/esb/components/confapis/cc/apidocs/zh_hans/update_business_set.md @@ -0,0 +1,119 @@ +### 功能描述 + +更新业务集信息(v3.10.12+) + +### 请求参数 + +{{ common_args_desc }} + +#### 接口参数 + +| 字段 | 类型 | 必选 | 描述 | +|-----------|------------|--------|------------| +| bk_biz_set_ids | array | 是 | 业务集ID列表 | +| data | object | 是 | 业务集数据 | + +#### data + +| 字段 | 类型 | 必选 | 描述 | +|-----------|------------|--------|------------| +| bk_biz_set_attr | object | 否 | 业务集模型字段 | +| bk_scope | object | 否 | 所选业务范围 | + +#### bk_biz_set_attr + +| 字段 | 类型 | 必选 | 描述 | +|-----------|------------|--------|------------| +| bk_biz_set_name | string | 是 | 业务集名称| +| bk_biz_maintainer | string | 否 | 运维人员 | +| bk_biz_set_desc | string | 否 | 业务集描述 | + +#### bk_scope + +| 字段 | 类型 | 必选 | 描述 | +|-----------|------------|--------|------------| +| match_all | bool | 是 | 所选业务范围标记| +| filter | object| 否 | 所选业务的范围条件 | + +#### filter + +该参数为业务属性字段过滤规则的组合,用于根据主机属性字段搜索主机。组合仅支持AND操作,可以嵌套,最多嵌套2层。 + +| 字段 | 类型 | 必选 | 描述 | +|-----------|------------|--------|------------| +| condition | string | 是 | 规则操作符| +| rules | array | 是 | 所选业务的范围条件规则 | + + +#### rules + +| 名称 | 类型 | 必填 | 默认值 | 说明 | Description | +| -------- | ------ | ---- | ------ | ------ | ------------------------------------------------------------ | +| field | string | 是 | 无 | 字段名 | | +| operator | string | 是 | 无 | 操作符 | 可选值 equal,in | +| value | - | 否 | 无 | 操作数 | 不同的operator对应不同的value格式 | + + +**注意:** +- 此处的输入参数仅对必填以及系统内置的参数做了说明,其余需要填写的参数取决于用户自己定义的属性字段 +- 对于批量场景(bk_biz_set_ids中的ID数量大于1)下不允许更改`bk_biz_set_name`和`bk_scope`字段 +- 每次批量更新最大数量为200。 + +### 请求参数示例 + +```python +{ + "bk_app_code":"esb_test", + "bk_app_secret":"xxx", + "bk_username":"xxx", + "bk_token":"xxx", + "bk_biz_set_ids":[ + 2 + ], + "data":{ + "bk_biz_set_attr":{ + "bk_biz_set_desc":"xxx", + "biz_set_maintainer":"xxx" + }, + "bk_scope":{ + "match_all":false, + "filter":{ + "condition":"AND", + "rules":[ + { + "field":"bk_sla", + "operator":"equal", + "value":"2" + } + ] + } + } + } +} +``` + +### 返回结果示例 + +```python + +{ + "result": true, + "code": 0, + "message": "", + "permission":null, + "data": {}, + "request_id": "dsda1122adasadadada2222" +} +``` + +### 返回结果参数说明 +#### response + +| 名称 | 类型 | 描述 | +| ------- | ------ | ------------------------------------- | +| result | bool | 请求成功与否。true:请求成功;false请求失败 | +| code | int | 错误编码。 0表示success,>0表示失败错误 | +| message | string | 请求失败返回的错误信息 | +| permission | object | 权限信息 | +| data | object | 请求返回的数据 | +| request_id | string | 请求链id | diff --git a/paas2/esb/components/confapis/cc/cc.yaml b/paas2/esb/components/confapis/cc/cc.yaml index 32c3eb046..2d784e475 100644 --- a/paas2/esb/components/confapis/cc/cc.yaml +++ b/paas2/esb/components/confapis/cc/cc.yaml @@ -1098,7 +1098,7 @@ label: 根据主机条件信息查询主机详情及其所属的拓扑信息 label_en: list host's detail info and its topology it belongs to suggest_method: POST - api_type: operate + api_type: query comp_codename: generic.v2.cc.cc_component dest_path: /api/v3/findmany/hosts/detail_topo dest_http_method: POST @@ -1109,7 +1109,7 @@ label: 查询模型实例 label_en: search object instances suggest_method: POST - api_type: operate + api_type: query comp_codename: generic.v2.cc.cc_component dest_path: /api/v3/search/instances/object/{bk_obj_id} dest_http_method: POST @@ -1119,7 +1119,7 @@ label: 查询模型实例数量 label_en: count object instances num suggest_method: POST - api_type: operate + api_type: query comp_codename: generic.v2.cc.cc_component dest_path: /api/v3/count/instances/object/{bk_obj_id} dest_http_method: POST @@ -1129,7 +1129,7 @@ label: 查询模型实例关系 label_en: search instance associations suggest_method: POST - api_type: operate + api_type: query comp_codename: generic.v2.cc.cc_component dest_path: /api/v3/search/instance_associations/object/{bk_obj_id} dest_http_method: POST @@ -1139,7 +1139,7 @@ label: 查询模型实例关系数量 label_en: count instance associations num suggest_method: POST - api_type: operate + api_type: query comp_codename: generic.v2.cc.cc_component dest_path: /api/v3/count/instance_associations/object/{bk_obj_id} dest_http_method: POST @@ -1149,7 +1149,7 @@ label: 查询业务主线实例拓扑源与目标节点的关系信息 label_en: search the brief relations of the source object instance with the destination object instance. suggest_method: POST - api_type: operate + api_type: query comp_codename: generic.v2.cc.cc_component dest_path: /api/v3/find/topo/biz/brief_node_relation dest_http_method: POST @@ -1169,11 +1169,71 @@ label: 批量创建模型实例关联关系 label_en: batch create association between object's instance suggest_method: POST - api_type: query + api_type: operate comp_codename: generic.v2.cc.cc_component dest_path: /api/v3/createmany/instassociation dest_http_method: POST +- path: /v2/cc/create_business_set/ + name: create_business_set + label: 创建业务集 + label_en: create business set + suggest_method: POST + api_type: operate + comp_codename: generic.v2.cc.cc_component + dest_path: /api/v3/create/biz_set + dest_http_method: POST + +- path: /v2/cc/batch_delete_business_set/ + name: batch_delete_business_set + label: 批量删除业务集 + label_en: delete business set batch + suggest_method: POST + api_type: operate + comp_codename: generic.v2.cc.cc_component + dest_path: /api/v3/deletemany/biz_set + dest_http_method: POST + +- path: /v2/cc/list_business_in_business_set/ + name: list_business_in_business_set + label: 查询业务集中的业务列表 + label_en: list business in business set + suggest_method: POST + api_type: query + comp_codename: generic.v2.cc.cc_component + dest_path: /api/v3/find/biz_set/biz_list + dest_http_method: POST + +- path: /v2/cc/list_business_set/ + name: list_business_set + label: 查询业务集 + label_en: list business set + suggest_method: POST + api_type: query + comp_codename: generic.v2.cc.cc_component + dest_path: /api/v3/findmany/biz_set + dest_http_method: POST + +- path: /v2/cc/list_business_set_topo/ + name: list_business_set_topo + label: 查询业务集拓扑 + label_en: list business set topo + suggest_method: POST + api_type: query + comp_codename: generic.v2.cc.cc_component + dest_path: /api/v3/find/biz_set/topo_path + dest_http_method: POST + +- path: /v2/cc/batch_update_business_set/ + name: batch_update_business_set + label: 批量更新业务集信息 + label_en: batch update business set info + suggest_method: POST + api_type: operate + comp_codename: generic.v2.cc.cc_component + dest_path: /api/v3/updatemany/biz_set + dest_http_method: PUT + - path: /v2/cc/find_host_service_template/ name: list_host_service_template_id label: 查询主机所属的服务模版id列表信息 diff --git a/paas2/esb/components/confapis/monitor_v3/monitor_v3.yaml b/paas2/esb/components/confapis/monitor_v3/monitor_v3.yaml index 2aae774f7..bc8cfb1dd 100644 --- a/paas2/esb/components/confapis/monitor_v3/monitor_v3.yaml +++ b/paas2/esb/components/confapis/monitor_v3/monitor_v3.yaml @@ -1020,17 +1020,6 @@ path: /v2/monitor_v3/collector_plugin_upgrade_info/ suggest_method: GET -- api_type: operate - comp_codename: generic.v2.monitor_v3.monitor_v3_component - dest_http_method: POST - dest_path: /api/v3/meta/check_or_create_kafka_storage/ - is_hidden: true - label: 创建实时监控表对应的kafka存储 - label_en: check or create kafka storage - name: check_or_create_kafka_storage - path: /v2/monitor_v3/check_or_create_kafka_storage/ - method: POST - - api_type: operate comp_codename: generic.v2.monitor_v3.monitor_v3_component dest_http_method: POST @@ -1383,3 +1372,14 @@ name: search_alert_by_event path: /v2/monitor_v3/search_alert_by_event/ method: POST + +- api_type: operate + comp_codename: generic.v2.monitor_v3.monitor_v3_component + dest_http_method: POST + dest_path: /api/v4/action_instance/get_action_params_by_config/ + is_hidden: true + label: 根据套餐ID获取当前告警处理参数 + label_en: null + name: get_action_params_by_config + path: /v2/monitor_v3/get_action_params_by_config/ + method: POST \ No newline at end of file diff --git a/paas2/esb/components/confapis/usermanage/apidocs/en/list_department_profiles.md b/paas2/esb/components/confapis/usermanage/apidocs/en/list_department_profiles.md index 05f590bf6..91bac2594 100644 --- a/paas2/esb/components/confapis/usermanage/apidocs/en/list_department_profiles.md +++ b/paas2/esb/components/confapis/usermanage/apidocs/en/list_department_profiles.md @@ -41,48 +41,9 @@ Get user info by department "data": [{ "id":1, "username":"admin", - "password_valid_days":-1, - "departments":[{ - "id":1, - "name":"总公司", - "order":1, - "full_name":"总公司" - }], - "extras":{ - "date":null, - "gender":"1", - "level":"1", - "dingding":null - }, - "leader":[{ - "id":1335, - "username":"foo", - "display_name":"foo" - }], - "last_login_time":"2021-12-23T20:43:25.164441Z", - "create_time":"2020-10-23T10:48:42.155327Z", - "update_time":"2021-11-29T20:11:44.922731Z", - "qq":"", - "email":"admin@test.com", - "telephone":"13111112222", - "wx_userid":"", - "wx_openid":"", - "code":null, - "domain":"default.local", - "category_id":1, - "display_name":"admin", - "logo":"null", - "status":"NORMAL", - "staff_status":"IN", - "password_update_time":"2021-10-12T11:03:36.713819Z", - "position":0, - "time_zone":"Asia/Shanghai", - "language":"zh-cn", - "country_code":"86", - "iso_code":"CN", - "enabled":true, - "type":"", - "role":1 + "departments":[], + "extras":{}, + "leader":[] }], "result": true } @@ -97,3 +58,13 @@ Get user info by department |message|string|error message| |data| array| result | +`data` fields(The specific field depends on the parameter `fields`) + +| field | type | description | +|-----------|-----------|-----------| +|id| int | user ID | +|username|string| username | +|departments|array| related departments | +|extras| dict | extras fields | +|leader| array| related leaders | + diff --git a/paas2/esb/components/confapis/usermanage/apidocs/en/list_departments.md b/paas2/esb/components/confapis/usermanage/apidocs/en/list_departments.md index 74b0e48d8..b9dd13715 100644 --- a/paas2/esb/components/confapis/usermanage/apidocs/en/list_departments.md +++ b/paas2/esb/components/confapis/usermanage/apidocs/en/list_departments.md @@ -47,21 +47,7 @@ List all departments "name":"总公司", "has_children":true, "full_name":"总公司", - "order":1, - "extras":{}, - "enabled":true, - "children":[{ - "id":316, - "name":"子部门", - "full_name":"总公司/子公司", - "has_children":true - }], - "code":null, - "category_id":1, - "lft":1, - "rght":6900, - "tree_id":1004, - "level":0, + "children":[], "parent":null }], "result": true @@ -77,3 +63,13 @@ List all departments |message|string|error message| |data| array| result, please refer to sample results | +`data` fields(The specific field depends on the parameter `fields`) + +| field | type | description | +|-----------|-----------|-----------| +|id| int | department ID | +|name|string| department name | +|has_children|bool| if include children departments | +|full_name| string | full route of department | +|children| array| related children departments | +|parent| object | parent department | diff --git a/paas2/esb/components/confapis/usermanage/apidocs/en/list_profile_departments.md b/paas2/esb/components/confapis/usermanage/apidocs/en/list_profile_departments.md index 08112e4f3..ac471dccc 100644 --- a/paas2/esb/components/confapis/usermanage/apidocs/en/list_profile_departments.md +++ b/paas2/esb/components/confapis/usermanage/apidocs/en/list_profile_departments.md @@ -38,10 +38,7 @@ List certain user's departments "data": [{ "id": 4, "name": "admin", - "family": [ - {"id": 5, "name": "BlueKing1"}, - {"id": 6, "name": "BlueKing2"}, - ] + "children": [] }], "result": true } @@ -56,3 +53,13 @@ List certain user's departments |message|string|error message| |data| array| result | +`data` fields(The specific field depends on the parameter `fields`) + +| field | type | description | +|-----------|-----------|-----------| +|id| int | department ID | +|name|string| department name | +|has_children|bool| if include children departments | +|full_name| string | full route of department | +|children| array| related children departments | +|parent| object | parent department | diff --git a/paas2/esb/components/confapis/usermanage/apidocs/en/list_users.md b/paas2/esb/components/confapis/usermanage/apidocs/en/list_users.md index 7a76f97ee..3c04df16c 100644 --- a/paas2/esb/components/confapis/usermanage/apidocs/en/list_users.md +++ b/paas2/esb/components/confapis/usermanage/apidocs/en/list_users.md @@ -45,48 +45,9 @@ List all users "data": [{ "id":1, "username":"admin", - "password_valid_days":-1, - "departments":[{ - "id":1, - "name":"总公司", - "order":1, - "full_name":"总公司" - }], - "extras":{ - "date":null, - "gender":"1", - "level":"1", - "dingding":null - }, - "leader":[{ - "id":1335, - "username":"foo", - "display_name":"foo" - }], - "last_login_time":"2021-12-23T20:43:25.164441Z", - "create_time":"2020-10-23T10:48:42.155327Z", - "update_time":"2021-11-29T20:11:44.922731Z", - "qq":"", - "email":"admin@test.com", - "telephone":"13111112222", - "wx_userid":"", - "wx_openid":"", - "code":null, - "domain":"default.local", - "category_id":1, - "display_name":"admin", - "logo":"null", - "status":"NORMAL", - "staff_status":"IN", - "password_update_time":"2021-10-12T11:03:36.713819Z", - "position":0, - "time_zone":"Asia/Shanghai", - "language":"zh-cn", - "country_code":"86", - "iso_code":"CN", - "enabled":true, - "type":"", - "role":1 + "departments":[], + "extras":{}, + "leader":[] }], "result": true } @@ -101,3 +62,12 @@ List all users |message|string|error message| |data| array| result | +`data` fields(The specific field depends on the parameter `fields`) + +| field | type | description | +|-----------|-----------|-----------| +|id| int | user ID | +|username|string| username | +|departments|array| related departments | +|extras| dict | extras fields | +|leader| array| related leaders | diff --git a/paas2/esb/components/confapis/usermanage/apidocs/en/retrieve_department.md b/paas2/esb/components/confapis/usermanage/apidocs/en/retrieve_department.md index 65f95a9d5..6e1b89e04 100644 --- a/paas2/esb/components/confapis/usermanage/apidocs/en/retrieve_department.md +++ b/paas2/esb/components/confapis/usermanage/apidocs/en/retrieve_department.md @@ -39,21 +39,7 @@ Query department info "name":"总公司", "has_children":true, "full_name":"总公司", - "order":1, - "extras":{}, - "enabled":true, - "children":[{ - "id":316, - "name":"子部门", - "full_name":"总公司/子公司", - "has_children":true - }], - "code":null, - "category_id":1, - "lft":1, - "rght":6900, - "tree_id":1004, - "level":0, + "children":[], "parent":null }, "result": true @@ -69,3 +55,13 @@ Query department info |message|string|error message| |data| array| result | +`data` fields(The specific field depends on the parameter `fields`) + +| field | type | description | +|-----------|-----------|-----------| +|id| int | department ID | +|name|string| department name | +|has_children|bool| if include children departments | +|full_name| string | full route of department | +|children| array| related children departments | +|parent| object | parent department | diff --git a/paas2/esb/components/confapis/usermanage/apidocs/en/retrieve_user.md b/paas2/esb/components/confapis/usermanage/apidocs/en/retrieve_user.md index 3f366ec6a..f7603ea05 100644 --- a/paas2/esb/components/confapis/usermanage/apidocs/en/retrieve_user.md +++ b/paas2/esb/components/confapis/usermanage/apidocs/en/retrieve_user.md @@ -41,48 +41,9 @@ Query a profile which has 'admin' as username, only return selected fields (`use "data": { "id":1, "username":"admin", - "password_valid_days":-1, - "departments":[{ - "id":1, - "name":"总公司", - "order":1, - "full_name":"总公司" - }], - "extras":{ - "date":null, - "gender":"1", - "level":"1", - "dingding":null - }, - "leader":[{ - "id":1335, - "username":"foo", - "display_name":"foo" - }], - "last_login_time":"2021-12-23T20:43:25.164441Z", - "create_time":"2020-10-23T10:48:42.155327Z", - "update_time":"2021-11-29T20:11:44.922731Z", - "qq":"", - "email":"admin@test.com", - "telephone":"13111112222", - "wx_userid":"", - "wx_openid":"", - "code":null, - "domain":"default.local", - "category_id":1, - "display_name":"admin", - "logo":"null", - "status":"NORMAL", - "staff_status":"IN", - "password_update_time":"2021-10-12T11:03:36.713819Z", - "position":0, - "time_zone":"Asia/Shanghai", - "language":"zh-cn", - "country_code":"86", - "iso_code":"CN", - "enabled":true, - "type":"", - "role":1 + "departments":[], + "extras":{}, + "leader":[] }, "result": true } @@ -97,3 +58,12 @@ Query a profile which has 'admin' as username, only return selected fields (`use |message|string|error message| |data| array| result | +`data` fields(The specific field depends on the parameter `fields`) + +| field | type | description | +|-----------|-----------|-----------| +|id| int | user ID | +|username|string| username | +|departments|array| related departments | +|extras| dict | extras fields | +|leader| array| related leaders | diff --git a/paas2/esb/components/confapis/usermanage/apidocs/zh_hans/list_department_profiles.md b/paas2/esb/components/confapis/usermanage/apidocs/zh_hans/list_department_profiles.md index 2deef66d9..4eee9d5bf 100644 --- a/paas2/esb/components/confapis/usermanage/apidocs/zh_hans/list_department_profiles.md +++ b/paas2/esb/components/confapis/usermanage/apidocs/zh_hans/list_department_profiles.md @@ -41,48 +41,9 @@ "data": [{ "id":1, "username":"admin", - "password_valid_days":-1, - "departments":[{ - "id":1, - "name":"总公司", - "order":1, - "full_name":"总公司" - }], - "extras":{ - "date":null, - "gender":"1", - "level":"1", - "dingding":null - }, - "leader":[{ - "id":1335, - "username":"foo", - "display_name":"foo" - }], - "last_login_time":"2021-12-23T20:43:25.164441Z", - "create_time":"2020-10-23T10:48:42.155327Z", - "update_time":"2021-11-29T20:11:44.922731Z", - "qq":"", - "email":"admin@test.com", - "telephone":"13111112222", - "wx_userid":"", - "wx_openid":"", - "code":null, - "domain":"default.local", - "category_id":1, - "display_name":"admin", - "logo":"null", - "status":"NORMAL", - "staff_status":"IN", - "password_update_time":"2021-10-12T11:03:36.713819Z", - "position":0, - "time_zone":"Asia/Shanghai", - "language":"zh-cn", - "country_code":"86", - "iso_code":"CN", - "enabled":true, - "type":"", - "role":1 + "departments":[], + "extras":{}, + "leader":[] }], "result": true } @@ -96,3 +57,13 @@ |code|int|返回码,0表示成功,其他值表示失败| |message|string|错误信息| |data| array| 结果,根据请求参数动态返回,可以参考上述返回结果示例 | + +`data` 字段简析 + +| 字段 | 类型 | 描述 | +|-----------|-----------|-----------| +|id| int | 用户 ID | +|username|string| 用户名 | +|departments|array| 用户关联的部门列表 | +|extras| dict | 用户扩展字段 | +|leader| array| 用户关联上级 | diff --git a/paas2/esb/components/confapis/usermanage/apidocs/zh_hans/list_departments.md b/paas2/esb/components/confapis/usermanage/apidocs/zh_hans/list_departments.md index 2e2eaa2c8..f593d577a 100644 --- a/paas2/esb/components/confapis/usermanage/apidocs/zh_hans/list_departments.md +++ b/paas2/esb/components/confapis/usermanage/apidocs/zh_hans/list_departments.md @@ -48,21 +48,7 @@ "name":"总公司", "has_children":true, "full_name":"总公司", - "order":1, - "extras":{}, - "enabled":true, - "children":[{ - "id":316, - "name":"子部门", - "full_name":"总公司/子公司", - "has_children":true - }], - "code":null, - "category_id":1, - "lft":1, - "rght":6900, - "tree_id":1004, - "level":0, + "children":[], "parent":null }], "result": true @@ -78,3 +64,13 @@ |message|string|错误信息| |data| array| 结果,请参照返回结果示例 | +`data` 字段简析(具体字段取决于参数 `fields`) + +| 字段 | 类型 | 描述 | +|-----------|-----------|-----------| +|id| int | 部门 ID | +|name|string| 部门名 | +|has_children|bool| 是否包含子部门 | +|full_name| string | 部门完整路径 | +|children| array| 用户关联子部门 | +|parent| object | 该部门的父部门 | diff --git a/paas2/esb/components/confapis/usermanage/apidocs/zh_hans/list_profile_departments.md b/paas2/esb/components/confapis/usermanage/apidocs/zh_hans/list_profile_departments.md index 40e8bc817..4e9b16aa5 100644 --- a/paas2/esb/components/confapis/usermanage/apidocs/zh_hans/list_profile_departments.md +++ b/paas2/esb/components/confapis/usermanage/apidocs/zh_hans/list_profile_departments.md @@ -25,7 +25,6 @@ "bk_token": "xxx", "bk_username": "xxx", "id": 1, - "with_family": true, "lookup_field": "username" } ``` @@ -40,10 +39,7 @@ "data": [{ "id": 4, "name": "admin", - "family": [ - {"id": 5, "name": "BlueKing1"}, - {"id": 6, "name": "BlueKing2"}, - ] + "children": [] }], "result": true } @@ -57,3 +53,14 @@ |code|int|返回码,0表示成功,其他值表示失败| |message|string|错误信息| |data| array| 结果,请参照返回结果示例 | + +`data` 字段简析 + +| 字段 | 类型 | 描述 | +|-----------|-----------|-----------| +|id| int | 部门 ID | +|name|string| 部门名 | +|has_children|bool| 是否包含子部门 | +|full_name| string | 部门完整路径 | +|children| array| 用户关联子部门 | +|parent| dict | 该部门的父部门 | diff --git a/paas2/esb/components/confapis/usermanage/apidocs/zh_hans/list_users.md b/paas2/esb/components/confapis/usermanage/apidocs/zh_hans/list_users.md index a89c0bb24..8390a7636 100644 --- a/paas2/esb/components/confapis/usermanage/apidocs/zh_hans/list_users.md +++ b/paas2/esb/components/confapis/usermanage/apidocs/zh_hans/list_users.md @@ -30,7 +30,7 @@ "lookup_field": "username", "page": 1, "page_size": 0, - "fields": "username,id", + "fields": "username,id,departments,leader,extras", "exact_lookups": "jack,pony", "fuzzy_lookups": "jack,pony" } @@ -46,48 +46,9 @@ "data": [{ "id":1, "username":"admin", - "password_valid_days":-1, - "departments":[{ - "id":1, - "name":"总公司", - "order":1, - "full_name":"总公司" - }], - "extras":{ - "date":null, - "gender":"1", - "level":"1", - "dingding":null - }, - "leader":[{ - "id":1335, - "username":"foo", - "display_name":"foo" - }], - "last_login_time":"2021-12-23T20:43:25.164441Z", - "create_time":"2020-10-23T10:48:42.155327Z", - "update_time":"2021-11-29T20:11:44.922731Z", - "qq":"", - "email":"admin@test.com", - "telephone":"13111112222", - "wx_userid":"", - "wx_openid":"", - "code":null, - "domain":"default.local", - "category_id":1, - "display_name":"admin", - "logo":"null", - "status":"NORMAL", - "staff_status":"IN", - "password_update_time":"2021-10-12T11:03:36.713819Z", - "position":0, - "time_zone":"Asia/Shanghai", - "language":"zh-cn", - "country_code":"86", - "iso_code":"CN", - "enabled":true, - "type":"", - "role":1 + "departments":[], + "extras":{}, + "leader":[], }], "result": true } @@ -102,3 +63,13 @@ |message|string|错误信息| |data| array| 结果,根据请求参数动态返回,可以参考上述返回结果示例 | +`data` 字段简析(具体字段取决于参数 `fields`) + +| 字段 | 类型 | 描述 | +|-----------|-----------|-----------| +|id| int | 用户 ID | +|username|string| 用户名 | +|departments|array| 用户关联的部门列表 | +|extras| dict | 用户扩展字段 | +|leader| array| 用户关联上级 | + diff --git a/paas2/esb/components/confapis/usermanage/apidocs/zh_hans/retrieve_department.md b/paas2/esb/components/confapis/usermanage/apidocs/zh_hans/retrieve_department.md index 0767b40fa..dc78f194f 100644 --- a/paas2/esb/components/confapis/usermanage/apidocs/zh_hans/retrieve_department.md +++ b/paas2/esb/components/confapis/usermanage/apidocs/zh_hans/retrieve_department.md @@ -41,21 +41,7 @@ "name":"总公司", "has_children":true, "full_name":"总公司", - "order":1, - "extras":{}, - "enabled":true, - "children":[{ - "id":316, - "name":"子部门", - "full_name":"总公司/子公司", - "has_children":true - }], - "code":null, - "category_id":1, - "lft":1, - "rght":6900, - "tree_id":1004, - "level":0, + "children":[], "parent":null }, "result": true @@ -71,3 +57,13 @@ |message|string|错误信息| |data| array| 结果,请参照返回结果示例 | +`data` 字段简析(具体字段取决于参数 `fields`) + +| 字段 | 类型 | 描述 | +|-----------|-----------|-----------| +|id| int | 部门 ID | +|name|string| 部门名 | +|has_children|bool| 是否包含子部门 | +|full_name| string | 部门完整路径 | +|children| array| 用户关联子部门 | +|parent| object | 该部门的父部门 | diff --git a/paas2/esb/components/confapis/usermanage/apidocs/zh_hans/retrieve_user.md b/paas2/esb/components/confapis/usermanage/apidocs/zh_hans/retrieve_user.md index 8454b7a2a..3ca398520 100644 --- a/paas2/esb/components/confapis/usermanage/apidocs/zh_hans/retrieve_user.md +++ b/paas2/esb/components/confapis/usermanage/apidocs/zh_hans/retrieve_user.md @@ -41,48 +41,9 @@ "data": { "id":1, "username":"admin", - "password_valid_days":-1, - "departments":[{ - "id":1, - "name":"总公司", - "order":1, - "full_name":"总公司" - }], - "extras":{ - "date":null, - "gender":"1", - "level":"1", - "dingding":null - }, - "leader":[{ - "id":1335, - "username":"foo", - "display_name":"foo" - }], - "last_login_time":"2021-12-23T20:43:25.164441Z", - "create_time":"2020-10-23T10:48:42.155327Z", - "update_time":"2021-11-29T20:11:44.922731Z", - "qq":"", - "email":"admin@test.com", - "telephone":"13111112222", - "wx_userid":"", - "wx_openid":"", - "code":null, - "domain":"default.local", - "category_id":1, - "display_name":"admin", - "logo":"null", - "status":"NORMAL", - "staff_status":"IN", - "password_update_time":"2021-10-12T11:03:36.713819Z", - "position":0, - "time_zone":"Asia/Shanghai", - "language":"zh-cn", - "country_code":"86", - "iso_code":"CN", - "enabled":true, - "type":"", - "role":1 + "departments":[], + "extras":{}, + "leader":[] }, "result": true } @@ -96,3 +57,13 @@ |code|int|返回码,0表示成功,其他值表示失败| |message|string|错误信息| |data| array| 结果,根据请求参数动态返回,可以参考上述返回结果示例 | + +`data` 字段简析(具体字段取决于参数 `fields`) + +| 字段 | 类型 | 描述 | +|-----------|-----------|-----------| +|id| int | 用户 ID | +|username|string| 用户名 | +|departments|array| 用户关联的部门列表 | +|extras| dict | 用户扩展字段 | +|leader| array| 用户关联上级 | diff --git a/paas2/esb/components/generic/templates/cmsi/apidocs/en/get_msg_type.md b/paas2/esb/components/generic/templates/cmsi/apidocs/en/get_msg_type.md index 2299d7632..1669e0277 100644 --- a/paas2/esb/components/generic/templates/cmsi/apidocs/en/get_msg_type.md +++ b/paas2/esb/components/generic/templates/cmsi/apidocs/en/get_msg_type.md @@ -20,6 +20,7 @@ Query the type of send_msg component that supports sending messages { "result": true, "code": 0, + "message": "", "data": [ { "type": "weixin", @@ -53,8 +54,10 @@ Query the type of send_msg component that supports sending messages | Field | Type | Description | |-----------|----------|-----------| -| result | bool | true or false, indicate success or failure | -| data | list | data returned when result is true, details are described below | +| result | bool | return result, true for success, false for failure | +| code | int | return code, 0 for success, other values for failure | +| message | string | error message | +| data | list | result data, details are described below | #### data diff --git a/paas2/esb/components/generic/templates/cmsi/apidocs/en/send_mail.md b/paas2/esb/components/generic/templates/cmsi/apidocs/en/send_mail.md index f6e7ba4d6..44972f4f6 100644 --- a/paas2/esb/components/generic/templates/cmsi/apidocs/en/send_mail.md +++ b/paas2/esb/components/generic/templates/cmsi/apidocs/en/send_mail.md @@ -48,7 +48,15 @@ Send email ```python { "result": true, - "code": "00", + "code": 0, "message": "OK", } -``` \ No newline at end of file +``` + +### Return Result Description + +| Field | Type | Description | +|-----------|----------|-----------| +| result | bool | return result, true for success, false for failure | +| code | int | return code, 0 for success, other values for failure | +| message | string | error message | diff --git a/paas2/esb/components/generic/templates/cmsi/apidocs/en/send_msg.md b/paas2/esb/components/generic/templates/cmsi/apidocs/en/send_msg.md index 2ff4641e5..ed078d656 100644 --- a/paas2/esb/components/generic/templates/cmsi/apidocs/en/send_msg.md +++ b/paas2/esb/components/generic/templates/cmsi/apidocs/en/send_msg.md @@ -52,7 +52,13 @@ Universal messaging interface "result": true, "code": 0, "message": "OK", - "data": [], - "request_id": "sdfdfdfsdfasdasdasas" } ``` + +### Return Result Description + +| Field | Type | Description | +|-----------|----------|-----------| +| result | bool | return result, true for success, false for failure | +| code | int | return code, 0 for success, other values for failure | +| message | string | error message | diff --git a/paas2/esb/components/generic/templates/cmsi/apidocs/en/send_sms.md b/paas2/esb/components/generic/templates/cmsi/apidocs/en/send_sms.md index 2b35a7236..d87dc9d96 100644 --- a/paas2/esb/components/generic/templates/cmsi/apidocs/en/send_sms.md +++ b/paas2/esb/components/generic/templates/cmsi/apidocs/en/send_sms.md @@ -31,7 +31,15 @@ Send SMS ```python { "result": true, - "code": "00", + "code": 0, "message": "OK", } -``` \ No newline at end of file +``` + +### Return Result Description + +| Field | Type | Description | +|-----------|----------|-----------| +| result | bool | return result, true for success, false for failure | +| code | int | return code, 0 for success, other values for failure | +| message | string | error message | diff --git a/paas2/esb/components/generic/templates/cmsi/apidocs/en/send_voice_msg.md b/paas2/esb/components/generic/templates/cmsi/apidocs/en/send_voice_msg.md index e33833df1..10ace5cd1 100644 --- a/paas2/esb/components/generic/templates/cmsi/apidocs/en/send_voice_msg.md +++ b/paas2/esb/components/generic/templates/cmsi/apidocs/en/send_voice_msg.md @@ -39,10 +39,15 @@ Public voice notice ```python { "result": true, - "code": "00", - "message": "", - "data": { - "instance_id": "2662152044" - } + "code": 0, + "message": "" } -``` \ No newline at end of file +``` + +### Return Result Description + +| Field | Type | Description | +|-----------|----------|-----------| +| result | bool | return result, true for success, false for failure | +| code | int | return code, 0 for success, other values for failure | +| message | string | error message | diff --git a/paas2/esb/components/generic/templates/cmsi/apidocs/en/send_weixin.md b/paas2/esb/components/generic/templates/cmsi/apidocs/en/send_weixin.md index 21d46dc39..94f0f1965 100644 --- a/paas2/esb/components/generic/templates/cmsi/apidocs/en/send_weixin.md +++ b/paas2/esb/components/generic/templates/cmsi/apidocs/en/send_weixin.md @@ -46,7 +46,15 @@ Send WeChat message, with WeChat official account message and WeChat corporation ```python { "result": true, - "code": "00", + "code": 0, "message": "OK", } -``` \ No newline at end of file +``` + +### Return Result Description + +| Field | Type | Description | +|-----------|----------|-----------| +| result | bool | return result, true for success, false for failure | +| code | int | return code, 0 for success, other values for failure | +| message | string | error message | diff --git a/paas2/esb/components/generic/templates/cmsi/apidocs/zh_hans/get_msg_type.md b/paas2/esb/components/generic/templates/cmsi/apidocs/zh_hans/get_msg_type.md index 497b25be6..551ac462f 100644 --- a/paas2/esb/components/generic/templates/cmsi/apidocs/zh_hans/get_msg_type.md +++ b/paas2/esb/components/generic/templates/cmsi/apidocs/zh_hans/get_msg_type.md @@ -53,8 +53,10 @@ | 字段 | 类型 | 描述 | |-----------|----------|-----------| -| result | bool | true/false 操作是否成功 | -| data | list | result=true 时成功数据,详细信息请见下面说明 | +| result | bool | 返回结果,true 为成功,false 为失败 | +| code | int | 返回码,0 表示成功,其它值表示失败 | +| message | string | 错误信息 | +| data | list | 结果数据,详细信息请见下面说明 | #### data diff --git a/paas2/esb/components/generic/templates/cmsi/apidocs/zh_hans/send_mail.md b/paas2/esb/components/generic/templates/cmsi/apidocs/zh_hans/send_mail.md index 992945954..18352e018 100644 --- a/paas2/esb/components/generic/templates/cmsi/apidocs/zh_hans/send_mail.md +++ b/paas2/esb/components/generic/templates/cmsi/apidocs/zh_hans/send_mail.md @@ -48,7 +48,15 @@ ```python { "result": true, - "code": "00", + "code": 0, "message": "OK", } -``` \ No newline at end of file +``` + +### 返回结果参数说明 + +| 字段 | 类型 | 描述 | +|-----------|----------|-----------| +| result | bool | 返回结果,true 为成功,false 为失败 | +| code | int | 返回码,0 表示成功,其它值表示失败 | +| message | string | 错误信息 | diff --git a/paas2/esb/components/generic/templates/cmsi/apidocs/zh_hans/send_msg.md b/paas2/esb/components/generic/templates/cmsi/apidocs/zh_hans/send_msg.md index dc0b2ce2d..df2a09010 100644 --- a/paas2/esb/components/generic/templates/cmsi/apidocs/zh_hans/send_msg.md +++ b/paas2/esb/components/generic/templates/cmsi/apidocs/zh_hans/send_msg.md @@ -54,7 +54,13 @@ "result": true, "code": 0, "message": "OK", - "data": [], - "request_id": "sdfdfdfsdfasdasdasas" } ``` + +### 返回结果参数说明 + +| 字段 | 类型 | 描述 | +|-----------|----------|-----------| +| result | bool | 返回结果,true 为成功,false 为失败 | +| code | int | 返回码,0 表示成功,其它值表示失败 | +| message | string | 错误信息 | diff --git a/paas2/esb/components/generic/templates/cmsi/apidocs/zh_hans/send_sms.md b/paas2/esb/components/generic/templates/cmsi/apidocs/zh_hans/send_sms.md index b3e5c5460..5fc3102ef 100644 --- a/paas2/esb/components/generic/templates/cmsi/apidocs/zh_hans/send_sms.md +++ b/paas2/esb/components/generic/templates/cmsi/apidocs/zh_hans/send_sms.md @@ -31,7 +31,15 @@ ```python { "result": true, - "code": "00", + "code": 0, "message": "OK", } -``` \ No newline at end of file +``` + +### 返回结果参数说明 + +| 字段 | 类型 | 描述 | +|-----------|----------|-----------| +| result | bool | 返回结果,true 为成功,false 为失败 | +| code | int | 返回码,0 表示成功,其它值表示失败 | +| message | string | 错误信息 | diff --git a/paas2/esb/components/generic/templates/cmsi/apidocs/zh_hans/send_voice_msg.md b/paas2/esb/components/generic/templates/cmsi/apidocs/zh_hans/send_voice_msg.md index c4f4547e3..b9e2738f3 100644 --- a/paas2/esb/components/generic/templates/cmsi/apidocs/zh_hans/send_voice_msg.md +++ b/paas2/esb/components/generic/templates/cmsi/apidocs/zh_hans/send_voice_msg.md @@ -39,10 +39,15 @@ ```python { "result": true, - "code": "00", + "code": 0, "message": "", - "data": { - "instance_id": "2662152044" - } } -``` \ No newline at end of file +``` + +### 返回结果参数说明 + +| 字段 | 类型 | 描述 | +|-----------|----------|-----------| +| result | bool | 返回结果,true 为成功,false 为失败 | +| code | int | 返回码,0 表示成功,其它值表示失败 | +| message | string | 错误信息 | diff --git a/paas2/esb/components/generic/templates/cmsi/apidocs/zh_hans/send_weixin.md b/paas2/esb/components/generic/templates/cmsi/apidocs/zh_hans/send_weixin.md index 15ae1503d..e87e93fa3 100644 --- a/paas2/esb/components/generic/templates/cmsi/apidocs/zh_hans/send_weixin.md +++ b/paas2/esb/components/generic/templates/cmsi/apidocs/zh_hans/send_weixin.md @@ -46,7 +46,15 @@ ```python { "result": true, - "code": "00", + "code": 0, "message": "OK", } -``` \ No newline at end of file +``` + +### 返回结果参数说明 + +| 字段 | 类型 | 描述 | +|-----------|----------|-----------| +| result | bool | 返回结果,true 为成功,false 为失败 | +| code | int | 返回码,0 表示成功,其它值表示失败 | +| message | string | 错误信息 | diff --git a/paas2/release.md b/paas2/release.md index 22084936a..0bdc75ff5 100644 --- a/paas2/release.md +++ b/paas2/release.md @@ -1,5 +1,8 @@ Release Log =============================== +# 2.13.31 + - update: esb update cmsi, usermanage apidocs, update cc, monitor_v3 apis + # 2.13.30 - bugfix: bkima permission name @@ -94,6 +97,12 @@ Release Log # 2.13.0 - add: support python2/3 both +# 2.12.43 + - update: esb update cmsi, usermanage apidocs, update monitor_v3 apis + +# 2.12.42 + - update: fix console page display + # 2.12.39 - update: esb update channel is_hidden, add export_official_api_docs command, update api docs