Reserve IPs
curl --request POST \
--url https://console.cloudblast.io/api/v2/reserved-ips \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"location_id": 1,
"subnet_id": "d618ecc9-a614-4bb5-9dd2-67bef1b596ae",
"quantity": 2
}
'import requests
url = "https://console.cloudblast.io/api/v2/reserved-ips"
payload = {
"location_id": 1,
"subnet_id": "d618ecc9-a614-4bb5-9dd2-67bef1b596ae",
"quantity": 2
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({location_id: 1, subnet_id: 'd618ecc9-a614-4bb5-9dd2-67bef1b596ae', quantity: 2})
};
fetch('https://console.cloudblast.io/api/v2/reserved-ips', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'location_id' => 1,
'subnet_id' => 'd618ecc9-a614-4bb5-9dd2-67bef1b596ae',
'quantity' => 2
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://console.cloudblast.io/api/v2/reserved-ips"
payload := strings.NewReader("{\n \"location_id\": 1,\n \"subnet_id\": \"d618ecc9-a614-4bb5-9dd2-67bef1b596ae\",\n \"quantity\": 2\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://console.cloudblast.io/api/v2/reserved-ips")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"location_id\": 1,\n \"subnet_id\": \"d618ecc9-a614-4bb5-9dd2-67bef1b596ae\",\n \"quantity\": 2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://console.cloudblast.io/api/v2/reserved-ips")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"location_id\": 1,\n \"subnet_id\": \"d618ecc9-a614-4bb5-9dd2-67bef1b596ae\",\n \"quantity\": 2\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"address": "203.0.113.50",
"type": "ipv4",
"gateway": "203.0.113.1",
"cidr": 24,
"rdns": null,
"subnet": "203.0.113.0/24",
"location": {
"id": 1,
"short_code": "nl",
"description": "Amsterdam, NL"
},
"server": {
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"uuid_short": "a1b2c3d4",
"hostname": "web-01"
},
"reserved_at": "2023-11-07T05:31:56Z"
}
],
"meta": {
"count": 2,
"limit": 8,
"used": 2,
"hourly_price": 0.00347
}
}{
"error": {
"code": "UNAUTHENTICATED",
"message": "Missing or invalid Authorization header. Use: Authorization: Bearer <token>"
}
}{
"error": {
"code": "RESERVED_IP_LIMIT_REACHED",
"message": "You can hold up to 5 reserved IPs. You have 4, so you can reserve 1 more."
}
}Reserved IPs
Reserve IPs
Reserves addresses from a subnet at a location. Reserved IPs are never handed out to anyone else. Your balance has to cover the first hour. Warning: reserved IPs are billed hourly while no server uses them.
POST
/
reserved-ips
Reserve IPs
curl --request POST \
--url https://console.cloudblast.io/api/v2/reserved-ips \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"location_id": 1,
"subnet_id": "d618ecc9-a614-4bb5-9dd2-67bef1b596ae",
"quantity": 2
}
'import requests
url = "https://console.cloudblast.io/api/v2/reserved-ips"
payload = {
"location_id": 1,
"subnet_id": "d618ecc9-a614-4bb5-9dd2-67bef1b596ae",
"quantity": 2
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({location_id: 1, subnet_id: 'd618ecc9-a614-4bb5-9dd2-67bef1b596ae', quantity: 2})
};
fetch('https://console.cloudblast.io/api/v2/reserved-ips', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'location_id' => 1,
'subnet_id' => 'd618ecc9-a614-4bb5-9dd2-67bef1b596ae',
'quantity' => 2
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://console.cloudblast.io/api/v2/reserved-ips"
payload := strings.NewReader("{\n \"location_id\": 1,\n \"subnet_id\": \"d618ecc9-a614-4bb5-9dd2-67bef1b596ae\",\n \"quantity\": 2\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://console.cloudblast.io/api/v2/reserved-ips")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"location_id\": 1,\n \"subnet_id\": \"d618ecc9-a614-4bb5-9dd2-67bef1b596ae\",\n \"quantity\": 2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://console.cloudblast.io/api/v2/reserved-ips")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"location_id\": 1,\n \"subnet_id\": \"d618ecc9-a614-4bb5-9dd2-67bef1b596ae\",\n \"quantity\": 2\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"address": "203.0.113.50",
"type": "ipv4",
"gateway": "203.0.113.1",
"cidr": 24,
"rdns": null,
"subnet": "203.0.113.0/24",
"location": {
"id": 1,
"short_code": "nl",
"description": "Amsterdam, NL"
},
"server": {
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"uuid_short": "a1b2c3d4",
"hostname": "web-01"
},
"reserved_at": "2023-11-07T05:31:56Z"
}
],
"meta": {
"count": 2,
"limit": 8,
"used": 2,
"hourly_price": 0.00347
}
}{
"error": {
"code": "UNAUTHENTICATED",
"message": "Missing or invalid Authorization header. Use: Authorization: Bearer <token>"
}
}{
"error": {
"code": "RESERVED_IP_LIMIT_REACHED",
"message": "You can hold up to 5 reserved IPs. You have 4, so you can reserve 1 more."
}
}Authorizations
API token from your CloudBlast account settings. Pass as Authorization: Bearer <token>.
Body
application/json