方法列表
创建API节点
admin
RPC
createAPINode (CreateAPINodeRequest) returns (CreateAPINodeResponse)
HTTP
POST /APINodeService/createAPINode
输入对象:CreateAPINodeRequest:
{ // API节点名称 string name; // API节点描述 string description; // 监听HTTP地址配置 json:http_protocol bytes httpJSON; // 监听HTTPS地址配置 json:https_protocol bytes httpsJSON; // 访问地址 json:network_address bytes accessAddrsJSON; // 是否启用当前API节点 bool isOn; // 是否启用API bool restIsOn; // API地址HTTP地址配置 json:http_protocol bytes restHTTPJSON; // API地址HTTPS地址配置 json:https_protocol bytes restHTTPSJSON; }
输出对象:CreateAPINodeResponse:
修改API节点
admin
RPC
updateAPINode (UpdateAPINodeRequest) returns (RPCSuccess)
HTTP
POST /APINodeService/updateAPINode
输入对象:UpdateAPINodeRequest:
{ // API节点ID int64 apiNodeId; // API节点名称 string name; // API节点描述 string description; // 监听HTTP地址配置 json:http_protocol bytes httpJSON; // 监听HTTPS地址配置 json:https_protocol bytes httpsJSON; // 访问地址 json:network_address bytes accessAddrsJSON; // 是否启用当前API节点 bool isOn; // 是否启用API bool restIsOn; // API地址HTTP地址配置 json:http_protocol bytes restHTTPJSON; // API地址HTTPS地址配置 json:https_protocol bytes restHTTPSJSON; // 是否为主要API节点,日常任务主要运行在主要API节点上 bool isPrimary; }
输出对象:RPCSuccess:
{ }
删除API节点
admin
RPC
deleteAPINode (DeleteAPINodeRequest) returns (RPCSuccess)
HTTP
POST /APINodeService/deleteAPINode
输入对象:DeleteAPINodeRequest:
输出对象:RPCSuccess:
{ }
列出所有可用API节点
dns
user
node
admin
RPC
findAllEnabledAPINodes (FindAllEnabledAPINodesRequest) returns (FindAllEnabledAPINodesResponse)
HTTP
POST /APINodeService/findAllEnabledAPINodes
输入对象:FindAllEnabledAPINodesRequest:
{ }
输出对象:FindAllEnabledAPINodesResponse:
计算API节点数量
admin
RPC
countAllEnabledAPINodes (CountAllEnabledAPINodesRequest) returns (RPCCountResponse)
HTTP
POST /APINodeService/countAllEnabledAPINodes
输入对象:CountAllEnabledAPINodesRequest:
{ }
输出对象:RPCCountResponse:
{ // 数量 int64 count; }
计算启用的API节点数量
admin
RPC
countAllEnabledAndOnAPINodes (CountAllEnabledAndOnAPINodesRequest) returns (RPCCountResponse)
HTTP
POST /APINodeService/countAllEnabledAndOnAPINodes
输入对象:CountAllEnabledAndOnAPINodesRequest:
{ }
输出对象:RPCCountResponse:
{ // 数量 int64 count; }
列出单页的API节点
admin
RPC
listEnabledAPINodes (ListEnabledAPINodesRequest) returns (ListEnabledAPINodesResponse)
HTTP
POST /APINodeService/listEnabledAPINodes
输入对象:ListEnabledAPINodesRequest:
{ // 读取位置 int64 offset; // 数量,通常不能小于0 int64 size; }
输出对象:ListEnabledAPINodesResponse:
根据ID查找节点
admin
RPC
findEnabledAPINode (FindEnabledAPINodeRequest) returns (FindEnabledAPINodeResponse)
HTTP
POST /APINodeService/findEnabledAPINode
输入对象:FindEnabledAPINodeRequest:
输出对象:FindEnabledAPINodeResponse:
获取当前API节点的信息
admin
RPC
findCurrentAPINode (FindCurrentAPINodeRequest) returns (FindCurrentAPINodeResponse)
HTTP
POST /APINodeService/findCurrentAPINode
输入对象:FindCurrentAPINodeRequest:
输出对象:FindCurrentAPINodeResponse:
计算使用某个SSL证书的API节点数量
admin
RPC
countAllEnabledAPINodesWithSSLCertId (CountAllEnabledAPINodesWithSSLCertIdRequest) returns (RPCCountResponse)
HTTP
POST /APINodeService/countAllEnabledAPINodesWithSSLCertId
输入对象:CountAllEnabledAPINodesWithSSLCertIdRequest:
输出对象:RPCCountResponse:
{ // 数量 int64 count; }
修改调试模式状态
admin
RPC
debugAPINode (DebugAPINodeRequest) returns (RPCSuccess)
HTTP
POST /APINodeService/debugAPINode
输入对象:DebugAPINodeRequest:
{ bool debug; }
输出对象:RPCSuccess:
{ }
上传新版API节点文件
admin
RPC
uploadAPINodeFile (UploadAPINodeFileRequest) returns (UploadAPINodeFileResponse)
HTTP
POST /APINodeService/uploadAPINodeFile
输入对象:UploadAPINodeFileRequest:
{ // 文件名 string filename; // 整个文件的SUM值 string sum; // 片段数据 bytes chunkData; // 是否为第一个片段 bool isFirstChunk; // 是否为最后一个片段 bool isLastChunk; }
输出对象:UploadAPINodeFileResponse:
{ }
上传节点安装文件
admin
RPC
uploadDeployFileToAPINode (UploadDeployFileToAPINodeRequest) returns (RPCSuccess)
HTTP
POST /APINodeService/uploadDeployFileToAPINode
输入对象:UploadDeployFileToAPINodeRequest:
{ // 文件名 string filename; // 整个文件的SUM值 string sum; // 片段数据 bytes chunkData; // 是否为第一个片段 bool isFirstChunk; // 是否为最后一个片段 bool isLastChunk; }
输出对象:RPCSuccess:
{ }
查找已有节点安装文件信息
admin
RPC
findLatestDeployFiles (FindLatestDeployFilesRequest) returns (FindLatestDeployFilesResponse)
HTTP
POST /APINodeService/findLatestDeployFiles
输入对象:FindLatestDeployFilesRequest:
{ }
输出对象:FindLatestDeployFilesResponse:
{ // 边缘节点 []DeployFile nodeDeployFiles; // NS节点 []DeployFile nsNodeDeployFiles; DeployFile { // 操作系统代号 string os; // 架构 string arch; // 版本号 string version; } }