Floating IPs API v2

Floating IP API

This API can be used to manage your Floating IP Ranges and definitions

GEThttps://api.leaseweb.com/floatingIps/v2/ranges
REQUEST EXAMPLE
curl --request GET \
  --url https://api.leaseweb.com/floatingIps/v2/ranges \
  --header 'X-Lsw-Auth: 213423-2134234-234234-23424'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.leaseweb.com/floatingIps/v2/ranges",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "X-Lsw-Auth: 213423-2134234-234234-23424"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import http.client

conn = http.client.HTTPSConnection("api.leaseweb.com")

headers = { 'X-Lsw-Auth': "213423-2134234-234234-23424" }

conn.request("GET", "/floatingIps/v2/ranges", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://api.leaseweb.com/floatingIps/v2/ranges")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["X-Lsw-Auth"] = '213423-2134234-234234-23424'

response = http.request(request)
puts response.read_body
RESPONSE EXAMPLE
200 OK
{
  "ranges": [
    {
      "id": "88.17.0.0_17",
      "range": "88.17.0.0/17",
      "customerId": "10001234",
      "salesOrgId": "2000",
      "pop": "AMS-01"
    },
    {
      "id": "85.17.0.0_17",
      "range": "85.17.0.0/17",
      "customerId": "10001234",
      "salesOrgId": "2000",
      "pop": "AMS-01"
    },
    {
      "id": "86.17.0.0_17",
      "range": "86.17.0.0/17",
      "customerId": "10001234",
      "salesOrgId": "2000",
      "pop": "AMS-01"
    }
  ],
  "_metadata": {
    "limit": 20,
    "offset": 0,
    "totalCount": 3
  }
}

GETList all Floating IP Ranges

Using this API you can list all your Floating IP Ranges. A Floating IP Range is bound to a particular site, or datacenter (also known as pop).

If you have services in multiple data centers and want to use the floating IP feature in each of those locations you will need to order a range per site.


The following query string parameters are available:

Name Example Description
limit 10 Limit the number of results returned
offset 10 Return results starting from the given offset

The following properties describe the response:

Name Type Description
ranges array Collection of Floating IP Ranges
id string The ID of the range
range string CIDR representation of the range
customerId string ID of the customer associated with this range
salesOrgId string Sales Org ID of the customer associated with this range
pop string PoP of the range
_metadata object Metadata about the collection
limit integer The maximum number of results returned
offset integer Results are returned started at the given offset
totalCount integer The total number of results
GEThttps://api.leaseweb.com/floatingIps/v2/ranges/88.17.0.0_17
REQUEST EXAMPLE
curl --request GET \
  --url https://api.leaseweb.com/floatingIps/v2/ranges/88.17.0.0_17 \
  --header 'X-Lsw-Auth: 213423-2134234-234234-23424'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.leaseweb.com/floatingIps/v2/ranges/88.17.0.0_17",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "X-Lsw-Auth: 213423-2134234-234234-23424"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import http.client

conn = http.client.HTTPSConnection("api.leaseweb.com")

headers = { 'X-Lsw-Auth': "213423-2134234-234234-23424" }

conn.request("GET", "/floatingIps/v2/ranges/88.17.0.0_17", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://api.leaseweb.com/floatingIps/v2/ranges/88.17.0.0_17")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["X-Lsw-Auth"] = '213423-2134234-234234-23424'

response = http.request(request)
puts response.read_body
RESPONSE EXAMPLE
200 OK
{
  "id": "88.17.0.0_17",
  "range": "88.17.0.0/17",
  "customerId": "10001234",
  "salesOrgId": "2000",
  "pop": "AMS-01"
}

GETGet a range by ID

This API gives you a single Floating IP Range.

A Floating IP Range is identified by is network IP and the prefix length, seperated by a underscore; for example 10.0.0.0_29.

Be aware that every IP address of a Floating IP Range is usable and routable. A Floating IP Range does not have a network IP, broadcast IP or gateway IP.

So for every IP in the range you can create a Floating IP Definition.


The following properties describe the response:

Name Type Description
id string The ID of the range
range string CIDR representation of the range
customerId string ID of the customer associated with this range
salesOrgId string Sales Org ID of the customer associated with this range
pop string PoP of the range
GEThttps://api.leaseweb.com/floatingIps/v2/ranges/88.17.0.0_17/floatingIpDefinitions
REQUEST EXAMPLE
curl --request GET \
  --url https://api.leaseweb.com/floatingIps/v2/ranges/88.17.0.0_17/floatingIpDefinitions \
  --header 'X-Lsw-Auth: 213423-2134234-234234-23424'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.leaseweb.com/floatingIps/v2/ranges/88.17.0.0_17/floatingIpDefinitions",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "X-Lsw-Auth: 213423-2134234-234234-23424"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import http.client

conn = http.client.HTTPSConnection("api.leaseweb.com")

headers = { 'X-Lsw-Auth': "213423-2134234-234234-23424" }

conn.request("GET", "/floatingIps/v2/ranges/88.17.0.0_17/floatingIpDefinitions", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://api.leaseweb.com/floatingIps/v2/ranges/88.17.0.0_17/floatingIpDefinitions")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["X-Lsw-Auth"] = '213423-2134234-234234-23424'

response = http.request(request)
puts response.read_body
RESPONSE EXAMPLE
200 OK
{
    "floatingIpDefinitions": [
        {
            "id": "88.17.34.108_32",
            "rangeId": "88.17.0.0_17",
            "pop": "AMS-01",
            "customerId": "10001234",
            "salesOrgId": "2000",
            "floatingIp": "88.17.34.108/32",
            "anchorIp": "95.10.126.1",
            "status": "ACTIVE",
            "createdAt": "2019-03-13T09:10:02+0000",
            "updatedAt": "2019-03-13T09:10:02+0000"
        },
        {
            "id": "88.17.34.109_32",
            "rangeId": "88.17.0.0_17",
            "pop": "AMS-01",
            "customerId": "10001234",
            "salesOrgId": "2000",
            "floatingIp": "88.17.34.109/32",
            "anchorIp": "95.10.126.12",
            "status": "ACTIVE",
            "createdAt": "2019-03-13T09:10:02+0000",
            "updatedAt": "2019-03-13T09:10:02+0000"
        },
        {
            "id": "88.17.34.110_32",
            "rangeId": "88.17.0.0_17",
            "pop": "AMS-01",
            "customerId": "10001234",
            "salesOrgId": "2000",
            "floatingIp": "88.17.34.110/32",
            "anchorIp": "95.10.126.11",
            "status": "ACTIVE",
            "createdAt": "2019-03-13T09:10:02+0000",
            "updatedAt": "2019-03-13T09:10:02+0000"
        }
    ],
    "_metadata": {
        "limit": 20,
        "offset": 0,
        "totalCount": 3
    }
}

GETGet all Floating IP Definitions in a range

This API lists all the Floating IP Definitions that belong to the Floating IP Range.

A Floating IP Definition describes a mapping between one or more Floating IPs (a.k.a Floating IP) to an Anchor IP. Traffic destined for all the Floating IPs will be rerouted to the Anchor IP. The Anchor IP is an ip address that belongs to a service you have with Leaseweb. At this moment only Dedicated Servers, Private Racks and Colocations are supported.


The following query string parameters are available:

Name Example Description
limit 10 Limit the number of results returned
offset 10 Return results starting from the given offset

The following properties describe the response:

Name Type Description
floatingIpDefinitions array Collection of Floating IP Definitions
id string The ID of this Floating IP Definition
rangeId string The ID of the range to which this Floating IP belongs
pop string The PoP ID of this Floating IP
customerId string The ID of the customer associated with this Floating IP
salesOrgId string Sales Org ID of the customer associated with this Floating IP
floatingIp string The Floating IP address
anchorIp string The Anchor IP address
status string Status of the Floating IP Definition (Allowed values: ACTIVE,CREATING,UPDATING,REMOVING)
createdAt string Date timestamp when the resource was created
updatedAt string Date timestamp when the resource was updated
_metadata object Metadata about the collection
limit integer The maximum number of results returned
offset integer Results are returned started at the given offset
totalCount integer The total number of results
POSThttps://api.leaseweb.com/floatingIps/v2/ranges/88.17.0.0_17/floatingIpDefinitions
REQUEST EXAMPLE
curl --request POST \
  --url https://api.leaseweb.com/floatingIps/v2/ranges/88.17.0.0_17/floatingIpDefinitions \
  --header 'X-Lsw-Auth: 213423-2134234-234234-23424' \
  --header 'content-type: application/json' \
  --data '{
    "floatingIp": "88.17.0.5/32",
    "anchorIp": "95.10.126.1"
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.leaseweb.com/floatingIps/v2/ranges/88.17.0.0_17/floatingIpDefinitions",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{    \"floatingIp\": \"88.17.0.5/32\",    \"anchorIp\": \"95.10.126.1\"}",
  CURLOPT_HTTPHEADER => array(
    "X-Lsw-Auth: 213423-2134234-234234-23424",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import http.client

conn = http.client.HTTPSConnection("api.leaseweb.com")

payload = "{    \"floatingIp\": \"88.17.0.5/32\",    \"anchorIp\": \"95.10.126.1\"}"

headers = {
    'X-Lsw-Auth': "213423-2134234-234234-23424",
    'content-type': "application/json"
    }

conn.request("POST", "/floatingIps/v2/ranges/88.17.0.0_17/floatingIpDefinitions", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://api.leaseweb.com/floatingIps/v2/ranges/88.17.0.0_17/floatingIpDefinitions")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["X-Lsw-Auth"] = '213423-2134234-234234-23424'
request["content-type"] = 'application/json'
request.body = "{    \"floatingIp\": \"88.17.0.5/32\",    \"anchorIp\": \"95.10.126.1\"}"

response = http.request(request)
puts response.read_body
RESPONSE EXAMPLE
200 OK
{
    "id": "88.17.34.108_32",
    "rangeId": "88.17.0.0_17",
    "pop": "AMS-01",
    "customerId": "10001234",
    "salesOrgId": "2000",
    "floatingIp": "88.17.34.108/32",
    "anchorIp": "95.10.126.1",
    "status": "ACTIVE",
    "createdAt": "2019-03-13T09:10:02+0000",
    "updatedAt": "2019-03-13T09:10:02+0000"
}

POSTCreate a new Floating IP Definition

This API allows you to create a new Floating IP Definition.

When a Floating IP Definition is created, the Floating IP address is then made to route all traffic to the Anchor IP address, Hence all services on the server become reachable via the Floating IP. This works in the background by maintaining BGP sessions in each site which announce the Floating IP routes through the border routers.

Floating IP addresses which do not have an Anchor IP address have no route, and are thus effectively nullrouted.

How to configure Floating IPs on a server

On the server, Floating IPs should be setup like any other additional IP address. However, the same Floating IP will have to be setup on all servers that you want to be able to route it to.

Note: Currently, Floating IPs does not work on VPS or Cloud servers.


The following properties should be part of the request:

Name Type Required Description
floatingIp string false The Floating IP address
anchorIp string false The Anchor IP address

The following properties describe the response:

Name Type Description
id string The ID of this Floating IP Definition
rangeId string The ID of the range to which this Floating IP belongs
pop string The PoP ID of this Floating IP
customerId string The ID of the customer associated with this Floating IP
salesOrgId string Sales Org ID of the customer associated with this Floating IP
floatingIp string The Floating IP address
anchorIp string The Anchor IP address
status string Status of the Floating IP Definition (Allowed values: ACTIVE,CREATING,UPDATING,REMOVING)
createdAt string Date timestamp when the resource was created
updatedAt string Date timestamp when the resource was updated
GEThttps://api.leaseweb.com/floatingIps/v2/ranges/88.17.0.0_17/floatingIpDefinitions/88.17.34.108_32
REQUEST EXAMPLE
curl --request GET \
  --url https://api.leaseweb.com/floatingIps/v2/ranges/88.17.0.0_17/floatingIpDefinitions/88.17.34.108_32 \
  --header 'X-Lsw-Auth: 213423-2134234-234234-23424'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.leaseweb.com/floatingIps/v2/ranges/88.17.0.0_17/floatingIpDefinitions/88.17.34.108_32",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "X-Lsw-Auth: 213423-2134234-234234-23424"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import http.client

conn = http.client.HTTPSConnection("api.leaseweb.com")

headers = { 'X-Lsw-Auth': "213423-2134234-234234-23424" }

conn.request("GET", "/floatingIps/v2/ranges/88.17.0.0_17/floatingIpDefinitions/88.17.34.108_32", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://api.leaseweb.com/floatingIps/v2/ranges/88.17.0.0_17/floatingIpDefinitions/88.17.34.108_32")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["X-Lsw-Auth"] = '213423-2134234-234234-23424'

response = http.request(request)
puts response.read_body
RESPONSE EXAMPLE
200 OK
{
    "id": "88.17.34.108_32",
    "rangeId": "88.17.0.0_17",
    "pop": "AMS-01",
    "customerId": "10001234",
    "salesOrgId": "2000",
    "floatingIp": "88.17.34.108/32",
    "anchorIp": "95.10.126.1",
    "status": "ACTIVE",
    "createdAt": "2019-03-13T09:10:02+0000",
    "updatedAt": "2019-03-13T09:10:02+0000"
}

GETGet details of a Floating IP Definition

This API gives you a single Floating IP Definition.


The following properties describe the response:

Name Type Description
id string The ID of this Floating IP Definition
rangeId string The ID of the range to which this Floating IP belongs
pop string The PoP ID of this Floating IP
customerId string The ID of the customer associated with this Floating IP
salesOrgId string Sales Org ID of the customer associated with this Floating IP
floatingIp string The Floating IP address
anchorIp string The Anchor IP address
status string Status of the Floating IP Definition (Allowed values: ACTIVE,CREATING,UPDATING,REMOVING)
createdAt string Date timestamp when the resource was created
updatedAt string Date timestamp when the resource was updated
PUThttps://api.leaseweb.com/floatingIps/v2/ranges/88.17.0.0_17/floatingIpDefinitions/88.17.34.108_32
REQUEST EXAMPLE
curl --request PUT \
  --url https://api.leaseweb.com/floatingIps/v2/ranges/88.17.0.0_17/floatingIpDefinitions/88.17.34.108_32 \
  --header 'X-Lsw-Auth: 213423-2134234-234234-23424' \
  --header 'content-type: application/json' \
  --data '{
    "anchorIp": "95.10.126.1"
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.leaseweb.com/floatingIps/v2/ranges/88.17.0.0_17/floatingIpDefinitions/88.17.34.108_32",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
  CURLOPT_POSTFIELDS => "{    \"anchorIp\": \"95.10.126.1\"}",
  CURLOPT_HTTPHEADER => array(
    "X-Lsw-Auth: 213423-2134234-234234-23424",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import http.client

conn = http.client.HTTPSConnection("api.leaseweb.com")

payload = "{    \"anchorIp\": \"95.10.126.1\"}"

headers = {
    'X-Lsw-Auth': "213423-2134234-234234-23424",
    'content-type': "application/json"
    }

conn.request("PUT", "/floatingIps/v2/ranges/88.17.0.0_17/floatingIpDefinitions/88.17.34.108_32", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://api.leaseweb.com/floatingIps/v2/ranges/88.17.0.0_17/floatingIpDefinitions/88.17.34.108_32")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Put.new(url)
request["X-Lsw-Auth"] = '213423-2134234-234234-23424'
request["content-type"] = 'application/json'
request.body = "{    \"anchorIp\": \"95.10.126.1\"}"

response = http.request(request)
puts response.read_body
RESPONSE EXAMPLE
200 OK
{
    "id": "88.17.34.108_32",
    "rangeId": "88.17.0.0_17",
    "pop": "AMS-01",
    "customerId": "10001234",
    "salesOrgId": "2000",
    "floatingIp": "88.17.34.108/32",
    "anchorIp": "95.10.126.1",
    "status": "ACTIVE",
    "createdAt": "2019-03-13T09:10:02+0000",
    "updatedAt": "2019-03-13T09:10:02+0000"
}

PUTUpdate a Floating IP Definition

This API allows you to change the Anchor IP of an existing Floating IP definition.

Immagine you have 2 dedicated servers in AMS-01, in different racks. And you have a Floating IP Definition for Floating IP 10.0.0.0_32. You have configured the ip address 10.0.0.0/32 on both dedicated servers.

If the achor IP in the Floating IP Definition is poining to your first server, all traffic goes to that server. With this PUT request you can change the Anchor IP address to point to, for example, your second server. Within a matter of seconds all the traffic destined for the Floating IP will now end up at the new Anchor IP. In the above example, your second server.


The following properties should be part of the request:

Name Type Required Description
anchorIp string false The Anchor IP address

The following properties describe the response:

Name Type Description
id string The ID of this Floating IP Definition
rangeId string The ID of the range to which this Floating IP belongs
pop string The PoP ID of this Floating IP
customerId string The ID of the customer associated with this Floating IP
salesOrgId string Sales Org ID of the customer associated with this Floating IP
floatingIp string The Floating IP address
anchorIp string The Anchor IP address
status string Status of the Floating IP Definition (Allowed values: ACTIVE,CREATING,UPDATING,REMOVING)
createdAt string Date timestamp when the resource was created
updatedAt string Date timestamp when the resource was updated
DELETEhttps://api.leaseweb.com/floatingIps/v2/ranges/88.17.0.0_17/floatingIpDefinitions/88.17.34.108_32
REQUEST EXAMPLE
curl --request DELETE \
  --url https://api.leaseweb.com/floatingIps/v2/ranges/88.17.0.0_17/floatingIpDefinitions/88.17.34.108_32 \
  --header 'X-Lsw-Auth: 213423-2134234-234234-23424'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.leaseweb.com/floatingIps/v2/ranges/88.17.0.0_17/floatingIpDefinitions/88.17.34.108_32",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_HTTPHEADER => array(
    "X-Lsw-Auth: 213423-2134234-234234-23424"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import http.client

conn = http.client.HTTPSConnection("api.leaseweb.com")

headers = { 'X-Lsw-Auth': "213423-2134234-234234-23424" }

conn.request("DELETE", "/floatingIps/v2/ranges/88.17.0.0_17/floatingIpDefinitions/88.17.34.108_32", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://api.leaseweb.com/floatingIps/v2/ranges/88.17.0.0_17/floatingIpDefinitions/88.17.34.108_32")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Delete.new(url)
request["X-Lsw-Auth"] = '213423-2134234-234234-23424'

response = http.request(request)
puts response.read_body
RESPONSE EXAMPLE
202 Accepted
{
    "id": "88.17.34.108_32",
    "rangeId": "88.17.0.0_17",
    "pop": "AMS-01",
    "customerId": "10001234",
    "salesOrgId": "2000",
    "floatingIp": "88.17.34.108/32",
    "anchorIp": "95.10.126.1",
    "status": "ACTIVE",
    "createdAt": "2019-03-13T09:10:02+0000",
    "updatedAt": "2019-03-13T09:10:02+0000"
}

DELETERemove a Floating IP Definition

This API allows you to remove an existing Floating IP Definition.


The following properties describe the response:

Name Type Description
id string The ID of this Floating IP Definition
rangeId string The ID of the range to which this Floating IP belongs
pop string The PoP ID of this Floating IP
customerId string The ID of the customer associated with this Floating IP
salesOrgId string Sales Org ID of the customer associated with this Floating IP
floatingIp string The Floating IP address
anchorIp string The Anchor IP address
status string Status of the Floating IP Definition (Allowed values: ACTIVE,CREATING,UPDATING,REMOVING)
createdAt string Date timestamp when the resource was created
updatedAt string Date timestamp when the resource was updated