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 /haproxy/backends

Get all backends

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

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

const data = await response.json();
Response
{
  "status": "success",
  "message": "Backend configuration retrieved successfully",
  "data": [
    {
      "id": "5cf-4f3-1a5-977",
      "name": "testingbackend",
      "ripIds": [],
      "mode": "tcp",
      "httpPipeline": "httpKeepAlive",
      "httpPretendKeepalive": false,
      "httpAcceptInvalidResponse": false,
      "httpRequestTimeout": true,
      "httpReuseConnection": false,
      "TCPKeepalive": false,
      "balanceMode": "leastconn",
      "persistenceMode": "sourceIP",
      "persistenceTimeout": "15m",
      "persistenceTableSize": 10240,
      "httpCookieName": "SERVERID",
      "httpCookieMaxIdle": "30m",
      "httpCookieMaxLife": "12h",
      "applicationCookieName": "",
      "XFFIPPosition": -1,
      "persistenceClearStickOnDrain": false,
      "enableFeedbackAgent": false,
      "feedbackAgentPort": 3333,
      "feedbackAgentInterval": "2s",
      "fallbackPersistence": false,
      "fallbackKillConnections": false,
      "healthCheck": "connectToPort",
      "healthCheckPort": 80,
      "healthCheckInterval": "4s",
      "healthCheckRise": 2,
      "healthCheckFall": 2,
      "healthCheckRequestToSend": "/",
      "enableServerConnTimeout": true,
      "serverTimeout": "43s",
      "sendProxyProtocol": "disabled",
      "enableTProxy": false,
      "enableGzipCompression": false,
      "connectionRedispatch": true,
      "tunnelTimeout": "1h",
      "slowStartTime": "6s",
      "aclIds": [],
      "headerIds": [],
      "fallbackServerId": ""
    }
  ]
}

POST /haproxy/backends

Add a HAProxy Backend to the configuration.

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

Body parameters
name string Required

A unique identifier for the backend service.

mode default: "tcp" tcp | http
httpPipeline default: "httpKeepAlive" httpKeepAlive | httpClose | httpServerClose | httpForceClose
httpPretendKeepalive boolean default: "false"
httpAcceptInvalidResponse boolean default: "false"
httpRequestTimeout boolean default: "true"
httpReuseConnection boolean default: "false"
TCPKeepalive boolean default: "false"
abortOnClose boolean default: "false"
balanceMode default: "leastconn" leastconn | roundrobin | first | source | rdpcookie
persistenceMode default: "sourceIP" httpCookie | appSession | sslSessID | RDPSession | RDPCookie | sourceIP | httpCookieAndSourceIP | XFF
persistenceTimeout string default: "15m"
persistenceTableSize integer default: "10240"
persistenceTableIPVersion default: "4" 4 | 6 | both
httpCookieName string
httpCookieMaxIdle string default: "30m"

How long the persistence cookie may sit idle before it expires, as a HAProxy time. Empty means no idle expiry, so the cookie lasts the browser session.

httpCookieMaxLife string default: "12h"

How long the persistence cookie lives regardless of use, as a HAProxy time. Empty means no hard expiry.

httpCookieHttpOnly boolean default: false

Marks the persistence cookie HttpOnly, so page scripts cannot read it. Opt-in; off leaves the cookie exactly as before.

httpCookieSecure boolean default: false

Marks the persistence cookie Secure, so the browser only sends it over HTTPS. Persistence will not work on a service reached over plain HTTP.

httpCookieDomain string default: ""

Domain the persistence cookie is scoped to. Letters, digits, dot, hyphen and underscore only, and must contain a dot. Empty means unset, and no Domain attribute is sent.

applicationCookieName string
XFFIPPosition integer default: "-1"
persistenceClearStickOnDrain boolean default: "false"
enableFeedbackAgent boolean default: "false"
feedbackAgentPort integer default: "3333"
feedbackAgentInterval string default: "2s"
fallbackPersistence boolean default: "false"
fallbackKillConnections boolean default: "false"
healthCheck default: "connectToPort" connectToPort | negotiateHTTPGET | negotiateHTTPSGET | negotiateHTTPHEAD | negotiateHTTPHEAD | negotiateHTTPSHEAD | negotiateHTTPOPTIONS | negotiateHTTPSOPTIONS | externalScript | mysql | nocheck
healthCheckPort integer default: "80"
healthCheckInterval string default: "4s"
healthCheckRise integer default: "2"
healthCheckFall integer default: "2"
healthCheckRequestToSend string default: "/"
healthCheckResponseExpected string
healthCheckHostHeader string
healthCheckScriptId string

