@mwumli
2016-07-23T17:18:33.000000Z
字数 4146
阅读 1541
temp
tableAction()
参数:
返回:
{
"flag": 0,
"list": [
{
"id": "32",
"role_id": "0", // 0 -- 承建方 1--运维方 2--监管方
"username": "zhanglingjun-xy-s",
"realname": null,
"loginemail": "zhanglingjun-xy-xy-xy@360.cn",
"imageid": null,
"telephone": "123456789",
"logintime": null,
"status": "0",
"remark": "安全云测试专用",
"ctime": "2016-07-12 18:09:08"
},
{
"id": "27",
"role_id": "0",
"username": "zhanglingjun",
"realname": null,
"loginemail": "zhanglingjun@360.cn",
"imageid": null,
"telephone": "123456789",
"logintime": null,
"status": "0",
"remark": "安全云测试专用",
"ctime": "2016-07-12 15:09:39"
}
],
"page": {
"all": "14",
"total": 1
},
"msg": "获取数据成功"
}
失败flag为1 msg为失败信息 无list和page项
方法:CreateAction()
参数:
返回:
标准结果返回
方法:resetPassAction()
参数:
返回:
标准结果返回
getUserPermissionAction()
参数:
返回:
{
"flag": 0,
"msg": "获取成功",
"data": {
"func_permission": {
"home_page": {
"home_page": 0
},
"network_sec": {
"topology": 1,
"traffic_statistic": 1
},
"host_sec": {
"home_page": 1,
"virus_kill": 1,
"baseline": 1
},
"virtual_sec": {
"home_page": 0,
"loophole_manage": 1
},
"cloud_host_sec": {
"home_page": 1,
"virus_kill": 0,
"webshell_scan": 1,
"brute_force": 0
},
"app_sec": {
"home_page": 1,
"loophole": 1,
"firewall": 0,
"web_protect": 1
},
"data_sec": {
"mirror_sec": 0
},
"audit_sec": {
"audit_warn": 1,
"log_search": 0,
"rule_manage": 1
},
"log_report": {
"terminal_log": 0,
"operage_log": 1,
"task_log": 0
},
"deploy_upgrade": {
"deploy_manage": 1,
"upgrade_manage": 0
},
"system_manage": {
"terminal": 0,
"system": 1,
"file": 0,
"account": 0
}
},
"range_permission": {
"10.12.23.33": {
"00028f6f1737481487bc13f56dc47191": {
"name": "2611676249",
"enabled": 1
},
"0071612ac556468790853267b2dbc29b": {
"name": "754566335",
"enabled": 0
},
functionAction()
参数:
返回:
标准结果返回
rangeAction()
参数:
返回:
标准结果返回
获取用户信息
getUserInfoAction()
参数:
返回:
{
"flag": 0,
"msg": "成功",
"data": {
"telephone": "123456789",
"loginemail": "liuyang-c-c@360.cn",
"remark": "安全云测试专用",
"role_id": "0"
}
}
changeAccountStateAction()
参数:
{
username : "MwumLi",
op: '1' // 0 -- 禁用 1 -- 启用
}
返回:
标准结果返回
{
"username": "wangjia3",
"func_permission": {
"home_page": {
"home_page": 0,
},
"network_sec": {
"topology": 1,
"traffic_statistic": 0
},
"host_sec": {
"home_page": 0,
"virus_kill": 1,
"baseline": 1
},
"virtual_sec": {
"home_page": 0,
"loophole_manage": 1
},
"cloud_host_sec": {
"home_page": 1,
"virus_kill": 1,
"webshell_scan": 1,
"brute_force": 1
},
"app_sec": {
"home_page": 1,
"loophole": 1,
"firewall": 0,
"web_protect": 1
},
"data_sec": {
"mirror_sec": 0
},
"audit_sec": {
"audit_warn": 1,
"log_search": 0,
"rule_manage": 1
},
"log_report": {
"terminal_log": 0,
"operage_log": 1,
"task_log": 0
},
"deploy_upgrade": {
"deploy_manage": 1,
"upgrade_manage": 0
},
"system_manage": {
"terminal": 0,
"system": 1,
"file": 0,
"account": 0
}
}
}
对于里面的 name 参数,如果传递为空字符串, 我将使用 key 作为其值
/Sysmanage/Countmanage/getUserRangePermissionAction
{
"flag": 0,
"msg": "获取数据成功",
"data": {
"enabled": 0,
"hosts": {
"1": {
"name": "http://keystone01.sys.shht.qihoo.net:35357/v2.0",
"enabled": 1,
"tenants": {
"00028f6f1737481487bc13f56dc47191": {
"name": "2611676249",
"enabled": 1
}
}
},
"2": {
"name": "http://keystone02.sys.shht.qihoo.net:35357/v2.0",
"enabled": 0,
"tenants": {
"00028f6f1737481487bc13f56dc47191": {
"name": "2611676249",
"enabled": 0
},
"0071612ac556468790853267b2dbc29b": {
"name": "754566335",
"enabled": 1
}
}
},
"3": {
"name": "http://keystone03.sys.shht.qihoo.net:35357/v2.0",
"enabled": 0,
"tenants": {
"00028f6f1737481487bc13f56dc47191": {
"name": "2611676249",
"enabled": 1
},
"0071612ac556468790853267b2dbc29b": {
"name": "754566335",
"enabled": 0
}
}
},
"4": {
"name": "http://keystone04.sys.shht.qihoo.net:35357/v2.0",
"enabled": 1,
"tenants": {
"00028f6f1737481487bc13f56dc47191": {
"name": "2611676249",
"enabled": 1
},
"0071612ac556468790853267b2dbc29b": {
"name": "754566335",
"enabled": 1
}
}
}
}
}
}
/Sysmanage/Countmanage/saveUserRangePermissionAction
{
"username": "wangjia3",
"range_permission": {
"1": ["00028f6f1737481487bc13f56dc47191"],
"2": ["00028f6f1737481487bc13f56dc47191"]
}
}
请求参数:
{
username: "wangjia3",
oldpass: "dfsdfdsf",
newpass: "dsfdsfdsfsfd"
}
返回:
{
flag: 0
msg: "修改成功"
}
请求参数:
{
username: "wabgjia",
info: "test@test.com",
flag: 0 // 0 -- 修改电话 1-- 修改邮箱
}
返回:
// 无论成功失败都需返回修改的信息
// 修改成功返回成功后的数据
// 修改失败返回旧的的数据, 但提示错误
{
flag: 0
data: "sdfdssdfsd",
msg: "修改成功"
}
请求参数:
{
username: "wangjia"
}
返回:
{
flag: 0,
data: true/false
}