ServerMania logo

Get List of IP Addresses for VS

To get the list of IP address assignments for a particular VS, use the following request:

GET /virtual_machines/:virtual_machine_id/ip_addresses.xml
GET /virtual_machines/:virtual_machine_id/ip_addresses.json

XML Request Example

curl -i -X GET -H 'Accept: application/xml' -H 'Content-type: application/xml' -u user:userpass --url http://test/virtual_machines/12/ip_addresses.xml

JSON Request Example

curl -i -X GET -H 'Accept: application/json' -H 'Content-type: application/json' -u user:userpass --url http://test/virtual_machines/12/ip_addresses.json

XML Output Example

  <ip_address_joins type="array">
	  <id type="integer">323</id>
	  <ip_address_id type="integer">5525</ip_address_id>
	  <network_interface_id type="integer">267</network_interface_id>
	  <created_at type="datetime">2011-07-19T12:29:10Z</created_at>
	  <updated_at type="datetime">2011-07-19T12:29:10Z</updated_at>
		<id type="integer">5525</id>
		<prefix type="integer">24</prefix>
		<created_at type="dateTime">2018-05-23T14:29:12+00:00</created_at>
		<updated_at type="dateTime">2018-05-23T14:29:12+00:00</updated_at>
		<ipv4 type="boolean">true</ipv4>
		<user_id nil="true"/>
		<pxe type="boolean">false</pxe>
		<hypervisor_id nil="true"/>
		<ip_range_id type="integer">308</ip_range_id>
		<network_id type="integer">261</network_id>
		<ip_net_id type="integer">206</ip_net_id>


ip_address_joins – an array of all IP addresses, assigned to VS

id – the ID of the IP address join

ip_address _id – ID of an IP address

created_at – the date when the record was created in the [YYYY][MM][DD]T[hh][mm][ss] format

updated_at – the date when the record was updated in the [YYYY][MM][DD]T[hh][mm][ss] format

ip_address – an array of an IP address assigned to VS

id – the ID of the IP address

address – the IP address

prefix – the prefix of the IP address

broadcast – the broadcast address

network_address – the address of the network

gateway – the gateway address

created_at – the date when the record was created in the [YYYY][MM][DD]T[hh][mm][ss] format

updated_at – the date when the record was updated in the [YYYY][MM][DD]T[hh][mm][ss] format

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

pxe – true, if this address can be used for cloudbooting a compute resource

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

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

network_id – the ID of the network

ip_net_id – the ID of the IP net the IP address is associated with