Balancing algorithms 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 geohost balancing algorithms
GEThttps://api.gslb.me/2.0/utils/lbalgorithms
Retrieves the list of balancing algorithms that can be used by geohosts
Example request
curl -u "username@mydomain.com:your-password" \
-X GET "https://api.gslb.me/2.0/utils/lbalgorithms" \
-H "Accept: application/json"import requests
r = requests.get(
"https://api.gslb.me/2.0/utils/lbalgorithms",
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/lbalgorithms", {
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 geohost balancing algorithms
{
"allLBalgorithms": [
{
"description": "Any available",
"tag": "geolb.any"
},
{
"description": "Georouting",
"tag": "geolb.georouting"
},
{
"description": "Priority",
"tag": "geolb.priority"
},
{
"description": "Proximity",
"tag": "geolb.proximity"
},
{
"description": "Round robin",
"tag": "geolb.roundrobin"
},
{
"description": "Weighted",
"tag": "geolb.weighted"
}
]
}