POST /rci/ip/hotspot/policy HTTP/1.1
Host: 192.168.1.1
Content-length: 48
Content-type: application/json
{
"interface":"Home",
"access":"permit"
}
B.1.3.2 Nested resources
Object and array values of a parent object are interpreted as nested resources.
{
"
command
": {
"
parameter
":
value
}
}
In particular, empty object denotes a command with no parameters.
{
"
command
": {}
}
Using this rule, you can address multiple resources at a time. RCI engine will process your
request from top to bottom, recursing over the JSON structure. Parameters of a parent
resource apply to all nested resources within the nearest surrounding scope.
Example B.2. Create and enable a PPP interface
Call “interface” to create a new PPPoE connection, as described in
and enable it with “interface up”. The “name” parameter applies to both “interface” and
“up”.
POST /rci HTTP/1.1
Host: 192.168.1.1
Content-length: 39
Content-type: application/json
{"interface":{"name":"PPPoE1","up":{}}}
B.1.3.3 Arrays
Arrays can be used to operate on a specific resource multiple times. The important thing
is that arrays preserve the order of their elements, in contrast to object members.
{
"
command
": [
{"
parameter1
":
value1
},
{"
parameter2
":
value2
} ]
}
Keenetic Extra (KN-1710) — Command Reference Guide
337
Appendix B HTTP API
Summary of Contents for EXTRA KN-1710
Page 2: ......
Page 6: ...Command Reference Guide Keenetic Extra KN 1710 6 Contents Overview...
Page 20: ...Command Reference Guide Keenetic Extra KN 1710 20 Chapter 1 Product Overview...
Page 26: ...Command Reference Guide Keenetic Extra KN 1710 26 Chapter 2 Introduction to the CLI...
Page 322: ...Command Reference Guide Keenetic Extra KN 1710 322 Chapter 3 Command Reference...
Page 332: ...Command Reference Guide Keenetic Extra KN 1710 332 Glossary...
Page 348: ...Command Reference Guide Keenetic Extra KN 1710 348 Appendix C SNMP MIB...