Endurance

Backends

A backend is the group of Real Servers a Virtual Service distributes traffic across, together with the load balancing method and health check it uses.

Backends

GET /gslb/backends

Get all GSLB Backends

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

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

const data = await response.json();
Response
{
  "status": "success",
  "message": "Backend/s",
  "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-a60"
      ]
    }
  ]
}

POST /gslb/backends

Add a GSLB Backend

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

Body parameters
name string Required
monitor default: "http" http | tcp | forced

http requires monitorInterval monitorTimeout monitorRetries monitorUseSSL monitorURLPath monitorHostname monitorPort monitorExpectedCodes tcp requires monitorInterval monitorTimeout monitorRetries monitorPort monitorSendString monitorMatchRe forced requires monitorInterval monitorTimeout monitorRetries monitorStatus

monitorInterval integer default: "10"
monitorTimeout integer default: "5000"
monitorRetries integer default: "2"
monitorURLPath string default: "/"
monitorHostname string
monitorPort integer default: "80"
monitorExpectedCodes string
monitorSendString string
monitorMatchRe string
monitorStatus default: "up" up | down
lbMethod default: "wrr" wrr | twrr | fogroup
fallback default: "any" any | refuse
ripIds array
curl
curl -X POST "https://appliance.example.com/api/v1/gslb/backends" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "<name>",
  "monitor": "http",
  "monitorInterval": "10",
  "monitorTimeout": "5000",
  "monitorRetries": "2",
  "monitorURLPath": "/",
  "monitorHostname": "<monitorHostname>",
  "monitorPort": "80",
  "monitorExpectedCodes": "<monitorExpectedCodes>",
  "monitorSendString": "<monitorSendString>",
  "monitorMatchRe": "<monitorMatchRe>",
  "monitorStatus": "up",
  "lbMethod": "wrr",
  "fallback": "any",
  "ripIds": [
    "<ripIds>"
  ]
}'
PHP
<?php

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

$payload = [
    'name' => '<name>',
    'monitor' => 'http',
    'monitorInterval' => '10',
    'monitorTimeout' => '5000',
    'monitorRetries' => '2',
    'monitorURLPath' => '/',
    'monitorHostname' => '<monitorHostname>',
    'monitorPort' => '80',
    'monitorExpectedCodes' => '<monitorExpectedCodes>',
    'monitorSendString' => '<monitorSendString>',
    'monitorMatchRe' => '<monitorMatchRe>',
    'monitorStatus' => 'up',
    'lbMethod' => 'wrr',
    'fallback' => 'any',
    'ripIds' => [
        '<ripIds>',
    ],
];

$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 = {
    "name": "<name>",
    "monitor": "http",
    "monitorInterval": "10",
    "monitorTimeout": "5000",
    "monitorRetries": "2",
    "monitorURLPath": "/",
    "monitorHostname": "<monitorHostname>",
    "monitorPort": "80",
    "monitorExpectedCodes": "<monitorExpectedCodes>",
    "monitorSendString": "<monitorSendString>",
    "monitorMatchRe": "<monitorMatchRe>",
    "monitorStatus": "up",
    "lbMethod": "wrr",
    "fallback": "any",
    "ripIds": [
        "<ripIds>"
    ]
}

response = requests.post("https://appliance.example.com/api/v1/gslb/backends", headers=headers, json=payload)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/gslb/backends', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${token}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "name": "<name>",
  "monitor": "http",
  "monitorInterval": "10",
  "monitorTimeout": "5000",
  "monitorRetries": "2",
  "monitorURLPath": "/",
  "monitorHostname": "<monitorHostname>",
  "monitorPort": "80",
  "monitorExpectedCodes": "<monitorExpectedCodes>",
  "monitorSendString": "<monitorSendString>",
  "monitorMatchRe": "<monitorMatchRe>",
  "monitorStatus": "up",
  "lbMethod": "wrr",
  "fallback": "any",
  "ripIds": [
    "<ripIds>"
  ]
}),
});

const data = await response.json();
Response
{
  "status": "success",
  "message": "Backend Added",
  "data": {
    "id": "5ca35d6877c1f"
  }
}

List the GSLB backends with pending changes

GET /gslb/backends/hangings

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

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

const data = await response.json();
Response
{
  "status": "success",
  "message": "Hanging 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-a60"
      ]
    }
  ]
}

By ID

GET /gslb/backends/{id}

Get a GSLB backend

Path parameters
id string Required

The id of the backend.

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

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

const data = await response.json();
Response
{
  "status": "success",
  "message": "Backend",
  "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"
    ]
  }
}

PUT /gslb/backends/{id}

Edit a GSLB Backend

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

Path parameters
id string Required

The id of the backend.

Body parameters
name string Required
monitor default: "http" http | tcp | forced

http requires monitorInterval monitorTimeout monitorRetries monitorUseSSL monitorURLPath monitorHostname monitorPort monitorExpectedCodes tcp requires monitorInterval monitorTimeout monitorRetries monitorPort monitorSendString monitorMatchRe forced requires monitorInterval monitorTimeout monitorRetries monitorStatus

