[关闭]
@moshangxc 2019-01-11T16:54:06.000000Z 字数 9855 阅读 608

MW6接口文档

MW6


所有接口的请求地址统一为"goform/module"

set操作的接口返回统一为

  1. {
  2. //非列表操作
  3. "请求的模块名称"0 //0表示成功,其他表示失败
  4. }

所有的列表数据目前都增加了字段"ID"

设置向导

获取数据

请求
  1. {
  2. "getWanConnectStatus":"",
  3. "getLanIpMask":"",
  4. "getL2TPServer":"",
  5. "getPPTPServer":"",
  6. "getPppoes":"",
  7. "getGuest":"",
  8. "getDevName":"",
  9. "getQuickCfgWanUpperServerType":""
  10. }
返回
  1. "getWanConnectStatus":{
  2. "portLink": "1,1,0,0,01",
  3. "bLanguage":"en",
  4. "status": [
  5. {
  6. "wanStatus": "unwired",
  7. "wanError": "connected",
  8. "connectTime": "01:09:20"
  9. }
  10. ]
  11. },
  12. "getLanIpMask":{},
  13. "getL2TPServer":{},
  14. "getPPTPServer":{},
  15. "getPppoes":{},
  16. "getGuest":{},
  17. "getQuickCfgWanUpperServerType":{
  18. "upperServerType" : "static"
  19. },
  20. // 设备名称
  21. "getDevName":{
  22. "en": "xxxxx",
  23. "cn": "微企一体化网关"
  24. },
设置数据
  1. //进入页面将联网方式设置为dhcp
  2. "setQuickCfgNetwork":{
  3. "wanType":"pppoe"
  4. "wanIP":"",
  5. "wanMask":"",
  6. "wanGateway":"",
  7. "wanDns1":"",
  8. "wanDns2":"",
  9. "wanUser":"tenda",
  10. "wanPwd":"12345678",
  11. "wanNum":1
  12. },
  13. "setQuickCfgPwd":{ // 暂时删除
  14. "sysUserPassword":"xxxxxxx"
  15. },
  16. "setQuickCfgWifiAndLogin":{
  17. "wifiSSID": "",
  18. "wifiPassword": "",
  19. "sysPassword": "",
  20. "wifiSecurity": "psk2",
  21. "bLanguage": "cn"
  22. }
  23. //返回
  24. "setQuickCfgWifiAndLogin":{
  25. "redirect": true //true:已设置联网信息,false未设置
  26. }

公共模块

获取数据

  1. {
  2. "getAcountType":"",
  3. "getLang":""
  4. }
  5. //返回
  6. {
  7. //获取账号类型
  8. "getAcountType":{
  9. "acountType":1 //1:系统管理员, 2:认证管理员
  10. }
  11. }

登录

获取数据

  1. "getLoginType":{
  2. "bLanguage":"cn",
  3. "theme": "tenda", //Tenda,Ip-com
  4. "skipQuickset": false // 跳过快速设置
  5. }

第二次及以后登录

  1. {
  2. "auth":{
  3. "password":""
  4. }
  5. }

系统状态

获取数据

请求
  1. {
  2. //获取系统状态页显示的基本信息
  3. "getSystemStatus":"",
  4. //获取WAN口速度信息
  5. "getNetWork":"",
  6. //首页查询在线设备
  7. "getQosUserList":{
  8. "type":1, // 1:在线,2:离线,3:黑名单,空为查询所有数据
  9. "limit":5 //查询前五条数据,不传则查所有数据
  10. },
  11. //点击路由器获取系统信息
  12. "getSysInfo":"",
  13. "getLanInfo":"",
  14. "getWanInfo":""
  15. //点击WAN口上下行速度进行WAN口信息配置
  16. "getWanIP":{
  17. "ID":1
  18. }
  19. //获取WAN口联网状态
  20. "getWanStatus":{
  21. "ID":1
  22. },
  23. //获取节点列表信息
  24. "getMeshList":"",
  25. "getMeshDetail": {
  26. "serialID": "234324535"
  27. }
  28. }

