Endurance

Real servers

Real Servers are the servers behind a Virtual Service that answer client requests. Each is health checked, and is taken out of service automatically when it fails.

Real servers

GET /ipvsDirector/rips

Get all Real Servers from the configuration

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

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

const data = await response.json();
Response
{
  "status": "success",
  "message": "Real Servers retrieved successfully",
  "data": [
    {
      "id": "5ce-e78-d60-084",
      "name": "testingrealserver",
      "ip": "192.168.79.101",
      "port": 80,
      "weight": 100
    },
    {
      "id": "5ce-ea7-cc0-72a",
      "name": "testingrealserver2",
      "ip": "192.168.79.101",
      "port": 81,
      "weight": 100
    }
  ]
}

POST /ipvsDirector/rips

Add a Real Server to the configuration

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

Body parameters
name string Required

The identifying name for the Real Server.

ip string Required

The IP address of the Real Server.

port integer Required

The port that the traffic will be sent to. Leave blank for multiple ports.

weight integer default: "100"

The weighting of the Real Server. All other things being equal the server will receive weight/sum_of_all_weight connections.

state string default: "online"

The current state of the Real Server.

curl
curl -X POST "https://appliance.example.com/api/v1/ipvsDirector/rips" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "<name>",
  "ip": "<ip>",
  "port": 0,
  "weight": "100",
  "state": "online"
}'
PHP
<?php

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

$payload = [
    'name' => '<name>',
    'ip' => '<ip>',
    'port' => 0,
    'weight' => '100',
    'state' => 'online',
];

$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>",
    "ip": "<ip>",
    "port": 0,
    "weight": "100",
    "state": "online"
}

response = requests.post("https://appliance.example.com/api/v1/ipvsDirector/rips", headers=headers, json=payload)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/ipvsDirector/rips', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${token}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "name": "<name>",
  "ip": "<ip>",
  "port": 0,
  "weight": "100",
  "state": "online"
}),
});

const data = await response.json();
Response
{
  "status": "success",
  "message": "Real Server added successfully",
  "data": {
    "id": "5cf-7a3-706-ab8"
  }
}

List the Layer 4 real servers with pending changes

GET /ipvsDirector/rips/hanging

Get all hanging IPVS Director Real Servers

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

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

const data = await response.json();
Response
{
  "status": "success",
  "message": "Real Servers retrieved successfully",
  "data": [
    "111-111-111-111",
    "222-222-222-222"
  ]
}

By ID

GET /ipvsDirector/rips/{id}

Get a Real Server by Id

Path parameters
id string Required

The id of the rip.

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

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

const data = await response.json();
Response
{
  "status": "success",
  "message": "Real Servers retrieved successfully",
  "data": {
    "id": "5ce-ea7-cc0-72a",
    "name": "testingrealserver2",
    "ip": "192.168.79.101",
    "port": 81,
    "weight": 100
  }
}

PUT /ipvsDirector/rips/{id}

Edit a Real Server.

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

Path parameters
id string Required

The id of the rip.

Body parameters
name string

The identifying name for the Real Server.

ip string

The IP address of the Real Server.

port integer Required

The port that the traffic will be sent to. Leave blank for multiple ports.

weight integer

The weighting of the Real Server. All other things being equal the server will receive weight/sum_of_all_weight connections.

state string

The current state of the Real Server.

curl
curl -X PUT "https://appliance.example.com/api/v1/ipvsDirector/rips/{id}" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "<name>",
  "ip": "<ip>",
  "port": 0,
  "weight": 0,
  "state": "<state>"
}'
PHP
<?php

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

$payload = [
    'name' => '<name>',
    'ip' => '<ip>',
    'port' => 0,
    'weight' => 0,
    'state' => '<state>',
];

$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>",
    "ip": "<ip>",
    "port": 0,
    "weight": 0,
    "state": "<state>"
}

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

const data = await response.json();
Response
{
  "status": "success",
  "message": "Real Server updated successfully",
  "data": []
}

DELETE /ipvsDirector/rips/{id}

Delete a Real Server.

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

Path parameters
id string Required

The id of the rip.

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

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

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

Drain a Layer 4 real server

PUT /ipvsDirector/rips/{id}/drain

Drain a Real Server

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

Path parameters
id string Required

The id of the rip.

curl
curl -X PUT "https://appliance.example.com/api/v1/ipvsDirector/rips/{id}/drain" \
  -H "Authorization: Bearer $TOKEN"
PHP
<?php

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

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

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

Halt a Layer 4 real server

PUT /ipvsDirector/rips/{id}/halt

Halt a Real Server.

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

Path parameters
id string Required

The id of the rip.

curl
curl -X PUT "https://appliance.example.com/api/v1/ipvsDirector/rips/{id}/halt" \
  -H "Authorization: Bearer $TOKEN"
PHP
<?php

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

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

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

Bring a Layer 4 real server online

PUT /ipvsDirector/rips/{id}/online

Online a Real Server

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

Path parameters
id string Required

The id of the rip.

curl
curl -X PUT "https://appliance.example.com/api/v1/ipvsDirector/rips/{id}/online" \
  -H "Authorization: Bearer $TOKEN"
PHP
<?php

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

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

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