Files
pyGoEdge-UserPanel/reference/goedge 文档/NodeIPAddressThresholdService.md
2025-11-18 03:36:49 +08:00

4.6 KiB
Raw Permalink Blame History

NodeIPAddressThresholdService

IP阈值相关服务


countAllEnabledNodeIPAddressThresholds

计算IP阈值的数量

  • 角色:admin
  • HTTPPOST https://backend.dooki.cloud/NodeIPAddressThresholdService/countAllEnabledNodeIPAddressThresholds
  • RPCrpc countAllEnabledNodeIPAddressThresholds(CountAllEnabledNodeIPAddressThresholdsRequest) returns (RPCCountResponse);

请求对象 (CountAllEnabledNodeIPAddressThresholdsRequest)

{
  "nodeIPAddressId": "int64"
}

响应对象 (RPCCountResponse)

{
  "count": "int64 // 数量"
}

调用示例

curl -X POST "https://backend.dooki.cloud/NodeIPAddressThresholdService/countAllEnabledNodeIPAddressThresholds" \
  -H "Content-Type: application/json" \
  -H "X-Edge-Access-Token: <YOUR_TOKEN>" \
  -d '{
    ...
  }'

createNodeIPAddressThreshold

创建阈值

  • 角色:admin
  • HTTPPOST https://backend.dooki.cloud/NodeIPAddressThresholdService/createNodeIPAddressThreshold
  • RPCrpc createNodeIPAddressThreshold(CreateNodeIPAddressThresholdRequest) returns (CreateNodeIPAddressThresholdResponse);

请求对象 (CreateNodeIPAddressThresholdRequest)

{
  "nodeIPAddressId": "int64",
  "itemsJSON": "bytes",
  "actionsJSON": "bytes"
}

响应对象 (CreateNodeIPAddressThresholdResponse)

{
  "nodeIPAddressThresholdId": "int64"
}

调用示例

curl -X POST "https://backend.dooki.cloud/NodeIPAddressThresholdService/createNodeIPAddressThreshold" \
  -H "Content-Type: application/json" \
  -H "X-Edge-Access-Token: <YOUR_TOKEN>" \
  -d '{
    ...
  }'

deleteNodeIPAddressThreshold

删除阈值

  • 角色:admin
  • HTTPPOST https://backend.dooki.cloud/NodeIPAddressThresholdService/deleteNodeIPAddressThreshold
  • RPCrpc deleteNodeIPAddressThreshold(DeleteNodeIPAddressThresholdRequest) returns (RPCSuccess);

请求对象 (DeleteNodeIPAddressThresholdRequest)

{
  "nodeIPAddressThresholdId": "int64"
}

响应对象 (RPCSuccess)

{}

调用示例

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
  • HTTPPOST https://backend.dooki.cloud/NodeIPAddressThresholdService/findAllEnabledNodeIPAddressThresholds
  • RPCrpc findAllEnabledNodeIPAddressThresholds(FindAllEnabledNodeIPAddressThresholdsRequest) returns (FindAllEnabledNodeIPAddressThresholdsResponse);

请求对象 (FindAllEnabledNodeIPAddressThresholdsRequest)

{
  "nodeIPAddressId": "int64"
}

响应对象 (FindAllEnabledNodeIPAddressThresholdsResponse)

{
  "nodeIPAddressThresholds": "[]NodeIPAddressThreshold"
}

调用示例

curl -X POST "https://backend.dooki.cloud/NodeIPAddressThresholdService/findAllEnabledNodeIPAddressThresholds" \
  -H "Content-Type: application/json" \
  -H "X-Edge-Access-Token: <YOUR_TOKEN>" \
  -d '{
    ...
  }'

updateAllNodeIPAddressThresholds

批量更新阈值

  • 角色:admin
  • HTTPPOST https://backend.dooki.cloud/NodeIPAddressThresholdService/updateAllNodeIPAddressThresholds
  • RPCrpc updateAllNodeIPAddressThresholds(UpdateAllNodeIPAddressThresholdsRequest) returns (RPCSuccess);

请求对象 (UpdateAllNodeIPAddressThresholdsRequest)

{
  "nodeIPAddressId": "int64",
  "nodeIPAddressThresholdsJSON": "bytes"
}

响应对象 (RPCSuccess)

{}

调用示例

curl -X POST "https://backend.dooki.cloud/NodeIPAddressThresholdService/updateAllNodeIPAddressThresholds" \
  -H "Content-Type: application/json" \
  -H "X-Edge-Access-Token: <YOUR_TOKEN>" \
  -d '{
    ...
  }'

updateNodeIPAddressThreshold

修改阈值

  • 角色:admin
  • HTTPPOST https://backend.dooki.cloud/NodeIPAddressThresholdService/updateNodeIPAddressThreshold
  • RPCrpc updateNodeIPAddressThreshold(UpdateNodeIPAddressThresholdRequest) returns (RPCSuccess);

请求对象 (UpdateNodeIPAddressThresholdRequest)

{
  "nodeIPAddressThresholdId": "int64",
  "itemsJSON": "bytes",
  "actionsJSON": "bytes"
}

响应对象 (RPCSuccess)

{}

调用示例

curl -X POST "https://backend.dooki.cloud/NodeIPAddressThresholdService/updateNodeIPAddressThreshold" \
  -H "Content-Type: application/json" \
  -H "X-Edge-Access-Token: <YOUR_TOKEN>" \
  -d '{
    ...
  }'