Georouting countries REST calls.
Base URL https://api.gslb.me/2.0. All requests require HTTP Basic authentication; set Accept to application/json or application/xml. Try these calls in the Postman collection.
Get georouting countries
GEThttps://api.gslb.me/2.0/utils/countries
Gets a list of countries and regions to be used for geohosts georouting
Example request
curl -u "username@mydomain.com:your-password" \
-X GET "https://api.gslb.me/2.0/utils/countries" \
-H "Accept: application/json"import requests
r = requests.get(
"https://api.gslb.me/2.0/utils/countries",
auth=("username@mydomain.com", "your-password"),
headers={"Accept": "application/json"},
)
print(r.status_code, r.json())const res = await fetch("https://api.gslb.me/2.0/utils/countries", {
method: "GET",
headers: {
"Authorization": "Basic " + btoa("username@mydomain.com:your-password"),
"Accept": "application/json"
}
});
console.log(res.status, await res.json());Example response
200 OK Get georouting countries
{
"allCountries": [
{
"code": "GE",
"name": "Abkhazia"
},
{
"code": "AF",
"name": "Afghanistan",
"regions": [
{
"description": "Badakhshan",
"id": "15"
},
{
"description": "Badghis",
"id": "16"
},
"…"
]
}
]
}