@moshangxc
2019-01-11T16:54:06.000000Z
字数 9855
阅读 608
MW6
所有接口的请求地址统一为"goform/module"
set操作的接口返回统一为
{
//非列表操作
"请求的模块名称":0 //0表示成功,其他表示失败
}
所有的列表数据目前都增加了字段"ID"
请求
{
"getWanConnectStatus":"",
"getLanIpMask":"",
"getL2TPServer":"",
"getPPTPServer":"",
"getPppoes":"",
"getGuest":"",
"getDevName":"",
"getQuickCfgWanUpperServerType":""
}
返回
"getWanConnectStatus":{
"portLink": "1,1,0,0,01",
"bLanguage":"en",
"status": [
{
"wanStatus": "unwired",
"wanError": "connected",
"connectTime": "01:09:20"
}
]
},
"getLanIpMask":{},
"getL2TPServer":{},
"getPPTPServer":{},
"getPppoes":{},
"getGuest":{},
"getQuickCfgWanUpperServerType":{
"upperServerType" : "static"
},
// 设备名称
"getDevName":{
"en": "xxxxx",
"cn": "微企一体化网关"
},
设置数据
//进入页面将联网方式设置为dhcp
"setQuickCfgNetwork":{
"wanType":"pppoe"
"wanIP":"",
"wanMask":"",
"wanGateway":"",
"wanDns1":"",
"wanDns2":"",
"wanUser":"tenda",
"wanPwd":"12345678",
"wanNum":1
},
"setQuickCfgPwd":{ // 暂时删除
"sysUserPassword":"xxxxxxx"
},
"setQuickCfgWifiAndLogin":{
"wifiSSID": "",
"wifiPassword": "",
"sysPassword": "",
"wifiSecurity": "psk2",
"bLanguage": "cn"
}
//返回
"setQuickCfgWifiAndLogin":{
"redirect": true //true:已设置联网信息,false未设置
}
{
"getAcountType":"",
"getLang":""
}
//返回
{
//获取账号类型
"getAcountType":{
"acountType":1 //1:系统管理员, 2:认证管理员
}
}
"getLoginType":{
"bLanguage":"cn",
"theme": "tenda", //Tenda,Ip-com
"skipQuickset": false // 跳过快速设置
}
{
"auth":{
"password":""
}
}
请求
{
//获取系统状态页显示的基本信息
"getSystemStatus":"",
//获取WAN口速度信息
"getNetWork":"",
//首页查询在线设备
"getQosUserList":{
"type":1, // 1:在线,2:离线,3:黑名单,空为查询所有数据
"limit":5 //查询前五条数据,不传则查所有数据
},
//点击路由器获取系统信息
"getSysInfo":"",
"getLanInfo":"",
"getWanInfo":""
//点击WAN口上下行速度进行WAN口信息配置
"getWanIP":{
"ID":1
}
//获取WAN口联网状态
"getWanStatus":{
"ID":1
},
//获取节点列表信息
"getMeshList":"",
"getMeshDetail": {
"serialID": "234324535"
}
}
返回
{
"getSystemStatus":{
"runTime": "0d13h23m45s", //运行时间
"onlineHostCount": 5 //连接终端数
},
"getMeshList":[{
"serialID": "1312313", //序列号
"meshPlace": "hall", //设备位置
"hostCount": 12,//终端数
"flag": 1, //1:主节点,0:子节点
"exterior": "", //外观
// mesh在线状态
"status": 1, //1: 在线, 2:离线
"assocList": [{ //节点之间的关联关系
"serialID" : "xxxxx",
"wl2gRSSI" : 32,
"wl5gRSSI" : 32,
"wiredRSSI" : true //是否是有线
}]
}],
"getMeshDetail":{
"serialID": "1312313", //序列号
"flag": 1, //1:MPP,0:MAP
"meshPlace": "eception", //设备位置 eception:前台,hall:大厅,councilHall:会议室,anteroom:接待室,自定义直接传对应的字符串
"meshName": "", // 设备名称
"version": "", //软件版本
"ledStatus": true, //LED灯状态
"online": true, //在线状态
"runTime": "", //运行实际时间
"hostCount": "", //终端数
"MACAddress": "", //MAC地址
"sysTime": "", //系统时间
"lanIP": "", //LAN口IP
"cpuUsePercent": "", //cpn使用率
"memoryUsePercent": "", //内存使用率
"WanInfo": [{ //同WAN口设置里面的字段
"ID":1, //
"wanType": "pppoe", //联网方式
"wanIP": "192.168.98.224", //IP地址
"wanMask": "255.255.255.255", //子网掩码
"wanGateway": "192.168.98.1", //默认网关
"wanDns1": "192.168.108.107", //首选DNS
"wanDns2": "192.168.108.108", //备选DNS
"wanUpFlux": "500", //上传速率
"wanDownFlux": "1500", //下载速率
"wanStatus": "unwired" //联网状态
}],
"meshInfo":{
"wl2gRSSI" : 32,
"wl5gRSSI" : 32,
"wiredRSSI" : true,
"scenes": 1 //使用场景 1:更多用户接入,2:更大面积覆盖
}
},
"getNetwork":[],
//首页查询在线设备
"getQosUserList":[
{
"ID":1,
"hostName":"xxx",
"hostIP":"",
"hostMAC":"",
"hostAuthType":"", //认证方式
"hostConnectType":1,//联网方式 1:无线,2:有线,3:2.4G,4:5G
"hostUploadSpeed":12, //上传速度
"hostDownloadSpeed":123, //下载速度
"onlineTime":123,//在线时长,以分钟为单位
"hostUploadLimit":0, //上传限制
"hostDownloadLimit":0 //下载限制
}
],
//点击路由器获取系统信息
"getSysInfo":{
"sysInfoRunTime": "1h56m32s",
"sysInfoSysTime": "2015-11-19 11:02:21",
"sysInfoSoftVersion": "V15.01.0.1(2345_702)",
"cpuUsePercent": 2,
"memoryUsePercent": 21
},
"getLanInfo":{
"lanIp":"xxx",
"lanMac":"xxx"
},
"getWanInfo":[
{
"ID":1,
"wanStatus": "wired",
"wanError": "usernamePwdError",
"wanType": "pppoe",
"wanIP": "192.168.98.224",
"wanMask": "255.255.255.255",
"wanGateway": "192.168.98.1",
"wanDns1": "192.168.108.107",
"wanDns2": "192.168.108.108",
"wanUpFlux": 500,
"wanDownFlux": 1500
}
],
//end
//点击WAN口上下行速度进行WAN口信息配置
"getWanIP":{
"wanType":"static",
"wanIP":"192.168.27.11",
"wanMask":"255.255.255.0",
"wanGateway":"192.168.27.1",
"wanDns1":"192.168.1.1",
"wanDns2":"192.168.1.1"
}
//获取WAN口联网状态
"getWanStatus":{
"ID":1,
"wanStatus": "unwired",
"wanError": "disconnected",
}
}
设置数据
{
//WAN口信息配置
"setWanIP":{
"ID":1,
"wanType":"static",
"wanIP":"192.168.27.11",
"wanMask":"255.255.255.0",
"wanGateway":"192.168.27.1",
"wanDns1":"192.168.1.1",
"wanDns2":"192.168.1.1"
}
}
获取数据
{
"getWanData":"",
"getLanIpMask":"",
"getL2TPServer":"",
"getPPTPServer":"",
"getQvlan":"",
"getPppoes":"",
"getGuest":"",
"getNetwork":"",
"getStaticTemp":"",
"getWanConnectStatus":""
}
返回
{
"getWanData":{},
"getLanIpMask":{},
"getL2TPServer":{},
"getPPTPServer":{},
"getQvlan":{},
"getPppoes":{},
"getGuest":{},
"getNetwork":[{
"ID":0,
"wanType": "dhcp",
"wanStatus": "wired",
"wanError": "connected",
"wanUpFlux": 10.0,
"wanDownFlux": 10.0,
"wanISP": "0",
"wanDns1":"192.168.6.2",
"wanDns2":"",
"wanError":"disconnected",
"wanGateway":"192.168.6.1",
"wanIP":"192.168.6.12",
"wanL2tpDns1":"192.168.5.2",
"wanL2tpDns2":"",
"wanL2tpGateway":"192.168.5.1",
"wanL2tpIP":"192.168.5.12",
"wanL2tpIPType":"manual",
"wanL2tpMask":"255.255.255.0",
"wanL2tpPwd":"hahaha",
"wanL2tpServerAddr":"192.168.5.6",
"wanL2tpUser":"dapeipeia",
"wanMask":"255.255.255.0",
"wanPppoeDns1":"192.168.2.2",
"wanPppoeDns2":"",
"wanPppoeGateway":"192.16826.1",
"wanPppoeIP":"192.168.2.12",
"wanPppoeIPType":"auto",
"wanPppoeMask":"255.255.255.0",
"wanPppoePwd":"hahaha",
"wanPppoeServer":"192.168.2.4",
"wanPppoeService":"sssss",
"wanPppoeUser":"dapei",
"wanPptpDns1":"192.168.3.2",
"wanPptpDns2":"",
"wanPptpGateway":"192.168.3.1",
"wanPptpIP":"192.168.3.12",
"wanPptpIPType":"manual",
"wanPptpMask":"255.255.255.0",
"wanPptpPwd":"hahaha",
"wanPptpServerAddr":"192.168.3.6",
"wanPptpUser":"dapeipei",
"wanPwd":"hahaha",
"wanServer":"192.168.2.4",
"wanService":"tttttt",
"wanUser":"da"
}],
"getWanConnectStatus":{
"portLink": "1,1,0,0,1",
"status": [
{
"ID":0,
"wanStatus": "wired",
"wanError": "connected",
"connectTime": "01:09:20"
},
{
"ID":1,
"wanStatus": "unwired",
"wanError": "disconnected",
"connectTime": "00:00:00"
}
]
}
}
设置数据
{
"setNetwork":{
"wanNum":2,
"wanList":[
{
"ID":0,
"wanType":"static",
"wanIP":"192.168.27.11",
"wanMask":"255.255.255.0",
"wanGateway":"192.168.27.1",
"wanDns1":"192.168.1.1",
"wanDns2":"192.168.1.1"
},
{
"ID":1,
"wanType":"pppoe",
"wanUser":"tenda",
"wanPwd":"12345678"
}
]
}
}
获取数据
{
"getWirelessList": ""
}
返回
{
"getWirelessList":[
{
"ID": 1,
"wirelessSwitch": true,
"wirelessName": "Mr9_1001",
"wirelessPwd": "1001",
"noClientPwd": "1"
}
],
}
设置数据
{
"setWirelessList":[
{
"ID": 1,
"wirelessSwitch": true, //无线开关
"wirelessName": "Mr9_1001", //无线名称
"wirelessPwd": "1001", //无线密码
"noClientPwd": false //是否勾选不设密码
}
]
}
}
获取数据
{
"getClientWireless":""
}
返回
{
"getClientWireless": {
"clientWirelessSwitch":true,
"clientWirelessName":"guest_ssid",
"clientWirelessPwd":"12345678",
"noClientPwd":true //是否设置访问网络密码
}
}
设置数据
"setClientWireless":{
"clientWirelessSwitch":true,
"clientWirelessName":"guest_ssid",
"clientWirelessPwd":"12345678",
"noClientPwd":true
}
{
"getIPTVInfo":""
}
返回
{
"getIPTVInfo": {
"iptvEn":true
}
}
设置数据
"setIPTVInfo":{
"iptvEn":true
}
获取数据
{
"getELinkInfo":""
}
返回
{
"getELinkInfo": {
"eLinkEn":true,
"status": true // true:已连接智能网关, false:未连接智能网关
}
}
设置数据
"setELinkInfo":{
"eLinkEn":true
}
获取数据
{
"getWorkModeInfo":""
}
返回
{
"getWorkModeInfo": {
"workMode": 1 //1:路由模式,2:桥模式
}
}
设置数据
"setWorkModeInfo":{
"workMode": 1
}
获取数据,请求
{
"getWanData":"",
"getLanIpMask":"",
"getL2TPServer":"",
"getPPTPServer":"",
"getQvlan":"",
"getPppoes":"",
"getGuest":"",
"getDhcpClientList":"", //原名getDhcpBindList
"getDhcpServerList":"",
"getDhcpStaticBindList":""//原名getDhcpStaticList
}
返回
{
"getWanData":[{
"ID":0,
"wanIP": "192.168.9.1",
"wanMask": "255.255.255.0",
"wanGateWay":"192.168.11.1"
}],
"getLanIpMask":{
"lanIP": "192.168.0.1",
"lanMask": "255.255.255.0"
},
"getL2TPServer":{
"serverIP": "192.168.9.1",
"serverMask": "255.255.255.0"
},
"getPPTPServer":{
"serverIP": "192.168.8.1",
"serverMask": "255.255.255.0"
},
"getQvlan":[
{
"ID":0,
"vlanName":"vlan1",
"vlanIP":"192.168.1.2",
"vlanMask":"255.255.255.0"
}
],
"getPppoes":{
"pppoesIP": "192.168.2.1",
"pppoesMask": "255.255.255.0"
},
"getGuest": {
"guestIP": "192.168.10.1",
"guestMask": "255.255.255.0"
},
"getDhcpClientList":[
{
"ID":0,
"bindIPAddr": "192.168.2.130",
"bindMACAddr": "fc:4d:d4:f8:71:aa",
"hostName":"xxxxx",
"bindStatus": true
}
],
"getDhcpServerList":[{
"dhcpServerEn" : false,
"dhcpServerStartIP" : "192.168.0.2",
"dhcpServerEndIP" : "192.168.0.254",
"dhcpServerReleaseTime" : 360,
"dhcpServerDns1": "192.168.0.1",
"dhcpServerDns2": "192.168.0.1"
}],
"getDhcpStaticBindList":[
{
"ID":0,
"bindIPAddr": "192.168.2.134",
"bindMACAddr": "fc:4d:d4:f8:71:cd",
"bindRemark": "",
"enableStatus": false
}
]
}
获取数据,请求
{
"getLanIpMask":"",
"getPortMapping":""
}
返回
{
"getLanIpMask":{
"lanIP": "192.168.0.1",
"lanMask":"255.255.255.0"
}
"getPortMapping":[
{
"ID":1,
"portMappingServer": "192.168.0.100",
"porMappingtInternal": "100-200",
"portMappingExternal": "100-200",
"portMappingProtocol": "TCP",
"portMappingWan": "WAN1",
"portMappingEn": true
}
]
}
新增数据
请求
{
"setPortMapping":{
"type":"add",
"data":{
"portMappingServer":"192.168.0.1",
"innerPortUpstream":1,
"innerPortDownstream":31,
"outerPortUpstream":1,
"outerPortDownstream":31,
"portMappingProtocol":1,
"portMappingWan":1,
"porMappingtInternal":"1-31",
"portMappingExternal":"1-31",
}
}
}
显示隐藏开关
{
"setPortMapping":{
"type":"switch",
"data":{
"ID":1,
"portMappingEn":true
}
}
}
修改数据
请求
{
"setPortMapping":{
"type":"edit",
"data":{
"ID":1,
"portMappingServer":"192.168.0.1",
"innerPortUpstream":1,
"innerPortDownstream":31,
"outerPortUpstream":1,
"outerPortDownstream":31,
"portMappingProtocol":1,
"portMappingWan":1,
"porMappingtInternal":"1-31",
"portMappingExternal":"1-31",
}
}
}
删除数据
请求
{
"setPortMapping":{
"type":"delete",
"data":[1, 2, 3] //删除数据的ID值数组
}
}
获取数据,请求
{
"getUPnP":""
}
返回
{
"getUPnP":{
"upnpEn": true,
"upnpList": [
{
"upnpListExternalHost": "192.168.9.1",
"upnpListExternalPort": "80",
"upnpListInternalHost": "192.168.9.2",
"upnpListInternalPort": "81",
"upnpListProtocol": "UDP",
"upnpListDescribe":"描述1"
}
]
}
}
修改数据
请求
{
"setUPnP":{
"upnpEn":false
}
}
重启
{
"reboot":""
}
//返回
{
"reboot":0
}
修改密码
{
"setPassword":{
"password":"1231313"
}
}
获取数据,请求
{
"getSoftWareVerion":"",
"getSoftWareUpgrade":""
}
返回
{
"getSoftWareVerion":{
"softWareVerion":"5.0.1.3"
}
"getSoftWareUpgrade":{
"status": 2,
"update_info": {
"new_version": "V15.01.0.3(2300)",
"description": [
"V15.01.0.1(2200)",
"V15.01.0.2(2299)",
"V15.01.0.3 (2300)"
]
}
}
}
发送请求
软件升级
{
"setOnlineUpgrade":{
"onlineUpgradeType":"software"
}
}