"]

healthCheckParameters object

The values this reference supplies for the health check it names, keyed by parameter name. Each value is an object carrying exactly one of literal or system, e.g. {"path": {"literal": "/probe"}, "hostHeader": {"system": "hostname"}}. A name the check does not declare, a missing required parameter, and a value that fails its declared type are all rejected.

healthCheckUsername string
healthCheckPassword string
enableServerConnTimeout boolean default: "true"
serverTimeout string default: "43s"
tunnelTimeout string default: "1h"
sendProxyProtocol default: "disabled" v1 | v2 | v2SSL | v2SSLCN | disabled
backendSourceAddress string
enableTProxy boolean default: "false"
enableGzipCompression boolean default: "false"
connectionRedispatch boolean default: "true"
slowStartTime string default: "6s"
encryptToRealServers boolean default: "false"
backendCAId string default: ""

Backend mTLS: id of the CA that anchors trust in the real servers' certificates. Empty means unset, and no ca-file is emitted.

backendClientCertId string default: ""

Backend mTLS: id of the certificate the appliance presents to its real servers as its own identity. Empty means unset.

verifyRealServers default: "none" none | required

Backend mTLS: whether the real servers' certificates are verified. Defaults to none, which is what an encrypted backend renders today. Only these two values: HAProxy accepts optional on a bind line but not on a server line.

verifyHost string default: ""

Backend mTLS: the identity a real server certificate must carry. Required when verifyRealServers is required, because chain-of-trust alone accepts any certificate the CA signed.

curl
curl -X POST "https://appliance.example.com/api/v1/haproxy/backends" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "<name>",
  "mode": "tcp",
  "httpPipeline": "httpKeepAlive",
  "httpPretendKeepalive": "false",
  "httpAcceptInvalidResponse": "false",
  "httpRequestTimeout": "true",
  "httpReuseConnection": "false",
  "TCPKeepalive": "false",
  "abortOnClose": "false",
  "balanceMode": "leastconn",
  "persistenceMode": "sourceIP",
  "persistenceTimeout": "15m",
  "persistenceTableSize": "10240",
  "persistenceTableIPVersion": "4",
  "httpCookieName": "<httpCookieName>",
  "httpCookieMaxIdle": "30m",
  "httpCookieMaxLife": "12h",
  "httpCookieHttpOnly": false,
  "httpCookieSecure": false,
  "httpCookieDomain": "",
  "applicationCookieName": "<applicationCookieName>",
  "XFFIPPosition": "-1",
  "persistenceClearStickOnDrain": "false",
  "enableFeedbackAgent": "false",
  "feedbackAgentPort": "3333",
  "feedbackAgentInterval": "2s",
  "fallbackPersistence": "false",
  "fallbackKillConnections": "false",
  "healthCheck": "connectToPort",
  "healthCheckPort": "80",
  "healthCheckInterval": "4s",
  "healthCheckRise": "2",
  "healthCheckFall": "2",
  "healthCheckRequestToSend": "/",
  "healthCheckResponseExpected": "<healthCheckResponseExpected>",
  "healthCheckHostHeader": "<healthCheckHostHeader>",
  "healthCheckScriptId": "<healthCheckScriptId>",
  "healthCheckParameters": {},
  "healthCheckUsername": "<healthCheckUsername>",
  "healthCheckPassword": "<healthCheckPassword>",
  "enableServerConnTimeout": "true",
  "serverTimeout": "43s",
  "tunnelTimeout": "1h",
  "sendProxyProtocol": "disabled",
  "backendSourceAddress": "<backendSourceAddress>",
  "enableTProxy": "false",
  "enableGzipCompression": "false",
  "connectionRedispatch": "true",
  "slowStartTime": "6s",
  "encryptToRealServers": "false",
  "backendCAId": "",
  "backendClientCertId": "",
  "verifyRealServers": "none",
  "verifyHost": ""
}'
PHP
<?php

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

