REST API - get

appliance networking interfaces: get

Get information about a particular network interface.

Request:

HTTP request

GET https://{server}/rest/appliance/networking/interfaces/{interface_name}

Path Parameters

Name Type Description
Required
interface_name string Network interface, for example, "nic0".

Response:

HTTP Status Code: 200

Representation:

{
    "value"{
        "ipv4"{
            "mode""DHCP",
            "default_gateway""string",
            "address""string",
            "prefix"1,
            "configurable"true
        },
        "ipv6"{
            "default_gateway""string",
            "addresses"[
                {
                    "address""string",
                    "prefix"1,
                    "origin""DHCP",
                    "status""TENTATIVE"
                },
                {
                    "address""string",
                    "prefix"1,
                    "origin""DHCP",
                    "status""TENTATIVE"
                }
            ],
            "autoconf"true,
            "dhcp"true,
            "configurable"true
        },
        "name""string",
        "mac""string",
        "status""down"
    }
}

Response Type:

Name Type Description
bold = required
value interface_info Network interface information.
value.name string Interface name, for example, "nic0", "nic1".

value.status string Interface status.

Defines interface status Value is one of:
down: The interface is down.
up: The interface is up.

value.mac string MAC address. For example 00:0C:29:94:BB:5A.

value.ipv4 info IPv4 Address information. This attribute was added in vSphere API 6.7.

Optional. ipv4 This field will be unset if IPv4 is not enabled.

value.ipv4.configurable boolean The specified network interface is configurable or not. This attribute was added in vSphere API 6.7.

value.ipv4.mode string The Address assignment mode. This attribute was added in vSphere API 6.7.

Defines different IPv4 address assignment modes. This enumeration was added in vSphere API 6.7. Value is one of:
DHCP: The IPv4 address is automatically assigned by a DHCP server. This constant was added in vSphere API 6.7.
STATIC: The IPv4 address is static. This constant was added in vSphere API 6.7.
UNCONFIGURED: The IPv4 protocol is not configured. This constant was added in vSphere API 6.7.

value.ipv4.address string The IPv4 address, for example, "10.20.80.191". This attribute was added in vSphere API 6.7.

Optional. It is only relevant when mode has value [STATIC, DHCP]. This field is optional and it is only relevant when the value of mode is one of STATIC or DHCP.

value.ipv4.prefix long The IPv4 CIDR prefix, for example, 24. See http://www.oav.net/mirrors/cidr.html for netmask-to-prefix conversion. This attribute was added in vSphere API 6.7.

Optional. It is only relevant when mode has value [STATIC, DHCP]. This field is optional and it is only relevant when the value of mode is one of STATIC or DHCP.

value.ipv4.default_gateway string The IPv4 address of the default gateway. This configures the global default gateway on the appliance with the specified gateway address and interface. This gateway replaces the existing default gateway configured on the appliance. However, if the gateway address is link-local, then it is added for that interface. This does not support configuration of multiple global default gateways through different interfaces. This attribute was added in vSphere API 6.7.

Optional. It is only relevant when mode has value [STATIC, DHCP]. This field is optional and it is only relevant when the value of mode is one of STATIC or DHCP.

value.ipv6 info IPv6 Address information. This attribute was added in vSphere API 6.7.

Optional. ipv6 This field will be unset if IPv6 is not enabled.

value.ipv6.dhcp boolean DHCP is on. This attribute was added in vSphere API 6.7.

value.ipv6.autoconf boolean Stateless Address Autoconfiguration (SLAAC) is on. This attribute was added in vSphere API 6.7.

value.ipv6.addresses address_info[] List of addresses with their origins and statuses. This attribute was added in vSphere API 6.7.

value.ipv6.addresses[].origin string The Origin of the IPv6 address. For more information, see RFC 4293. This attribute was added in vSphere API 6.7.

Defines IPv6 address origin values. This enumeration was added in vSphere API 6.7. Value is one of:
DHCP: The IPv6 address is assigned by a DHCP server. See RFC 4293. This constant was added in vSphere API 6.7.
RANDOM: The IPv6 address is assigned randomly by the system. See RFC 4293. This constant was added in vSphere API 6.7.
MANUAL: The IPv6 address was manually configured to a specified address, for example, by user configuration. See RFC 4293. This constant was added in vSphere API 6.7.
LINKLAYER: The IPv6 address is assigned by IPv6 Stateless Address Auto-configuration (SLAAC). See RFC 4293. This constant was added in vSphere API 6.7.
OTHER: The IPv6 address is assigned by a mechanism other than manual, DHCP, SLAAC, or random. See RFC 4293. This constant was added in vSphere API 6.7.

value.ipv6.addresses[].status string The Status of the IPv6 address. For more information, see RFC 4293. This attribute was added in vSphere API 6.7.

Defines IPv6 address status values. See RFC 4293. This enumeration was added in vSphere API 6.7. Value is one of:
TENTATIVE: The IPv6 address is in the process of being verified as unique. An address in this state cannot be used for general communication. It can be used to determine the uniqueness of the address. This constant was added in vSphere API 6.7.
UNKNOWN: The status of this address cannot be determined. This constant was added in vSphere API 6.7.
INACCESSIBLE: The IPv6 address is inaccessible because the interface to which this address is assigned is not operational. This constant was added in vSphere API 6.7.
INVALID: The IPv6 address is not a valid address. It should not appear as the destination or source address of a packet. This constant was added in vSphere API 6.7.
DUPLICATE: The IPv6 address is not unique on the link and cannot be used. This constant was added in vSphere API 6.7.
PREFERRED: This is a valid IPv6 address that can appear as the destination or source address of a packet. This constant was added in vSphere API 6.7.
DEPRECATED: The is a valid but deprecated IPv6 address. This address cannot be used as a source address in new communications, although packets addressed to such an address are processed as expected. This constant was added in vSphere API 6.7.
OPTIMISTIC: The IPv6 address is available for use, subject to restrictions, while its uniqueness on a link is being verified. This constant was added in vSphere API 6.7.

value.ipv6.addresses[].address string The IPv6 address, for example, fc00:10:20:83:20c:29ff:fe94:bb5a. This attribute was added in vSphere API 6.7.

value.ipv6.addresses[].prefix long The IPv6 CIDR prefix, for example, 64. This attribute was added in vSphere API 6.7.

value.ipv6.default_gateway string The default gateway for static IP address assignment. This configures the global IPv6 default gateway on the appliance with the specified gateway address and interface. This gateway replaces the existing default gateway configured on the appliance. However, if the gateway address is link-local, then it is added for that interface. This does not support configuration of multiple global default gateways through different interfaces. This attribute was added in vSphere API 6.7.

value.ipv6.configurable boolean Is NIC configurable or not. This attribute was added in vSphere API 6.7.

Errors:

HTTP Status Code Type Description
404 not_found if the specified interface is not found.
500 error Generic error