返回

  1. {
  2. "getSystemStatus":{
  3. "runTime": "0d13h23m45s", //运行时间
  4. "onlineHostCount": 5 //连接终端数
  5. },
  6. "getMeshList":[{
  7. "serialID": "1312313", //序列号
  8. "meshPlace": "hall", //设备位置
  9. "hostCount": 12,//终端数
  10. "flag": 1, //1:主节点,0:子节点
  11. "exterior": "", //外观
  12. // mesh在线状态
  13. "status": 1, //1: 在线, 2:离线
  14. "assocList": [{ //节点之间的关联关系
  15. "serialID" : "xxxxx",
  16. "wl2gRSSI" : 32,
  17. "wl5gRSSI" : 32,
  18. "wiredRSSI" : true //是否是有线
  19. }]
  20. }],
  21. "getMeshDetail":{
  22. "serialID": "1312313", //序列号
  23. "flag": 1, //1:MPP,0:MAP
  24. "meshPlace": "eception", //设备位置 eception:前台,hall:大厅,councilHall:会议室,anteroom:接待室,自定义直接传对应的字符串
  25. "meshName": "", // 设备名称
  26. "version": "", //软件版本
  27. "ledStatus": true, //LED灯状态
  28. "online": true, //在线状态
  29. "runTime": "", //运行实际时间
  30. "hostCount": "", //终端数
  31. "MACAddress": "", //MAC地址
  32. "sysTime": "", //系统时间
  33. "lanIP": "", //LAN口IP
  34. "cpuUsePercent": "", //cpn使用率
  35. "memoryUsePercent": "", //内存使用率
  36. "WanInfo": [{ //同WAN口设置里面的字段
  37. "ID":1, //
  38. "wanType": "pppoe", //联网方式
  39. "wanIP": "192.168.98.224", //IP地址
  40. "wanMask": "255.255.255.255", //子网掩码
  41. "wanGateway": "192.168.98.1", //默认网关
  42. "wanDns1": "192.168.108.107", //首选DNS
  43. "wanDns2": "192.168.108.108", //备选DNS
  44. "wanUpFlux": "500", //上传速率
  45. "wanDownFlux": "1500", //下载速率
  46. "wanStatus": "unwired" //联网状态
  47. }],
  48. "meshInfo":{
  49. "wl2gRSSI" : 32,
  50. "wl5gRSSI" : 32,
  51. "wiredRSSI" : true,
  52. "scenes": 1 //使用场景 1:更多用户接入,2:更大面积覆盖
  53. }
  54. },
  55. "getNetwork":[],
  56. //首页查询在线设备
  57. "getQosUserList":[
  58. {
  59. "ID":1,
  60. "hostName":"xxx",
  61. "hostIP":"",
  62. "hostMAC":"",
  63. "hostAuthType":"", //认证方式
  64. "hostConnectType":1,//联网方式 1:无线,2:有线,3:2.4G,4:5G
  65. "hostUploadSpeed":12, //上传速度
  66. "hostDownloadSpeed":123, //下载速度
  67. "onlineTime":123,//在线时长,以分钟为单位
  68. "hostUploadLimit":0, //上传限制
  69. "hostDownloadLimit":0 //下载限制
  70. }
  71. ],
  72. //点击路由器获取系统信息
  73. "getSysInfo":{
  74. "sysInfoRunTime": "1h56m32s",
  75. "sysInfoSysTime": "2015-11-19 11:02:21",
  76. "sysInfoSoftVersion": "V15.01.0.1(2345_702)",
  77. "cpuUsePercent": 2,
  78. "memoryUsePercent": 21
  79. },
  80. "getLanInfo":{
  81. "lanIp":"xxx",
  82. "lanMac":"xxx"
  83. },
  84. "getWanInfo":[
  85. {
  86. "ID":1,
  87. "wanStatus": "wired",
  88. "wanError": "usernamePwdError",
  89. "wanType": "pppoe",
  90. "wanIP": "192.168.98.224",
  91. "wanMask": "255.255.255.255",
  92. "wanGateway": "192.168.98.1",
  93. "wanDns1": "192.168.108.107",
  94. "wanDns2": "192.168.108.108",
  95. "wanUpFlux": 500,
  96. "wanDownFlux": 1500
  97. }
  98. ],
  99. //end
  100. //点击WAN口上下行速度进行WAN口信息配置
  101. "getWanIP":{
  102. "wanType":"static",
  103. "wanIP":"192.168.27.11",
  104. "wanMask":"255.255.255.0",
  105. "wanGateway":"192.168.27.1",
  106. "wanDns1":"192.168.1.1",
  107. "wanDns2":"192.168.1.1"
  108. }
  109. //获取WAN口联网状态
  110. "getWanStatus":{
  111. "ID":1,
  112. "wanStatus": "unwired",
  113. "wanError": "disconnected",
  114. }
  115. }