$payload = [
    'name' => '<name>',
    'mode' => 'tcp',
    'httpPipeline' => 'httpKeepAlive',
    'httpPretendKeepalive' => 'false',
    'httpAcceptInvalidResponse' => 'false',
    'httpRequestTimeout' => 'true',
    'httpReuseConnection' => 'false',
    'TCPKeepalive' => 'false',
    'abortOnClose' => 'false',
    'balanceMode' => 'leastconn',
    'persistenceMode' => 'sourceIP',
    'persistenceTimeout' => '15m',
    'persistenceTableSize' => '10240',
    'persistenceTableIPVersion' => '4',
    'httpCookieName' => '<httpCookieName>',
    'httpCookieMaxIdle' => '30m',
    'httpCookieMaxLife' => '12h',
    'httpCookieHttpOnly' => false,
    'httpCookieSecure' => false,
    'httpCookieDomain' => '',
    'applicationCookieName' => '<applicationCookieName>',
    'XFFIPPosition' => '-1',
    'persistenceClearStickOnDrain' => 'false',
    'enableFeedbackAgent' => 'false',
    'feedbackAgentPort' => '3333',
    'feedbackAgentInterval' => '2s',
    'fallbackPersistence' => 'false',
    'fallbackKillConnections' => 'false',
    'healthCheck' => 'connectToPort',
    'healthCheckPort' => '80',
    'healthCheckInterval' => '4s',
    'healthCheckRise' => '2',
    'healthCheckFall' => '2',
    'healthCheckRequestToSend' => '/',
    'healthCheckResponseExpected' => '<healthCheckResponseExpected>',
    'healthCheckHostHeader' => '<healthCheckHostHeader>',
    'healthCheckScriptId' => '<healthCheckScriptId>',
    'healthCheckParameters' => [],
    'healthCheckUsername' => '<healthCheckUsername>',
    'healthCheckPassword' => '<healthCheckPassword>',
    'enableServerConnTimeout' => 'true',
    'serverTimeout' => '43s',
    'tunnelTimeout' => '1h',
    'sendProxyProtocol' => 'disabled',
    'backendSourceAddress' => '<backendSourceAddress>',
    'enableTProxy' => 'false',
    'enableGzipCompression' => 'false',
    'connectionRedispatch' => 'true',
    'slowStartTime' => '6s',
    'encryptToRealServers' => 'false',
    'backendCAId' => '',
    'backendClientCertId' => '',
    'verifyRealServers' => 'none',
    'verifyHost' => '',
];

$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>",
    "mode": "tcp",
    "httpPipeline": "httpKeepAlive",
    "httpPretendKeepalive": "false",
    "httpAcceptInvalidResponse": "false",
    "httpRequestTimeout": "true",
    "httpReuseConnection": "false",
    "TCPKeepalive": "false",
    "abortOnClose": "false",
    "balanceMode": "leastconn",
    "persistenceMode": "sourceIP",
    "persistenceTimeout": "15m",
    "persistenceTableSize": "10240",
    "persistenceTableIPVersion": "4",
    "httpCookieName": "<httpCookieName>",
    "httpCookieMaxIdle": "30m",
    "httpCookieMaxLife": "12h",
    "httpCookieHttpOnly": false,
    "httpCookieSecure": false,
    "httpCookieDomain": "",
    "applicationCookieName": "<applicationCookieName>",
    "XFFIPPosition": "-1",
    "persistenceClearStickOnDrain": "false",
    "enableFeedbackAgent": "false",
    "feedbackAgentPort": "3333",
    "feedbackAgentInterval": "2s",
    "fallbackPersistence": "false",
    "fallbackKillConnections": "false",
    "healthCheck": "connectToPort",
    "healthCheckPort": "80",
    "healthCheckInterval": "4s",
    "healthCheckRise": "2",
    "healthCheckFall": "2",
    "healthCheckRequestToSend": "/",
    "healthCheckResponseExpected": "<healthCheckResponseExpected>",
    "healthCheckHostHeader": "<healthCheckHostHeader>",
    "healthCheckScriptId": "<healthCheckScriptId>",
    "healthCheckParameters": {},
    "healthCheckUsername": "<healthCheckUsername>",
    "healthCheckPassword": "<healthCheckPassword>",
    "enableServerConnTimeout": "true",
    "serverTimeout": "43s",
    "tunnelTimeout": "1h",
    "sendProxyProtocol": "disabled",
    "backendSourceAddress": "<backendSourceAddress>",
    "enableTProxy": "false",
    "enableGzipCompression": "false",
    "connectionRedispatch": "true",
    "slowStartTime": "6s",
    "encryptToRealServers": "false",
    "backendCAId": "",
    "backendClientCertId": "",
    "verifyRealServers": "none",
    "verifyHost": ""
}

