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": { /*OBJECT*/ | |||||||||
"Device": "STRING" | Ethernet device name (E.g. eth0, usb1, ...) | ||||||||
"Object": "STRING" | Ethernet device object name (NOTE: it's device object name but not connection object name) | ||||||||
"State": "STRING" | Current Ethernet connection status, as one of below:
| ||||||||
"ConnectionObject": "STRING" | The current connection object name, this is needed in setEthernet.lua | ||||||||
"ConnectionUuid": "STRING" | Current Uuid of current connection, this is needed in setEthernet.lua | ||||||||
"Carrier": INTEGER |
| ||||||||
"Speed": INTEGER | Connection speed (10/100/1000, in Mbps) | ||||||||
"HwAddress": "STRING" | MAC address (it may be Cloned MAC address) | ||||||||
"PermHwAddress": "STRING" | Original MAC address (not be cloned) | ||||||||
"DHCP": INTEGER |
| ||||||||
"IP": "STRING" | Current IP address | ||||||||
"Prefix": "STRING" | Subnet mask represented as 'prefix' ( E.g. 24 is 255.255.255.0, 16 is 255.255.0.0) | ||||||||
"Gateway": "STRING" | Default gateway | ||||||||
"Dns1": "STRING" | DNS1 | ||||||||
"Dns2": "STRING" | DNS2 | ||||||||
} | |||||||||
} |
Device HTTP API, v1.0
Copyright (c) 2016.