设置数据

  1. {
  2. //WAN口信息配置
  3. "setWanIP":{
  4. "ID":1,
  5. "wanType":"static",
  6. "wanIP":"192.168.27.11",
  7. "wanMask":"255.255.255.0",
  8. "wanGateway":"192.168.27.1",
  9. "wanDns1":"192.168.1.1",
  10. "wanDns2":"192.168.1.1"
  11. }
  12. }

上网设置

获取数据

  1. {
  2. "getWanData":"",
  3. "getLanIpMask":"",
  4. "getL2TPServer":"",
  5. "getPPTPServer":"",
  6. "getQvlan":"",
  7. "getPppoes":"",
  8. "getGuest":"",
  9. "getNetwork":"",
  10. "getStaticTemp":"",
  11. "getWanConnectStatus":""
  12. }
返回
  1. {
  2. "getWanData":{},
  3. "getLanIpMask":{},
  4. "getL2TPServer":{},
  5. "getPPTPServer":{},
  6. "getQvlan":{},
  7. "getPppoes":{},
  8. "getGuest":{},
  9. "getNetwork":[{
  10. "ID":0,
  11. "wanType": "dhcp",
  12. "wanStatus": "wired",
  13. "wanError": "connected",
  14. "wanUpFlux": 10.0,
  15. "wanDownFlux": 10.0,
  16. "wanISP": "0",
  17. "wanDns1":"192.168.6.2",
  18. "wanDns2":"",
  19. "wanError":"disconnected",
  20. "wanGateway":"192.168.6.1",
  21. "wanIP":"192.168.6.12",
  22. "wanL2tpDns1":"192.168.5.2",
  23. "wanL2tpDns2":"",
  24. "wanL2tpGateway":"192.168.5.1",
  25. "wanL2tpIP":"192.168.5.12",
  26. "wanL2tpIPType":"manual",
  27. "wanL2tpMask":"255.255.255.0",
  28. "wanL2tpPwd":"hahaha",
  29. "wanL2tpServerAddr":"192.168.5.6",
  30. "wanL2tpUser":"dapeipeia",
  31. "wanMask":"255.255.255.0",
  32. "wanPppoeDns1":"192.168.2.2",
  33. "wanPppoeDns2":"",
  34. "wanPppoeGateway":"192.16826.1",
  35. "wanPppoeIP":"192.168.2.12",
  36. "wanPppoeIPType":"auto",
  37. "wanPppoeMask":"255.255.255.0",
  38. "wanPppoePwd":"hahaha",
  39. "wanPppoeServer":"192.168.2.4",
  40. "wanPppoeService":"sssss",
  41. "wanPppoeUser":"dapei",
  42. "wanPptpDns1":"192.168.3.2",
  43. "wanPptpDns2":"",
  44. "wanPptpGateway":"192.168.3.1",
  45. "wanPptpIP":"192.168.3.12",
  46. "wanPptpIPType":"manual",
  47. "wanPptpMask":"255.255.255.0",
  48. "wanPptpPwd":"hahaha",
  49. "wanPptpServerAddr":"192.168.3.6",
  50. "wanPptpUser":"dapeipei",
  51. "wanPwd":"hahaha",
  52. "wanServer":"192.168.2.4",
  53. "wanService":"tttttt",
  54. "wanUser":"da"
  55. }],
  56. "getWanConnectStatus":{
  57. "portLink": "1,1,0,0,1",
  58. "status": [
  59. {
  60. "ID":0,
  61. "wanStatus": "wired",
  62. "wanError": "connected",
  63. "connectTime": "01:09:20"
  64. },
  65. {
  66. "ID":1,
  67. "wanStatus": "unwired",
  68. "wanError": "disconnected",
  69. "connectTime": "00:00:00"
  70. }
  71. ]
  72. }
  73. }

设置数据

  1. {
  2. "setNetwork":{
  3. "wanNum":2,
  4. "wanList":[
  5. {
  6. "ID":0,
  7. "wanType":"static",
  8. "wanIP":"192.168.27.11",
  9. "wanMask":"255.255.255.0",
  10. "wanGateway":"192.168.27.1",
  11. "wanDns1":"192.168.1.1",
  12. "wanDns2":"192.168.1.1"
  13. },
  14. {
  15. "ID":1,
  16. "wanType":"pppoe",
  17. "wanUser":"tenda",
  18. "wanPwd":"12345678"
  19. }
  20. ]
  21. }
  22. }

无线设置

无线名称和密码

