Skip to main content
A newer release of this product is available.

Retrieve details for all subnets

Contributors

GET /network/ip/subnets

Introduced In: 9.11

Retrieves details for all subnets.

  • network subnet show

Parameters

Name Type In Required Description

used_count

integer

query

False

Filter by used_count

broadcast_domain.name

string

query

False

Filter by broadcast_domain.name

broadcast_domain.uuid

string

query

False

Filter by broadcast_domain.uuid

name

string

query

False

Filter by name

uuid

string

query

False

Filter by uuid

gateway

string

query

False

Filter by gateway

subnet.netmask

string

query

False

Filter by subnet.netmask

subnet.address

string

query

False

Filter by subnet.address

subnet.family

string

query

False

Filter by subnet.family

available_ip_ranges.start

string

query

False

Filter by available_ip_ranges.start

available_ip_ranges.end

string

query

False

Filter by available_ip_ranges.end

available_ip_ranges.family

string

query

False

Filter by available_ip_ranges.family

ip_ranges.start

string

query

False

Filter by ip_ranges.start

ip_ranges.end

string

query

False

Filter by ip_ranges.end

ip_ranges.family

string

query

False

Filter by ip_ranges.family

ipspace.name

string

query

False

Filter by ipspace.name

ipspace.uuid

string

query

False

Filter by ipspace.uuid

total_count

integer

query

False

Filter by total_count

available_count

integer

query

False

Filter by available_count

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.

  • Default value: 1

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.

  • Default value: 1

  • Max value: 120

  • Min value: 0

order_by

array[string]

query

False

Order results by specified fields and optional [asc

Response

Status: 200, Ok
Name Type Description

_links

_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"
      },
      "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": "exchange",
        "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

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

Name Type Description

next

href

self

href

Name Type Description

self

href

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

_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

_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 netmask length.

ip_subnet

Name Type Description

_links

_links

available_count

integer

available_ip_ranges

array[ip_address_range]

broadcast_domain

broadcast_domain

The broadcast domain that the subnet is associated with. Either the UUID or name must be supplied on POST.

fail_if_lifs_conflict

boolean

This action will fail if any existing interface is using an IP address in the ranges provided. Set this to false to associate any manually addressed interfaces with the subnet and allow the action to succeed.

gateway

string

The IP address of the gateway for this subnet.

ip_ranges

array[ip_address_range]

ipspace

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_info

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

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.