B.1.3.4 Response structure
The structure of POST output strictly corresponds to input. RCI reproduces input arrays
and nested objects, and replaces input parameters with output data. This approach lets
you locate any part of the response using a resource name.
Example B.3. Show version and interface Home
Run two different “show” commands in a certain order.
POST /rci/show HTTP/1.1
Host: 192.168.1.1
Content-length: 46
Content-type: application/json
[{"version":{}},{"interface":{"name":"Home"}}]
Response is an array of two elements, in accordance with the request.
[
{
"version": {
"release": "2.12.A.1.0-1",
"arch": "mips",
"ndm": {
"exact": "0-cbf8590",
"cdate": "15 Jan 2018"
},
"bsp": {
"exact": "0-06ee10b",
"cdate": "15 Jan 2018"
},
"ndw": {
"version": "0.2.1",
"features": "wifi_button,single_usb_port,dual_image",
"components": "base,cloudcontrol,..."
},
"manufacturer": "Keenetic Ltd.",
"vendor": "Keenetic",
"series": "KN",
"model": "4G (KN-1210)",
"hw_version": "10128000",
"hw_id": "KN-1210",
"device": "4G",
"class": "Internet Center"
}
},
{
"interface": {
"id": "Bridge0",
"index": 0,
"type": "Bridge",
"description": "Home network",
"interface-name": "Home",
Command Reference Guide — Keenetic Extra (KN-1710)
338
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...