Contents
describe
- lan interface
Interface version
| Version number | Maker | Date of formulation | Revision date |
|---|---|---|---|
| 1.0 | alan | 2022-07-26 |
POST request address
http://192.168.1.1/apiAPI List
| Name | Description |
|---|---|
| get | Get LAN port information |
| set | Set LAN port information, the system will restart after modifying the LAN port IP |
1、get
Get LAN port information interface parameters
{ "version": "1.0", "sid": "9f667090acfa315b0e797cd8d28fc6f0", "module": "lan", "api": "get",}Request parameter description
| Parameter name | type | description |
|---|---|---|
| ver | string | API version |
| sid | string | session id returned after logging |
| module | string | requested module |
| api | string | requested api interface |
Return to the example
{ "module": "lan", "version": "1.0", "api": "get", "errcode": 0, "result": { "ipv4mask": "255.255.255.0", "ipv4addr": "192.168.1.1" }, "sid": "9f667090acfa315b0e797cd8d28fc6f0"}Return to parameter description
| Parameter name | type | description |
|---|---|---|
| module | string | requested module |
| version | string | api version |
| api | string | requested api interface |
| errcode | string | Returned error code |
| sid | string | requested sid |
| result.ipv4mask | string | lankou subnet mask |
| result.ipv4addr | string | lan port ip address |
2、set
Set the LAN port information request format
{ "version": "1.0", "sid": "8d85efa6bd8966d7219fa930a0165042", "module": "lan", "api": "set", "param": { "ipv4addr": "192.168.1.2", "ipv4mask": "255.255.255.0" }}Request parameter description
| Parameter name | type | description |
|---|---|---|
| version | string | API version |
| sid | string | session id returned after logging |
| module | string | requested module |
| api | string | requested api interface |
| param.ipv4addr | string | set lan’s ip address |
| param.ipv4mask | string | Subnet mask that lan refers to |
Return to the example
{ "module": "lan", "version": "1.0", "api": "set", "errcode": 0, "result": {}, "sid": "8d85efa6bd8966d7219fa930a0165042"}Return to parameter description
| Parameter name | type | description |
|---|---|---|
| module | string | requested module |
| version | string | api version |
| api | string | requested api interface |
| errcode | string | Returned error code |
| sid | string | requested sid |