curl --request PATCH \
--url https://console.advinservers.com/api/v1/client/bandwidth-blocks/pooling \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"location_id": 3,
"enabled": false
}
'import requests
url = "https://console.advinservers.com/api/v1/client/bandwidth-blocks/pooling"
payload = {
"location_id": 3,
"enabled": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({location_id: 3, enabled: false})
};
fetch('https://console.advinservers.com/api/v1/client/bandwidth-blocks/pooling', 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.advinservers.com/api/v1/client/bandwidth-blocks/pooling",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'location_id' => 3,
'enabled' => false
]),
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.advinservers.com/api/v1/client/bandwidth-blocks/pooling"
payload := strings.NewReader("{\n \"location_id\": 3,\n \"enabled\": false\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://console.advinservers.com/api/v1/client/bandwidth-blocks/pooling")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"location_id\": 3,\n \"enabled\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://console.advinservers.com/api/v1/client/bandwidth-blocks/pooling")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"location_id\": 3,\n \"enabled\": false\n}"
response = http.request(request)
puts response.read_body{
"location_id": 3,
"pooling": false,
"pooled_locations": [],
"pools": [
{
"location_id": 3,
"name": "Kansas City, MO",
"region": "us_eu",
"region_label": "Americas & EMEA",
"pooling": false,
"servers": 2,
"shaped_servers": 0,
"base_limit": 10995116277760,
"usage": 1358993459200,
"capacity": 12644383719424,
"covered": 1649267441664,
"remaining": 11285390260224,
"blocks": 1,
"block_bytes_available": 1649267441664,
"exhausted": false
}
]
}{
"message": "Unauthenticated."
}{
"message": "This API key is not allowed to do that in this team. It needs the \"snapshot.delete\" permission."
}{
"message": "The name field is required.",
"errors": {}
}{
"message": "Too Many Attempts."
}Enable or disable bandwidth pooling for a location
Overview
Enables or disables bandwidth pooling for a location in the current team. Send location_id and enabled. With pooling enabled, the team’s servers there share one bandwidth allowance. Each team has its own pools, so servers in the account’s other teams are not affected. Otherwise, each server is metered separately. Disabling pooling detaches blocks bound to that location, distributes recorded usage back to individual servers and may immediately throttle servers over their limits. Request a preview first. Returns the team’s updated figures for every location.
Permissions
Requires the network.update (Change networking) permission for the selected team. Resources outside that team return 404.
curl --request PATCH \
--url https://console.advinservers.com/api/v1/client/bandwidth-blocks/pooling \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"location_id": 3,
"enabled": false
}
'import requests
url = "https://console.advinservers.com/api/v1/client/bandwidth-blocks/pooling"
payload = {
"location_id": 3,
"enabled": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({location_id: 3, enabled: false})
};
fetch('https://console.advinservers.com/api/v1/client/bandwidth-blocks/pooling', 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.advinservers.com/api/v1/client/bandwidth-blocks/pooling",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'location_id' => 3,
'enabled' => false
]),
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.advinservers.com/api/v1/client/bandwidth-blocks/pooling"
payload := strings.NewReader("{\n \"location_id\": 3,\n \"enabled\": false\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://console.advinservers.com/api/v1/client/bandwidth-blocks/pooling")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"location_id\": 3,\n \"enabled\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://console.advinservers.com/api/v1/client/bandwidth-blocks/pooling")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"location_id\": 3,\n \"enabled\": false\n}"
response = http.request(request)
puts response.read_body{
"location_id": 3,
"pooling": false,
"pooled_locations": [],
"pools": [
{
"location_id": 3,
"name": "Kansas City, MO",
"region": "us_eu",
"region_label": "Americas & EMEA",
"pooling": false,
"servers": 2,
"shaped_servers": 0,
"base_limit": 10995116277760,
"usage": 1358993459200,
"capacity": 12644383719424,
"covered": 1649267441664,
"remaining": 11285390260224,
"blocks": 1,
"block_bytes_available": 1649267441664,
"exhausted": false
}
]
}{
"message": "Unauthenticated."
}{
"message": "This API key is not allowed to do that in this team. It needs the \"snapshot.delete\" permission."
}{
"message": "The name field is required.",
"errors": {}
}{
"message": "Too Many Attempts."
}Authorizations
Your API key, sent as a bearer token. Create one in the control panel under API Keys, give it only the permissions the integration needs, and copy it when it is created. It cannot be shown again. Each key is restricted to one owned team. The key determines the team for every request.
Body
Send a JSON object containing the fields below. Required fields are marked in the schema.
Response
The record, as a JSON object. There is no envelope.
The city that was switched.
3
Whether it pools now.
false
Every city where the team pools, after the change.
[]
Every city's figures, as they stand after the change.
Show child attributes
Show child attributes
[
{
"location_id": 3,
"name": "Kansas City, MO",
"region": "us_eu",
"region_label": "Americas & EMEA",
"pooling": false,
"servers": 2,
"shaped_servers": 0,
"base_limit": 10995116277760,
"usage": 1358993459200,
"capacity": 12644383719424,
"covered": 1649267441664,
"remaining": 11285390260224,
"blocks": 1,
"block_bytes_available": 1649267441664,
"exhausted": false
}
]