IP Address API Reference

Changed in version 3.2.2: The following methods are not available anymore : hosting.ip.create, hosting.ip.delete

Methods

hosting.ip.count(apikey[, opts=nil])

Count IP addresses.

Parameters:
Returns:

int – number of IPs

hosting.ip.info(apikey, ip_id)

Get information about an IP Address.

Parameters:
  • apikey (string) – API connection key
  • ip_id (int) – IP unique identifier
Returns:

struct – IP Address information

hosting.ip.list(apikey[, opts=nil])

List IP addresses.

Parameters:
Returns:

struct – list of IP descriptions

hosting.ip.update(apikey, ip_id, ip_spec)
Update an IP address using the attributes specified by ip_spec
Parameters:
Returns:

struct – ip_update operation

Parameters

IP

parameter of hosting.ip.info(), hosting.ip.update(), ip.info() and ip.update()

IPCountOptions

parameter of hosting.ip.count() and ip.count()

Name Default Type Mandatory
datacenter_id   int or array of int no
id of the datacenter where the IP is available
id   int or array of int no
unique identifier of the IP
iface_id   int or array of int no
id of the interface the ip is attached to
ip   array of string or string no
num   int or array of int no
number of IP in the interface
reverse   array of string or string no
hostname in the PTR record of the IP Address
state   string no
status of the IP
version   string no
IP Protocol Version
vm_hostname   array of string or string no
~vm_hostname   string no
IPListOptions

parameter of hosting.ip.list() and ip.list()

Name Default Type Mandatory
datacenter_id   int or array of int no
id of the datacenter where the IP is available
id   int or array of int no
unique identifier of the IP
iface_id   int or array of int no
id of the interface the ip is attached to
ip   array of string or string no
items_per_page 100 int no
number of items returned for the pagination
num   int or array of int no
number of IP in the interface
page 0 int no
page number for pagination offset
reverse   array of string or string no
hostname in the PTR record of the IP Address
sort_by   string no
used to sort returned items: datacenter_id, id, iface_id, ip, num, reverse, state, version, vm_hostname
state   string no
status of the IP
version   string no
IP Protocol Version
vm_hostname   array of string or string no
~vm_hostname   string no
IPUpdate

parameter of hosting.ip.update() and ip.update()

Name Default Type Mandatory
reverse   string yes
hostname in the PTR record of the IP Address

Returns