response = requests.post("https://appliance.example.com/api/v1/haproxy/backends", headers=headers, json=payload)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/haproxy/backends', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${token}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "name": "<name>",
  "mode": "tcp",
  "httpPipeline": "httpKeepAlive",
  "httpPretendKeepalive": "false",
  "httpAcceptInvalidResponse": "false",
  "httpRequestTimeout": "true",
  "httpReuseConnection": "false",
  "TCPKeepalive": "false",
  "abortOnClose": "false",
  "balanceMode": "leastconn",
  "persistenceMode": "sourceIP",
  "persistenceTimeout": "15m",
  "persistenceTableSize": "10240",
  "persistenceTableIPVersion": "4",
  "httpCookieName": "<httpCookieName>",
  "httpCookieMaxIdle": "30m",
  "httpCookieMaxLife": "12h",
  "httpCookieHttpOnly": false,
  "httpCookieSecure": false,
  "httpCookieDomain": "",
  "applicationCookieName": "<applicationCookieName>",
  "XFFIPPosition": "-1",
  "persistenceClearStickOnDrain": "false",
  "enableFeedbackAgent": "false",
  "feedbackAgentPort": "3333",
  "feedbackAgentInterval": "2s",
  "fallbackPersistence": "false",
  "fallbackKillConnections": "false",
  "healthCheck": "connectToPort",
  "healthCheckPort": "80",
  "healthCheckInterval": "4s",
  "healthCheckRise": "2",
  "healthCheckFall": "2",
  "healthCheckRequestToSend": "/",
  "healthCheckResponseExpected": "<healthCheckResponseExpected>",
  "healthCheckHostHeader": "<healthCheckHostHeader>",
  "healthCheckScriptId": "<healthCheckScriptId>",
  "healthCheckParameters": {},
  "healthCheckUsername": "<healthCheckUsername>",
  "healthCheckPassword": "<healthCheckPassword>",
  "enableServerConnTimeout": "true",
  "serverTimeout": "43s",
  "tunnelTimeout": "1h",
  "sendProxyProtocol": "disabled",
  "backendSourceAddress": "<backendSourceAddress>",
  "enableTProxy": "false",
  "enableGzipCompression": "false",
  "connectionRedispatch": "true",
  "slowStartTime": "6s",
  "encryptToRealServers": "false",
  "backendCAId": "",
  "backendClientCertId": "",
  "verifyRealServers": "none",
  "verifyHost": ""
}),
});

const data = await response.json();
Response
{
  "status": "success",
  "message": "Backend added successfully",
  "data": {
    "id": "5cf-4f3-1a5-977",
    "name": "BackendGroup"
  }
}

List the Layer 7 backends with pending changes

GET /haproxy/backends/hanging

Get all hanging HAProxy Backends

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

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

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

By ID

GET /haproxy/backends/{id}

Get a specific backend

Path parameters
id string Required

The id of the backend.

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

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

const data = await response.json();
Response
{
  "status": "success",
  "message": "Backend configuration retrieved successfully",
  "data": {
    "id": "5cf-4f3-1a5-977-",
    "name": "testingbackend",
    "ripIds": [],
    "mode": "tcp",
    "httpPipeline": "httpKeepAlive",
    "httpPretendKeepalive": false,
    "httpAcceptInvalidResponse": false,
    "httpRequestTimeout": true,
    "httpReuseConnection": false,
    "TCPKeepalive": false,
    "balanceMode": "leastconn",
    "persistenceMode": "sourceIP",
    "persistenceTimeout": "15m",
    "persistenceTableSize": 10240,
    "httpCookieName": "",
    "httpCookieMaxIdle": "30m",
    "httpCookieMaxLife": "12h",
    "applicationCookieName": "",
    "XFFIPPosition": -1,
    "persistenceClearStickOnDrain": false,
    "enableFeedbackAgent": false,
    "feedbackAgentPort": 3333,
    "feedbackAgentInterval": "2s",
    "fallbackPersistence": false,
    "fallbackKillConnections": false,
    "healthCheck": "connectToPort",
    "healthCheckPort": 80,
    "healthCheckInterval": "4s",
    "healthCheckRise": 2,
    "healthCheckFall": 2,
    "healthCheckRequestToSend": "/",
    "enableServerConnTimeout": true,
    "serverTimeout": "43s",
    "sendProxyProtocol": "disabled",
    "enableTProxy": false,
    "enableGzipCompression": false,
    "connectionRedispatch": true,
    "tunnelTimeout": "1h",
    "slowStartTime": "6s",
    "aclIds": [],
    "headerIds": [],
    "fallbackServerId": ""
  }
}

