方法列表
检查管理员是否存在
admin
RPC
checkAdminExists (CheckAdminExistsRequest) returns (CheckAdminExistsResponse)
HTTP
POST /AdminService/checkAdminExists
输入对象:CheckAdminExistsRequest:
{ // 管理员ID int64 adminId; }
输出对象:CheckAdminExistsResponse:
检查管理员用户名是否存在
admin
RPC
checkAdminUsername (CheckAdminUsernameRequest) returns (CheckAdminUsernameResponse)
HTTP
POST /AdminService/checkAdminUsername
输入对象:CheckAdminUsernameRequest:
{ // 管理员ID int64 adminId; string username; }
输出对象:CheckAdminUsernameResponse:
使用用管理员户名查找管理员信息
admin
RPC
findAdminWithUsername (FindAdminWithUsernameRequest) returns (FindAdminWithUsernameResponse)
HTTP
POST /AdminService/findAdminWithUsername
输入对象:FindAdminWithUsernameRequest:
{ // 管理员用户名 string username; }
输出对象:FindAdminWithUsernameResponse:
{ // 管理员信息 Admin admin; }
获取管理员名称
admin
RPC
findAdminFullname (FindAdminFullnameRequest) returns (FindAdminFullnameResponse)
HTTP
POST /AdminService/findAdminFullname
输入对象:FindAdminFullnameRequest:
{ // 管理员ID int64 adminId; }
输出对象:FindAdminFullnameResponse:
获取管理员信息
admin
RPC
findEnabledAdmin (FindEnabledAdminRequest) returns (FindEnabledAdminResponse)
HTTP
POST /AdminService/findEnabledAdmin
输入对象:FindEnabledAdminRequest:
{ // 管理员ID int64 adminId; }
输出对象:FindEnabledAdminResponse:
创建或修改管理员
admin
RPC
createOrUpdateAdmin (CreateOrUpdateAdminRequest) returns (CreateOrUpdateAdminResponse)
HTTP
POST /AdminService/createOrUpdateAdmin
输入对象:CreateOrUpdateAdminRequest:
输出对象:CreateOrUpdateAdminResponse:
{ // 管理员ID int64 adminId; }
修改管理员信息
admin
RPC
updateAdminInfo (UpdateAdminInfoRequest) returns (RPCSuccess)
HTTP
POST /AdminService/updateAdminInfo
输入对象:UpdateAdminInfoRequest:
{ // 管理员ID int64 adminId; string fullname; }
输出对象:RPCSuccess:
{ }
修改管理员登录信息
admin
RPC
updateAdminLogin (UpdateAdminLoginRequest) returns (RPCSuccess)
HTTP
POST /AdminService/updateAdminLogin
输入对象:UpdateAdminLoginRequest:
{ // 管理员ID int64 adminId; string username; string password; }
输出对象:RPCSuccess:
{ }
获取所有管理员的权限列表
admin
RPC
findAllAdminModules (FindAllAdminModulesRequest) returns (FindAllAdminModulesResponse)
HTTP
POST /AdminService/findAllAdminModules
输入对象:FindAllAdminModulesRequest:
{ }
输出对象:FindAllAdminModulesResponse:
创建管理员
admin
RPC
createAdmin (CreateAdminRequest) returns (CreateAdminResponse)
HTTP
POST /AdminService/createAdmin
输入对象:CreateAdminRequest:
输出对象:CreateAdminResponse:
{ // 管理员ID int64 adminId; }
修改管理员
admin
RPC
updateAdmin (UpdateAdminRequest) returns (RPCSuccess)
HTTP
POST /AdminService/updateAdmin
输入对象:UpdateAdminRequest:
输出对象:RPCSuccess:
{ }
计算管理员数量
admin
RPC
countAllEnabledAdmins (CountAllEnabledAdminsRequest) returns (RPCCountResponse)
HTTP
POST /AdminService/countAllEnabledAdmins
输入对象:CountAllEnabledAdminsRequest:
{ // 可选项,查询关键词 string keyword; // 可选项,筛选有弱密码的管理员,只有超级管理员才能查询 bool hasWeakPassword; }
输出对象:RPCCountResponse:
{ // 数量 int64 count; }
列出单页的管理员
admin
RPC
listEnabledAdmins (ListEnabledAdminsRequest) returns (ListEnabledAdminsResponse)
HTTP
POST /AdminService/listEnabledAdmins
输入对象:ListEnabledAdminsRequest:
{ // 可选项,查询关键词 string keyword; // 可选项,筛选有弱密码的管理员,只有超级管理员才能查询 bool hasWeakPassword; // 读取位置,从0开始 int64 offset; // 读取数量 int64 size; }
输出对象:ListEnabledAdminsResponse:
删除管理员
admin
RPC
deleteAdmin (DeleteAdminRequest) returns (RPCSuccess)
HTTP
POST /AdminService/deleteAdmin
输入对象:DeleteAdminRequest:
{ // 管理员ID int64 adminId; }
输出对象:RPCSuccess:
{ }
根据用户名检查是否需要输入OTP
admin
RPC
checkAdminOTPWithUsername (CheckAdminOTPWithUsernameRequest) returns (CheckAdminOTPWithUsernameResponse)
HTTP
POST /AdminService/checkAdminOTPWithUsername
输入对象:CheckAdminOTPWithUsernameRequest:
输出对象:CheckAdminOTPWithUsernameResponse:
取得管理员Dashboard数据
admin
RPC
composeAdminDashboard (ComposeAdminDashboardRequest) returns (ComposeAdminDashboardResponse)
HTTP
POST /AdminService/composeAdminDashboard
输入对象:ComposeAdminDashboardRequest:
{ // 当前API版本号 string apiVersion; }
输出对象:ComposeAdminDashboardResponse:
{ int64 countNodeClusters; int64 countNodes; int64 countOfflineNodes; int64 countServers; int64 countAuditingServers; // 所有用户数 int64 countUsers; // 待审核用户数 int64 countVerifyingUsers; int64 countAPINodes; int64 countOfflineAPINodes; int64 countDBNodes; int64 countOfflineDBNodes; int64 countUserNodes; int64 countOfflineUserNodes; int64 defaultNodeClusterId; []DailyTrafficStat dailyTrafficStats; []HourlyTrafficStat hourlyTrafficStats; UpgradeInfo nodeUpgradeInfo; UpgradeInfo apiNodeUpgradeInfo; UpgradeInfo userNodeUpgradeInfo; UpgradeInfo authorityNodeUpgradeInfo; UpgradeInfo nsNodeUpgradeInfo; UpgradeInfo reportNodeUpgradeInfo; []NodeStat topNodeStats; []DomainStat topDomainStats; []CountryStat topCountryStats; []MetricDataChart metricDataCharts; DailyTrafficStat { // 日期 YYYYMMDD string day; int64 bytes; int64 cachedBytes; int64 countRequests; int64 countCachedRequests; int64 countAttackRequests; // 攻击流量(字节) int64 attackBytes; // 独立IP数量 int64 countIPs; } HourlyTrafficStat { string hour; int64 bytes; int64 cachedBytes; int64 countRequests; int64 countCachedRequests; int64 countAttackRequests; int64 attackBytes; } NodeStat { // 节点ID int64 nodeId; string nodeName; int64 countRequests; int64 bytes; } DomainStat { // 服务ID(网站ID) int64 serverId; string domain; int64 countRequests; int64 bytes; } CountryStat { string countryName; int64 bytes; int64 countRequests; // 流量占比 float percent; int64 countAttackRequests; int64 attackBytes; } // 节点升级信息 UpgradeInfo { // 节点数 int64 countNodes; // 新版本 string newVersion; } }
修改管理员使用的界面风格
admin
RPC
updateAdminTheme (UpdateAdminThemeRequest) returns (RPCSuccess)
HTTP
POST /AdminService/updateAdminTheme
输入对象:UpdateAdminThemeRequest:
{ // 管理员ID int64 adminId; // 风格代号 string theme; }
输出对象:RPCSuccess:
{ }
修改管理员使用的语言
admin
RPC
updateAdminLang (UpdateAdminLangRequest) returns (RPCSuccess)
HTTP
POST /AdminService/updateAdminLang
输入对象:UpdateAdminLangRequest:
{ // 语言代号:en-us, zh-cn, ...,如果为空表示默认 string langCode; }
输出对象:RPCSuccess:
{ }