getNetworkSettings (v1.0)

Estimated reading time: 2 minutes

This API provides information about network settings.

Syntax

http://<Base URL>/system

Authentication Level

generic

Request

params' Elements
An object composed of the following pair(s).
name type multiplicity default description
netif string ? "" Network interface. The default value is "". (This indicates all interfaces.)
JSON Example
{
    "method": "getNetworkSettings",
    "id": 2,
    "params": [{"netif": "eth0"}],
    "version": "1.0"
}

Response

result's Elements
An array of objects composed of the following pairs.
name type multiplicity default description
netif string 1 Network Interface.
  • (ex) "eth0"
  • (ex) "wlan0"
hwAddr string 1 Hardware address. (MAC Address)
ipAddrV4 string 1 IP Address for IPv4.
ipAddrV6 string 1 IP Address for IPv6.
netmask string 1 Netmask.
gateway string 1 Gateway.
dns string-array 1 DNS
JSON Example
{
    "result": [[
        {
            "hwAddr": "FF-FF-FF-FF-FF-FF",
            "netmask": "255.255.255.0",
            "ipAddrV4": "0.0.0.0",
            "netif": "eth0",
            "ipAddrV6": "ffff::ffff:ffff:fffd%7",
            "dns": [
                "0.0.0.0",
                "1.1.1.1"
            ],
            "gateway": "0.0.0.0"
        },
        {
            "hwAddr": "00-00-00-00-00-00",
            "netmask": "255.255.255.0",
            "ipAddrV4": "0.0.0.1",
            "netif": "wlan0",
            "ipAddrV6": "ffff::ffff:ffff:fffd%8",
            "dns": [
                "0.0.0.0",
                "fec0:0:0:ffff::1%1"
            ],
            "gateway": "0.0.0.0"
        }
    ]],
    "id": 2
}
Error Code
No additional error codes are defined. Refer to error code for common errors.

Appendix

  • This API provides information about network settings.
  • The response includes information only about the active network interface.
  • The active network interface is assigned an IP address.
  • It is possible to set up connection of either Wired or Wi-Fi.
    It depends on the current network settings of “Wired + (Wi-Fi Direct)” or “Wi-Fi + (Wi-Fi Direct)”.
  • When the “built-in Wi-Fi” set is on and the connection setup is Wi-Fi, an IP address is assigned even if it is not connected to the access point.

Guide about Request

name explanation
netif The value of “netif” is “eth0”, “wlan0”, “p2p1”, or “”. If the value is empty, this indicates all interfaces.
Last modified: 6 Feb 2019