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": "wi_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 Lite (KN-1310)
304
Appendix B HTTP API