宝塔 Linux 面板 API 文档
[Pages:13] Linux API
API Linux Linux
api_sk = ( - API ) request_time = uinx ( php: time() / python: time.time() ) request_token = md5(string(request_time) + md5(api_sk)) PHP $request_token = md5($request_time . `' . md5($api_sk))
request_time request_token
uinx [] md5(string(request_time) + md5(api_sk)) [] []
1 POST API 2 cookie cookie 3 IP 4 Json
DEMO
PHP-Demo:
URI /system?action=GetSystemTotal
system
CentOS Linux 7.5.1804 (Core)
version
6.8.2
time
0 23 45
cpuNum
2
cpuRealUsed 2.01
memTotal
1024
memRealUsed 300
memFree
724
memCached 700
memBuffers 100
{
"cpuRealUsed": 0.85,
"memTotal": 1741,
"system": "CentOS Linux 7.5.1804 (Core)",
"memRealUsed": 691,
"cpuNum": 6,
"memFree": 189,
"version": "6.8.1",
"time": "0\u592923\u5c0f\u65f657\u5206\u949f",
"memCached": 722,
"memBuffers": 139,
"isuser": 0
}
CPU CPU () (MB) (MB) (MB) (MB) (MB)
URI /system?action=GetDiskInfo
[].path
/
[].inodes
["8675328", "148216", "8527112", "2%"]
[].size
["8.3G", "4.0G", "4.3G", "49%"]
[
{"path": "/",
"inodes": ["8675328", "148216", "8527112", "2%"],
"size": ["8.3G", "4.0G", "4.3G", "49%"]
},
{
Inode [,,,] [,,,]
"path": "/www", "inodes": ["655360", "295093", "360267", "46%"], "size": ["9.8G", "3.7G", "5.6G", "40%"]
} ]
(CPU)
URI /system?action=GetNetWork
downTotal
446326699
()
upTotal
77630707
()
downPackets 1519428
()
upPackets
175326
()
down
36.22
(KB)
up
72.81
(KB)
cpu
[1.87, 6]
CPU [,]
mem
{memFree: 189, memTotal: 1741, memCached:
722, memBuffers: 139, memRealUsed: 691}
load
{max: 12, safe: 9, one: 0, five: 0.01, limit: 12, one: 1 five: 5 fifteen: 10
fifteen: 0.05}
{
"load": {"max": 12, "safe": 9.0, "one": 0.01, "five": 0.02, "limit": 12, "fifteen": 0.05},
"down": 8.77,
"downTotal": 453078627,
"mem": {"memFree": 189, "memTotal": 1741, "memCached": 722, "memBuffers": 140, "memRealUsed": 690},
"up": 4.33,
"upTotal": 78070942,
"upPackets": 177930,
"downPackets": 1548192,
"cpu": [0.23, 6]
}
URI /ajax?action=GetTaskCount 0
URI /ajax?action=UpdatePanel
check
true
[]
force
true
[]
status version updateMsg
true 6.5.8 string
true|false
{ "status": true, "version": "6.8.2", "updateMsg": ""
}
URI /data?action=getData&table=sites
p
1
[]
limit
15
[]
type
-1
, -1: 0: []
order
id desc
id id desc name desc []
tojs
get_site_list
JS , URI []
search
www
[]
data page where
[]
type_id=0
{ "data": [ { "status": "1", "ps": "", "domain": 1, "name": "",
"addtime": "2018-12-14 16:14:03", "path": "/www/wwwroot/",
"backup_count": 0, "edate": "0000-00-00", "id": 64 } ], "where": "type_id=0", "page": "1\u51711\u6761\u6570\u636e" }
URI /site?action=get_site_types [
{"id": 0, "name": "\u9ed8\u8ba4\u5206\u7c7b"} ]
PHP
URI /site?action=GetPHPVersion [
{"version": "00", "name": "\u7eaf\u9759\u6001"}, {"version": "56", "name": "PHP-56"},
{"version": "72", "name": "PHP-72"} ]
URI /site?action=AddSite
webname
{"domain":"w1.","domainlist":[],"count":0}
path
/www/wwwroot/w1.
type_id
0
type
PHP
version
72
port
80
ps
ftp
true|false
ftp_username w1_hao_com
ftp_password WCBZ6cH87raERzXc
sql
true|false
codeing
utf8|utf8mb4|gbk|big5
JSON [] [] [] PHP [] PHP PHP [] [] [] FTP [] FTP FTP FTP FTP []
datauser
w1_hao_com
datapassword PdbNjJy5hBA346AR
siteStatus ftpStatus ftpUser ftpPass databaseStatus databaseUser databasePass
true|false true|false w2_hao_com sRxmY6xCn6zEsFtG true|false w2_hao_com PdbNjJy5hBA346AR
{ "ftpStatus": true, "databaseUser": "w2_hao_com", "databaseStatus": true, "ftpUser": "w2_hao_com", "databasePass": "PdbNjJy5hBA346AR", "siteStatus": true, "ftpPass": "sRxmY6xCn6zEsFtG"
}
FTP FTP FTP
URI /site?action=DeleteSite
id
66
ID []
webname
w2_hao_com
[]
ftp
1
FTP []
database
1
[]
path
1
[]
status msg
true|false !
{ "status": true, "msg": "\u7ad9\u70b9\u5220\u9664\u6210\u529f!"
}
URI /site?action=SiteStop
id name
66 w2.
ID [] () []
{ "status": true, "msg": "\u7ad9\u70b9\u5220\u9664\u6210\u529f!"
}
URI /site?action=SiteStart
id
66
name
w2.
ID [] () []
{ "status": true, "msg": "\u7ad9\u70b9\u5df2\u542f\u7528"
}
URI /site?action=SetEdate
id
66
edate
2019-01-01
ID [] 0000-00-00 []
{ "status": true, "msg": "\u7ad9\u70b9\u5df2\u542f\u7528"
}
URI /data?action=setPs&table=sites
id
66
ID []
ps
[]
{ "status": true, "msg": "\u4fee\u6539\u6210\u529f"
}
URI /data?action=getData&table=backup
p
1
[]
limit
5
[]
type
0
, 0 []
tojs
get_site_backup JS , URI []
search
66
ID []
data page where
[]
type_id=0
{ "data": [], "where": "pid=65 and type='0'", "page": "1\u51710\u6761\u6570\u636e"
}
URI /site?action=ToBackup
id
66
ID []
{ "status": true, "msg": "\u5907\u4efd\u6210\u529f!"
}
URI /site?action=DelBackup
id
121
ID []
{ "status": true, "msg": "\u5220\u9664\u6210\u529f"
}
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related searches
- javascript api download
- esri javascript api 3 16
- esri api for javascript
- esri javascript api search
- arcgis javascript api 4 5
- esri javascript api 4
- microsoft api download
- unified communications managed api 4
- unified communications api 4 0
- unified communications managed api 2 0
- javascript api documentation
- javascript api reference