Skip to content

Commit

Permalink
ESB文档更新英文文档
Browse files Browse the repository at this point in the history
  • Loading branch information
bd-xiaowang committed Jan 25, 2024
1 parent f4672bc commit 097e303
Show file tree
Hide file tree
Showing 192 changed files with 8,442 additions and 7,787 deletions.
93 changes: 65 additions & 28 deletions docs/apidoc/cc/en/add_cloud_host_to_biz.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,61 @@
### Function description
### Function Description

add cloud host to biz idle module (cloud host management dedicated interface, version: v3.10.19+, permission: edit business host)
Add the module for idle hosts in the business related to cloud hosts (Dedicated interface for cloud host management, Version: v3.10.19+, Permission: Business host editing permission)

### Request Parameters

{{ common_args_desc }}

#### Interface Parameters

| field | type | mandatory | description |
|-----------|--------------|-----------|---------------------------------------------------------------------------------------------------------------------------|
| bk_biz_id | int | yes | business id |
| host_info | array | yes | to be added cloud host information, array length is limited to 200, these hosts can only succeed or fail at the same time |
| Field | Type | Required | Description |
| --------- | ----- | -------- | ------------------------------------------------------------ |
| bk_biz_id | int | Yes | Business ID |
| host_info | array | Yes | Information of newly added cloud hosts, array length can be up to 200, success or failure occurs for the entire batch of hosts |

#### host_info

host information fields, cloud area ID and inner IP fields are required, other fields are attribute fields defined in host model. Only field examples are shown here, please fill in other fields as needed.

| field | type | required | description |
|-----------------|--------|----------|-------------------------------------------------------------------|
| bk_host_innerip | string | yes | host inner ip in IPv4 format, multiple ips are seperated by comma |
| bk_cloud_id | int | yes | cloud area id |
| bk_host_name | string | no | host name, or any other property |
| operator | string | no | host main maintainer, or other attributes |
| bk_comment | string | no | comment, or other attributes |
Host information, where bk_cloud_id, bk_host_innerip, cloud vendor, and cloud host instance ID fields are required. Other fields are attributes defined in the host model. Only a subset of fields is shown here, please fill in other fields as needed.

| Field | Type | Required | Description |
| -------------------- | ------ | -------- | ------------------------------------------------------------ |
| bk_cloud_id | int | Yes | Control area ID |
| bk_host_innerip | string | Yes | IPv4 format of host's internal IP, separated by commas for multiple IPs |
| bk_cloud_vendor | array | Yes | Cloud vendor |
| bk_cloud_inst_id | array | Yes | Cloud host instance ID |
| bk_addressing | string | No | Addressing method, static for cloud hosts |
| bk_host_name | string | No | Hostname or other attributes |
| operator | string | No | Main maintainer or other attributes |
| bk_comment | string | No | Remark or other attributes |
| import_from | string | No | Host import source, 3 for API import |
| bk_asset_id | string | No | Fixed asset number |
| bk_created_at | string | No | Creation time |
| bk_updated_at | string | No | Update time |
| bk_created_by | string | No | Creator |
| bk_updated_by | string | No | Updater |
| bk_cloud_host_status | string | No | Cloud host status |
| bk_cpu | int | No | CPU logical cores |
| bk_cpu_architecture | string | No | CPU architecture |
| bk_cpu_module | string | No | CPU model |
| bk_disk | int | No | Disk capacity (GB) |
| bk_host_outerip | string | No | Host's external IP |
| bk_host_innerip_v6 | string | No | Host's internal IPv6 |
| bk_host_outerip_v6 | string | No | Host's external IPv6 |
| bk_isp_name | string | No | Affiliated ISP |
| bk_mac | string | No | Host's internal MAC address |
| bk_mem | int | No | Host's RAM capacity (MB) |
| bk_os_bit | string | No | Operating system bit |
| bk_os_name | string | No | Operating system name |
| bk_os_type | string | No | Operating system type |
| bk_os_version | string | No | Operating system version |
| bk_outer_mac | string | No | Host's external MAC address |
| bk_province_name | string | No | Province where the host is located |
| bk_service_term | int | No | Warranty period |
| bk_sla | string | No | SLA level |
| bk_sn | string | No | Device SN |
| bk_state | string | No | Current state |
| bk_state_name | string | No | Country where the host is located |
| bk_bak_operator | string | No | Backup maintainer |

