PublicIpsResource


Create an ip in a public network


POST https://example.com/api/admin/datacenters/{datacenter}/network/{publicnetwork}/ips

Roles : [ROLE_PHYS_DC_ALLOW_MODIFY_NETWORK]

Content-Type : publicip Accept : publicip

Error Codes

  • VLAN-41 - IP format is invalid
  • VLAN-70 - The IP does not belong to the network
  • VLAN-72 - The requested IP is already created in the network
  • VLAN-73 - The supplied IP format does not match the IP version
  • VLAN-77 - Cannot create unmanaged IPs. Abiquo does not create IPs for unmanaged networks
  • VLAN-78 - Cannot create IPs manually in strict networks

Example

Create multiple ips in a public network


Creates multiple IP addresses for a public network given a first IP and the number of IPs to create.

POST https://example.com/api/admin/datacenters/{datacenter}/network/{publicnetwork}/ips

Roles : [ROLE_PHYS_DC_ALLOW_MODIFY_NETWORK]

Content-Type : ipsbulkcreation Accept : publicips

Error Codes

  • VLAN-70 - The IP does not belong to the network
  • VLAN-72 - The requested IP is already created in the network
  • VLAN-77 - Cannot create unmanaged IPs. Abiquo does not create IPs for unmanaged networks
  • VLAN-78 - Cannot create IPs manually in strict networks
  • VLAN-85 - The requested number of IPs to create is out of range
  • VLAN-86 - Cannot create IPs because too many IPs were requested
  • VLAN-87 - Invalid IPv6 format Caused by: can not parse [::ffff:0.0.10]
  • VLAN-88 - The IP is not within the allowed range of the VLAN
  • VLAN-89 - The literal of the first IP is required

Example

List ips in a external network


GET https://example.com/api/admin/datacenters/{datacenter}/network/{publicnetwork}/ips

Roles : [ROLE_PHYS_DC_RETRIEVE_DETAILS]

Parameter Type Default Value Description
startwith Integer 0 The first element to be retrieved of the filtered search
by String ip How to order the search. Available values are: \{IP, QUARANTINE, MAC, LEASE, VLAN, VIRTUALDATACENTER, VIRTUALMACHINE, VIRTUALAPPLIANCE, ENTERPRISENAME\}
has String If present filter to apply in the search.
ip String If present, filter by IP value
limit Integer 25 The number of entities to retrieve
asc Boolean true If the value of the 'by' parameter must be sorted in ascending order (true) or descending order (false)
available Boolean If true, retrieve available IPs; if false, retrieve unavailable IPs. If not present, retrieve all IPs. By default, this value is not present

Accept : externalips

Error Codes

  • VLAN_61 - The requested IPs are not from an external network

Example

List ips in an unmanaged network


GET https://example.com/api/admin/datacenters/{datacenter}/network/{publicnetwork}/ips

Roles : [ROLE_PHYS_DC_RETRIEVE_DETAILS]

Parameter Type Default Value Description
startwith Integer 0 The first element to be retrieved of the filtered search
by String ip How to order the search. Available values are: \{IP, QUARANTINE, MAC, LEASE, VLAN, VIRTUALDATACENTER, VIRTUALMACHINE, VIRTUALAPPLIANCE, ENTERPRISENAME\}
has String If present filter to apply in the search.
ip String If present, filter by IP value
limit Integer 25 The number of entities to retrieve
asc Boolean true If the value of the 'by' parameter must be sorted in ascending order (true) or descending order (false)
available Boolean If present, retrieve available IPs; If false, retrieve unavailable IPs. If not present, retrieve all IPs. By default, this value is not present

Accept : unmanagedips

Error Codes

  • VLAN_62 - The requested IPs are not from an unmanaged network

Example

List ips in public network


GET https://example.com/api/admin/datacenters/{datacenter}/network/{publicnetwork}/ips

Roles : [ROLE_PHYS_DC_RETRIEVE_DETAILS]

Parameter Type Default Value Description
startwith Integer 0 The first element to be retrieved of the filtered search
by String ip How to order the search. Available values are: \{IP, QUARANTINE, MAC, LEASE, VLAN, VIRTUALDATACENTER, VIRTUALMACHINE, VIRTUALAPPLIANCE, ENTERPRISENAME\}
has String If present filter to apply in the search.
ip String If present, filter by IP value
limit Integer 25 The number of entities to retrieve
asc Boolean true If the value of the 'by' parameter must be sorted in ascending order (true) or descending order (false)
available Boolean If true, retrieve available IPs; if false, retrieve unavailable IPs If not present, retrieve all IPs. By default, this value is not present

Accept : publicips

Error Codes

  • VLAN_63 - The requested IPs are not from a public network

Example

Update multiple ips in a public network


Update a list of IPs from a public VLAN. You can only change the 'available' and 'quarantine' attributes

PUT https://example.com/api/admin/datacenters/{datacenter}/network/{publicnetwork}/ips

Roles : [ROLE_PHYS_DC_ALLOW_MODIFY_NETWORK]

