Get IPs

Obtains IP address details for physical network interfaces.

URL

/api/v1/interface/getips

HTTP Method

GET

URL Parameters

none

Response Parameters

Returns an object containing network interfance, ip_details pairs.

Parameter

Type

Description

<name of network interface>

ip_details

The IP details for the network interface.

ip_details

Parameter

Type

Description

addr

string containing IP address

The IP address of the network interface.

netmask string containing netmask The netmask of the network interface.

Example: Get interfaces

Request

GET

/api/v1/interface/getips

cURL
Copy
curl -kv \
-u api_ninja:ninja_password \
-X GET \
https://172.31.1.172:4849/api/v1/interface/getips

Response

Copy
{
  "eth0": {
    "addr": "10.0.2.15",
    "netmask": "255.255.255.0"
  },
  "eth1": {
    "addr": "192.168.33.11",
    "netmask": "255.255.255.0"
  }
}