### Request Parameters Example

Expand All @@ -38,13 +70,17 @@ host information fields, cloud area ID and inner IP fields are required, other f
{
"bk_cloud_id": 0,
"bk_host_innerip": "127.0.0.1",
"bk_cloud_vendor": "2",
"bk_cloud_inst_id": "45515",
"bk_host_name": "host1",
"operator": "admin",
"bk_comment": "comment"
},
{
"bk_cloud_id": 0,
"bk_host_innerip": "127.0.0.2",
"bk_cloud_vendor": "2",
"bk_cloud_inst_id": "45656",
"bk_host_name": "host2",
"operator": "admin",
"bk_comment": "comment"
Expand All @@ -53,7 +89,7 @@ host information fields, cloud area ID and inner IP fields are required, other f
}
```

### Return Result Example
### Response Example

```json
{
Expand All @@ -71,20 +107,21 @@ host information fields, cloud area ID and inner IP fields are required, other f
}
```

### Return Result Parameters Description
### Response Parameters Description

#### response

| name | type | description |
|------------|--------|-------------------------------------------------------------------------------------------|
| result | bool | Whether the request was successful or not. true:request successful; false request failed. |
| code | int | The error code. 0 means success, >0 means failure error. |
| message | string | The error message returned by the failed request. |
| data | object | The data returned by the request. |
| permission | object | Permission information |
| request_id | string | Request chain id |
| Field | Type | Description |
| ---------- | ------ | ------------------------------------------------------------ |
| result | bool | Whether the request was successful. true: success; false: failure |
| code | int | Error code. 0 indicates success, >0 indicates a failure error |
| message | string | Error message returned for a failed request |
| data | object | Data returned by the request |
| permission | object | Permission information |
| request_id | string | Request chain ID |

#### data
| field | type | description |
|-------|-----------|------------------------------------|
| ids | array | successfully created host id array |

| Field | Type | Description |
| ----- | ----- | ------------------------------------------- |
| ids | array | Array of IDs for successfully created hosts |
33 changes: 17 additions & 16 deletions docs/apidoc/cc/en/add_host_lock.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
### Functional description
### Function Description

Lock the host according to the id list of the host, and add a new host lock. If the host has already been locked, it will also prompt that the locking is successful (v3.8.6).
Lock hosts based on a list of host IDs. For newly added hosts, if the host has already been locked, it will also indicate successful locking (Version: v3.8.6, Permission: Business host editing permission)

### Request Parameters

{{ common_args_desc }}

#### Interface Parameters

| Field | Type | Required | Description |
|---------------------|-------------|--------|----------------------------------|
|id_list| int array| yes | Host ID list|

| Field | Type | Required | Description |
| ------- | --------- | -------- | ---------------- |
| id_list | int array | Yes | List of host IDs |

### Request Parameters Example

Expand All @@ -25,10 +24,9 @@ Lock the host according to the id list of the host, and add a new host lock. If
}
```

### Return Result Example
### Response Example

```python

{
"result": true,
"code": 0,
Expand All @@ -38,13 +36,16 @@ Lock the host according to the id list of the host, and add a new host lock. If
"request_id": "e43da4ef221746868dc4c837d36f3807"
}
```

### Response Parameters Description

#### response

