curl --request GET \
--url https://console.advinservers.com/api/v1/client/bandwidth-blocks/pools \
--header 'Authorization: Bearer <token>'import requests
url = "https://console.advinservers.com/api/v1/client/bandwidth-blocks/pools"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://console.advinservers.com/api/v1/client/bandwidth-blocks/pools', 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/pools",
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.advinservers.com/api/v1/client/bandwidth-blocks/pools"
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.advinservers.com/api/v1/client/bandwidth-blocks/pools")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://console.advinservers.com/api/v1/client/bandwidth-blocks/pools")
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[
{
"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": "Too Many Attempts."
}List bandwidth usage by location
Overview
Returns the current team’s bandwidth usage for every available location, including zero values where the team has no servers. Each entry includes plan allowances, extra bandwidth, usage and the number of throttled servers. Servers in the account’s other teams are not counted.
Permissions
Requires the network.read (View networking) permission for the selected team. Resources outside that team return 404.
curl --request GET \
--url https://console.advinservers.com/api/v1/client/bandwidth-blocks/pools \
--header 'Authorization: Bearer <token>'import requests
url = "https://console.advinservers.com/api/v1/client/bandwidth-blocks/pools"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://console.advinservers.com/api/v1/client/bandwidth-blocks/pools', 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/pools",
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.advinservers.com/api/v1/client/bandwidth-blocks/pools"
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.advinservers.com/api/v1/client/bandwidth-blocks/pools")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://console.advinservers.com/api/v1/client/bandwidth-blocks/pools")
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[
{
"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": "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.
Response
The whole set, as a JSON array. There is no envelope and no paging.
The location id ID.
3
The name shown to customers.
"Kansas City, MO"
The value of region.
us_eu, apac "us_eu"
The value of region_label.
"Americas & EMEA"
Whether the team's servers here share one budget or are metered one by one.
false
The value of servers.
2
The value of shaped_servers.
0
What the plans alone allow here, in bytes.
10995116277760
The value of usage.
1358993459200
The budget in force, plans and blocks together.
12644383719424
How much of that budget the team's blocks are responsible for.
1649267441664
The value of remaining.
11285390260224
The value of blocks.
1
The value of block_bytes_available.
1649267441664
With pooling on, the whole city at once. With it off, whether at least one server here has been shaped.
false
[
{
"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
}
]