PUT /haproxy/backends/{id}

Edit a HAProxy Backend to the configuration.

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

A unique identifier for the backend service.

mode default: "tcp" tcp | http
httpPipeline default: "httpKeepAlive" httpKeepAlive | httpClose | httpServerClose | httpForceClose
httpPretendKeepalive boolean default: "false"
httpAcceptInvalidResponse boolean default: "false"
httpRequestTimeout boolean default: "true"
httpReuseConnection boolean default: "false"
TCPKeepalive boolean default: "false"
abortOnClose boolean default: "false"
balanceMode Required default: "leastconn" leastconn | roundrobin | first | source | rdpcookie
persistenceMode default: "sourceIP" httpCookie | appSession | sslSessID | RDPSession | RDPCookie | sourceIP | httpCookieAndSourceIP | XFF
persistenceTimeout string default: "15m"
persistenceTableSize integer default: "10240"
persistenceTableIPVersion default: "4" 4 | 6 | both
httpCookieName string
httpCookieMaxIdle string default: "30m"

How long the persistence cookie may sit idle before it expires, as a HAProxy time. Empty means no idle expiry, so the cookie lasts the browser session.

httpCookieMaxLife string default: "12h"

How long the persistence cookie lives regardless of use, as a HAProxy time. Empty means no hard expiry.

httpCookieHttpOnly boolean default: false

Marks the persistence cookie HttpOnly, so page scripts cannot read it. Opt-in; off leaves the cookie exactly as before.

httpCookieSecure boolean default: false

Marks the persistence cookie Secure, so the browser only sends it over HTTPS. Persistence will not work on a service reached over plain HTTP.

httpCookieDomain string default: ""

Domain the persistence cookie is scoped to. Letters, digits, dot, hyphen and underscore only, and must contain a dot. Empty means unset, and no Domain attribute is sent.

applicationCookieName string
XFFIPPosition integer default: "-1"
persistenceClearStickOnDrain boolean default: "false"
enableFeedbackAgent boolean default: "false"
feedbackAgentPort integer default: "3333"
feedbackAgentInterval string default: "2s"
fallbackPersistence boolean default: "false"
fallbackKillConnections boolean default: "false"
healthCheck default: "connectToPort" connectToPort | negotiateHTTPGET | negotiateHTTPSGET | negotiateHTTPHEAD | negotiateHTTPHEAD | negotiateHTTPSHEAD | negotiateHTTPOPTIONS | negotiateHTTPSOPTIONS | externalScript | mysql | nocheck
healthCheckPort integer default: "80"
healthCheckInterval string default: "4s"
healthCheckRise integer default: "2"
healthCheckFall integer default: "2"
healthCheckRequestToSend string default: "/"
healthCheckResponseExpected string
healthCheckHostHeader string
healthCheckScriptId string
healthCheckParameters object

The values this reference supplies for the health check it names, keyed by parameter name. Each value is an object carrying exactly one of literal or system, e.g. {"path": {"literal": "/probe"}, "hostHeader": {"system": "hostname"}}. A name the check does not declare, a missing required parameter, and a value that fails its declared type are all rejected.

healthCheckUsername string
healthCheckPassword string
enableServerConnTimeout boolean default: "true"
serverTimeout string default: "43s"
tunnelTimeout string default: "1h"
sendProxyProtocol default: "disabled" v1 | v2 | v2SSL | v2SSLCN | disabled
backendSourceAddress string
enableTProxy boolean default: "false"
enableGzipCompression boolean default: "false"
connectionRedispatch boolean default: "true"
slowStartTime string default: "6s"
encryptToRealServers boolean default: "false"
backendCAId string default: ""