Content-Type : publicips

Example

Update multiple ips in an external network


Update a list of IPs from a public VLAN. You can only change the 'available' and 'quarantine' attributes

PUT https://example.com/api/admin/datacenters/{datacenter}/network/{publicnetwork}/ips

Roles : [ROLE_PHYS_DC_ALLOW_MODIFY_NETWORK]

Content-Type : externalips

Example

Disable multiple ips in a public or external network


Make multiple IPs unavailable in a public or external network. Accepts lists of IPs separated by commas and/or ranges of IPs separated by a dash.

POST https://example.com/api/admin/datacenters/{datacenter}/network/{publicnetwork}/ips/action/disable

Roles : [ROLE_PHYS_DC_ALLOW_MODIFY_NETWORK]

Content-Type : ipliterals

Example

Disable all ips in a public or external network


Make all IPs unavailable in a public or external network.

POST https://example.com/api/admin/datacenters/{datacenter}/network/{publicnetwork}/ips/action/disableall

Roles : [ROLE_PHYS_DC_ALLOW_MODIFY_NETWORK]

Example

Enable multiple ips in a public or external network


Make multiple IPs available in a public or external network. Accepts lists of IPs separated by commas and/or ranges of IPs separated by a dash.

POST https://example.com/api/admin/datacenters/{datacenter}/network/{publicnetwork}/ips/action/enable

Roles : [ROLE_PHYS_DC_ALLOW_MODIFY_NETWORK]

Content-Type : ipliterals

Example

Enable all ips in a public or external network


Make all IPs available in a public or external network.

POST https://example.com/api/admin/datacenters/{datacenter}/network/{publicnetwork}/ips/action/enableall

Roles : [ROLE_PHYS_DC_ALLOW_MODIFY_NETWORK]

Example

Quarantine multiple ips in a public or external network


Put multiple IPs in a public or external network into quarantine. Accepts lists of IPs separated by commas and/or ranges of IPs separated by a dash. To quarantine all the IPs in the network, supply an empty collection

POST https://example.com/api/admin/datacenters/{datacenter}/network/{publicnetwork}/ips/action/quarantine

Roles : [ROLE_PHYS_DC_ALLOW_MODIFY_NETWORK]

Content-Type : ipliterals

Example

Remove quarantine of multiple ips in a public or external network


Remove multiple IPs in a public or external network from quarantine. Accepts lists of IPs separated by commas and/or ranges of IPs separated by a dash. To release all IPs in the network from quarantine, supply an empty collection

POST https://example.com/api/admin/datacenters/{datacenter}/network/{publicnetwork}/ips/action/removequarantine

Roles : [ROLE_PHYS_DC_ALLOW_MODIFY_NETWORK]

Content-Type : ipliterals

Example

Delete an ip from public external or unmanaged network


You cannot delete an IP if it is in use, for example, assigned to a VDC or attached to a VM

DELETE https://example.com/api/admin/datacenters/{datacenter}/network/{publicnetwork}/ips/{ip}

Roles : [ROLE_PHYS_DC_ALLOW_MODIFY_NETWORK]

Example

Get an ip from a publi network


GET https://example.com/api/admin/datacenters/{datacenter}/network/{publicnetwork}/ips/{ip}

Roles : [ROLE_PHYS_DC_RETRIEVE_DETAILS]

Accept : publicip

Error Codes

  • VLAN_66 - The requested IP is not from a public network

Example

Get an ip from an external network


GET https://example.com/api/admin/datacenters/{datacenter}/network/{publicnetwork}/ips/{ip}

Roles : [ROLE_PHYS_DC_RETRIEVE_DETAILS]

Accept : externalip

Error Codes

  • VLAN_64 - The requested IP is not from an external network

Example

Get an ip from an unmanaged network


GET https://example.com/api/admin/datacenters/{datacenter}/network/{publicnetwork}/ips/{ip}

Roles : [ROLE_PHYS_DC_RETRIEVE_DETAILS]

Accept : unmanagedip

Error Codes

  • VLAN_65 - The requested IP is not from an unmanaged network

Example

Update an ip in a public network


You can only change the 'quarantine' or 'available' attributes

PUT https://example.com/api/admin/datacenters/{datacenter}/network/{publicnetwork}/ips/{ip}

Roles : [ROLE_PHYS_DC_ALLOW_MODIFY_NETWORK]

Content-Type : publicip Accept : publicip

Error Codes

  • VLAN-32 - Cannot set the IP as 'not available' while it is purchased by an enterprise

Example

Update an ip in an external network


You can only change the 'quarantine' or 'available' attributes

PUT https://example.com/api/admin/datacenters/{datacenter}/network/{publicnetwork}/ips/{ip}

Roles : [ROLE_PHYS_DC_ALLOW_MODIFY_NETWORK]

Content-Type : externalip Accept : externalip

Error Codes

  • VLAN-83 - Cannot set the IP as 'not available' while it is attached to a virtual machine

Example