| Name | Type | Description |
| ------- | ------ | ------------------------------------- |
| result | bool | Whether the request was successful or not. True: request succeeded;false request failed|
| code | int | Wrong code. 0 indicates success,>0 indicates failure error |
| message | string |Error message returned by request failure |
| data | object |Data returned by request |
| permission | object |Permission information |
| request_id | string |Request chain id |
| Field | Type | Description |
| ---------- | ------ | ------------------------------------------------------------ |
| result | bool | Whether the request was successful. true: success; false: failure |
| code | int | Error code. 0 indicates success, >0 indicates a failure error |
| message | string | Error message returned for a failed request |
| data | object | Data returned by the request |
| permission | object | Permission information |
| request_id | string | Request chain ID |
59 changes: 30 additions & 29 deletions docs/apidoc/cc/en/add_host_to_business_idle.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
### Function description
### Function Description

Add hosts to the service idle machine
- This interface ensures that hosts are either added successfully or fail at the same time(v3.10.25+)
Add hosts to the business idle hosts. This interface ensures that hosts are either added successfully together or fail together (v3.10.25+, Permission: Host pool host allocation to business permission)

### Request Parameters

{{ common_args_desc }}

#### Interface Parameters

| field | type | mandatory | description |
| -----------|------------|--------|------------|
| bk_host_list | array | Yes | Host information (array length is limited to 200 at a time) |
| bk_biz_id | int | yes | business_id |
| Field | Type | Required | Description |
| ------------ | ----- | -------- | ---------------------------------------------- |
| bk_host_list | array | Yes | Host information (array length limited to 200) |
| bk_biz_id | int | Yes | Business ID |

#### bk_host_list(host-related fields)
#### bk_host_list (Fields related to hosts)

| field | type | required | description |
| -----------|------------|--------|------------|
| bk_host_innerip | string | yes | host_internal_ip |
| bk_cloud_id | int | Yes | cloud_region_id |
| bk_addressing | string | Yes | Addressing method, "static", "dynamic" |
| operator | string | No | Primary maintainer |
...
| Field | Type | Required | Description |
| ------------------ | ------ | -------- | ------------------------------------------------------------ |
| bk_host_innerip | string | No | Host's internal IPv4, one of bk_host_innerip or bk_host_innerip_v6 is required |
| bk_host_innerip_v6 | string | No | Host's internal IPv6, one of bk_host_innerip or bk_host_innerip_v6 is required |
| bk_cloud_id | int | Yes | Control area ID |
| bk_addressing | string | Yes | Addressing method, "static" or "dynamic" |
| operator | string | No | Main maintainer |
| ... | | | |

### Request Parameters Example

Expand Down Expand Up @@ -50,10 +50,9 @@ Add hosts to the service idle machine
}
```

### Return Result Example
### Response Example

```python

{
"result": true,
"code": 0,
Expand All @@ -68,20 +67,22 @@ Add hosts to the service idle machine
}
}
```
### Return Result Parameters Description

### Response Parameters Description

#### response

| name | type | description |
| ------- | ------ | ------------------------------------- |
| result | bool | Whether the request was successful or not. true:request successful; false request failed.|
| code | int | The error code. 0 means success, >0 means failure error.|
| message | string | The error message returned by the failed request.|
| data | object | The data returned by the request.|
| permission | object | Permission information |
| request_id | string | Request chain id |
| Field | Type | Description |
| ---------- | ------ | ------------------------------------------------------------ |
| result | bool | Whether the request was successful. true: success; false: failure |
| code | int | Error code. 0 indicates success, >0 indicates a failure error |
| message | string | Error message returned for a failed request |
| data | object | Data returned by the request |
| permission | object | Permission information |
| request_id | string | Request chain ID |

#### data
| field | type | description |
| -----------|-----------|--------------|
| bk_host_ids | array | host_id of the host |

| Field | Type | Description |
| ----------- | ----- | ----------------------------- |
| bk_host_ids | array | Host IDs of the created hosts |
Loading

0 comments on commit 097e303

Please sign in to comment.