Retrieve details for all subnets
Retrieves detailed information about all subnets, which is useful for managing network configurations and understanding the layout of your network resources.
HTTP method and endpoint
GET /network/ip/subnets
Introduced in
ONTAP 9.11
Usage notes
Retrieves details for all subnets.
Related ONTAP Commands
-
network subnet show
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
ipspace.uuid |
string |
query |
False |
Filter by ipspace.uuid |
ipspace.name |
string |
query |
False |
Filter by ipspace.name |
name |
string |
query |
False |
Filter by name |
gateway |
string |
query |
False |
Filter by gateway |
uuid |
string |
query |
False |
Filter by uuid |
subnet.family |
string |
query |
False |
Filter by subnet.family |
subnet.netmask |
string |
query |
False |
Filter by subnet.netmask |
subnet.address |
string |
query |
False |
Filter by subnet.address |
total_count |
integer |
query |
False |
Filter by total_count |
used_count |
integer |
query |
False |
Filter by used_count |
available_ip_ranges.end |
string |
query |
False |
Filter by available_ip_ranges.end |
available_ip_ranges.start |
string |
query |
False |
Filter by available_ip_ranges.start |
available_ip_ranges.family |
string |
query |
False |
Filter by available_ip_ranges.family |
ip_ranges.end |
string |
query |
False |
Filter by ip_ranges.end |
ip_ranges.start |
string |
query |
False |
Filter by ip_ranges.start |
ip_ranges.family |
string |
query |
False |
Filter by ip_ranges.family |
available_count |
integer |
query |
False |
Filter by available_count |
broadcast_domain.name |
string |
query |
False |
Filter by broadcast_domain.name |
broadcast_domain.uuid |
string |
query |
False |
Filter by broadcast_domain.uuid |
fields |
array[string] |
query |
False |
Specify the fields to return. |
max_records |
integer |
query |
False |
Limit the number of records returned. |
return_records |
boolean |
query |
False |
The default is true for GET calls. When set to false, only the number of records is returned.
|
return_timeout |
integer |
query |
False |
The number of seconds to allow the call to execute before returning. When iterating over a collection, the default is 15 seconds. ONTAP returns earlier if either max records or the end of the collection is reached.
|
order_by |
array[string] |
query |
False |
Order results by specified fields and optional [asc |
Response
Status: 200, Ok
| Name | Type | Description |
|---|---|---|
_links |
||
num_records |
integer |
Number of records |
records |
array[ip_subnet] |
Example response
{
"_links": {
"next": {
"href": "/api/resourcelink"
},
"self": {
"href": "/api/resourcelink"
}
},
"num_records": 1,
"records": [
{
"_links": {
"self": {
"href": "/api/resourcelink"
}
},
"available_count": 0,
"available_ip_ranges": [
{
"end": "10.10.10.7",
"family": "string",
"start": "10.10.10.7"
}
],
"broadcast_domain": {
"_links": {
"self": {
"href": "/api/resourcelink"
}
},
"name": "bd1",
"uuid": "1cd8a442-86d1-11e0-ae1c-123478563412"
},
"fail_if_lifs_conflict": true,
"gateway": "10.1.1.1",
"ip_ranges": [
{
"end": "10.10.10.7",
"family": "string",
"start": "10.10.10.7"
}
],
"ipspace": {
"_links": {
"self": {
"href": "/api/resourcelink"
}
},
"name": "Default",
"uuid": "1cd8a442-86d1-11e0-ae1c-123478563412"
},
"name": "subnet1",
"subnet": {
"address": "10.10.10.7",
"family": "string",
"netmask": "24"
},
"total_count": 0,
"used_count": 0,
"uuid": "1cd8a442-86d1-11e0-ae1c-123478563412"
}
]
}
Error
Status: Default, Error
| Name | Type | Description |
|---|---|---|
error |
Example error
{
"error": {
"arguments": [
{
"code": "string",
"message": "string"
}
],
"code": "4",
"message": "entry doesn't exist",
"target": "uuid"
}
}
Definitions
See Definitions
href
| Name | Type | Description |
|---|---|---|
href |
string |
_links
| Name | Type | Description |
|---|---|---|
next |
||
self |
_links
| Name | Type | Description |
|---|---|---|
self |
ip_address_range
IP address range
| Name | Type | Description |
|---|---|---|
end |
string |
IPv4 or IPv6 address |
family |
string |
IPv4 or IPv6 |
start |
string |
IPv4 or IPv6 address |
broadcast_domain
The broadcast domain that the subnet is associated with. Either the UUID or name must be supplied on POST.
| Name | Type | Description |
|---|---|---|
_links |
||
name |
string |
Name of the broadcast domain, scoped to its IPspace |
uuid |
string |
Broadcast domain UUID |
ipspace
The IPspace that the subnet is associated with. Either the UUID or name must be supplied on POST.
| Name | Type | Description |
|---|---|---|
_links |
||
name |
string |
IPspace name |
uuid |
string |
IPspace UUID |
ip_info
IP information
| Name | Type | Description |
|---|---|---|
address |
string |
IPv4 or IPv6 address |
family |
string |
IPv4 or IPv6 |
netmask |
string |
Input as netmask length (16) or IPv4 mask (255.255.0.0). For IPv6, the default value is 64 with a valid range of 1 to 127. Output is always the netmask length. |
ip_subnet
| Name | Type | Description |
|---|---|---|
_links |
||
available_count |
integer |
|
available_ip_ranges |
array[ip_address_range] |
|
broadcast_domain |
The broadcast domain that the subnet is associated with. Either the UUID or name must be supplied on POST. |
|
gateway |
string |
The IP address of the gateway for this subnet. |
ip_ranges |
array[ip_address_range] |
|
ipspace |
The IPspace that the subnet is associated with. Either the UUID or name must be supplied on POST. |
|
name |
string |
Subnet name |
subnet |
IP information |
|
total_count |
integer |
|
used_count |
integer |
|
uuid |
string |
The UUID that uniquely identifies the subnet. |
error_arguments
| Name | Type | Description |
|---|---|---|
code |
string |
Argument code |
message |
string |
Message argument |
returned_error
| Name | Type | Description |
|---|---|---|
arguments |
array[error_arguments] |
Message arguments |
code |
string |
Error code |
message |
string |
Error message |
target |
string |
The target parameter that caused the error. |