Return a JSON style result. The JSON format is:
{ /*OBJECT*/ | |||||||||||||||||
"Result": NUMBER | 200 means OK, other error code meanings are similar to HTTP Response. | ||||||||||||||||
"Status": "STRING" | Status message. Responsing result status of API executive, if there errors, it will describe reasons. | ||||||||||||||||
"Data": [ /*ARRAY*/ | Array. Each item represents one network interface information as below: | ||||||||||||||||
{ /*OBJECT*/ | |||||||||||||||||
"Device": "STRING" | Network interface name (E.g. eth0, usb0, ...) | ||||||||||||||||
"Object": "STRING" | Interface (Device) ObjectID. Please pay attention to this ObjectID, it is the unique identification for network operations about this interface, e.g. argument 'DeviceObject' for getEthernetDetail.lua, addWifiConnection.lua, ... | ||||||||||||||||
"Type": "STRING" | Interface type, as one of below:(NOTE: Currelty, except ETHERNET/WIFI/MODEM/BT, other types are not supported.)
| ||||||||||||||||
"State": "STRING" | Current network connection status, is one of below:
| ||||||||||||||||
} | |||||||||||||||||
] | |||||||||||||||||
} |
To get the detail status of each network interface (like IP address, Wifi connection informations and other), please check the interface's Type (ETHERNET/WIFI...), then call corresponding get****Detail.lua.like getWifiDetail.lua, getEthernetDetail.lua, ...
Device HTTP API, v1.0
Copyright (c) 2016.