Backend mTLS: id of the CA that anchors trust in the real servers' certificates. Empty means unset, and no ca-file is emitted.

backendClientCertId string default: ""

Backend mTLS: id of the certificate the appliance presents to its real servers as its own identity. Empty means unset.

verifyRealServers default: "none" none | required

Backend mTLS: whether the real servers' certificates are verified. Defaults to none, which is what an encrypted backend renders today. Only these two values: HAProxy accepts optional on a bind line but not on a server line.

verifyHost string default: ""

Backend mTLS: the identity a real server certificate must carry. Required when verifyRealServers is required, because chain-of-trust alone accepts any certificate the CA signed.

curl
curl -X PUT "https://appliance.example.com/api/v1/haproxy/backends/{id}" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "<name>",
  "mode": "tcp",
  "httpPipeline": "httpKeepAlive",
  "httpPretendKeepalive": "false",
  "httpAcceptInvalidResponse": "false",
  "httpRequestTimeout": "true",
  "httpReuseConnection": "false",
  "TCPKeepalive": "false",
  "abortOnClose": "false",
  "balanceMode": "leastconn",
  "persistenceMode": "sourceIP",
  "persistenceTimeout": "15m",
  "persistenceTableSize": "10240",
  "persistenceTableIPVersion": "4",
  "httpCookieName": "<httpCookieName>",
  "httpCookieMaxIdle": "30m",
  "httpCookieMaxLife": "12h",
  "httpCookieHttpOnly": false,
  "httpCookieSecure": false,
  "httpCookieDomain": "",
  "applicationCookieName": "<applicationCookieName>",
  "XFFIPPosition": "-1",
  "persistenceClearStickOnDrain": "false",
  "enableFeedbackAgent": "false",
  "feedbackAgentPort": "3333",
  "feedbackAgentInterval": "2s",
  "fallbackPersistence": "false",
  "fallbackKillConnections": "false",
  "healthCheck": "connectToPort",
  "healthCheckPort": "80",
  "healthCheckInterval": "4s",
  "healthCheckRise": "2",
  "healthCheckFall": "2",
  "healthCheckRequestToSend": "/",
  "healthCheckResponseExpected": "<healthCheckResponseExpected>",
  "healthCheckHostHeader": "<healthCheckHostHeader>",
  "healthCheckScriptId": "<healthCheckScriptId>",
  "healthCheckParameters": {},
  "healthCheckUsername": "<healthCheckUsername>",
  "healthCheckPassword": "<healthCheckPassword>",
  "enableServerConnTimeout": "true",
  "serverTimeout": "43s",
  "tunnelTimeout": "1h",
  "sendProxyProtocol": "disabled",
  "backendSourceAddress": "<backendSourceAddress>",
  "enableTProxy": "false",
  "enableGzipCompression": "false",
  "connectionRedispatch": "true",
  "slowStartTime": "6s",
  "encryptToRealServers": "false",
  "backendCAId": "",
  "backendClientCertId": "",
  "verifyRealServers": "none",
  "verifyHost": ""
}'
PHP
<?php

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

