List reservable subnets
curl --request GET \
--url https://console.cloudblast.io/api/v2/reserved-ips/subnets \
--header 'Authorization: Bearer <token>'import requests
url = "https://console.cloudblast.io/api/v2/reserved-ips/subnets"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://console.cloudblast.io/api/v2/reserved-ips/subnets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://console.cloudblast.io/api/v2/reserved-ips/subnets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://console.cloudblast.io/api/v2/reserved-ips/subnets"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://console.cloudblast.io/api/v2/reserved-ips/subnets")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://console.cloudblast.io/api/v2/reserved-ips/subnets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"location": {
"id": 1,
"short_code": "nl",
"description": "Amsterdam, NL"
},
"subnets": [
{
"id": "d618ecc9-a614-4bb5-9dd2-67bef1b596ae",
"network": "203.0.113.0/24",
"type": "ipv4"
}
]
}
]
}{
"error": {
"code": "UNAUTHENTICATED",
"message": "Missing or invalid Authorization header. Use: Authorization: Bearer <token>"
}
}Reserved IPs
List Reservable Subnets
Returns, per location, the subnets that still have addresses to reserve. A subnet that is full is not listed; how many addresses a subnet has left is not disclosed.
GET
/
reserved-ips
/
subnets
List reservable subnets
curl --request GET \
--url https://console.cloudblast.io/api/v2/reserved-ips/subnets \
--header 'Authorization: Bearer <token>'import requests
url = "https://console.cloudblast.io/api/v2/reserved-ips/subnets"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://console.cloudblast.io/api/v2/reserved-ips/subnets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://console.cloudblast.io/api/v2/reserved-ips/subnets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://console.cloudblast.io/api/v2/reserved-ips/subnets"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://console.cloudblast.io/api/v2/reserved-ips/subnets")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://console.cloudblast.io/api/v2/reserved-ips/subnets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"location": {
"id": 1,
"short_code": "nl",
"description": "Amsterdam, NL"
},
"subnets": [
{
"id": "d618ecc9-a614-4bb5-9dd2-67bef1b596ae",
"network": "203.0.113.0/24",
"type": "ipv4"
}
]
}
]
}{
"error": {
"code": "UNAUTHENTICATED",
"message": "Missing or invalid Authorization header. Use: Authorization: Bearer <token>"
}
}