- url: /api/sysinfo
- method: get
- parameter: None
- response
{
"cpu_info": {
"core_num": 2,
"cpu_num": 1,
"model_name": "Intel(R) Xeon(R) Platinum 8163 CPU @ 2.50GHz",
"processor_num": 2
},
"disk_info": {
"Total": 39,
"Used": 29
},
"io_info": {
"io_recv": 0,
"io_sent": 0,
"net_io_recv": 0,
"net_io_sent": 0
},
"mem_info": {
"Active": 2.71,
"-Buffers": 0.3,
"-Cached": 0.75,
"MemAvailable": 1.4,
"-MemFree": 0.51,
"MemTotal": 3.85,
"SwapCached": 0,
"-Used": 2.29
}
}
-
url: /api/dns
-
method: get
-
parameter: None
-
response:
{ "server_1": "8.8.8.8", "server_2": "8.8.4.4" }
-
description: 获取当前服务器的dns server
-
url: /api/dns
-
method: post
-
parameter: application/json
{ "server_1": "8.8.8.8", "server_2": "8.8.8.8" }
-
response:
{ "status": "OK" }
-
description: 提交用户希望变更的dns server
-
url: /api/login
-
method: post
-
parameter:
{ "name": "admin", "passwd": "admin" }
-
response
{ "status": "OK" }
-
url: /api/logout
-
method: post
-
parameter: None
-
response:
{ "status": "OK" }
-
url: /api/file
-
method: get
-
parameter:
{ "path": "/root" }
-
response:
{ "file": [ { "file_type": "dir", "mode": "755", "name": ".", "owner": "root" }, { "file_type": "dir", "mode": "755", "name": "..", "owner": "root" }, { "file_type": "dir", "mode": "755", "name": "bin", "owner": "root" }, { "file_type": "dir", "mode": "755", "name": "boot", "owner": "root" }, { "file_type": "dir", "mode": "755", "name": "CONFIG_DIR", "owner": "root" }, { "file_type": "dir", "mode": "755", "name": "dev", "owner": "root" }, { "file_type": "dir", "mode": "755", "name": "DOWNLOAD_DIR", "owner": "root" } ] }