monitorInterval integer default: "10"
monitorTimeout integer default: "5000"
monitorRetries integer default: "2"
monitorURLPath string default: "/"
monitorHostname string
monitorPort integer default: "80"
monitorExpectedCodes string
monitorSendString string
monitorMatchRe string
monitorStatus default: "up" up | down
lbMethod default: "wrr" wrr | twrr | fogroup
fallback default: "any" any | refuse
ripIds array
curl
curl -X PUT "https://appliance.example.com/api/v1/gslb/backends/{id}" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "<name>",
  "monitor": "http",
  "monitorInterval": "10",
  "monitorTimeout": "5000",
  "monitorRetries": "2",
  "monitorURLPath": "/",
  "monitorHostname": "<monitorHostname>",
  "monitorPort": "80",
  "monitorExpectedCodes": "<monitorExpectedCodes>",
  "monitorSendString": "<monitorSendString>",
  "monitorMatchRe": "<monitorMatchRe>",
  "monitorStatus": "up",
  "lbMethod": "wrr",
  "fallback": "any",
  "ripIds": [
    "<ripIds>"
  ]
}'
PHP
<?php

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

$payload = [
    'name' => '<name>',
    'monitor' => 'http',
    'monitorInterval' => '10',
    'monitorTimeout' => '5000',
    'monitorRetries' => '2',
    'monitorURLPath' => '/',
    'monitorHostname' => '<monitorHostname>',
    'monitorPort' => '80',
    'monitorExpectedCodes' => '<monitorExpectedCodes>',
    'monitorSendString' => '<monitorSendString>',
    'monitorMatchRe' => '<monitorMatchRe>',
    'monitorStatus' => 'up',
    'lbMethod' => 'wrr',
    'fallback' => 'any',
    'ripIds' => [
        '<ripIds>',
    ],
];

$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 = {
    "name": "<name>",
    "monitor": "http",
    "monitorInterval": "10",
    "monitorTimeout": "5000",
    "monitorRetries": "2",
    "monitorURLPath": "/",
    "monitorHostname": "<monitorHostname>",
    "monitorPort": "80",
    "monitorExpectedCodes": "<monitorExpectedCodes>",
    "monitorSendString": "<monitorSendString>",
    "monitorMatchRe": "<monitorMatchRe>",
    "monitorStatus": "up",
    "lbMethod": "wrr",
    "fallback": "any",
    "ripIds": [
        "<ripIds>"
    ]
}

response = requests.put("https://appliance.example.com/api/v1/gslb/backends/{id}", headers=headers, json=payload)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/gslb/backends/{id}', {
  method: 'PUT',
  headers: {
    Authorization: `Bearer ${token}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "name": "<name>",
  "monitor": "http",
  "monitorInterval": "10",
  "monitorTimeout": "5000",
  "monitorRetries": "2",
  "monitorURLPath": "/",
  "monitorHostname": "<monitorHostname>",
  "monitorPort": "80",
  "monitorExpectedCodes": "<monitorExpectedCodes>",
  "monitorSendString": "<monitorSendString>",
  "monitorMatchRe": "<monitorMatchRe>",
  "monitorStatus": "up",
  "lbMethod": "wrr",
  "fallback": "any",
  "ripIds": [
    "<ripIds>"
  ]
}),
});

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

DELETE /gslb/backends/{id}

Delete GSLB Backend

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

Path parameters
id string Required

The id of the backend.

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

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

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

Real servers

GET /gslb/backends/{id}/realservers

Get GSLB Backend RealServers

Path parameters
id string Required

The id of the backend.

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

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

const data = await response.json();
Response
{
  "status": "success",
  "message": "Backend RealServers",
  "data": [
    {
      "id": "5ca-36c-d10-655",
      "ip": "10.0.0.1",
      "monitorIp": "10.0.0.1",
      "name": "realserver1",
      "weight": 10
    }
  ]
}

PUT /gslb/backends/{id}/realservers

Add GSLB RealServer to Backend

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

Path parameters
id string Required

The id of the backend.

Body parameters
realServerId string Required
position integer Required
curl
curl -X PUT "https://appliance.example.com/api/v1/gslb/backends/{id}/realservers" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "realServerId": "<realServerId>",
  "position": 0
}'
PHP
<?php

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

$payload = [
    'realServerId' => '<realServerId>',
    'position' => 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 = {
    "realServerId": "<realServerId>",
    "position": 0
}

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

const data = await response.json();
Response
{
  "status": "success",
  "message": "Backend RealServer Added",
  "data": {
    "realServers": [
      "f4e-4a1-b2b-a22",
      "5f4-e4a-0fa-60a",
      "74e-4a2-d02-669"
    ]
  }
}

Remove a real server from a GSLB backend

DELETE /gslb/backends/{id}/realservers/{realServerId}

Delete GSLB RealServer from Backend

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

Path parameters
id string Required

The id of the backend.

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

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

const data = await response.json();
Response
{
  "status": "success",
  "message": "RealServer Deleted from Backend"
}