Get List of IP Addresses in IP Range

To view the list of the IP addresses in an IP range, use the following request:

GET /settings/networks/:network_id/ip_nets/:ip_net_id/ip_ranges/:ip_range_id/ip_addresses.xml
GET /settings/networks/:network_id/ip_nets/:ip_net_id/ip_ranges/:ip_range_id/ip_addresses.json

This API request returns only those IP addresses that are assigned to a VS and/or a user.

XML Request Example

curl -i -X GET -u user:userpass --url http://onapp.test/settings/networks/24/ip_nets/12/ip_ranges/46/ip_addresses.xml -H 'Accept: application/xml' -H 'Content-type: application/xml'

JSON Request Example

curl -i -X GET -u user:userpass --url http://onapp.test/settings/networks/24/ip_nets/12/ip_ranges/46/ip_addresses.xml -H 'Accept: application/json' -H 'Content-type: application/json'

XML Output Example

<ip_addresses type="array">
  <ip_address>
    <id type="integer">1215</id>
    <address>169.0.0.2</address>
    <prefix type="integer">24</prefix>
    <broadcast>169.0.0.255</broadcast>
    <network_address>169.0.0.0</network_address>
    <gateway>169.0.0.1</gateway>
    <created_at type="dateTime">2017-03-31T09:41:56+03:00</created_at>
    <updated_at type="dateTime">2017-03-31T09:41:56+03:00</updated_at>
    <network_id>24</network_id>
    <disallowed_primary type="boolean">false</disallowed_primary>
    <ipv4 type="boolean">true</ipv4>
    <user_id nil="true"/>
    <hypervisor_id nil="true"/>
    <ip_address_pool_id nil="true"/>
    <ip_range_id type="integer">46</ip_range_id>
  </ip_address>
  <ip_address>...</ip_address>
</ip_addresses>

Where:

id - the ID of the IP address

address – IP address

prefix - the prefix of the IP address

broadcast – broadcast address

network_address – the address of the network

gateway – gateway address

created_at — the date in the [YYYY][MM][DD]T[hh][mm][ss]Z format

updated_at — the date in the [YYYY][MM][DD]T[hh][mm][ss]Z format

network_id –the ID of the network

disallowed_primary – true if not allowed to be used as primary, otherwise false

customer_network_id - the ID of the customer VLAN the IP address belongs to

ipv4 - whether this is an IPv4 or and IPv6 IP address: `true` for IPv4 IPs and `false` for IPv6 IPs

user_id - the ID of a user the IP address is associated with

hypervisor_id - the ID of a compute resource the IP address is associated with

ip_address_pool_id - ID of the IP address pool the IP address is associated with

ip_range_id - ID of the IP range the IP address is associated with