获取数据
  1. {
  2. "getWirelessList": ""
  3. }
 返回
  1. {
  2. "getWirelessList":[
  3. {
  4. "ID": 1,
  5. "wirelessSwitch": true,
  6. "wirelessName": "Mr9_1001",
  7. "wirelessPwd": "1001",
  8. "noClientPwd": "1"
  9. }
  10. ],
  11. }
设置数据  
  1. {
  2. "setWirelessList":[
  3. {
  4. "ID": 1,
  5. "wirelessSwitch": true, //无线开关
  6. "wirelessName": "Mr9_1001", //无线名称
  7. "wirelessPwd": "1001", //无线密码
  8. "noClientPwd": false //是否勾选不设密码
  9. }
  10. ]
  11. }
  12. }

访客网络

获取数据

  1. {
  2. "getClientWireless":""
  3. }

返回

  1. {
  2. "getClientWireless": {
  3. "clientWirelessSwitch":true,
  4. "clientWirelessName":"guest_ssid",
  5. "clientWirelessPwd":"12345678",
  6. "noClientPwd":true //是否设置访问网络密码
  7. }
  8. }

设置数据

  1. "setClientWireless":{
  2. "clientWirelessSwitch":true,
  3. "clientWirelessName":"guest_ssid",
  4. "clientWirelessPwd":"12345678",
  5. "noClientPwd":true
  6. }

IPTV

  1. {
  2. "getIPTVInfo":""
  3. }

返回

  1. {
  2. "getIPTVInfo": {
  3. "iptvEn":true
  4. }
  5. }

设置数据

  1. "setIPTVInfo":{
  2. "iptvEn":true
  3. }

E-link

获取数据

  1. {
  2. "getELinkInfo":""
  3. }

返回

  1. {
  2. "getELinkInfo": {
  3. "eLinkEn":true,
  4. "status": true // true:已连接智能网关, false:未连接智能网关
  5. }
  6. }

设置数据

  1. "setELinkInfo":{
  2. "eLinkEn":true
  3. }

切换工作模式

获取数据

  1. {
  2. "getWorkModeInfo":""
  3. }

返回

  1. {
  2. "getWorkModeInfo": {
  3. "workMode": 1 //1:路由模式,2:桥模式
  4. }
  5. }

设置数据

  1. "setWorkModeInfo":{
  2. "workMode": 1
  3. }

更多功能

局域网设置

获取数据,请求
  1. {
  2. "getWanData":"",
  3. "getLanIpMask":"",
  4. "getL2TPServer":"",
  5. "getPPTPServer":"",
  6. "getQvlan":"",
  7. "getPppoes":"",
  8. "getGuest":"",
  9. "getDhcpClientList":"", //原名getDhcpBindList
  10. "getDhcpServerList":"",
  11. "getDhcpStaticBindList":""//原名getDhcpStaticList
  12. }
返回
  1. {
  2. "getWanData":[{
  3. "ID":0,
  4. "wanIP": "192.168.9.1",
  5. "wanMask": "255.255.255.0",
  6. "wanGateWay":"192.168.11.1"
  7. }],
  8. "getLanIpMask":{
  9. "lanIP": "192.168.0.1",
  10. "lanMask": "255.255.255.0"
  11. },
  12. "getL2TPServer":{
  13. "serverIP": "192.168.9.1",
  14. "serverMask": "255.255.255.0"
  15. },
  16. "getPPTPServer":{
  17. "serverIP": "192.168.8.1",
  18. "serverMask": "255.255.255.0"
  19. },
  20. "getQvlan":[
  21. {
  22. "ID":0,
  23. "vlanName":"vlan1",
  24. "vlanIP":"192.168.1.2",
  25. "vlanMask":"255.255.255.0"
  26. }
  27. ],
  28. "getPppoes":{
  29. "pppoesIP": "192.168.2.1",
  30. "pppoesMask": "255.255.255.0"
  31. },
  32. "getGuest": {
  33. "guestIP": "192.168.10.1",
  34. "guestMask": "255.255.255.0"
  35. },
  36. "getDhcpClientList":[
  37. {
  38. "ID":0,
  39. "bindIPAddr": "192.168.2.130",
  40. "bindMACAddr": "fc:4d:d4:f8:71:aa",
  41. "hostName":"xxxxx",
  42. "bindStatus": true
  43. }
  44. ],
  45. "getDhcpServerList":[{
  46. "dhcpServerEn" : false,
  47. "dhcpServerStartIP" : "192.168.0.2",
  48. "dhcpServerEndIP" : "192.168.0.254",
  49. "dhcpServerReleaseTime" : 360,
  50. "dhcpServerDns1": "192.168.0.1",
  51. "dhcpServerDns2": "192.168.0.1"
  52. }],
  53. "getDhcpStaticBindList":[
  54. {
  55. "ID":0,
  56. "bindIPAddr": "192.168.2.134",
  57. "bindMACAddr": "fc:4d:d4:f8:71:cd",
  58. "bindRemark": "",
  59. "enableStatus": false
  60. }
  61. ]
  62. }