$payload = [
    'name' => '<name>',
    'mode' => 'tcp',
    'httpPipeline' => 'httpKeepAlive',
    'httpPretendKeepalive' => 'false',
    'httpAcceptInvalidResponse' => 'false',
    'httpRequestTimeout' => 'true',
    'httpReuseConnection' => 'false',
    'TCPKeepalive' => 'false',
    'abortOnClose' => 'false',
    'balanceMode' => 'leastconn',
    'persistenceMode' => 'sourceIP',
    'persistenceTimeout' => '15m',
    'persistenceTableSize' => '10240',
    'persistenceTableIPVersion' => '4',
    'httpCookieName' => '<httpCookieName>',
    'httpCookieMaxIdle' => '30m',
    'httpCookieMaxLife' => '12h',
    'httpCookieHttpOnly' => false,
    'httpCookieSecure' => false,
    'httpCookieDomain' => '',
    'applicationCookieName' => '<applicationCookieName>',
    'XFFIPPosition' => '-1',
    'persistenceClearStickOnDrain' => 'false',
    'enableFeedbackAgent' => 'false',
    'feedbackAgentPort' => '3333',
    'feedbackAgentInterval' => '2s',
    'fallbackPersistence' => 'false',
    'fallbackKillConnections' => 'false',
    'healthCheck' => 'connectToPort',
    'healthCheckPort' => '80',
    'healthCheckInterval' => '4s',
    'healthCheckRise' => '2',
    'healthCheckFall' => '2',
    'healthCheckRequestToSend' => '/',
    'healthCheckResponseExpected' => '<healthCheckResponseExpected>',
    'healthCheckHostHeader' => '<healthCheckHostHeader>',
    'healthCheckScriptId' => '<healthCheckScriptId>',
    'healthCheckParameters' => [],
    'healthCheckUsername' => '<healthCheckUsername>',
    'healthCheckPassword' => '<healthCheckPassword>',
    'enableServerConnTimeout' => 'true',
    'serverTimeout' => '43s',
    'tunnelTimeout' => '1h',
    'sendProxyProtocol' => 'disabled',
    'backendSourceAddress' => '<backendSourceAddress>',
    'enableTProxy' => 'false',
    'enableGzipCompression' => 'false',
    'connectionRedispatch' => 'true',
    'slowStartTime' => '6s',
    'encryptToRealServers' => 'false',
    'backendCAId' => '',
    'backendClientCertId' => '',
    'verifyRealServers' => 'none',
    'verifyHost' => '',
];

$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>",
    "mode": "tcp",
    "httpPipeline": "httpKeepAlive",
    "httpPretendKeepalive": "false",
    "httpAcceptInvalidResponse": "false",
    "httpRequestTimeout": "true",
    "httpReuseConnection": "false",
    "TCPKeepalive": "false",
    "abortOnClose": "false",
    "balanceMode": "leastconn",
    "persistenceMode": "sourceIP",
    "persistenceTimeout": "15m",
    "persistenceTableSize": "10240",
    "persistenceTableIPVersion": "4",
    "httpCookieName": "<httpCookieName>",
    "httpCookieMaxIdle": "30m",
    "httpCookieMaxLife": "12h",
    "httpCookieHttpOnly": false,
    "httpCookieSecure": false,
    "httpCookieDomain": "",
    "applicationCookieName": "<applicationCookieName>",
    "XFFIPPosition": "-1",
    "persistenceClearStickOnDrain": "false",
    "enableFeedbackAgent": "false",
    "feedbackAgentPort": "3333",
    "feedbackAgentInterval": "2s",
    "fallbackPersistence": "false",
    "fallbackKillConnections": "false",
    "healthCheck": "connectToPort",
    "healthCheckPort": "80",
    "healthCheckInterval": "4s",
    "healthCheckRise": "2",
    "healthCheckFall": "2",
    "healthCheckRequestToSend": "/",
    "healthCheckResponseExpected": "<healthCheckResponseExpected>",
    "healthCheckHostHeader": "<healthCheckHostHeader>",
    "healthCheckScriptId": "<healthCheckScriptId>",
    "healthCheckParameters": {},
    "healthCheckUsername": "<healthCheckUsername>",
    "healthCheckPassword": "<healthCheckPassword>",
    "enableServerConnTimeout": "true",
    "serverTimeout": "43s",
    "tunnelTimeout": "1h",
    "sendProxyProtocol": "disabled",
    "backendSourceAddress": "<backendSourceAddress>",
    "enableTProxy": "false",
    "enableGzipCompression": "false",
    "connectionRedispatch": "true",
    "slowStartTime": "6s",
    "encryptToRealServers": "false",
    "backendCAId": "",
    "backendClientCertId": "",
    "verifyRealServers": "none",
    "verifyHost": ""
}

