appliance networking interfaces ipv4: get
Get IPv4 network configuration for specific NIC. This operation was added in vSphere API 6.7.
Request:
HTTP request
GET https://{server}/rest/appliance/networking/interfaces/{interface_name}/ipv4
Path Parameters
Name | Type | Description |
---|---|---|
Required | ||
interface_name | string | The Network interface to query, for example, "nic0". |
Response:
HTTP Status Code: 200
Representation:
{
"value" : {
"mode" : "DHCP",
"default_gateway" : "string",
"address" : "string",
"prefix" : 1,
"configurable" : true
}
}
"value" : {
"mode" : "DHCP",
"default_gateway" : "string",
"address" : "string",
"prefix" : 1,
"configurable" : true
}
}
Response Type:
Name | Type | Description |
---|---|---|
bold = required | ||
value | info | The IPv4 configuration for the queried NIC. |
value.configurable | boolean | The specified network interface is configurable or not. This attribute was added in vSphere API 6.7. |
value.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.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.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.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. |
Errors:
HTTP Status Code | Type | Description |
---|---|---|
404 | not_found | if the specified NIC is not found. |
500 | error | Generic error. |