Endurance

Layer 4

Layer 4 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 all Real Servers from the configuration

GET /ipvsDirector/rips

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();
Bruno
meta {
  name: List the Layer 4 real servers
  type: http
  seq: 1
}

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

auth:bearer {
  token: {{token}}
}
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
    }
  ]
}

Add a Real Server to the configuration

POST /ipvsDirector/rips

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();
Bruno
meta {
  name: Create a Layer 4 real server
  type: http
  seq: 1
}

post {
  url: https://{{node-0}}:{{port}}/api/v1/ipvsDirector/rips
  body: json
  auth: bearer
}

headers {
  Content-Type: application/json
}

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

body:json {
  {
    "name": "<name>",
    "ip": "<ip>",
    "port": 0,
    "weight": "100",
    "state": "online"
  }
}
Response
{
  "status": "success",
  "message": "Real Server added successfully",
  "data": {
    "id": "5cf-7a3-706-ab8"
  }
}

List the Layer 4 real servers with pending changes

Get all hanging IPVS Director Real Servers

GET /ipvsDirector/rips/hanging

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();
Bruno
meta {
  name: List the Layer 4 real servers with pending changes
  type: http
  seq: 1
}

get {
  url: https://{{node-0}}:{{port}}/api/v1/ipvsDirector/rips/hanging
  body: none
  auth: bearer
}

auth:bearer {
  token: {{token}}
}
Response
{
  "status": "success",
  "message": "Real Servers retrieved successfully",
  "data": [
    "111-111-111-111",
    "222-222-222-222"
  ]
}

Real servers by ID

Get a Real Server by Id

GET /ipvsDirector/rips/{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();
Bruno
meta {
  name: Get a Layer 4 real server
  type: http
  seq: 1
}

get {
  url: https://{{node-0}}:{{port}}/api/v1/ipvsDirector/rips/{id}
  body: none
  auth: bearer
}

auth:bearer {
  token: {{token}}
}
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
  }
}

Edit a Real Server.

PUT /ipvsDirector/rips/{id}

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();
Bruno
meta {
  name: Update a Layer 4 real server
  type: http
  seq: 1
}

put {
  url: https://{{node-0}}:{{port}}/api/v1/ipvsDirector/rips/{id}
  body: json
  auth: bearer
}

headers {
  Content-Type: application/json
}

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

body:json {
  {
    "name": "<name>",
    "ip": "<ip>",
    "port": 0,
    "weight": 0,
    "state": "<state>"
  }
}
Response
{
  "status": "success",
  "message": "Real Server updated successfully",
  "data": []
}

Delete a Real Server.

DELETE /ipvsDirector/rips/{id}

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();
Bruno
meta {
  name: Delete a Layer 4 real server
  type: http
  seq: 1
}

delete {
  url: https://{{node-0}}:{{port}}/api/v1/ipvsDirector/rips/{id}
  body: none
  auth: bearer
}

auth:bearer {
  token: {{token}}
}
Response
{
  "status": "success",
  "message": "Real Server deleted successfully",
  "data": []
}

Drain a Layer 4 real server

Drain a Real Server

PUT /ipvsDirector/rips/{id}/drain

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();
Bruno
meta {
  name: Drain a Layer 4 real server
  type: http
  seq: 1
}

put {
  url: https://{{node-0}}:{{port}}/api/v1/ipvsDirector/rips/{id}/drain
  body: none
  auth: bearer
}

auth:bearer {
  token: {{token}}
}
Response
{
  "status": "success",
  "message": "Drained Real Server",
  "data": []
}

Halt a Layer 4 real server

Halt a Real Server.

PUT /ipvsDirector/rips/{id}/halt

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();
Bruno
meta {
  name: Halt a Layer 4 real server
  type: http
  seq: 1
}

put {
  url: https://{{node-0}}:{{port}}/api/v1/ipvsDirector/rips/{id}/halt
  body: none
  auth: bearer
}

auth:bearer {
  token: {{token}}
}
Response
{
  "status": "success",
  "message": "Halted Real Server",
  "data": []
}

Bring a Layer 4 real server online

Online a Real Server

PUT /ipvsDirector/rips/{id}/online

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();
Bruno
meta {
  name: Bring a Layer 4 real server online
  type: http
  seq: 1
}

put {
  url: https://{{node-0}}:{{port}}/api/v1/ipvsDirector/rips/{id}/online
  body: none
  auth: bearer
}

auth:bearer {
  token: {{token}}
}
Response
{
  "status": "success",
  "message": "Enabled Real Server",
  "data": []
}