response = requests.put("https://appliance.example.com/api/v1/haproxy/backends/{id}", headers=headers, json=payload)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/haproxy/backends/{id}', {
  method: 'PUT',
  headers: {
    Authorization: `Bearer ${token}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "name": "<name>",
  "mode": "tcp",
  "httpPipeline": "httpKeepAlive",
  "httpPretendKeepalive": "false",
  "httpAcceptInvalidResponse": "false",
  "httpRequestTimeout": "true",
  "httpReuseConnection": "false",
  "TCPKeepalive": "false",
  "abortOnClose": "false",
  "balanceMode": "leastconn",
  "persistenceMode": "sourceIP",
  "persistenceTimeout": "15m",
  "persistenceTableSize": "10240",
  "persistenceTableIPVersion": "4",
  "httpCookieName": "<httpCookieName>",
  "httpCookieMaxIdle": "30m",
  "httpCookieMaxLife": "12h",
  "httpCookieHttpOnly": false,
  "httpCookieSecure": false,
  "httpCookieDomain": "",
  "applicationCookieName": "<applicationCookieName>",
  "XFFIPPosition": "-1",
  "persistenceClearStickOnDrain": "false",
  "enableFeedbackAgent": "false",
  "feedbackAgentPort": "3333",
  "feedbackAgentInterval": "2s",
  "fallbackPersistence": "false",
  "fallbackKillConnections": "false",
  "healthCheck": "connectToPort",
  "healthCheckPort": "80",
  "healthCheckInterval": "4s",
  "healthCheckRise": "2",
  "healthCheckFall": "2",
  "healthCheckRequestToSend": "/",
  "healthCheckResponseExpected": "<healthCheckResponseExpected>",
  "healthCheckHostHeader": "<healthCheckHostHeader>",
  "healthCheckScriptId": "<healthCheckScriptId>",
  "healthCheckParameters": {},
  "healthCheckUsername": "<healthCheckUsername>",
  "healthCheckPassword": "<healthCheckPassword>",
  "enableServerConnTimeout": "true",
  "serverTimeout": "43s",
  "tunnelTimeout": "1h",
  "sendProxyProtocol": "disabled",
  "backendSourceAddress": "<backendSourceAddress>",
  "enableTProxy": "false",
  "enableGzipCompression": "false",
  "connectionRedispatch": "true",
  "slowStartTime": "6s",
  "encryptToRealServers": "false",
  "backendCAId": "",
  "backendClientCertId": "",
  "verifyRealServers": "none",
  "verifyHost": ""
}),
});

const data = await response.json();
Response
{
  "status": "success",
  "message": "Backend edited successfully",
  "data": {
    "id": "5cf-4f3-1a5-977"
  }
}

DELETE /haproxy/backends/{id}

Delete A 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/haproxy/backends/{id}" \
  -H "Authorization: Bearer $TOKEN"
PHP
<?php

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

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

List the ACLs of a Layer 7 backend

GET /haproxy/backends/{id}/acls

Get ACLS associated to a backend

Path parameters
id string Required

The id of the backend.

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

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

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

Drain a Layer 7 backend

PUT /haproxy/backends/{id}/drain

Drain all real servers associated to this 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 PUT "https://appliance.example.com/api/v1/haproxy/backends/{id}/drain" \
  -H "Authorization: Bearer $TOKEN"
PHP
<?php

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

const data = await response.json();
Response
{
  "status": "success",
  "message": "The service has been drained successfully",
  "data": []
}

Halt a Layer 7 backend

PUT /haproxy/backends/{id}/halt

Halt all real servers linked to this 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 PUT "https://appliance.example.com/api/v1/haproxy/backends/{id}/halt" \
  -H "Authorization: Bearer $TOKEN"
PHP
<?php

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

const data = await response.json();
Response
{
  "status": "success",
  "message": "The service has been halted successfully",
  "data": []
}

Bring a Layer 7 backend online

PUT /haproxy/backends/{id}/online

Online a Backend service

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

Path parameters
id string Required

The id of the backend.

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

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

const data = await response.json();
Response
{
  "status": "success",
  "message": "The service has been enabled successfully",
  "data": []
}

List the real servers of a Layer 7 backend

GET /haproxy/backends/{id}/rips

Get real servers by backend Id

Path parameters
id string Required

The id of the backend.

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

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

const data = await response.json();
Response
{
  "status": "success",
  "message": "RIPs retrieved successfully",
  "data": {
    "rips": [
      {
        "name": "testingrealserver",
        "ip": "192.168.79.101",
        "port": 80,
        "weight": 100,
        "previousweight": 100,
        "minconns": 0,
        "maxconns": 0,
        "ipversion": 4,
        "id": "5cee788d60084"
      },
      {
        "name": "testingrealserver2",
        "ip": "192.168.79.101",
        "port": 81,
        "weight": 100,
        "previousweight": 100,
        "minconns": 0,
        "maxconns": 0,
        "ipversion": 4,
        "id": "5ceea7cc072ab"
      }
    ]
  }
}