Get client content delivery regions list
curl --request GET \
--url https://api.gcore.com/cdn/admin/billing_regions \
--header 'Authorization: <api-key>'import requests
url = "https://api.gcore.com/cdn/admin/billing_regions"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.gcore.com/cdn/admin/billing_regions', 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://api.gcore.com/cdn/admin/billing_regions",
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: <api-key>"
],
]);
$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://api.gcore.com/cdn/admin/billing_regions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.gcore.com/cdn/admin/billing_regions")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/cdn/admin/billing_regions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"id": 1,
"name": "region1",
"created_at": "",
"changed_at": "",
"description": "Region 1",
"required": false,
"visible": false,
"localization": null
},
{
"id": 2,
"name": "region2",
"created_at": "",
"changed_at": "",
"description": "Region 2",
"required": false,
"visible": false,
"localization": null
}
]Balancer
Get client content delivery regions list
Get information about all regions that might be used for content delivery for a specific client.
GET
/
cdn
/
admin
/
billing_regions
Get client content delivery regions list
curl --request GET \
--url https://api.gcore.com/cdn/admin/billing_regions \
--header 'Authorization: <api-key>'import requests
url = "https://api.gcore.com/cdn/admin/billing_regions"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.gcore.com/cdn/admin/billing_regions', 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://api.gcore.com/cdn/admin/billing_regions",
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: <api-key>"
],
]);
$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://api.gcore.com/cdn/admin/billing_regions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.gcore.com/cdn/admin/billing_regions")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/cdn/admin/billing_regions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"id": 1,
"name": "region1",
"created_at": "",
"changed_at": "",
"description": "Region 1",
"required": false,
"visible": false,
"localization": null
},
{
"id": 2,
"name": "region2",
"created_at": "",
"changed_at": "",
"description": "Region 2",
"required": false,
"visible": false,
"localization": null
}
]Authorizations
API key for authentication. Make sure to include the word apikey, followed by a single space and then your token.
Example: apikey 1234_abcdef
Query Parameters
Client account ID.
Response
Successful.
Region ID.
Region abbreviation.
Date of region creation.
Date of the last update of the information about the region.
Region full name.
Defines whether the region is the default location handler or not.
Default location handler cannot be excluded from the content delivery.
Possible values:
- true - Region is the default location handler.
- false - Region is not the default location handler.
Parameter is legacy.
Region full name translated into different languages.
Was this page helpful?