103 lines
2.0 KiB
Markdown
103 lines
2.0 KiB
Markdown
|
|
# NSService
|
|||
|
|
> 域名服务
|
|||
|
|
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
## composeNSBoard
|
|||
|
|
> 组合看板数据
|
|||
|
|
|
|||
|
|
- 角色:`admin`
|
|||
|
|
- HTTP:`POST https://backend.dooki.cloud/NSService/composeNSBoard`
|
|||
|
|
- RPC:`rpc composeNSBoard (ComposeNSBoardRequest) returns (ComposeNSBoardResponse);`
|
|||
|
|
|
|||
|
|
**请求对象 (`ComposeNSBoardRequest`)**
|
|||
|
|
|
|||
|
|
```json
|
|||
|
|
{}
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
**响应对象 (`ComposeNSBoardResponse`)**
|
|||
|
|
|
|||
|
|
```json
|
|||
|
|
{
|
|||
|
|
"countNSDomains": "int64",
|
|||
|
|
"countNSRecords": "int64",
|
|||
|
|
"countNSClusters": "int64",
|
|||
|
|
"countNSNodes": "int64",
|
|||
|
|
"countOfflineNSNodes": "int64",
|
|||
|
|
"dailyTrafficStats": "[]DailyTrafficStat",
|
|||
|
|
"hourlyTrafficStats": "[]HourlyTrafficStat",
|
|||
|
|
"topNSNodeStats": "[]NodeStat",
|
|||
|
|
"topNSDomainStats": "[]DomainStat",
|
|||
|
|
"cpuNodeValues": "[]NodeValue",
|
|||
|
|
"memoryNodeValues": "[]NodeValue",
|
|||
|
|
"loadNodeValues": "[]NodeValue",
|
|||
|
|
"day": "string",
|
|||
|
|
"bytes": "int64",
|
|||
|
|
"countRequests": "int64",
|
|||
|
|
"hour": "string",
|
|||
|
|
"nsClusterId": "int64",
|
|||
|
|
"nsNodeId": "int64",
|
|||
|
|
"nsNodeName": "string",
|
|||
|
|
"nsDomainId": "int64",
|
|||
|
|
"nsDomainName": "string"
|
|||
|
|
}
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
**调用示例**
|
|||
|
|
|
|||
|
|
```bash
|
|||
|
|
curl -X POST "https://backend.dooki.cloud/NSService/composeNSBoard" \
|
|||
|
|
-H "Content-Type: application/json" \
|
|||
|
|
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
|
|||
|
|
-d '{
|
|||
|
|
...
|
|||
|
|
}'
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
## composeNSUserBoard
|
|||
|
|
> 组合用户看板数据
|
|||
|
|
|
|||
|
|
- 角色:`admin`, `user`
|
|||
|
|
- HTTP:`POST https://backend.dooki.cloud/NSService/composeNSUserBoard`
|
|||
|
|
- RPC:`rpc composeNSUserBoard(ComposeNSUserBoardRequest) returns (ComposeNSUserBoardResponse);`
|
|||
|
|
|
|||
|
|
**请求对象 (`ComposeNSUserBoardRequest`)**
|
|||
|
|
|
|||
|
|
```json
|
|||
|
|
{
|
|||
|
|
"userId": "int64 // 用户ID"
|
|||
|
|
}
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
**响应对象 (`ComposeNSUserBoardResponse`)**
|
|||
|
|
|
|||
|
|
```json
|
|||
|
|
{
|
|||
|
|
"countNSDomains": "int64",
|
|||
|
|
"countNSRecords": "int64",
|
|||
|
|
"countNSRoutes": "int64",
|
|||
|
|
"nsUserPlan": "NSUserPlan",
|
|||
|
|
"topNSDomainStats": "[]DomainStat",
|
|||
|
|
"nsDomainId": "int64",
|
|||
|
|
"nsDomainName": "string",
|
|||
|
|
"countRequests": "int64",
|
|||
|
|
"bytes": "int64"
|
|||
|
|
}
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
**调用示例**
|
|||
|
|
|
|||
|
|
```bash
|
|||
|
|
curl -X POST "https://backend.dooki.cloud/NSService/composeNSUserBoard" \
|
|||
|
|
-H "Content-Type: application/json" \
|
|||
|
|
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
|
|||
|
|
-d '{
|
|||
|
|
...
|
|||
|
|
}'
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
---
|