端口映射

获取数据,请求
  1. {
  2. "getLanIpMask":"",
  3. "getPortMapping":""
  4. }
返回
  1. {
  2. "getLanIpMask":{
  3. "lanIP": "192.168.0.1",
  4. "lanMask":"255.255.255.0"
  5. }
  6. "getPortMapping":[
  7. {
  8. "ID":1,
  9. "portMappingServer": "192.168.0.100",
  10. "porMappingtInternal": "100-200",
  11. "portMappingExternal": "100-200",
  12. "portMappingProtocol": "TCP",
  13. "portMappingWan": "WAN1",
  14. "portMappingEn": true
  15. }
  16. ]
  17. }

新增数据
请求

  1. {
  2. "setPortMapping":{
  3. "type":"add",
  4. "data":{
  5. "portMappingServer":"192.168.0.1",
  6. "innerPortUpstream":1,
  7. "innerPortDownstream":31,
  8. "outerPortUpstream":1,
  9. "outerPortDownstream":31,
  10. "portMappingProtocol":1,
  11. "portMappingWan":1,
  12. "porMappingtInternal":"1-31",
  13. "portMappingExternal":"1-31",
  14. }
  15. }
  16. }

显示隐藏开关

  1. {
  2. "setPortMapping":{
  3. "type":"switch",
  4. "data":{
  5. "ID":1,
  6. "portMappingEn":true
  7. }
  8. }
  9. }

修改数据
请求

  1. {
  2. "setPortMapping":{
  3. "type":"edit",
  4. "data":{
  5. "ID":1,
  6. "portMappingServer":"192.168.0.1",
  7. "innerPortUpstream":1,
  8. "innerPortDownstream":31,
  9. "outerPortUpstream":1,
  10. "outerPortDownstream":31,
  11. "portMappingProtocol":1,
  12. "portMappingWan":1,
  13. "porMappingtInternal":"1-31",
  14. "portMappingExternal":"1-31",
  15. }
  16. }
  17. }

删除数据
请求

  1. {
  2. "setPortMapping":{
  3. "type":"delete",
  4. "data":[1, 2, 3] //删除数据的ID值数组
  5. }
  6. }

UPnP

获取数据,请求
  1. {
  2. "getUPnP":""
  3. }
返回
  1. {
  2. "getUPnP":{
  3. "upnpEn": true,
  4. "upnpList": [
  5. {
  6. "upnpListExternalHost": "192.168.9.1",
  7. "upnpListExternalPort": "80",
  8. "upnpListInternalHost": "192.168.9.2",
  9. "upnpListInternalPort": "81",
  10. "upnpListProtocol": "UDP",
  11. "upnpListDescribe":"描述1"
  12. }
  13. ]
  14. }
  15. }

修改数据
请求

  1. {
  2. "setUPnP":{
  3. "upnpEn":false
  4. }
  5. }

系统管理

重启与复位

重启
  1. {
  2. "reboot":""
  3. }
  4. //返回
  5. {
  6. "reboot":0
  7. }

管理员密码

修改密码
  1. {
  2. "setPassword":{
  3. "password":"1231313"
  4. }
  5. }

软件升级

获取数据,请求
  1. {
  2. "getSoftWareVerion":"",
  3. "getSoftWareUpgrade":""
  4. }
返回
  1. {
  2. "getSoftWareVerion":{
  3. "softWareVerion":"5.0.1.3"
  4. }
  5. "getSoftWareUpgrade":{
  6. "status": 2,
  7. "update_info": {
  8. "new_version": "V15.01.0.3(2300)",
  9. "description": [
  10. "V15.01.0.1(2200)",
  11. "V15.01.0.2(2299)",
  12. "V15.01.0.3 (2300)"
  13. ]
  14. }
  15. }
  16. }

发送请求
软件升级

  1. {
  2. "setOnlineUpgrade":{
  3. "onlineUpgradeType":"software"
  4. }
  5. }
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注