220 lines
4.6 KiB
Markdown
220 lines
4.6 KiB
Markdown
|
|
# NodeIPAddressThresholdService
|
|||
|
|
> IP阈值相关服务
|
|||
|
|
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
## countAllEnabledNodeIPAddressThresholds
|
|||
|
|
> 计算IP阈值的数量
|
|||
|
|
|
|||
|
|
- 角色:`admin`
|
|||
|
|
- HTTP:`POST https://backend.dooki.cloud/NodeIPAddressThresholdService/countAllEnabledNodeIPAddressThresholds`
|
|||
|
|
- RPC:`rpc countAllEnabledNodeIPAddressThresholds(CountAllEnabledNodeIPAddressThresholdsRequest) returns (RPCCountResponse);`
|
|||
|
|
|
|||
|
|
**请求对象 (`CountAllEnabledNodeIPAddressThresholdsRequest`)**
|
|||
|
|
|
|||
|
|
```json
|
|||
|
|
{
|
|||
|
|
"nodeIPAddressId": "int64"
|
|||
|
|
}
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
**响应对象 (`RPCCountResponse`)**
|
|||
|
|
|
|||
|
|
```json
|
|||
|
|
{
|
|||
|
|
"count": "int64 // 数量"
|
|||
|
|
}
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
**调用示例**
|
|||
|
|
|
|||
|
|
```bash
|
|||
|
|
curl -X POST "https://backend.dooki.cloud/NodeIPAddressThresholdService/countAllEnabledNodeIPAddressThresholds" \
|
|||
|
|
-H "Content-Type: application/json" \
|
|||
|
|
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
|
|||
|
|
-d '{
|
|||
|
|
...
|
|||
|
|
}'
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
## createNodeIPAddressThreshold
|
|||
|
|
> 创建阈值
|
|||
|
|
|
|||
|
|
- 角色:`admin`
|
|||
|
|
- HTTP:`POST https://backend.dooki.cloud/NodeIPAddressThresholdService/createNodeIPAddressThreshold`
|
|||
|
|
- RPC:`rpc createNodeIPAddressThreshold(CreateNodeIPAddressThresholdRequest) returns (CreateNodeIPAddressThresholdResponse);`
|
|||
|
|
|
|||
|
|
**请求对象 (`CreateNodeIPAddressThresholdRequest`)**
|
|||
|
|
|
|||
|
|
```json
|
|||
|
|
{
|
|||
|
|
"nodeIPAddressId": "int64",
|
|||
|
|
"itemsJSON": "bytes",
|
|||
|
|
"actionsJSON": "bytes"
|
|||
|
|
}
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
**响应对象 (`CreateNodeIPAddressThresholdResponse`)**
|
|||
|
|
|
|||
|
|
```json
|
|||
|
|
{
|
|||
|
|
"nodeIPAddressThresholdId": "int64"
|
|||
|
|
}
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
**调用示例**
|
|||
|
|
|
|||
|
|
```bash
|
|||
|
|
curl -X POST "https://backend.dooki.cloud/NodeIPAddressThresholdService/createNodeIPAddressThreshold" \
|
|||
|
|
-H "Content-Type: application/json" \
|
|||
|
|
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
|
|||
|
|
-d '{
|
|||
|
|
...
|
|||
|
|
}'
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
## deleteNodeIPAddressThreshold
|
|||
|
|
> 删除阈值
|
|||
|
|
|
|||
|
|
- 角色:`admin`
|
|||
|
|
- HTTP:`POST https://backend.dooki.cloud/NodeIPAddressThresholdService/deleteNodeIPAddressThreshold`
|
|||
|
|
- RPC:`rpc deleteNodeIPAddressThreshold(DeleteNodeIPAddressThresholdRequest) returns (RPCSuccess);`
|
|||
|
|
|
|||
|
|
**请求对象 (`DeleteNodeIPAddressThresholdRequest`)**
|
|||
|
|
|
|||
|
|
```json
|
|||
|
|
{
|
|||
|
|
"nodeIPAddressThresholdId": "int64"
|
|||
|
|
}
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
**响应对象 (`RPCSuccess`)**
|
|||
|
|
|
|||
|
|
```json
|
|||
|
|
{}
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
**调用示例**
|
|||
|
|
|
|||
|
|
```bash
|
|||
|
|
curl -X POST "https://backend.dooki.cloud/NodeIPAddressThresholdService/deleteNodeIPAddressThreshold" \
|
|||
|
|
-H "Content-Type: application/json" \
|
|||
|
|
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
|
|||
|
|
-d '{
|
|||
|
|
...
|
|||
|
|
}'
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
## findAllEnabledNodeIPAddressThresholds
|
|||
|
|
> 查找IP的所有阈值
|
|||
|
|
|
|||
|
|
- 角色:`admin`
|
|||
|
|
- HTTP:`POST https://backend.dooki.cloud/NodeIPAddressThresholdService/findAllEnabledNodeIPAddressThresholds`
|
|||
|
|
- RPC:`rpc findAllEnabledNodeIPAddressThresholds(FindAllEnabledNodeIPAddressThresholdsRequest) returns (FindAllEnabledNodeIPAddressThresholdsResponse);`
|
|||
|
|
|
|||
|
|
**请求对象 (`FindAllEnabledNodeIPAddressThresholdsRequest`)**
|
|||
|
|
|
|||
|
|
```json
|
|||
|
|
{
|
|||
|
|
"nodeIPAddressId": "int64"
|
|||
|
|
}
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
**响应对象 (`FindAllEnabledNodeIPAddressThresholdsResponse`)**
|
|||
|
|
|
|||
|
|
```json
|
|||
|
|
{
|
|||
|
|
"nodeIPAddressThresholds": "[]NodeIPAddressThreshold"
|
|||
|
|
}
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
**调用示例**
|
|||
|
|
|
|||
|
|
```bash
|
|||
|
|
curl -X POST "https://backend.dooki.cloud/NodeIPAddressThresholdService/findAllEnabledNodeIPAddressThresholds" \
|
|||
|
|
-H "Content-Type: application/json" \
|
|||
|
|
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
|
|||
|
|
-d '{
|
|||
|
|
...
|
|||
|
|
}'
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
## updateAllNodeIPAddressThresholds
|
|||
|
|
> 批量更新阈值
|
|||
|
|
|
|||
|
|
- 角色:`admin`
|
|||
|
|
- HTTP:`POST https://backend.dooki.cloud/NodeIPAddressThresholdService/updateAllNodeIPAddressThresholds`
|
|||
|
|
- RPC:`rpc updateAllNodeIPAddressThresholds(UpdateAllNodeIPAddressThresholdsRequest) returns (RPCSuccess);`
|
|||
|
|
|
|||
|
|
**请求对象 (`UpdateAllNodeIPAddressThresholdsRequest`)**
|
|||
|
|
|
|||
|
|
```json
|
|||
|
|
{
|
|||
|
|
"nodeIPAddressId": "int64",
|
|||
|
|
"nodeIPAddressThresholdsJSON": "bytes"
|
|||
|
|
}
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
**响应对象 (`RPCSuccess`)**
|
|||
|
|
|
|||
|
|
```json
|
|||
|
|
{}
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
**调用示例**
|
|||
|
|
|
|||
|
|
```bash
|
|||
|
|
curl -X POST "https://backend.dooki.cloud/NodeIPAddressThresholdService/updateAllNodeIPAddressThresholds" \
|
|||
|
|
-H "Content-Type: application/json" \
|
|||
|
|
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
|
|||
|
|
-d '{
|
|||
|
|
...
|
|||
|
|
}'
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
## updateNodeIPAddressThreshold
|
|||
|
|
> 修改阈值
|
|||
|
|
|
|||
|
|
- 角色:`admin`
|
|||
|
|
- HTTP:`POST https://backend.dooki.cloud/NodeIPAddressThresholdService/updateNodeIPAddressThreshold`
|
|||
|
|
- RPC:`rpc updateNodeIPAddressThreshold(UpdateNodeIPAddressThresholdRequest) returns (RPCSuccess);`
|
|||
|
|
|
|||
|
|
**请求对象 (`UpdateNodeIPAddressThresholdRequest`)**
|
|||
|
|
|
|||
|
|
```json
|
|||
|
|
{
|
|||
|
|
"nodeIPAddressThresholdId": "int64",
|
|||
|
|
"itemsJSON": "bytes",
|
|||
|
|
"actionsJSON": "bytes"
|
|||
|
|
}
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
**响应对象 (`RPCSuccess`)**
|
|||
|
|
|
|||
|
|
```json
|
|||
|
|
{}
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
**调用示例**
|
|||
|
|
|
|||
|
|
```bash
|
|||
|
|
curl -X POST "https://backend.dooki.cloud/NodeIPAddressThresholdService/updateNodeIPAddressThreshold" \
|
|||
|
|
-H "Content-Type: application/json" \
|
|||
|
|
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
|
|||
|
|
-d '{
|
|||
|
|
...
|
|||
|
|
}'
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
---
|