Endurance

Frontends

A frontend is the address and port a Virtual Service listens on — what clients connect to — and the rules that decide which backend serves a request.

Frontends

GET /gslb/frontends

Get GSLB Frontends

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

$url = 'https://appliance.example.com/api/v1/gslb/frontends';
$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/frontends", headers=headers)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/gslb/frontends', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${token}`,
  },
});

const data = await response.json();
Response
{
  "status": "success",
  "message": "Frontend/s",
  "data": []
}

POST /gslb/frontends

Add GSLB Frontend

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

Body parameters
domain string Required
timeToLive string default: "0"

DNS TTL in seconds, or a single unit-suffixed value (s/m/h/d/w) e.g. "1d". "0" means resolvers do not cache. Resolves to 0-2147483647 seconds.

curl
curl -X POST "https://appliance.example.com/api/v1/gslb/frontends" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "domain": "<domain>",
  "timeToLive": "0"
}'
PHP
<?php

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

$payload = [
    'domain' => '<domain>',
    'timeToLive' => '0',
];

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    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 = {
    "domain": "<domain>",
    "timeToLive": "0"
}

response = requests.post("https://appliance.example.com/api/v1/gslb/frontends", headers=headers, json=payload)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/gslb/frontends', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${token}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "domain": "<domain>",
  "timeToLive": "0"
}),
});

const data = await response.json();
Response
{
  "status": "success",
  "message": "Frontend added",
  "data": {
    "id": "5ca-35d-687-c1f"
  }
}

List the GSLB frontends with pending changes

GET /gslb/frontends/hangings

Get Hanging GSLB Frontends

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

$url = 'https://appliance.example.com/api/v1/gslb/frontends/hangings';
$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/frontends/hangings", headers=headers)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/gslb/frontends/hangings', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${token}`,
  },
});

const data = await response.json();
Response
{
  "status": "success",
  "message": "Hanging frontends",
  "data": []
}

By ID

GET /gslb/frontends/{id}

Get GSLB Frontend By ID

Path parameters
id string Required

The id of the frontend.

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

$url = 'https://appliance.example.com/api/v1/gslb/frontends/{id}';
$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/frontends/{id}", headers=headers)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/gslb/frontends/{id}', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${token}`,
  },
});

const data = await response.json();
Response
{
  "status": "success",
  "message": "Frontend",
  "data": {
    "id": "5ca-4ae-4f1-db2",
    "domain": "test.com",
    "timeToLive": "1d",
    "backendId": "287-f51-256-129"
  }
}

PUT /gslb/frontends/{id}

Edit a GSLB Frontend

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

Path parameters
id string Required

.Body parameters

domain string
timeToLive string default: "0"

DNS TTL in seconds, or a single unit-suffixed value (s/m/h/d/w) e.g. "1d". "0" means resolvers do not cache. Resolves to 0-2147483647 seconds.

curl
curl -X PUT "https://appliance.example.com/api/v1/gslb/frontends/{id}" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "domain": "<domain>",
  "timeToLive": "0"
}'
PHP
<?php

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

$payload = [
    'domain' => '<domain>',
    'timeToLive' => '0',
];

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'PUT',
    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 = {
    "domain": "<domain>",
    "timeToLive": "0"
}

response = requests.put("https://appliance.example.com/api/v1/gslb/frontends/{id}", headers=headers, json=payload)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/gslb/frontends/{id}', {
  method: 'PUT',
  headers: {
    Authorization: `Bearer ${token}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "domain": "<domain>",
  "timeToLive": "0"
}),
});

const data = await response.json();
Response
{
  "status": "success",
  "message": "Frontend edited",
  "data": {
    "id": "5ca-35d-687-7c1"
  }
}

DELETE /gslb/frontends/{id}

Delete GSLB Frontend

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

Path parameters
id string Required

The id of the frontend.

curl
curl -X DELETE "https://appliance.example.com/api/v1/gslb/frontends/{id}" \
  -H "Authorization: Bearer $TOKEN"
PHP
<?php

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

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'DELETE',
    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.delete("https://appliance.example.com/api/v1/gslb/frontends/{id}", headers=headers)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/gslb/frontends/{id}', {
  method: 'DELETE',
  headers: {
    Authorization: `Bearer ${token}`,
  },
});

const data = await response.json();
Response
{
  "status": "success",
  "message": "Frontend deleted",
  "data": []
}

List the backends of a GSLB frontend

GET /gslb/frontends/{id}/backends

Get GSLB Frontend By ID

Path parameters
id string Required

The id of the frontend.

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

$url = 'https://appliance.example.com/api/v1/gslb/frontends/{id}/backends';
$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/frontends/{id}/backends", headers=headers)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/gslb/frontends/{id}/backends', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${token}`,
  },
});

const data = await response.json();
Response
{
  "status": "success",
  "message": "Backends",
  "data": {
    "id": "5f4-fa4-3a0-e71",
    "name": "default",
    "monitor": "http",
    "monitorInterval": 10,
    "monitorTimeout": 5000,
    "monitorRetries": 2,
    "monitorUseSSL": false,
    "monitorURLPath": "/",
    "monitorPort": 80,
    "monitorExpectedCodes": [
      200,
      403
    ],
    "lbMethod": "fogroup",
    "fallback": "any",
    "maxAddrsReturned": 1,
    "ripIds": [
      "5f4-e4a-1b2-ba2",
      "5f4-e4a-2d0-266",
      "5f4-e4a-0f9-60a"
    ]
  }
}