REST API - list

vcenter vm guest networking interfaces: list

Returns information about the networking interfaces in the guest operating system. This operation was added in vSphere API 7.0.0.

Request:

HTTP request

GET https://{server}/rest/vcenter/vm/{vm}/guest/networking/interfaces

Path Parameters

Name Type Description
Required
vm string Virtual machine ID.

Response:

HTTP Status Code: 200

Representation:

{
    "value"[
        {
            "mac_address""string",
            "ip"{
                "ip_addresses"[
                    {
                        "origin""OTHER",
                        "ip_address""string",
                        "prefix_length"1,
                        "state""PREFERRED"
                    },
                    {
                        "origin""OTHER",
                        "ip_address""string",
                        "prefix_length"1,
                        "state""PREFERRED"
                    }
                ],
                "dhcp"{
                    "ipv6_enabled"true,
                    "ipv4_enabled"true
                }
            },
            "dns"{
                "ip_addresses"[
                    "string",
                    "string"
                ],
                "search_domains"[
                    "string",
                    "string"
                ]
            },
            "wins_servers"[
                "string",
                "string"
            ],
            "nic""obj-103",
            "dns_values"{
                "domain_name""string",
                "host_name""string"
            }
        },
        {
            "mac_address""string",
            "ip"{
                "ip_addresses"[
                    {
                        "origin""OTHER",
                        "ip_address""string",
                        "prefix_length"1,
                        "state""PREFERRED"
                    },
                    {
                        "origin""OTHER",
                        "ip_address""string",
                        "prefix_length"1,
                        "state""PREFERRED"
                    }
                ],
                "dhcp"{
                    "ipv6_enabled"true,
                    "ipv4_enabled"true
                }
            },
            "dns"{
                "ip_addresses"[
                    "string",
                    "string"
                ],
                "search_domains"[
                    "string",
                    "string"
                ]
            },
            "wins_servers"[
                "string",
                "string"
            ],
            "nic""obj-103",
            "dns_values"{
                "domain_name""string",
                "host_name""string"
            }
        }
    ]
}

Response Type:

Name Type Description
bold = required
value info[] Information about the interfaces configured in the guest operating system. Interfaces are ordered in a guest operating system specific determined order.
value[].dns_values dns_assigned_values Client DNS values. Data assigned by DNS. This attribute was added in vSphere API 7.0.0.

Optional. If unset no DNS assigned value exists.

value[].dns_values.host_name string The host name portion of DNS name. For example, "esx01" part of esx01.example.com. This attribute was added in vSphere API 7.0.0.

value[].dns_values.domain_name string The domain name portion of the DNS name. "example.com" part of esx01.example.com. This attribute was added in vSphere API 7.0.0.

value[].mac_address string MAC address of the adapter. This attribute was added in vSphere API 7.0.0.

Optional. If unset then not supported by the Guest OS.

Errors:

HTTP Status Code Type Description
500 error if the system reports an error while responding to the request.
404 not_found if the virtual machine is not found.
503 service_unavailable if VMware Tools is not running.