diff --git a/paas2/esb/components/confapis/cc/apidocs/en/count_instance_associations.md b/paas2/esb/components/confapis/cc/apidocs/en/count_instance_associations.md
new file mode 100644
index 000000000..746fbe03f
--- /dev/null
+++ b/paas2/esb/components/confapis/cc/apidocs/en/count_instance_associations.md
@@ -0,0 +1,81 @@
+### Functional description
+
+count instance associations num (v3.10.1+)
+
+### Request Parameters
+
+{{ common_args_desc }}
+
+#### Interface Parameters
+
+| Field | Type | Required | Description |
+|------------|--------|----------|----------------------------------------------------------------------------------------------|
+| bk_obj_id | string | Yes | object id |
+| conditions | object | Yes | conditions, support AND/OR types,max conditions deep 3, max OR conditions rules count is 20 |
+
+#### conditions
+
+| Field | Type | Required | Description |
+|----------|--------|----------|-----------------------------------------------------------------------------------------------------------------------|
+| field | string | Yes | condition field |
+| operator | string | Yes | condition operator, support equal,not_equal,in,not_in,less,less_or_equal,greater,greater_or_equal,between,not_between |
+| value | - | No | condition value, max slice(array) elements count is 500 |
+
+condition rules: https://github.com/Tencent/bk-cmdb/blob/master/src/common/querybuilder/README.md
+
+### Request Parameters Example
+
+```json
+{
+ "bk_app_code":"code",
+ "bk_app_secret":"secret",
+ "bk_token":"xxxx",
+ "bk_obj_id":"bk_switch",
+ "conditions":{
+ "condition": "AND",
+ "rules": [
+ {
+ "field": "bk_inst_name",
+ "operator": "begins_with",
+ "value": "switch"
+ },
+ {
+ "condition": "OR",
+ "rules": [
+ {
+ "field": "bk_inst_id",
+ "operator": "not_in",
+ "value": [2,4,6]
+ },
+ {
+ "field": "bk_obj_name",
+ "operator": "equal",
+ "value": "switch"
+ }
+ ]
+ }
+ ]
+ }
+}
+```
+
+### Return Result Example
+
+```json
+{
+ "result": true,
+ "code": 0,
+ "message": "",
+ "data": {
+ "count": 1
+ }
+}
+```
+
+### Return Result Parameters Description
+
+#### data
+
+| Field | Type | Description |
+|--------|---------|-------------------|
+| count | integer | the num of record |
diff --git a/paas2/esb/components/confapis/cc/apidocs/en/count_object_instances.md b/paas2/esb/components/confapis/cc/apidocs/en/count_object_instances.md
new file mode 100644
index 000000000..6a9d9bbd2
--- /dev/null
+++ b/paas2/esb/components/confapis/cc/apidocs/en/count_object_instances.md
@@ -0,0 +1,81 @@
+### Functional description
+
+count object instances num (v3.10.1+)
+
+### Request Parameters
+
+{{ common_args_desc }}
+
+#### Interface Parameters
+
+| Field | Type | Required | Description |
+|------------|--------|----------|----------------------------------------------------------------------------------------------|
+| bk_obj_id | string | Yes | object id |
+| conditions | object | Yes | conditions, support AND/OR types,max conditions deep 3, max OR conditions rules count is 20 |
+
+#### conditions
+
+| Field | Type | Required | Description |
+|----------|--------|----------|-----------------------------------------------------------------------------------------------------------------------|
+| field | string | Yes | condition field |
+| operator | string | Yes | condition operator, support equal,not_equal,in,not_in,less,less_or_equal,greater,greater_or_equal,between,not_between |
+| value | - | No | condition value, max slice(array) elements count is 500 |
+
+condition rules: https://github.com/Tencent/bk-cmdb/blob/master/src/common/querybuilder/README.md
+
+### Request Parameters Example
+
+```json
+{
+ "bk_app_code":"code",
+ "bk_app_secret":"secret",
+ "bk_token":"xxxx",
+ "bk_obj_id":"bk_switch",
+ "conditions":{
+ "condition": "AND",
+ "rules": [
+ {
+ "field": "bk_inst_name",
+ "operator": "begins_with",
+ "value": "switch"
+ },
+ {
+ "condition": "OR",
+ "rules": [
+ {
+ "field": "bk_inst_id",
+ "operator": "not_in",
+ "value": [2,4,6]
+ },
+ {
+ "field": "bk_obj_name",
+ "operator": "equal",
+ "value": "switch"
+ }
+ ]
+ }
+ ]
+ }
+}
+```
+
+### Return Result Example
+
+```json
+{
+ "result": true,
+ "code": 0,
+ "message": "",
+ "data": {
+ "count": 1
+ }
+}
+```
+
+### Return Result Parameters Description
+
+#### data
+
+| Field | Type | Description |
+|--------|---------|-------------------|
+| count | integer | the num of record |
diff --git a/paas2/esb/components/confapis/cc/apidocs/en/create_object_attribute.md b/paas2/esb/components/confapis/cc/apidocs/en/create_object_attribute.md
index b61ba9589..06440c39b 100644
--- a/paas2/esb/components/confapis/cc/apidocs/en/create_object_attribute.md
+++ b/paas2/esb/components/confapis/cc/apidocs/en/create_object_attribute.md
@@ -55,7 +55,7 @@ create object attribute
"ispre": false,
"isreadonly": false,
"isrequired": false,
- "option": {"min":"1","max":"2"},
+ "option": "",
"unit": "1",
"placeholder": "test",
"bk_property_group": "default",
diff --git a/paas2/esb/components/confapis/cc/apidocs/en/delete_instance_association.md b/paas2/esb/components/confapis/cc/apidocs/en/delete_instance_association.md
index fd37e4af3..c8d999fde 100644
--- a/paas2/esb/components/confapis/cc/apidocs/en/delete_instance_association.md
+++ b/paas2/esb/components/confapis/cc/apidocs/en/delete_instance_association.md
@@ -10,12 +10,14 @@ delete association between object's instance.
| Field | Type | Required | Description |
|----------------------|------------|--------|-----------------------------|
| id | int64 | Yes | the instance association's unique id |
+| bk_obj_id | string | Yes | the instance association's source or destination object id(v3.10+) |
### Request Parameters Example
``` json
{
- "id": 1
+ "id": 1,
+ "bk_obj_id": "abc"
}
```
diff --git a/paas2/esb/components/confapis/cc/apidocs/en/find_host_snapshot_batch.md b/paas2/esb/components/confapis/cc/apidocs/en/find_host_snapshot_batch.md
deleted file mode 100644
index 5852ffa19..000000000
--- a/paas2/esb/components/confapis/cc/apidocs/en/find_host_snapshot_batch.md
+++ /dev/null
@@ -1,93 +0,0 @@
-### Functional description
-
-find host snapshot in batch (v3.8.6)
-
-#### General Parameters
-
-{{ common_args_desc }}
-
-### Request Parameters
-
-| Field | Type | Required | Description |
-| ------------------- | ------ | -------- | --------------------- |
-| bk_ids | int array | Yes | bk_host_id array,the max length is 200 |
-| fields | string array | Yes | host snapshot property list, the specified snapshot property feilds will be returned
supported fields: bk_host_id,bk_all_ips|
-
-### Request Parameters Example
-
-```json
-{
- "bk_ids": [
- 1,
- 2
- ],
- "fields": [
- "bk_host_id",
- "bk_all_ips"
- ]
-}
-```
-
-### Return Result Example
-
-```json
-{
- "result": true,
- "code": 0,
- "message": "success",
- "data": [
- {
- "bk_all_ips": {
- "interface": [
- {
- "addrs": [
- {
- "ip": "192.xx.xx.xx"
- },
- {
- "ip": "fe80::xx:xx:xx:xx"
- }
- ],
- "mac": "52:xx:xx:xx:xx:xx"
- },
- {
- "addrs": [
- {
- "ip": "192.xx.xx.xx"
- }
- ],
- "mac": "02:xx:xx:xx:xx:xx"
- }
- ]
- },
- "bk_host_id": 1
- },
- {
- "bk_all_ips": {
- "interface": [
- {
- "addrs": [
- {
- "ip": "172.xx.xx.xx"
- },
- {
- "ip": "fe80::xx:xx:xx:xx"
- }
- ],
- "mac": "52:xx:xx:xx:xx:xx"
- },
- {
- "addrs": [
- {
- "ip": "192.xx.xx.xx"
- }
- ],
- "mac": "02:xx:xx:xx:xx:xx"
- }
- ]
- },
- "bk_host_id": 2
- }
- ]
-}
-```
diff --git a/paas2/esb/components/confapis/cc/apidocs/en/find_instance_association.md b/paas2/esb/components/confapis/cc/apidocs/en/find_instance_association.md
index f3db0cfd1..95ea659b8 100644
--- a/paas2/esb/components/confapis/cc/apidocs/en/find_instance_association.md
+++ b/paas2/esb/components/confapis/cc/apidocs/en/find_instance_association.md
@@ -12,27 +12,13 @@ find association between object's instance.
|----------------------|------------|--------|-----------------------------|
| metadata | object | Yes | request meta data |
| condition | string map | Yes | query condition |
-
-
-metadata params
-
-| Field | Type | Required | Description |
-|---------------------|------------|--------|-----------------------------|
-| label | string map | Yes |the label data request should with, such as biz info |
-
-
-label params
-
-| Field | Type | Required | Description |
-|---------------------|------------|--------|-----------------------------|
-| bk_biz_id | string | Yes | business's ID |
+| bk_obj_id | string | YES | the association's source object's id(v3.10+)|
condition params
| Field | Type | Required | Description |
|---------------------|------------|--------|-----------------------------|
| bk_obj_asst_id | string | Yes | object's association unique id|
| bk_asst_id | string | NO | object's association kind unique name|
-| bk_obj_id | string | NO | the association's source object's id|
| bk_asst_obj_id | string | NO | the association's destination object's id|
@@ -43,9 +29,9 @@ condition params
"condition": {
"bk_obj_asst_id": "bk_switch_belong_bk_host",
"bk_asst_id": "",
- "bk_object_id": "",
"bk_asst_obj_id": ""
},
+ "bk_object_id": "xxx",
"metadata":{
"label":{
"bk_biz_id":"3"
diff --git a/paas2/esb/components/confapis/cc/apidocs/en/get_operation_log.md b/paas2/esb/components/confapis/cc/apidocs/en/get_operation_log.md
deleted file mode 100644
index 2c4ec5920..000000000
--- a/paas2/esb/components/confapis/cc/apidocs/en/get_operation_log.md
+++ /dev/null
@@ -1,182 +0,0 @@
-### Functional description
-
-get operation log
-
-### Request Parameters
-
-{{ common_args_desc }}
-
-#### Request Parameters Example
-
-| Field | Type | Required | Description |
-| ------------------- | ------ | -------- | ------------------------------------- |
-| bk_supplier_account | string | Yes | supplier account code |
-| condition | object | No | search condition |
-| start | int | No | start record |
-| limit | int | Yes | page limit, max is 200 |
-| sort | string | No | the field for sort |
-
-#### condition
-
-| 名称 | Type | Required | Description |
-| -------------- | ------------ | -------- | ------------------------------------------------- |
-| audit_type | string | No | generic audit resource category |
-| user | string | No | the operator |
-| resource_type | string array | No | specific resource type of the operation |
-| action | string array | No | operation action type |
-| operate_from | string | No | source of operation |
-| operation_time | string array | No | operation start time and end time defined as pair |
-| bk_biz_id | int | No | business ID |
-| resource_id | int | No | resource ID |
-| resource_name | string | No | resource name |
-| category | string | No | resource category defined for UI |
-| label | string array | No | resource label |
-| fuzzy_query | bool | No | use fuzzy query or not when searching with resource name, **fuzzy query has low efficiency and poor performance** |
-
-### Request Parameters Example
-
-```json
-{
- "bk_supplier_account": "0",
- "condition": {
- "audit_type": "business_resource",
- "user": "admin",
- "resource_type": [
- "business",
- "module"
- ],
- "action": [
- "create",
- "update"
- ],
- "operate_from": "user",
- "operation_time": [
- "2020-04-03 00:00:00",
- "2020-04-03 18:00:00"
- ],
- "bk_biz_id": 6,
- "resource_id": 120,
- "resource_name": "test",
- "category": "business",
- "label": [
- "biz_topology"
- ]
- },
- "start": 0,
- "limit": 10,
- "sort": "-operation_time",
- "fuzzy_query": false
-}
-```
-
-### Return Result Example
-
-```json
-{
- "result": true,
- "code": 0,
- "message": null,
- "data": {
- "count": 1,
- "info": [
- {
- "audit_type": "business_resource",
- "bk_supplier_account": "0",
- "user": "admin",
- "resource_type": "module",
- "action": "create",
- "operate_from": "user",
- "operation_detail": {
- "bk_biz_id": 6,
- "bk_biz_name": "test_biz",
- "resource_id": 120,
- "resource_name": "test",
- "details": {
- "pre_data": null,
- "cur_data": {
- "bk_bak_operator": "",
- "bk_biz_id": 6,
- "bk_childid": null,
- "bk_module_id": 120,
- "bk_module_name": "test",
- "bk_module_type": "1",
- "bk_parent_id": 51,
- "bk_set_id": 51,
- "bk_supplier_account": "0",
- "create_time": "2020-04-03T09:55:30.574+08:00",
- "default": 0,
- "last_time": "2020-04-03T09:55:30.574+08:00",
- "operator": ""
- },
- "properties": [
- {
- "bk_property_id": "bk_biz_id",
- "bk_property_name": "business id"
- },
- {
- "bk_property_id": "bk_set_id",
- "bk_property_name": "set id"
- },
- {
- "bk_property_id": "bk_module_name",
- "bk_property_name": "module name"
- },
- {
- "bk_property_id": "bk_childid",
- "bk_property_name": ""
- },
- {
- "bk_property_id": "bk_module_type",
- "bk_property_name": "module type"
- },
- {
- "bk_property_id": "operator",
- "bk_property_name": "main operator"
- },
- {
- "bk_property_id": "bk_bak_operator",
- "bk_property_name": "backup operator"
- }
- ]
- },
- "bk_obj_id": "module"
- },
- "operation_time": "2020-04-03 09:55:30",
- "label": {
- "biz_topology": ""
- }
- }
- ]
- }
-}
-```
-
-### Return Result Parameters Description
-
-| Field | Type | Description |
-| ------- | ------ | ---------------------------------------------------------- |
-| result | bool | request result true or false |
-| code | int | error code. 0 represent success, >0 represent failure code |
-| message | string | error message from failed request |
-| data | object | the data response |
-
-#### data:
-
-| Field | Type | Description |
-| ----- | ------------ | ------------------------- |
-| count | int | the count of record |
-| info | object array | the information of record |
-
-#### info:
-
-| Field | Type | Description |
-| ------------------- | ------ | --------------------------------------- |
-| audit_type | string | generic audit resource category |
-| user | string | the operator |
-| bk_supplier_account | string | supplier account code |
-| resource_type | string | specific resource type of the operation |
-| action | string | operation action type |
-| operate_from | string | source of operation |
-| operation_detail | object | actual operation content |
-| operation_time | string | operation time |
-| label | object | resource label |
\ No newline at end of file
diff --git a/paas2/esb/components/confapis/cc/apidocs/en/list_operation_audit.md b/paas2/esb/components/confapis/cc/apidocs/en/list_operation_audit.md
index c407d4de5..e80906388 100644
--- a/paas2/esb/components/confapis/cc/apidocs/en/list_operation_audit.md
+++ b/paas2/esb/components/confapis/cc/apidocs/en/list_operation_audit.md
@@ -32,6 +32,16 @@
| user | string | No | Operator |
| resource_name | string | No | Resource name |
| category | string | No | type of query |
+| fuzzy_query | bool | No | use fuzzy query or not when searching with resource name, **fuzzy query has low efficiency and poor performance**.This field only works on the resource_name,it will be ignored when use 'condition.condition' to search |
+| condition | array | No | condition query's condition, with user and resource_name cannot be provided at the same time |
+
+##### condition.condition
+
+| Field | Type | Required | Description |
+| -------- | ------------ | -------- | ------------------------------------------------------------ |
+| field | string | Yes | fields of query, only can be "user" and "resource_name" |
+| operator | string | Yes | operator,in means "belong to",not_in means "does not belong to", resource_name can use contains to fuzzy query |
+| value | string/array | Yes | value of query,in and not_in need array type, contains need string type |
### Request Parameters Example
@@ -50,6 +60,42 @@
},
"user":"admin",
"resource_name":"1.1.1.1",
+ "category":"host",
+ "fuzzy_query": false
+ },
+ "page":{
+ "start":0,
+ "limit":10,
+ "sort":"-operation_time"
+ }
+}
+```
+
+```json
+{
+ "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"
+ },
+ "condition":[
+ {
+ "field":"user",
+ "operatior":"in",
+ "value":["admin"]
+ },
+ {
+ "field":"resource_name",
+ "operatior":"in",
+ "value":["1.1.1.1"]
+ }
+ ],
"category":"host"
},
"page":{
@@ -111,4 +157,5 @@
| Field | Type | Description |
|-----------|-----------|--------------|
| count | int | Number of records |
-| info | array | Operation audit record information |
\ No newline at end of file
+| info | array | Operation audit record information |
+
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 b79264ec6..a3a6e1b9b 100644
--- a/paas2/esb/components/confapis/cc/apidocs/en/resource_watch.md
+++ b/paas2/esb/components/confapis/cc/apidocs/en/resource_watch.md
@@ -15,7 +15,7 @@ watch and get the change of a kind of resource's event.
| bk_fields | array string | Depends on resource | the resource event fields you want to return, the host resource need to be set. |
| bk_start_from | Int64 | No | watch from a unix seconds time, It is the number of seconds that have elapsed since the Unix epoch, minus leap seconds; |
| bk_cursor | string | No | a cursor to represent the event you are watched at, you can use a cursor to watch the next event after it. |
-| bk_resource | string | Yes | resource you can watch, now is host, host_relation, biz, set, module, set_template, process. "host" means a host's detail info, "host_relation" means host's relation with biz, set and module, "biz" means a biz's detail info, "set" means a set's detail info, "module" means a module's detail info, "set_template" means a set_template's detail info, "process" means a process's detail info |
+| bk_resource | string | Yes | resource you can watch, now is host, host_relation, biz, set, module, process. "host" means a host's detail info, "host_relation" means host's relation with biz, set and module, "biz" means a biz's detail info, "set" means a set's detail info, "module" means a module's detail info, "process" means a process's detail info |
| bk_supplier_account | string | Yes | supplier account |
diff --git a/paas2/esb/components/confapis/cc/apidocs/en/search_inst.md b/paas2/esb/components/confapis/cc/apidocs/en/search_inst.md
index d3146400c..201003a42 100644
--- a/paas2/esb/components/confapis/cc/apidocs/en/search_inst.md
+++ b/paas2/esb/components/confapis/cc/apidocs/en/search_inst.md
@@ -71,7 +71,7 @@ search instance by the associated instance
]
},
"condition": {
- "host": [
+ "user": [
{
"field": "operator",
"operator": "$regex",
diff --git a/paas2/esb/components/confapis/cc/apidocs/en/search_instance_associations.md b/paas2/esb/components/confapis/cc/apidocs/en/search_instance_associations.md
new file mode 100644
index 000000000..ef58043b4
--- /dev/null
+++ b/paas2/esb/components/confapis/cc/apidocs/en/search_instance_associations.md
@@ -0,0 +1,110 @@
+### Functional description
+
+search instance associations (v3.10.1+)
+
+### Request Parameters
+
+{{ common_args_desc }}
+
+#### Interface Parameters
+
+| Field | Type | Required | Description |
+|------------|--------|----------|----------------------------------------------------------------------------------------------|
+| bk_obj_id | string | Yes | object id |
+| conditions | object | Yes | conditions, support AND/OR types,max conditions deep 3, max OR conditions rules count is 20 |
+| fields | array | Yes | fields of object |
+| page | object | Yes | query page settings |
+
+#### conditions
+
+| Field | Type | Required | Description |
+|----------|--------|----------|-----------------------------------------------------------------------------------------------------------------------|
+| field | string | Yes | condition field |
+| operator | string | Yes | condition operator, support equal,not_equal,in,not_in,less,less_or_equal,greater,greater_or_equal,between,not_between |
+| value | - | No | condition value, max slice(array) elements count is 500 |
+
+condition rules: https://github.com/Tencent/bk-cmdb/blob/master/src/common/querybuilder/README.md
+
+#### page
+
+| Field | Type | Required | Description |
+|--------|---------|-----------|------------------------|
+| start | int | Yes | start record |
+| limit | int | Yes | page limit, max is 500 |
+| sort | string | No | query order by |
+
+### Request Parameters Example
+
+```json
+{
+ "bk_app_code":"code",
+ "bk_app_secret":"secret",
+ "bk_token":"xxxx",
+ "bk_obj_id":"bk_switch",
+ "conditions":{
+ "condition": "AND",
+ "rules": [
+ {
+ "field": "bk_inst_name",
+ "operator": "begins_with",
+ "value": "switch"
+ },
+ {
+ "condition": "OR",
+ "rules": [
+ {
+ "field": "bk_inst_id",
+ "operator": "not_in",
+ "value": [2,4,6]
+ },
+ {
+ "field": "bk_obj_name",
+ "operator": "equal",
+ "value": "switch"
+ }
+ ]
+ }
+ ]
+ },
+ "fields":[
+ "bk_inst_id",
+ "bk_asst_inst_id",
+ "bk_asst_obj_id",
+ "bk_asst_id",
+ "bk_obj_asst_id"
+ ],
+ "page":{
+ "start":0,
+ "limit":500
+ }
+}
+```
+
+### Return Result Example
+
+```json
+{
+ "result": true,
+ "code": 0,
+ "message": "",
+ "data": {
+ "info": [
+ {
+ "bk_inst_id": 1,
+ "bk_asst_inst_id": 1,
+ "bk_asst_obj_id": "middleware",
+ "bk_asst_id": "connect",
+ "bk_obj_asst_id": "bk_switch_connect_middleware"
+ }
+ ]
+ }
+}
+```
+
+### Return Result Parameters Description
+
+#### data
+
+| Field | Type | Description |
+|--------|---------|-------------------|
+| info | array | data of record |
diff --git a/paas2/esb/components/confapis/cc/apidocs/en/search_object_instances.md b/paas2/esb/components/confapis/cc/apidocs/en/search_object_instances.md
new file mode 100644
index 000000000..2872550b4
--- /dev/null
+++ b/paas2/esb/components/confapis/cc/apidocs/en/search_object_instances.md
@@ -0,0 +1,104 @@
+### Functional description
+
+search object instances (v3.10.1+)
+
+### Request Parameters
+
+{{ common_args_desc }}
+
+#### Interface Parameters
+
+| Field | Type | Required | Description |
+|------------|--------|----------|----------------------------------------------------------------------------------------------|
+| bk_obj_id | string | Yes | object id |
+| conditions | object | Yes | conditions, support AND/OR types,max conditions deep 3, max OR conditions rules count is 20 |
+| fields | array | Yes | fields of object |
+| page | object | Yes | query page settings |
+
+#### conditions
+
+| Field | Type | Required | Description |
+|----------|--------|----------|-----------------------------------------------------------------------------------------------------------------------|
+| field | string | Yes | condition field |
+| operator | string | Yes | condition operator, support equal,not_equal,in,not_in,less,less_or_equal,greater,greater_or_equal,between,not_between |
+| value | - | No | condition value, max slice(array) elements count is 500 |
+
+condition rules: https://github.com/Tencent/bk-cmdb/blob/master/src/common/querybuilder/README.md
+
+#### page
+
+| Field | Type | Required | Description |
+|--------|---------|-----------|------------------------|
+| start | int | Yes | start record |
+| limit | int | Yes | page limit, max is 500 |
+| sort | string | No | query order by |
+
+### Request Parameters Example
+
+```json
+{
+ "bk_app_code":"code",
+ "bk_app_secret":"secret",
+ "bk_token":"xxxx",
+ "bk_obj_id":"bk_switch",
+ "conditions":{
+ "condition": "AND",
+ "rules": [
+ {
+ "field": "bk_inst_name",
+ "operator": "begins_with",
+ "value": "switch"
+ },
+ {
+ "condition": "OR",
+ "rules": [
+ {
+ "field": "bk_inst_id",
+ "operator": "not_in",
+ "value": [2,4,6]
+ },
+ {
+ "field": "bk_obj_name",
+ "operator": "equal",
+ "value": "switch"
+ }
+ ]
+ }
+ ]
+ },
+ "fields":[
+ "bk_inst_id",
+ "bk_inst_name"
+ ],
+ "page":{
+ "start":0,
+ "limit":500
+ }
+}
+```
+
+### Return Result Example
+
+```json
+{
+ "result": true,
+ "code": 0,
+ "message": "",
+ "data": {
+ "info": [
+ {
+ "bk_inst_id": 1,
+ "bk_inst_name": "switch-instance"
+ }
+ ]
+ }
+}
+```
+
+### Return Result Parameters Description
+
+#### data
+
+| Field | Type | Description |
+|--------|---------|-------------------|
+| info | array | data of record |
diff --git a/paas2/esb/components/confapis/cc/apidocs/en/search_subscription.md b/paas2/esb/components/confapis/cc/apidocs/en/search_subscription.md
deleted file mode 100644
index 72072cd6f..000000000
--- a/paas2/esb/components/confapis/cc/apidocs/en/search_subscription.md
+++ /dev/null
@@ -1,103 +0,0 @@
-### Functional description
-
-search subscription
-
-### Request Parameters
-
-{{ common_args_desc }}
-
-#### General Parameters
-
-| Field | Type | Required | Description |
-|---------------------|------------|--------|-----------------------------|
-| bk_biz_id | string | Yes | Business ID |
-| bk_supplier_account | string | Yes | Supplier account,please fill '0' by independent deployment |
-| page | object | Yes | Page parameters |
-| condition | object | No | Search condition |
-| fields |string array| No | Search fields |
-
-##### page
-
-| Field | Type | Required | Description |
-|-----------|------------|--------|----------------------|
-| start | int | Yes | The record of start position |
-| limit | int | Yes | Limit number of each page,maximum 200 |
-| sort | string | No | Sort fields |
-
-##### condition
-
-| Field | Type | Required | Description |
-|-----------|------------|--------|------------|
-| subscription_name |string |Yes | Here is a sample data, which needs to be set as the query condition field |
-
-### Request Parameters Example
-
-```python
-{
- "bk_supplier_account":"0",
- "condition":{
- "subscription_name":"name"
- },
- "page":{
- "start":0,
- "limit":10,
- "sort":"HostName"
- }
-}
-```
-
-### Return Result Example
-
-```python
-{
- "result": true,
- "code": 0,
- "message": "success",
- "data": {
- "count": 1,
- "info": [
- {
- "subscription_id": 1,
- "subscription_name": "mysubscribe",
- "system_name": "SystemName",
- "callback_url": "http://127.0.0.1:8080/callback",
- "confirm_mode": "httpstatus",
- "confirm_pattern": "200",
- "time_out": 10,
- "subscription_form": "hostcreate",
- "operator": "user",
- "bk_supplier_account": "0",
- "last_time": "2017-09-19 16:57:07",
- "statistics": {
- "total": 30,
- "failure": 2
- }
- }
- ]
- }
-}
-```
-
-### Return Result Parameters Description
-
-#### data
-| Field | Type | Description |
-| ----- | ------- | ----------------------- |
-| count | integer | total count |
-| info | array | event subscription list |
-
-#### info
-| 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 | Confirm mode,optional: httpstatus,regular |
-| confirm_pattern | string | Confirm pattern |
-| subscription_form | string | Subscription form, separated by ',' |
-| timeout | int | Timeout, unit: second |
-| operator | int | The last editor of data |
-| last_time | int | Last update time |
-| statistics.total | int | Total statistics |
-| statistics.failure | int | Failure statistics |
diff --git a/paas2/esb/components/confapis/cc/apidocs/en/subscribe_event.md b/paas2/esb/components/confapis/cc/apidocs/en/subscribe_event.md
deleted file mode 100644
index 8818d1167..000000000
--- a/paas2/esb/components/confapis/cc/apidocs/en/subscribe_event.md
+++ /dev/null
@@ -1,57 +0,0 @@
-### Functional description
-
-subscribe event
-
-### Request Parameters
-
-{{ common_args_desc }}
-
-#### General Parameters
-
-| Field | Type | Required | Description |
-|---------------------|------------|--------|--------------------------------------------------|
-| bk_supplier_account | string | Yes | Supplier account |
-| subscription_name | string | Yes | Subscription name |
-| system_name | string | Yes | Subscription system name |
-| callback_url | string | Yes | Url of callback |
-| confirm_mode | string | Yes | Verification mode of event sending success, optional: 1-httpstatus,2-regular |
-| confirm_pattern | string | Yes | Httpstatus or regex of callback |
-| subscription_form | string | Yes | Subscription form, separated by ',' |
-| timeout | int | Yes | Timeout of sending event |
-
-### Request Parameters Example
-
-```python
-{
- "bk_supplier_account": "0",
- "subscription_name":"mysubscribe",
- "system_name":"SystemName",
- "callback_url":"http://127.0.0.1:8080/callback",
- "confirm_mode":"httpstatus",
- "confirm_pattern":"200",
- "subscription_form":"hostcreate",
- "timeout":10
-}
-```
-
-### Return Result Example
-
-```python
-
-{
- "result": true,
- "code": 0,
- "message": "",
- "data":{
- "subscription_id": 1
- }
-}
-```
-
-### Return Result Parameters Description
-
-#### data
-
-| Field | Type | Description |
-|-----------------|---------|------------------|
-| subscription_id | int | Subscription ID |
diff --git a/paas2/esb/components/confapis/cc/apidocs/en/unsubcribe_event.md b/paas2/esb/components/confapis/cc/apidocs/en/unsubcribe_event.md
deleted file mode 100644
index 6dcd95a78..000000000
--- a/paas2/esb/components/confapis/cc/apidocs/en/unsubcribe_event.md
+++ /dev/null
@@ -1,35 +0,0 @@
-### Functional description
-
-unsubscribe event
-
-### Request Parameters
-
-{{ common_args_desc }}
-
-#### General Parameters
-
-| Field | Type | Required | Description |
-|--------------------|------------|--------|------------|
-|bk_supplier_account | string | Yes | Supplier account |
-|subscription_id | int | Yes | Subscription ID |
-
-### Request Parameters Example
-
-```python
-{
- "bk_supplier_account":"0",
- "subscription_id":1
-}
-```
-
-### Return Result Example
-
-```python
-
-{
- "result": true,
- "code": 0,
- "message": "",
- "data":"success"
-}
-```
diff --git a/paas2/esb/components/confapis/cc/apidocs/en/update_event_subscribe.md b/paas2/esb/components/confapis/cc/apidocs/en/update_event_subscribe.md
deleted file mode 100644
index 616a1bb77..000000000
--- a/paas2/esb/components/confapis/cc/apidocs/en/update_event_subscribe.md
+++ /dev/null
@@ -1,50 +0,0 @@
-### Functional description
-
-update event subscribe
-
-### Request Parameters
-
-{{ common_args_desc }}
-
-#### General Parameters
-
-| Field | Type | Required | Description |
-|------------------------|----------|--------|--------------------------------------------------|
-| bk_supplier_account | string | Yes | Supplier account |
-| subscription_id | int | Yes | Subscription ID |
-| subscription_name | string | Yes | Subscription name |
-| system_name | string | Yes | Subscription system name |
-| callback_url | string | Yes | Url of callback |
-| confirm_mode | string | Yes | Verification mode of event sending success, optional: 1-httpstatus,2-regular |
-| confirm_pattern | string | Yes | Httpstatus or regex of callback |
-| subscription_form | string | Yes | Subscription form, separated by ',' |
-| timeout | int | Yes | Timeout of sending event |
-
-
-### Request Parameters Example
-
-```python
-{
- "bk_supplier_account": "0",
- "subscription_name":"mysubscribe",
- "subscription_id": 2,
- "system_name":"SystemName",
- "callback_url":"http://127.0.0.1:8080/callback",
- "confirm_mode":"httpstatus",
- "confirm_pattern":"200",
- "subscription_form":"hostcreate",
- "timeout":10
-}
-```
-
-### Return Result Example
-
-```python
-
-{
- "result": true,
- "code": 0,
- "message": "",
- "data": "success"
-}
-```
diff --git a/paas2/esb/components/confapis/cc/apidocs/zh_hans/count_instance_associations.md b/paas2/esb/components/confapis/cc/apidocs/zh_hans/count_instance_associations.md
new file mode 100644
index 000000000..0a0f87e1a
--- /dev/null
+++ b/paas2/esb/components/confapis/cc/apidocs/zh_hans/count_instance_associations.md
@@ -0,0 +1,81 @@
+### 功能描述
+
+模型实例关系数量查询 (v3.10.1+)
+
+### 请求参数
+
+{{ common_args_desc }}
+
+#### 接口参数
+
+| 字段 | 类型 | 必选 | 描述 |
+|------------|--------|------|---------------------------------------------------------------------------------------|
+| bk_obj_id | string | 是 | 模型ID |
+| conditions | object | 是 | 组合查询条件, 组合支持AND和OR两种方式,可以嵌套,最多嵌套3层, 每层OR条件最大支持20个 |
+
+#### conditions
+
+| 字段 | 类型 | 必选 | 描述 |
+|----------|--------|------|----------------------------------------------------------------------------------------------------------|
+| field | string | 是 | 条件字段 |
+| operator | string | 是 | 操作符, 可选值 equal,not_equal,in,not_in,less,less_or_equal,greater,greater_or_equal,between,not_between |
+| value | - | 否 | 条件字段期望的值, 不同的operator对应不同的value格式, 数组类型值最大支持500个元素 |
+
+组装规则可参考: https://github.com/Tencent/bk-cmdb/blob/master/src/common/querybuilder/README.md
+
+### 请求参数示例
+
+```json
+{
+ "bk_app_code":"code",
+ "bk_app_secret":"secret",
+ "bk_token":"xxxx",
+ "bk_obj_id":"bk_switch",
+ "conditions":{
+ "condition": "AND",
+ "rules": [
+ {
+ "field": "bk_inst_name",
+ "operator": "begins_with",
+ "value": "switch"
+ },
+ {
+ "condition": "OR",
+ "rules": [
+ {
+ "field": "bk_inst_id",
+ "operator": "not_in",
+ "value": [2,4,6]
+ },
+ {
+ "field": "bk_obj_name",
+ "operator": "equal",
+ "value": "switch"
+ }
+ ]
+ }
+ ]
+ }
+}
+```
+
+### 返回结果示例
+
+```json
+{
+ "result": true,
+ "code": 0,
+ "message": "",
+ "data": {
+ "count": 1
+ }
+}
+```
+
+### 返回结果参数
+
+#### data
+
+| 字段 | 类型 | 描述 |
+|-------|---------|----------------------------|
+| count | integer | 返回满足条件的实例数据数量 |
diff --git a/paas2/esb/components/confapis/cc/apidocs/zh_hans/count_object_instances.md b/paas2/esb/components/confapis/cc/apidocs/zh_hans/count_object_instances.md
new file mode 100644
index 000000000..922b7f73e
--- /dev/null
+++ b/paas2/esb/components/confapis/cc/apidocs/zh_hans/count_object_instances.md
@@ -0,0 +1,81 @@
+### 功能描述
+
+模型实例数量查询 (v3.10.1+)
+
+### 请求参数
+
+{{ common_args_desc }}
+
+#### 接口参数
+
+| 字段 | 类型 | 必选 | 描述 |
+|------------|--------|------|---------------------------------------------------------------------------------------|
+| bk_obj_id | string | 是 | 模型ID |
+| conditions | object | 是 | 组合查询条件, 组合支持AND和OR两种方式,可以嵌套,最多嵌套3层, 每层OR条件最大支持20个 |
+
+#### conditions
+
+| 字段 | 类型 | 必选 | 描述 |
+|----------|--------|------|----------------------------------------------------------------------------------------------------------|
+| field | string | 是 | 条件字段 |
+| operator | string | 是 | 操作符, 可选值 equal,not_equal,in,not_in,less,less_or_equal,greater,greater_or_equal,between,not_between |
+| value | - | 否 | 条件字段期望的值, 不同的operator对应不同的value格式, 数组类型值最大支持500个元素 |
+
+组装规则可参考: https://github.com/Tencent/bk-cmdb/blob/master/src/common/querybuilder/README.md
+
+### 请求参数示例
+
+```json
+{
+ "bk_app_code":"code",
+ "bk_app_secret":"secret",
+ "bk_token":"xxxx",
+ "bk_obj_id":"bk_switch",
+ "conditions":{
+ "condition": "AND",
+ "rules": [
+ {
+ "field": "bk_inst_name",
+ "operator": "begins_with",
+ "value": "switch"
+ },
+ {
+ "condition": "OR",
+ "rules": [
+ {
+ "field": "bk_inst_id",
+ "operator": "not_in",
+ "value": [2,4,6]
+ },
+ {
+ "field": "bk_obj_name",
+ "operator": "equal",
+ "value": "switch"
+ }
+ ]
+ }
+ ]
+ }
+}
+```
+
+### 返回结果示例
+
+```json
+{
+ "result": true,
+ "code": 0,
+ "message": "",
+ "data": {
+ "count": 1
+ }
+}
+```
+
+### 返回结果参数
+
+#### data
+
+| 字段 | 类型 | 描述 |
+|-------|---------|----------------------------|
+| count | integer | 返回满足条件的实例数据数量 |
diff --git a/paas2/esb/components/confapis/cc/apidocs/zh_hans/create_object_attribute.md b/paas2/esb/components/confapis/cc/apidocs/zh_hans/create_object_attribute.md
index de66d8a6d..8335e3bdb 100644
--- a/paas2/esb/components/confapis/cc/apidocs/zh_hans/create_object_attribute.md
+++ b/paas2/esb/components/confapis/cc/apidocs/zh_hans/create_object_attribute.md
@@ -93,7 +93,7 @@
"bk_issystem": false,
"bk_isapi": false,
"bk_property_type": "singlechar",
- "option": {"min":"1","max":"2"},
+ "option": "",
"description": "test",
"creator": "user",
"create_time": "2020-03-25 17:12:08",
diff --git a/paas2/esb/components/confapis/cc/apidocs/zh_hans/delete_instance_association.md b/paas2/esb/components/confapis/cc/apidocs/zh_hans/delete_instance_association.md
index 87f103b23..8997bc00c 100644
--- a/paas2/esb/components/confapis/cc/apidocs/zh_hans/delete_instance_association.md
+++ b/paas2/esb/components/confapis/cc/apidocs/zh_hans/delete_instance_association.md
@@ -10,12 +10,14 @@
| 字段 | 类型 | 必填 | 描述 |
|----------------------|------------|--------|-----------------------------|
| id | int64 | Yes | 模型实例关联关系的唯一身份id |
+| bk_obj_id | string | Yes | 模型实例关联关系的源或目标模型id(v3.10+) |
### 请求参数示例
``` json
{
- "id": 1
+ "id": 1,
+ "bk_obj_id": "abc"
}
```
diff --git a/paas2/esb/components/confapis/cc/apidocs/zh_hans/find_host_snapshot_batch.md b/paas2/esb/components/confapis/cc/apidocs/zh_hans/find_host_snapshot_batch.md
deleted file mode 100644
index b6ee096f2..000000000
--- a/paas2/esb/components/confapis/cc/apidocs/zh_hans/find_host_snapshot_batch.md
+++ /dev/null
@@ -1,93 +0,0 @@
-### 功能描述
-
-根据主机实例ID列表和想要获取的主机快照属性列表批量获取主机快照 (v3.8.6)
-
-### 请求参数
-
-{{ common_args_desc }}
-
-#### 接口参数
-
-| 字段 | 类型 | 必选 | 描述 |
-|-----------|------------|--------|------------|
-| bk_ids | int array | 是 | 主机实例ID列表, 即bk_host_id列表,最多可填200个 |
-| fields | string array | 是 | 主机快照属性列表,控制返回结果的主机快照信息里有哪些字段
目前支持字段有:bk_host_id,bk_all_ips|
-
-### 请求参数示例
-
-```json
-{
- "bk_ids": [
- 1,
- 2
- ],
- "fields": [
- "bk_host_id",
- "bk_all_ips"
- ]
-}
-```
-
-### 返回结果示例
-
-```json
-{
- "result": true,
- "code": 0,
- "message": "success",
- "data": [
- {
- "bk_all_ips": {
- "interface": [
- {
- "addrs": [
- {
- "ip": "192.xx.xx.xx"
- },
- {
- "ip": "fe80::xx:xx:xx:xx"
- }
- ],
- "mac": "52:xx:xx:xx:xx:xx"
- },
- {
- "addrs": [
- {
- "ip": "192.xx.xx.xx"
- }
- ],
- "mac": "02:xx:xx:xx:xx:xx"
- }
- ]
- },
- "bk_host_id": 1
- },
- {
- "bk_all_ips": {
- "interface": [
- {
- "addrs": [
- {
- "ip": "172.xx.xx.xx"
- },
- {
- "ip": "fe80::xx:xx:xx:xx"
- }
- ],
- "mac": "52:xx:xx:xx:xx:xx"
- },
- {
- "addrs": [
- {
- "ip": "192.xx.xx.xx"
- }
- ],
- "mac": "02:xx:xx:xx:xx:xx"
- }
- ]
- },
- "bk_host_id": 2
- }
- ]
-}
-```
diff --git a/paas2/esb/components/confapis/cc/apidocs/zh_hans/find_instance_association.md b/paas2/esb/components/confapis/cc/apidocs/zh_hans/find_instance_association.md
index fe732c50c..162a829ab 100644
--- a/paas2/esb/components/confapis/cc/apidocs/zh_hans/find_instance_association.md
+++ b/paas2/esb/components/confapis/cc/apidocs/zh_hans/find_instance_association.md
@@ -10,22 +10,8 @@
| 字段 | 类型 | 是否必填 | 描述 |
|----------------------|------------|--------|-----------------------------|
-| metadata | object | Yes | meta data |
| condition | string map | Yes | 查询条件 |
-
-
-metadata params
-
-| 字段 | 类型 | 是否必填 | 描述 |
-|---------------------|------------|--------|-----------------------------|
-| label | string map | Yes | 标签信息 |
-
-
-label params
-
-| 字段 | 类型 | 是否必填 | 描述 |
-|---------------------|------------|--------|-----------------------------|
-| bk_biz_id | string | Yes | 业务ID |
+| bk_obj_id | string | YES | 源模型id(v3.10+)|
condition params
@@ -34,7 +20,6 @@ condition params
|---------------------|------------|--------|-----------------------------|
| bk_obj_asst_id | string | Yes | 模型关联关系的唯一id|
| bk_asst_id | string | NO | 关联类型的唯一id|
-| bk_obj_id | string | NO | 源模型id|
| bk_asst_obj_id | string | NO | 目标模型id|
@@ -45,14 +30,9 @@ condition params
"condition": {
"bk_obj_asst_id": "bk_switch_belong_bk_host",
"bk_asst_id": "",
- "bk_object_id": "",
"bk_asst_obj_id": ""
},
- "metadata":{
- "label":{
- "bk_biz_id":"3"
- }
- }
+ "bk_object_id": "xxx"
}
```
diff --git a/paas2/esb/components/confapis/cc/apidocs/zh_hans/get_operation_log.md b/paas2/esb/components/confapis/cc/apidocs/zh_hans/get_operation_log.md
deleted file mode 100644
index 333b503b8..000000000
--- a/paas2/esb/components/confapis/cc/apidocs/zh_hans/get_operation_log.md
+++ /dev/null
@@ -1,182 +0,0 @@
-### 功能描述
-
-获取操作日志
-
-### 请求参数
-
-{{ common_args_desc }}
-
-#### 接口参数
-
-| 字段 | 类型 | 必选 | 描述 |
-| --------- | ------ | ---- | ---------------------------- |
-| condition | object | 否 | 查询条件 |
-| start | int | 否 | 记录开始位置 |
-| limit | int | 是 | 每页限制条数,最大200 |
-| sort | string | 否 | 排序字段 |
-
-#### condition 字段说明
-
-| 字段 | 类型 | 必选 | 描述 |
-| -------------- | ------------ | ---- | -------------------------- |
-| audit_type | string | 否 | 操作的资源类型大类 |
-| user | string | 否 | 操作人 |
-| resource_type | string array | 否 | 操作的具体资源类型 |
-| action | string array | 否 | 操作类型 |
-| operate_from | string | 否 | 操作的来源 |
-| operation_time | string array | 否 | 操作开始和结束时间成对出现 |
-| bk_biz_id | int | 否 | 业务ID |
-| resource_id | int | 否 | 资源ID |
-| resource_name | string | 否 | 资源名称 |
-| category | string | 否 | 前端使用的资源分类 |
-| label | string array | 否 | 资源标签 |
-| fuzzy_query | bool | 否 | 是否使用模糊查询对资源名称进行查询,**模糊查询效率低,性能差** |
-
-
-### 请求参数示例
-
-```json
-{
- "bk_supplier_account": "0",
- "condition": {
- "audit_type": "business_resource",
- "user": "admin",
- "resource_type": [
- "business",
- "module"
- ],
- "action": [
- "create",
- "update"
- ],
- "operate_from": "user",
- "operation_time": [
- "2020-04-03 00:00:00",
- "2020-04-03 18:00:00"
- ],
- "bk_biz_id": 6,
- "resource_id": 120,
- "resource_name": "test",
- "category": "business",
- "label": [
- "biz_topology"
- ]
- },
- "start": 0,
- "limit": 10,
- "sort": "-operation_time",
- "fuzzy_query": false
-}
-```
-
-### 返回结果示例
-
-```json
-{
- "result": true,
- "code": 0,
- "message": null,
- "data": {
- "count": 1,
- "info": [
- {
- "audit_type": "business_resource",
- "bk_supplier_account": "0",
- "user": "admin",
- "resource_type": "module",
- "action": "create",
- "operate_from": "user",
- "operation_detail": {
- "bk_biz_id": 6,
- "bk_biz_name": "test_biz",
- "resource_id": 120,
- "resource_name": "test",
- "details": {
- "pre_data": null,
- "cur_data": {
- "bk_bak_operator": "",
- "bk_biz_id": 6,
- "bk_childid": null,
- "bk_module_id": 120,
- "bk_module_name": "test",
- "bk_module_type": "1",
- "bk_parent_id": 51,
- "bk_set_id": 51,
- "bk_supplier_account": "0",
- "create_time": "2020-04-03T09:55:30.574+08:00",
- "default": 0,
- "last_time": "2020-04-03T09:55:30.574+08:00",
- "operator": ""
- },
- "properties": [
- {
- "bk_property_id": "bk_biz_id",
- "bk_property_name": "业务ID"
- },
- {
- "bk_property_id": "bk_set_id",
- "bk_property_name": "集群ID"
- },
- {
- "bk_property_id": "bk_module_name",
- "bk_property_name": "模块名"
- },
- {
- "bk_property_id": "bk_childid",
- "bk_property_name": ""
- },
- {
- "bk_property_id": "bk_module_type",
- "bk_property_name": "模块类型"
- },
- {
- "bk_property_id": "operator",
- "bk_property_name": "主要维护人"
- },
- {
- "bk_property_id": "bk_bak_operator",
- "bk_property_name": "备份维护人"
- }
- ]
- },
- "bk_obj_id": "module"
- },
- "operation_time": "2020-04-03 09:55:30",
- "label": {
- "biz_topology": ""
- }
- }
- ]
- }
-}
-```
-
-### 返回结果参数说明
-
-| 名称 | 类型 | 描述 |
-| ------- | ------ | ------------------------------------------ |
-| result | bool | 请求成功与否。true:请求成功;false请求失败 |
-| code | int | 错误编码。 0表示success,>0表示失败错误 |
-| message | string | 请求失败返回的错误信息 |
-| data | object | 请求返回的数据 |
-
-#### data 字段说明:
-
-| 名称 | 类型 | 描述 |
-| ----- | ------------ | ------------------ |
-| count | int | 请求记录条数 |
-| info | object array | 请求记录数据 |
-
-#### info 字段说明:
-
-| 名称 | 类型 | 描述 |
-| ------------------- | ------ | ------------------ |
-| audit_type | string | 操作的资源类型大类 |
-| user | string | 操作人 |
-| bk_supplier_account | string | 开发商ID |
-| resource_type | string | 操作的具体资源类型 |
-| action | string | 操作类型 |
-| operate_from | string | 操作的来源 |
-| operation_detail | object | 实际操作内容 |
-| operation_time | string | 操作时间 |
-| label | object | 资源标签 |
\ No newline at end of file
diff --git a/paas2/esb/components/confapis/cc/apidocs/zh_hans/list_operation_audit.md b/paas2/esb/components/confapis/cc/apidocs/zh_hans/list_operation_audit.md
index dcff771e7..3df2490b7 100644
--- a/paas2/esb/components/confapis/cc/apidocs/zh_hans/list_operation_audit.md
+++ b/paas2/esb/components/confapis/cc/apidocs/zh_hans/list_operation_audit.md
@@ -27,11 +27,21 @@
|-----------|------------|--------|------------|
| bk_biz_id |int |否 | 业务id |
| resource_type |string |否 | 操作的具体资源类型 |
-| action | array | 否 | 操作类型 |
-| operation_time | object | 是 | 操作时间 |
-| user | string | 否 | 操作人 |
-| resource_name | string | 否 | 资源名称 |
-| category | string | 否 | 查询的类型 |
+| action | array | 否 | 操作类型 |
+| operation_time | object | 是 | 操作时间 |
+| user | string | 否 | 操作人 |
+| resource_name | string | 否 | 资源名称 |
+| category | string | 否 | 查询的类型 |
+| fuzzy_query | bool | 否 | 是否使用模糊查询对资源名称进行查询,**模糊查询效率低,性能差**,该字段仅对resource_name产生影响,使用condition方式进行模糊查询时会忽略该字段,请二者选其一使用。 |
+| condition | array | 否 | 指定查询条件,与user和resource_name不能同时提供 |
+
+##### condition.condition
+
+| 字段 | 类型 | 必选 | 描述 |
+| -------- | ------------ | ---- | ------------------------------------------------------------ |
+| field | string | 是 | 对象的字段,仅为"user","resource_name" |
+| operator | string | 是 | 操作符,in 为属于,not_in 为不属于, contains 为包含,field为resource_name时可以使用contains进行模糊查询 |
+| value | string/array | 是 | 字段对应的值,in和not_in需要array类型,contains需要string类型 |
### 请求参数示例
@@ -50,6 +60,42 @@
},
"user":"admin",
"resource_name":"1.1.1.1",
+ "category":"host",
+ "fuzzy_query": false
+ },
+ "page":{
+ "start":0,
+ "limit":10,
+ "sort":"-operation_time"
+ }
+}
+```
+
+```json
+{
+ "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"
+ },
+ "condition":[
+ {
+ "field":"user",
+ "operatior":"in",
+ "value":["admin"]
+ },
+ {
+ "field":"resource_name",
+ "operatior":"in",
+ "value":["1.1.1.1"]
+ }
+ ],
"category":"host"
},
"page":{
@@ -112,3 +158,4 @@
|-----------|-----------|--------------|
| count | int | 记录条数 |
| info | array | 操作审计的记录信息 |
+
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 14d8101f9..c5e24f41e 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,7 +42,7 @@
| bk_fields | array string | 看情况 | 返回的事件中需要返回的字段列表,目前监听主机资源该字段为必填字段,不能置空,主机关系可以置空。置空则默认为返回所有字段。 |
| bk_start_from | Int64 | 否 | 监听事件的起始时间,该值为unix time的秒数,即为从UTC1970年1月1日0时0分0秒起至你要watch的时间点的总秒数。 |
| bk_cursor | string | 否 | 监听事件的游标,代表了要开始或者继续watch(监听)的事件地址,系统会返回这个游标的下一个、或一批事件。 |
-| bk_resource | string | 是 | 要监听的资源类型,枚举值为:host, host_relation, biz, set, module, set_template, process。其中host代表主机详情事件,host_relation代表主机的关系事件,biz代表业务详情事件,set代表集群详情事件,module代表模块详情事件,set_template代表集群模板详情事件,process代表进程详情事件。 |
+| bk_resource | string | 是 | 要监听的资源类型,枚举值为:host, host_relation, biz, set, module, process。其中host代表主机详情事件,host_relation代表主机的关系事件,biz代表业务详情事件,set代表集群详情事件,module代表模块详情事件,process代表进程详情事件。 |
| bk_supplier_account | string | 是 | 开发商账号 |
diff --git a/paas2/esb/components/confapis/cc/apidocs/zh_hans/search_inst.md b/paas2/esb/components/confapis/cc/apidocs/zh_hans/search_inst.md
index fbb63db0b..3862f812f 100644
--- a/paas2/esb/components/confapis/cc/apidocs/zh_hans/search_inst.md
+++ b/paas2/esb/components/confapis/cc/apidocs/zh_hans/search_inst.md
@@ -70,7 +70,7 @@
]
},
"condition": {
- "host": [
+ "user": [
{
"field": "operator",
"operator": "$regex",
diff --git a/paas2/esb/components/confapis/cc/apidocs/zh_hans/search_instance_associations.md b/paas2/esb/components/confapis/cc/apidocs/zh_hans/search_instance_associations.md
new file mode 100644
index 000000000..d5ca27bab
--- /dev/null
+++ b/paas2/esb/components/confapis/cc/apidocs/zh_hans/search_instance_associations.md
@@ -0,0 +1,110 @@
+### 功能描述
+
+模型实例关系查询 (v3.10.1+)
+
+### 请求参数
+
+{{ common_args_desc }}
+
+#### 接口参数
+
+| 字段 | 类型 | 必选 | 描述 |
+|------------|--------|------|---------------------------------------------------------------------------------------|
+| bk_obj_id | string | 是 | 模型ID |
+| conditions | object | 是 | 组合查询条件, 组合支持AND和OR两种方式,可以嵌套,最多嵌套3层, 每层OR条件最大支持20个 |
+| fields | array | 是 | 指定需要返回的字段, 不具备的字段将被忽略 |
+| page | object | 是 | 分页设置 |
+
+#### conditions
+
+| 字段 | 类型 | 必选 | 描述 |
+|----------|--------|------|----------------------------------------------------------------------------------------------------------|
+| field | string | 是 | 条件字段 |
+| operator | string | 是 | 操作符, 可选值 equal,not_equal,in,not_in,less,less_or_equal,greater,greater_or_equal,between,not_between |
+| value | - | 否 | 条件字段期望的值, 不同的operator对应不同的value格式, 数组类型值最大支持500个元素 |
+
+组装规则可参考: https://github.com/Tencent/bk-cmdb/blob/master/src/common/querybuilder/README.md
+
+#### page
+
+| 字段 | 类型 | 必选 | 描述 |
+|-------|--------|------|------------------------------------------------------------------|
+| start | int | 是 | 记录开始位置 |
+| limit | int | 是 | 每页限制条数, 最大500 |
+| sort | string | 否 | 检索排序,遵循MongoDB语义格式{KEY}:{ORDER},默认按照创建时间排序 |
+
+### 请求参数示例
+
+```json
+{
+ "bk_app_code":"code",
+ "bk_app_secret":"secret",
+ "bk_token":"xxxx",
+ "bk_obj_id":"bk_switch",
+ "conditions":{
+ "condition": "AND",
+ "rules": [
+ {
+ "field": "bk_inst_name",
+ "operator": "begins_with",
+ "value": "switch"
+ },
+ {
+ "condition": "OR",
+ "rules": [
+ {
+ "field": "bk_inst_id",
+ "operator": "not_in",
+ "value": [2,4,6]
+ },
+ {
+ "field": "bk_obj_name",
+ "operator": "equal",
+ "value": "switch"
+ }
+ ]
+ }
+ ]
+ },
+ "fields":[
+ "bk_inst_id",
+ "bk_asst_inst_id",
+ "bk_asst_obj_id",
+ "bk_asst_id",
+ "bk_obj_asst_id"
+ ],
+ "page":{
+ "start":0,
+ "limit":500
+ }
+}
+```
+
+### 返回结果示例
+
+```json
+{
+ "result": true,
+ "code": 0,
+ "message": "",
+ "data": {
+ "info": [
+ {
+ "bk_inst_id": 1,
+ "bk_asst_inst_id": 1,
+ "bk_asst_obj_id": "middleware",
+ "bk_asst_id": "connect",
+ "bk_obj_asst_id": "bk_switch_connect_middleware"
+ }
+ ]
+ }
+}
+```
+
+### 返回结果参数
+
+#### data
+
+| 字段 | 类型 | 描述 |
+|------|-------|-------------------------------------|
+| info | array | map数组格式, 返回满足条件的实例数据 |
diff --git a/paas2/esb/components/confapis/cc/apidocs/zh_hans/search_object_instances.md b/paas2/esb/components/confapis/cc/apidocs/zh_hans/search_object_instances.md
new file mode 100644
index 000000000..250b33680
--- /dev/null
+++ b/paas2/esb/components/confapis/cc/apidocs/zh_hans/search_object_instances.md
@@ -0,0 +1,104 @@
+### 功能描述
+
+模型实例查询 (v3.10.1+)
+
+### 请求参数
+
+{{ common_args_desc }}
+
+#### 接口参数
+
+| 字段 | 类型 | 必选 | 描述 |
+|------------|--------|------|---------------------------------------------------------------------------------------|
+| bk_obj_id | string | 是 | 模型ID |
+| conditions | object | 是 | 组合查询条件, 组合支持AND和OR两种方式,可以嵌套,最多嵌套3层, 每层OR条件最大支持20个 |
+| fields | array | 是 | 指定需要返回的字段, 不具备的字段将被忽略 |
+| page | object | 是 | 分页设置 |
+
+#### conditions
+
+| 字段 | 类型 | 必选 | 描述 |
+|----------|--------|------|----------------------------------------------------------------------------------------------------------|
+| field | string | 是 | 条件字段 |
+| operator | string | 是 | 操作符, 可选值 equal,not_equal,in,not_in,less,less_or_equal,greater,greater_or_equal,between,not_between |
+| value | - | 否 | 条件字段期望的值, 不同的operator对应不同的value格式, 数组类型值最大支持500个元素 |
+
+组装规则可参考: https://github.com/Tencent/bk-cmdb/blob/master/src/common/querybuilder/README.md
+
+#### page
+
+| 字段 | 类型 | 必选 | 描述 |
+|-------|--------|------|------------------------------------------------------------------|
+| start | int | 是 | 记录开始位置 |
+| limit | int | 是 | 每页限制条数, 最大500 |
+| sort | string | 否 | 检索排序,遵循MongoDB语义格式{KEY}:{ORDER},默认按照创建时间排序 |
+
+### 请求参数示例
+
+```json
+{
+ "bk_app_code":"code",
+ "bk_app_secret":"secret",
+ "bk_token":"xxxx",
+ "bk_obj_id":"bk_switch",
+ "conditions":{
+ "condition": "AND",
+ "rules": [
+ {
+ "field": "bk_inst_name",
+ "operator": "begins_with",
+ "value": "switch"
+ },
+ {
+ "condition": "OR",
+ "rules": [
+ {
+ "field": "bk_inst_id",
+ "operator": "not_in",
+ "value": [2,4,6]
+ },
+ {
+ "field": "bk_obj_name",
+ "operator": "equal",
+ "value": "switch"
+ }
+ ]
+ }
+ ]
+ },
+ "fields":[
+ "bk_inst_id",
+ "bk_inst_name"
+ ],
+ "page":{
+ "start":0,
+ "limit":500
+ }
+}
+```
+
+### 返回结果示例
+
+```json
+{
+ "result": true,
+ "code": 0,
+ "message": "",
+ "data": {
+ "info": [
+ {
+ "bk_inst_id": 1,
+ "bk_inst_name": "switch-instance"
+ }
+ ]
+ }
+}
+```
+
+### 返回结果参数
+
+#### data
+
+| 字段 | 类型 | 描述 |
+|------|-------|-------------------------------------|
+| info | array | map数组格式, 返回满足条件的实例数据 |
diff --git a/paas2/esb/components/confapis/cc/apidocs/zh_hans/search_subscription.md b/paas2/esb/components/confapis/cc/apidocs/zh_hans/search_subscription.md
deleted file mode 100644
index 6b522d3bc..000000000
--- a/paas2/esb/components/confapis/cc/apidocs/zh_hans/search_subscription.md
+++ /dev/null
@@ -1,100 +0,0 @@
-### 功能描述
-
-查询事件订阅
-
-### 请求参数
-
-{{ common_args_desc }}
-
-#### 接口参数
-
-| 字段 | 类型 | 必选 | 描述 |
-|---------------------|------------|--------|-----------------------------|
-| page | object | 否 | 分页参数 |
-| condition | object | 否 | 查询条件 |
-
-#### page
-
-| 字段 | 类型 | 必选 | 描述 |
-|-----------|------------|--------|----------------------|
-| start | int | 是 | 记录开始位置 |
-| limit | int | 是 | 每页限制条数,最大200 |
-| sort | string | 否 | 排序字段 |
-
-#### condition
-
-| 字段 | 类型 | 必选 | 描述 |
-|-----------|------------|--------|------------|
-| subscription_name |string |是 | 此处仅为示例数据,需要被设置为查询的字段 |
-
-### 请求参数示例
-
-```python
-{
- "bk_supplier_account":"0",
- "condition":{
- "subscription_name":"name"
- },
- "page":{
- "start":0,
- "limit":10,
- "sort":"HostName"
- }
-}
-```
-
-### 返回结果示例
-
-```python
-{
- "result": true,
- "code": 0,
- "message": "success",
- "data": {
- "count": 1,
- "info": [
- {
- "subscription_id": 1,
- "subscription_name": "mysubscribe",
- "system_name": "SystemName",
- "callback_url": "http://127.0.0.1:8080/callback",
- "confirm_mode": "httpstatus",
- "confirm_pattern": "200",
- "time_out": 10,
- "subscription_form": "hostcreate",
- "operator": "user",
- "bk_supplier_account": "0",
- "last_time": "2017-09-19 16:57:07",
- "statistics": {
- "total": 30,
- "failure": 2
- }
- }
- ]
- }
-}
-```
-
-### 返回结果参数说明
-
-#### data
-| 字段 | 类型 | 描述 |
-|-------|--------------|------------------|
-| count | int | 记录条数 |
-| info | object array | 事件订阅的详情列表 |
-
-#### info
-| 字段 | 类型 | 描述 |
-|----------------------|-----------|--------------------------------------------|
-| subscription_id | int | 订阅ID |
-| subscription_name | string | 订阅名 |
-| system_name | string | 系统名称 |
-| callback_url | string | 回调地址 |
-| confirm_mode | string | 回调成功确认模式,可选:httpstatus,regular |
-| confirm_pattern | string | 回调成功标志 |
-| subscription_form | string | 订阅单,用","分隔 |
-| timeout | int | 超时时间,单位:秒 |
-| operator | int | 本条数据的最后更新人员 |
-| last_time | int | 更新时间 |
-| statistics.total | int | 推送总数 |
-| statistics.failure | int | 推送失败数 |
\ No newline at end of file
diff --git a/paas2/esb/components/confapis/cc/apidocs/zh_hans/subscribe_event.md b/paas2/esb/components/confapis/cc/apidocs/zh_hans/subscribe_event.md
deleted file mode 100644
index 514d9e559..000000000
--- a/paas2/esb/components/confapis/cc/apidocs/zh_hans/subscribe_event.md
+++ /dev/null
@@ -1,56 +0,0 @@
-### 功能描述
-
-订阅事件
-
-### 请求参数
-
-{{ common_args_desc }}
-
-#### 接口参数
-
-| 字段 | 类型 | 必选 | 描述 |
-|---------------------|------------|--------|--------------------------------------------------|
-| subscription_name | string | 是 | 订阅的名字 |
-| system_name | string | 是 | 订阅事件的系统的名字 |
-| callback_url | string | 是 | 回调函数 |
-| confirm_mode | string | 是 | 事件发送成功校验模式,可选 1-httpstatus,2-regular |
-| confirm_pattern | string | 是 | callback的httpstatus或正则 |
-| subscription_form | string | 是 | 订阅的事件,以逗号分隔 |
-| timeout | int | 是 | 发送事件超时时间 |
-
-### 请求参数示例
-
-```python
-{
- "bk_supplier_account": "0",
- "subscription_name":"mysubscribe",
- "system_name":"SystemName",
- "callback_url":"http://127.0.0.1:8080/callback",
- "confirm_mode":"httpstatus",
- "confirm_pattern":"200",
- "subscription_form":"hostcreate",
- "timeout":10
-}
-```
-
-### 返回结果示例
-
-```python
-
-{
- "result": true,
- "code": 0,
- "message": "",
- "data":{
- "subscription_id": 1
- }
-}
-```
-
-### 返回结果参数说明
-
-#### data
-
-| 字段 | 类型 | 描述 |
-|-----------------|---------|------------------|
-| subscription_id | int | 新增订阅的订阅ID |
diff --git a/paas2/esb/components/confapis/cc/apidocs/zh_hans/unsubcribe_event.md b/paas2/esb/components/confapis/cc/apidocs/zh_hans/unsubcribe_event.md
deleted file mode 100644
index b2fbde526..000000000
--- a/paas2/esb/components/confapis/cc/apidocs/zh_hans/unsubcribe_event.md
+++ /dev/null
@@ -1,34 +0,0 @@
-### 功能描述
-
-退订事件
-
-### 请求参数
-
-{{ common_args_desc }}
-
-#### 接口参数
-
-| 字段 | 类型 | 必选 | 描述 |
-|--------------------|------------|--------|------------|
-|subscription_id | int | 是 | 订阅ID |
-
-### 请求参数示例
-
-```python
-{
- "bk_supplier_account":"0",
- "subscription_id":1
-}
-```
-
-### 返回结果示例
-
-```python
-
-{
- "result": true,
- "code": 0,
- "message": "",
- "data":"success"
-}
-```
diff --git a/paas2/esb/components/confapis/cc/apidocs/zh_hans/update_event_subscribe.md b/paas2/esb/components/confapis/cc/apidocs/zh_hans/update_event_subscribe.md
deleted file mode 100644
index 00bfba3dd..000000000
--- a/paas2/esb/components/confapis/cc/apidocs/zh_hans/update_event_subscribe.md
+++ /dev/null
@@ -1,50 +0,0 @@
-### 功能描述
-
-修改订阅
-
-### 请求参数
-
-{{ common_args_desc }}
-
-#### 接口参数
-
-| 字段 | 类型 | 必选 | 描述 |
-|------------------------|----------|--------|--------------------------------------------------|
-| bk_supplier_account | string | 是 | 开发商账号 |
-| subscription_id | int | 是 | 订阅ID |
-| subscription_name | string | 是 | 订阅的名字 |
-| system_name | string | 是 | 订阅事件的系统的名字 |
-| callback_url | string | 是 | 回调函数 |
-| confirm_mode | string | 是 | 事件发送成功校验模式,可选 1-httpstatus,2-regular |
-| confirm_pattern | string | 是 | callback的httpstatus或正则 |
-| subscription_form | string | 是 | 订阅的事件,以逗号分隔 |
-| timeout | int | 是 | 发送事件超时时间 |
-
-
-### 请求参数示例
-
-```python
-{
- "bk_supplier_account": "0",
- "subscription_name":"mysubscribe",
- "subscription_id": 2,
- "system_name":"SystemName",
- "callback_url":"http://127.0.0.1:8080/callback",
- "confirm_mode":"httpstatus",
- "confirm_pattern":"200",
- "subscription_form":"hostcreate",
- "timeout":10
-}
-```
-
-### 返回结果示例
-
-```python
-
-{
- "result": true,
- "code": 0,
- "message": "",
- "data": "success"
-}
-```
diff --git a/paas2/esb/components/confapis/cc/cc.yaml b/paas2/esb/components/confapis/cc/cc.yaml
index 11e1e35f2..9690e4526 100644
--- a/paas2/esb/components/confapis/cc/cc.yaml
+++ b/paas2/esb/components/confapis/cc/cc.yaml
@@ -39,16 +39,6 @@
dest_path: /api/v3/findmany/module/bk_biz_id/{bk_biz_id}
dest_http_method: POST
-- path: /v2/cc/find_host_snapshot_batch/
- name: find_host_snapshot_batch
- label: 批量查询主机快照
- label_en: find host snapshot in batch
- suggest_method: POST
- api_type: query
- comp_codename: generic.v2.cc.cc_component
- dest_path: /api/v3/hosts/snapshot/batch
- dest_http_method: POST
-
- path: /v2/cc/create_inst/
name: create_inst
label: 创建实例
@@ -275,46 +265,6 @@
dest_path: /api/v3/update/objectattr/biz/{bk_biz_id}/id/{id}
dest_http_method: PUT
-- path: /v2/cc/subscribe_event/
- name: subscribe_event
- label: 订阅事件
- label_en: subscribe event
- suggest_method: POST
- api_type: operate
- comp_codename: generic.v2.cc.cc_component
- dest_path: /api/v3/event/subscribe/{bk_supplier_account}/0
- dest_http_method: POST
-
-- path: /v2/cc/unsubcribe_event/
- name: unsubcribe_event
- label: 退订事件
- label_en: event unsubscribe
- suggest_method: POST
- api_type: operate
- comp_codename: generic.v2.cc.cc_component
- dest_path: /api/v3/event/subscribe/{bk_supplier_account}/0/{subscription_id}
- dest_http_method: DELETE
-
-- path: /v2/cc/update_event_subscribe/
- name: update_event_subscribe
- label: 修改订阅
- label_en: update the event subscription
- suggest_method: POST
- api_type: operate
- comp_codename: generic.v2.cc.cc_component
- dest_path: /api/v3/event/subscribe/{bk_supplier_account}/0/{subscription_id}
- dest_http_method: PUT
-
-- path: /v2/cc/search_subscription/
- name: search_subscription
- label: 查询订阅
- label_en: search event subscription
- suggest_method: POST
- api_type: query
- comp_codename: generic.v2.cc.cc_component
- dest_path: /api/v3/event/subscribe/search/{bk_supplier_account}/0
- dest_http_method: POST
-
- path: /v2/cc/list_biz_hosts/
name: list_biz_hosts
label: 查询业务下的主机
@@ -482,7 +432,7 @@
suggest_method: POST
api_type: query
comp_codename: generic.v2.cc.cc_component
- dest_path: /api/v3/delete/instassociation/{id}
+ dest_path: /api/v3/delete/instassociation/{bk_obj_id}/{id}
dest_http_method: DELETE
- path: /v2/cc/find_host_topo_relation/
@@ -1152,3 +1102,43 @@
dest_path: /api/v3/findmany/hosts/detail_topo
dest_http_method: POST
is_hidden: true
+
+- path: /v2/cc/search_object_instances/
+ name: search_object_instances
+ label: 查询模型实例
+ label_en: search object instances
+ suggest_method: POST
+ api_type: operate
+ comp_codename: generic.v2.cc.cc_component
+ dest_path: /api/v3/search/instances/object/{bk_obj_id}
+ dest_http_method: POST
+
+- path: /v2/cc/count_object_instances/
+ name: count_object_instances
+ label: 查询模型实例数量
+ label_en: count object instances num
+ suggest_method: POST
+ api_type: operate
+ comp_codename: generic.v2.cc.cc_component
+ dest_path: /api/v3/count/instances/object/{bk_obj_id}
+ dest_http_method: POST
+
+- path: /v2/cc/search_instance_associations/
+ name: search_instance_associations
+ label: 查询模型实例关系
+ label_en: search instance associations
+ suggest_method: POST
+ api_type: operate
+ comp_codename: generic.v2.cc.cc_component
+ dest_path: /api/v3/search/instance_associations/object/{bk_obj_id}
+ dest_http_method: POST
+
+- path: /v2/cc/count_instance_associations/
+ name: count_instance_associations
+ label: 查询模型实例关系数量
+ label_en: count instance associations num
+ suggest_method: POST
+ api_type: operate
+ comp_codename: generic.v2.cc.cc_component
+ dest_path: /api/v3/count/instance_associations/object/{bk_obj_id}
+ dest_http_method: POST
diff --git a/paas2/paas/esb/apps/manager/templates/manager/channel/add.html b/paas2/paas/esb/apps/manager/templates/manager/channel/add.html
index ca36ccdf5..97c01ffeb 100644
--- a/paas2/paas/esb/apps/manager/templates/manager/channel/add.html
+++ b/paas2/paas/esb/apps/manager/templates/manager/channel/add.html
@@ -21,7 +21,7 @@
{{ form.type|bootstrap }}
{{ form.timeout_time|bootstrap }}
-