Endurance

GSLB

GSLB Settings

Settings that apply to the whole subsystem rather than to one object.

Settings

Get appliance-wide GSLB settings

GET /gslb/settings

curl
curl -X GET "https://appliance.example.com/api/v1/gslb/settings" \
  -H "Authorization: Bearer $TOKEN"
PHP
<?php

$url = 'https://appliance.example.com/api/v1/gslb/settings';
$headers = [
    'Authorization: Bearer ' . $token,
];

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => $headers,
    CURLOPT_RETURNTRANSFER => true,
]);

$response = json_decode(curl_exec($ch), true);
curl_close($ch);
Python
import requests

headers = {"Authorization": f"Bearer {token}"}

response = requests.get("https://appliance.example.com/api/v1/gslb/settings", headers=headers)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/gslb/settings', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${token}`,
  },
});

const data = await response.json();
Bruno
meta {
  name: Get the GSLB settings
  type: http
  seq: 1
}

get {
  url: https://{{node-0}}:{{port}}/api/v1/gslb/settings
  body: none
  auth: bearer
}

auth:bearer {
  token: {{token}}
}
Response
{
  "status": "success",
  "message": "GSLB Settings",
  "data": {
    "serviceIpIds": [
      "189-1e2-8b1-85e",
      "189-1e2-8b1-9a4"
    ],
    "port": 53,
    "enableEdnsClientSubnet": false,
    "restrictEdnsClientSubnetToGlobalNames": true
  }
}

Update appliance-wide GSLB settings

PATCH /gslb/settings

This change is staged. Send PUT /services/apply to apply it.

Body parameters
serviceIpIds array of string

The Service IPs GSLB answers DNS on. Each node listens on the static IP it maps to each, and on loopback; a Service IP a node maps nothing to adds nothing there. A Service IP maps a node to one static IP, so listening on IPv4 and IPv6 takes two. At least one is required once a Global Name has a pool with a Real Server.

port integer

The port GSLB answers DNS on, TCP and UDP, on every address it listens on. Defaults to 53, the only port a resolver asks unprompted. It must be free on each of those addresses.

enableEdnsClientSubnet boolean

Enable EDNS Client Subnet (ECS, RFC 7871) processing.

restrictEdnsClientSubnetToGlobalNames boolean

When ECS is enabled, scope it to the configured Global Name domains. No effect when ECS is disabled.

curl
curl -X PATCH "https://appliance.example.com/api/v1/gslb/settings" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "serviceIpIds": [
    "<serviceIpIds>"
  ],
  "port": 0,
  "enableEdnsClientSubnet": true,
  "restrictEdnsClientSubnetToGlobalNames": true
}'
PHP
<?php

$url = 'https://appliance.example.com/api/v1/gslb/settings';
$headers = [
    'Authorization: Bearer ' . $token,
    'Content-Type: application/json',
];

$payload = [
    'serviceIpIds' => [
        '<serviceIpIds>',
    ],
    'port' => 0,
    'enableEdnsClientSubnet' => true,
    'restrictEdnsClientSubnetToGlobalNames' => true,
];

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'PATCH',
    CURLOPT_HTTPHEADER => $headers,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POSTFIELDS => json_encode($payload),
]);

$response = json_decode(curl_exec($ch), true);
curl_close($ch);
Python
import requests

headers = {"Authorization": f"Bearer {token}"}
payload = {
    "serviceIpIds": [
        "<serviceIpIds>"
    ],
    "port": 0,
    "enableEdnsClientSubnet": true,
    "restrictEdnsClientSubnetToGlobalNames": true
}

response = requests.patch("https://appliance.example.com/api/v1/gslb/settings", headers=headers, json=payload)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/gslb/settings', {
  method: 'PATCH',
  headers: {
    Authorization: `Bearer ${token}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "serviceIpIds": [
    "<serviceIpIds>"
  ],
  "port": 0,
  "enableEdnsClientSubnet": true,
  "restrictEdnsClientSubnetToGlobalNames": true
}),
});

const data = await response.json();
Bruno
meta {
  name: Update the GSLB settings
  type: http
  seq: 1
}

patch {
  url: https://{{node-0}}:{{port}}/api/v1/gslb/settings
  body: json
  auth: bearer
}

headers {
  Content-Type: application/json
}

auth:bearer {
  token: {{token}}
}

body:json {
  {
    "serviceIpIds": [
      "<serviceIpIds>"
    ],
    "port": 0,
    "enableEdnsClientSubnet": true,
    "restrictEdnsClientSubnetToGlobalNames": true
  }
}
Response
{
  "status": "success",
  "message": "GSLB Settings updated"
}