getNetInterface.lua
[INDEX]

ABSTRACT

Get all network interfaces list on device

ARGUMENTS

HTTP Arguments submit: GET; POST

Test this API over HTTP - (URL):

NONE

RETURNS

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.)

ETHERNET

802.3 Ethernet

WIFI

802.11 WiFi

MODEM

3G/4G/LTE Wireless Wan

BT

Bluetooth

BOND

Multiple interface bond

ADSL

ADSL

VLAN

VLAN

UNKNOWN

Unknown

"State":
"STRING"

Current network connection status, is one of below:

disabled

Disabled

off

Not connected

connecting

Connecting in progress

connected

Connected

}
]
}

RELATED

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, ...

OTHER NOTES

Device HTTP API, v1.0