API
Change the priority of the WAN connection
The API will return WAN connection ID, priority and enable information which are just updated.
Avaliable in 7.1.1 or later
Input Parameters
Type | Notation | Mandatory | Description | |
instantActive | String | <boolean> | optional | Priority should be updated and take effect immediately When omitted, the configuration will be saved normally, and pending for the explicit apply changes action to take effect |
list | Array | list of <WAN_Config_Priority_Obj> | optional | The list of objects for changing the priority. |
<WAN_Config_Priority_Obj>
Type | Notation | Mandatory | Description | |
connId | Number | <number> | required | WAN connection ID |
priority | Number | <number> | optional | Priority of the WAN connection |
enable | Boolean | <boolean> | optional | Enable the WAN connection |
Return Parameters
Return JSON
Type | Notation | Description | |
order | Array | list of <conn_idj> | The order of WAN ID |
<conn_id> | Object | <WAN_Config_Priority_Obj> | WAN config information |
<WAN_Config_Priority_Obj>
Type | Notation | Description | |
name | String | <string> | Name of the WAN connection |
priority | Number | <number> | Priority of the WAN connection |
enable | Boolean | <boolean> | WAN connection enabled or not |
cURL Example
curl -b cookies.txt -H "Content-Type: application/json" -X POST -d '{"instantActive":true,"list": [{"connId":1,"priority":1},{"connId":2,"priority":2}]}' http://192.168.1.1/api/config.wan.connection.priority
{ "stat": "ok", "response": { "1": { "name": "WAN 1", "priority": 1, "enable": true }, "2": { "name": "WAN 2", "priority": 2, "enable": true }, "order": [ 1, 2 ] } }