Endurance

Layer 7

Layer 7 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 all frontends in the system.

GET /haproxy/frontends

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

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

const data = await response.json();
Bruno
meta {
  name: List the Layer 7 frontends
  type: http
  seq: 1
}

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

auth:bearer {
  token: {{token}}
}
Response
{
  "status": "success",
  "message": "Frontends retrieved successfully.",
  "data": [
    {
      "name": "testingVIP",
      "ports": [
        7554
      ],
      "sslPorts": [
        7888
      ],
      "id": "5cf-0e9-6fa-3f5",
      "fipId": "c24-fb1-563-1c3",
      "aclIds": [],
      "mode": "tcp",
      "httpPipeLine": "httpKeepAlive",
      "httpPretendKeepalive": false,
      "httpAcceptInvalidRequest": false,
      "httpRequestTimeout": true,
      "tcpKeepalive": false,
      "maximumConnections": 40000,
      "enableClientConnTimeout": true,
      "clientTimeout": "42s",
      "setXForwardedforHeader": false,
      "httpsForceToRedirect": false,
      "httpsRedirectCode": 301,
      "acceptProxyProtocol": false,
      "hstsEnable": false,
      "hstsTimeout": 6,
      "headerIds": [],
      "unixSocket": false,
      "SSLEnable": false,
      "SSLMinVer": "TLSv1.1",
      "SSLMaxVer": "TLSv1.3",
      "SSLTLSv130rttEnable": false,
      "sslCerts": [],
      "statsId": 653199455,
      "monitorUri": "",
      "type": "frontend"
    }
  ]
}

Add a new Frontend

POST /haproxy/frontends

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

Body parameters
name string Required

The name/identifier for the frontend service.

ports array Required

The port/ports that the service will listen on. Multiple Ports can be separated by a comma i.e [80,81,82]. A port range can also be defined [[80,90]] Or a single port [80] will also be accepted.

sslPorts array Required

The port/ports that the service will listen on for ssl. Multiple Ports can be separated by a comma i.e [80,81,82]. A port range can also be defined [[80,90]] Or a single port [80] will also be accepted.

fipId string Required

The floating IP Id. Use either fipId or serviceIPId

serviceIPId string Required

The Service IP Id. Use either fipId or serviceIPId

mode Required default: "tcp" http | tcp

Switch between TCP mode and HTTP mode.

httpPipeline default: "httpKeepAlive" httpKeepAlive | httpClose | httpServerClose | httpForceClose
httpPretendKeepAlive boolean default: "false"
httpAcceptInvalidRequest boolean default: "false"
httpRequestTimeout boolean default: "true"
TCPKeepalive boolean default: "false"
maximumConnections integer default: "40000"
enableClientConnTimeout boolean default: "true"
clientTimeout string default: "42s"
setXForwardedForHeader boolean default: "false"
HTTPSForceToRedirect boolean default: "false"
HTTPSRedirectCode default: "301" 301 | 302 | 303 | 307 | 308
acceptProxyProtocol boolean default: "false"
HSTSenable boolean default: "false"
HSTSTimeout integer default: "6"
headerIds array
unixSocket boolean default: "false"
SSLEnable boolean default: "false"

Enable or Disable SSL Offloading

SSLMinVer string default: "TLSv1.1"

one of TLSv1.0, TLSv1.1, TLSv1.2, TLSv1.3

SSLMaxVer string default: "TLSv1.3"

one of TLSv1.0, TLSv1.1, TLSv1.2, TLSv1.3

SSLTLSv130rttEnable boolean default: "false"

Enable or Disable Zero Round Trips

sslCerts array

Array need to be an Array of the options of adding a cert to a frontend

mtlsCAId string default: ""

Frontend mTLS: id of the CA that anchors trust in the client’s certificate. Empty means unset, and a frontend with no CA configures no client certificate verification at all whatever mtlsVerify says, so this is the field that turns the feature on.

mtlsCRLId string default: ""

Frontend mTLS: id of a revocation list checked against the client’s certificate. Empty means unset. Rendered only alongside a CA that is being verified against.

mtlsVerify default: "required" required | optional | none

Frontend mTLS: whether the client’s certificate is verified. Defaults to required, which is what a frontend with a CA selected renders today. optional means a valid certificate or none at all: a certificate that fails to verify is refused at every level, so optional tolerates only the absence of one. none keeps the CA reference and enforces nothing. Has no effect without an mtlsCAId. Three values here where a backend takes two, because tolerating an absent certificate only means something on the accepting side of a handshake.

monitorUri string

a monitor uri

type string default: "frontend"

or monitor.

curl
curl -X POST "https://appliance.example.com/api/v1/haproxy/frontends" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "<name>",
  "ports": [
    "<ports>"
  ],
  "sslPorts": [
    "<sslPorts>"
  ],
  "fipId": "<fipId>",
  "serviceIPId": "<serviceIPId>",
  "mode": "tcp",
  "httpPipeline": "httpKeepAlive",
  "httpPretendKeepAlive": "false",
  "httpAcceptInvalidRequest": "false",
  "httpRequestTimeout": "true",
  "TCPKeepalive": "false",
  "maximumConnections": "40000",
  "enableClientConnTimeout": "true",
  "clientTimeout": "42s",
  "setXForwardedForHeader": "false",
  "HTTPSForceToRedirect": "false",
  "HTTPSRedirectCode": "301",
  "acceptProxyProtocol": "false",
  "HSTSenable": "false",
  "HSTSTimeout": "6",
  "headerIds": [
    "<headerIds>"
  ],
  "unixSocket": "false",
  "SSLEnable": "false",
  "SSLMinVer": "TLSv1.1",
  "SSLMaxVer": "TLSv1.3",
  "SSLTLSv130rttEnable": "false",
  "sslCerts": [
    "<sslCerts>"
  ],
  "mtlsCAId": "",
  "mtlsCRLId": "",
  "mtlsVerify": "required",
  "monitorUri": "<monitorUri>",
  "type": "frontend"
}'
PHP
<?php

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

$payload = [
    'name' => '<name>',
    'ports' => [
        '<ports>',
    ],
    'sslPorts' => [
        '<sslPorts>',
    ],
    'fipId' => '<fipId>',
    'serviceIPId' => '<serviceIPId>',
    'mode' => 'tcp',
    'httpPipeline' => 'httpKeepAlive',
    'httpPretendKeepAlive' => 'false',
    'httpAcceptInvalidRequest' => 'false',
    'httpRequestTimeout' => 'true',
    'TCPKeepalive' => 'false',
    'maximumConnections' => '40000',
    'enableClientConnTimeout' => 'true',
    'clientTimeout' => '42s',
    'setXForwardedForHeader' => 'false',
    'HTTPSForceToRedirect' => 'false',
    'HTTPSRedirectCode' => '301',
    'acceptProxyProtocol' => 'false',
    'HSTSenable' => 'false',
    'HSTSTimeout' => '6',
    'headerIds' => [
        '<headerIds>',
    ],
    'unixSocket' => 'false',
    'SSLEnable' => 'false',
    'SSLMinVer' => 'TLSv1.1',
    'SSLMaxVer' => 'TLSv1.3',
    'SSLTLSv130rttEnable' => 'false',
    'sslCerts' => [
        '<sslCerts>',
    ],
    'mtlsCAId' => '',
    'mtlsCRLId' => '',
    'mtlsVerify' => 'required',
    'monitorUri' => '<monitorUri>',
    'type' => 'frontend',
];

$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>",
    "ports": [
        "<ports>"
    ],
    "sslPorts": [
        "<sslPorts>"
    ],
    "fipId": "<fipId>",
    "serviceIPId": "<serviceIPId>",
    "mode": "tcp",
    "httpPipeline": "httpKeepAlive",
    "httpPretendKeepAlive": "false",
    "httpAcceptInvalidRequest": "false",
    "httpRequestTimeout": "true",
    "TCPKeepalive": "false",
    "maximumConnections": "40000",
    "enableClientConnTimeout": "true",
    "clientTimeout": "42s",
    "setXForwardedForHeader": "false",
    "HTTPSForceToRedirect": "false",
    "HTTPSRedirectCode": "301",
    "acceptProxyProtocol": "false",
    "HSTSenable": "false",
    "HSTSTimeout": "6",
    "headerIds": [
        "<headerIds>"
    ],
    "unixSocket": "false",
    "SSLEnable": "false",
    "SSLMinVer": "TLSv1.1",
    "SSLMaxVer": "TLSv1.3",
    "SSLTLSv130rttEnable": "false",
    "sslCerts": [
        "<sslCerts>"
    ],
    "mtlsCAId": "",
    "mtlsCRLId": "",
    "mtlsVerify": "required",
    "monitorUri": "<monitorUri>",
    "type": "frontend"
}

response = requests.post("https://appliance.example.com/api/v1/haproxy/frontends", headers=headers, json=payload)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/haproxy/frontends', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${token}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "name": "<name>",
  "ports": [
    "<ports>"
  ],
  "sslPorts": [
    "<sslPorts>"
  ],
  "fipId": "<fipId>",
  "serviceIPId": "<serviceIPId>",
  "mode": "tcp",
  "httpPipeline": "httpKeepAlive",
  "httpPretendKeepAlive": "false",
  "httpAcceptInvalidRequest": "false",
  "httpRequestTimeout": "true",
  "TCPKeepalive": "false",
  "maximumConnections": "40000",
  "enableClientConnTimeout": "true",
  "clientTimeout": "42s",
  "setXForwardedForHeader": "false",
  "HTTPSForceToRedirect": "false",
  "HTTPSRedirectCode": "301",
  "acceptProxyProtocol": "false",
  "HSTSenable": "false",
  "HSTSTimeout": "6",
  "headerIds": [
    "<headerIds>"
  ],
  "unixSocket": "false",
  "SSLEnable": "false",
  "SSLMinVer": "TLSv1.1",
  "SSLMaxVer": "TLSv1.3",
  "SSLTLSv130rttEnable": "false",
  "sslCerts": [
    "<sslCerts>"
  ],
  "mtlsCAId": "",
  "mtlsCRLId": "",
  "mtlsVerify": "required",
  "monitorUri": "<monitorUri>",
  "type": "frontend"
}),
});

const data = await response.json();
Bruno
meta {
  name: Create a Layer 7 frontend
  type: http
  seq: 1
}

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

headers {
  Content-Type: application/json
}

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

body:json {
  {
    "name": "<name>",
    "ports": [
      "<ports>"
    ],
    "sslPorts": [
      "<sslPorts>"
    ],
    "fipId": "<fipId>",
    "serviceIPId": "<serviceIPId>",
    "mode": "tcp",
    "httpPipeline": "httpKeepAlive",
    "httpPretendKeepAlive": "false",
    "httpAcceptInvalidRequest": "false",
    "httpRequestTimeout": "true",
    "TCPKeepalive": "false",
    "maximumConnections": "40000",
    "enableClientConnTimeout": "true",
    "clientTimeout": "42s",
    "setXForwardedForHeader": "false",
    "HTTPSForceToRedirect": "false",
    "HTTPSRedirectCode": "301",
    "acceptProxyProtocol": "false",
    "HSTSenable": "false",
    "HSTSTimeout": "6",
    "headerIds": [
      "<headerIds>"
    ],
    "unixSocket": "false",
    "SSLEnable": "false",
    "SSLMinVer": "TLSv1.1",
    "SSLMaxVer": "TLSv1.3",
    "SSLTLSv130rttEnable": "false",
    "sslCerts": [
      "<sslCerts>"
    ],
    "mtlsCAId": "",
    "mtlsCRLId": "",
    "mtlsVerify": "required",
    "monitorUri": "<monitorUri>",
    "type": "frontend"
  }
}
Response
{
  "status": "success",
  "message": "Frontend Added Successfully.",
  "data": {
    "vip": {
      "id": "5cf0e96fa3f54"
    }
  }
}

By ID

Get a specific frontend

GET /haproxy/frontends/{id}

Path parameters
id string Required

The id of the frontend.

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

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

const data = await response.json();
Bruno
meta {
  name: Get a Layer 7 frontend
  type: http
  seq: 1
}

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

auth:bearer {
  token: {{token}}
}
Response
{
  "status": "success",
  "message": "Frontends retrieved successfully.",
  "data": {
    "name": "testingVIP",
    "ports": [
      7554
    ],
    "sslPorts": [
      7888
    ],
    "id": "5cf-0e9-6fa-3f5",
    "fipId": "c24-fb1-563-1c3",
    "aclIds": [],
    "mode": "tcp",
    "httpPipeLine": "httpKeepAlive",
    "httpPretendKeepalive": false,
    "httpAcceptInvalidRequest": false,
    "httpRequestTimeout": true,
    "tcpKeepalive": false,
    "maximumConnections": 40000,
    "enableClientConnTimeout": true,
    "clientTimeout": "42s",
    "setXForwardedforHeader": false,
    "httpsForceToRedirect": false,
    "httpsRedirectCode": 301,
    "acceptProxyProtocol": false,
    "hstsEnable": false,
    "hstsTimeout": 6,
    "headerIds": [],
    "unixSocket": false,
    "SSLEnable": false,
    "SSLMinVer": "TLSv1.1",
    "SSLMaxVer": "TLSv1.3",
    "SSLTLSv130rttEnable": false,
    "sslCerts": [],
    "statsId": 653199455,
    "monitorUri": "",
    "type": "frontend"
  }
}

Edit A frontend.

PUT /haproxy/frontends/{id}

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

Path parameters
id string Required

The id of the frontend.

Body parameters
name string Required

The name/identifier for the frontend service.

ports array Required

The port/ports that the service will listen on. Multiple Ports can be separated by a comma i.e [80,81,82] A port range can also be defined [[80,90]] Or a single port [80] will also be accepted.

sslPorts array Required

The port/ports that the service will listen on for ssl. Multiple Ports can be separated by a comma i.e [80,81,82]. A port range can also be defined [[80,90]] Or a single port [80] will also be accepted.

fipId string Required

The floating IP Id. Use either fipId or serviceIPId

serviceIPId string Required

The Service IP Id. Use either fipId or serviceIPId

mode default: "tcp" http | tcp

Switch between TCP mode and HTTP mode.

httpPipeline default: "httpKeepAlive" httpKeepAlive | httpClose | httpServerClose | httpForceClose
httpPretendKeepAlive boolean default: "false"
httpAcceptInvalidRequest boolean default: "false"
httpRequestTimeout boolean default: "true"
TCPKeepalive boolean default: "false"
maximumConnections integer default: "40000"
enableClientConnTimeout boolean default: "true"
clientTimeout string default: "42s"
setXForwardedForHeader boolean default: "false"
HTTPSForceToRedirect boolean default: "false"
HTTPSRedirectCode default: "301" 301 | 302 | 303 | 307 | 308
acceptProxyProtocol boolean default: "false"
HSTSenable boolean default: "false"
HSTSTimeout integer default: "6"
headerIds array
unixSocket boolean default: "false"
SSLEnable boolean default: "false"

Enable or Disable SSL Offloading

SSLMinVer string default: "TLSv1.1"

one of TLSv1.0, TLSv1.1, TLSv1.2, TLSv1.3

SSLMaxVer string default: "TLSv1.3"

one of TLSv1.0, TLSv1.1, TLSv1.2, TLSv1.3

SSLTLSv130rttEnable boolean default: "false"

Enable or Disable Zero Round Trips

sslCerts array

Array need to be an Array of the options of adding a cert to a frontend

mtlsCAId string default: ""

Frontend mTLS: id of the CA that anchors trust in the client’s certificate. Empty means unset, and a frontend with no CA configures no client certificate verification at all whatever mtlsVerify says, so this is the field that turns the feature on.

mtlsCRLId string default: ""

Frontend mTLS: id of a revocation list checked against the client’s certificate. Empty means unset. Rendered only alongside a CA that is being verified against.

mtlsVerify default: "required" required | optional | none

Frontend mTLS: whether the client’s certificate is verified. Defaults to required, which is what a frontend with a CA selected renders today. optional means a valid certificate or none at all: a certificate that fails to verify is refused at every level, so optional tolerates only the absence of one. none keeps the CA reference and enforces nothing. Has no effect without an mtlsCAId. Three values here where a backend takes two, because tolerating an absent certificate only means something on the accepting side of a handshake.

monitorUri string

a monitor uri

type string default: "frontend"

frontend or monitor.

curl
curl -X PUT "https://appliance.example.com/api/v1/haproxy/frontends/{id}" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "<name>",
  "ports": [
    "<ports>"
  ],
  "sslPorts": [
    "<sslPorts>"
  ],
  "fipId": "<fipId>",
  "serviceIPId": "<serviceIPId>",
  "mode": "tcp",
  "httpPipeline": "httpKeepAlive",
  "httpPretendKeepAlive": "false",
  "httpAcceptInvalidRequest": "false",
  "httpRequestTimeout": "true",
  "TCPKeepalive": "false",
  "maximumConnections": "40000",
  "enableClientConnTimeout": "true",
  "clientTimeout": "42s",
  "setXForwardedForHeader": "false",
  "HTTPSForceToRedirect": "false",
  "HTTPSRedirectCode": "301",
  "acceptProxyProtocol": "false",
  "HSTSenable": "false",
  "HSTSTimeout": "6",
  "headerIds": [
    "<headerIds>"
  ],
  "unixSocket": "false",
  "SSLEnable": "false",
  "SSLMinVer": "TLSv1.1",
  "SSLMaxVer": "TLSv1.3",
  "SSLTLSv130rttEnable": "false",
  "sslCerts": [
    "<sslCerts>"
  ],
  "mtlsCAId": "",
  "mtlsCRLId": "",
  "mtlsVerify": "required",
  "monitorUri": "<monitorUri>",
  "type": "frontend"
}'
PHP
<?php

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

$payload = [
    'name' => '<name>',
    'ports' => [
        '<ports>',
    ],
    'sslPorts' => [
        '<sslPorts>',
    ],
    'fipId' => '<fipId>',
    'serviceIPId' => '<serviceIPId>',
    'mode' => 'tcp',
    'httpPipeline' => 'httpKeepAlive',
    'httpPretendKeepAlive' => 'false',
    'httpAcceptInvalidRequest' => 'false',
    'httpRequestTimeout' => 'true',
    'TCPKeepalive' => 'false',
    'maximumConnections' => '40000',
    'enableClientConnTimeout' => 'true',
    'clientTimeout' => '42s',
    'setXForwardedForHeader' => 'false',
    'HTTPSForceToRedirect' => 'false',
    'HTTPSRedirectCode' => '301',
    'acceptProxyProtocol' => 'false',
    'HSTSenable' => 'false',
    'HSTSTimeout' => '6',
    'headerIds' => [
        '<headerIds>',
    ],
    'unixSocket' => 'false',
    'SSLEnable' => 'false',
    'SSLMinVer' => 'TLSv1.1',
    'SSLMaxVer' => 'TLSv1.3',
    'SSLTLSv130rttEnable' => 'false',
    'sslCerts' => [
        '<sslCerts>',
    ],
    'mtlsCAId' => '',
    'mtlsCRLId' => '',
    'mtlsVerify' => 'required',
    'monitorUri' => '<monitorUri>',
    'type' => 'frontend',
];

$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>",
    "ports": [
        "<ports>"
    ],
    "sslPorts": [
        "<sslPorts>"
    ],
    "fipId": "<fipId>",
    "serviceIPId": "<serviceIPId>",
    "mode": "tcp",
    "httpPipeline": "httpKeepAlive",
    "httpPretendKeepAlive": "false",
    "httpAcceptInvalidRequest": "false",
    "httpRequestTimeout": "true",
    "TCPKeepalive": "false",
    "maximumConnections": "40000",
    "enableClientConnTimeout": "true",
    "clientTimeout": "42s",
    "setXForwardedForHeader": "false",
    "HTTPSForceToRedirect": "false",
    "HTTPSRedirectCode": "301",
    "acceptProxyProtocol": "false",
    "HSTSenable": "false",
    "HSTSTimeout": "6",
    "headerIds": [
        "<headerIds>"
    ],
    "unixSocket": "false",
    "SSLEnable": "false",
    "SSLMinVer": "TLSv1.1",
    "SSLMaxVer": "TLSv1.3",
    "SSLTLSv130rttEnable": "false",
    "sslCerts": [
        "<sslCerts>"
    ],
    "mtlsCAId": "",
    "mtlsCRLId": "",
    "mtlsVerify": "required",
    "monitorUri": "<monitorUri>",
    "type": "frontend"
}

response = requests.put("https://appliance.example.com/api/v1/haproxy/frontends/{id}", headers=headers, json=payload)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/haproxy/frontends/{id}', {
  method: 'PUT',
  headers: {
    Authorization: `Bearer ${token}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "name": "<name>",
  "ports": [
    "<ports>"
  ],
  "sslPorts": [
    "<sslPorts>"
  ],
  "fipId": "<fipId>",
  "serviceIPId": "<serviceIPId>",
  "mode": "tcp",
  "httpPipeline": "httpKeepAlive",
  "httpPretendKeepAlive": "false",
  "httpAcceptInvalidRequest": "false",
  "httpRequestTimeout": "true",
  "TCPKeepalive": "false",
  "maximumConnections": "40000",
  "enableClientConnTimeout": "true",
  "clientTimeout": "42s",
  "setXForwardedForHeader": "false",
  "HTTPSForceToRedirect": "false",
  "HTTPSRedirectCode": "301",
  "acceptProxyProtocol": "false",
  "HSTSenable": "false",
  "HSTSTimeout": "6",
  "headerIds": [
    "<headerIds>"
  ],
  "unixSocket": "false",
  "SSLEnable": "false",
  "SSLMinVer": "TLSv1.1",
  "SSLMaxVer": "TLSv1.3",
  "SSLTLSv130rttEnable": "false",
  "sslCerts": [
    "<sslCerts>"
  ],
  "mtlsCAId": "",
  "mtlsCRLId": "",
  "mtlsVerify": "required",
  "monitorUri": "<monitorUri>",
  "type": "frontend"
}),
});

const data = await response.json();
Bruno
meta {
  name: Update a Layer 7 frontend
  type: http
  seq: 1
}

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

headers {
  Content-Type: application/json
}

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

body:json {
  {
    "name": "<name>",
    "ports": [
      "<ports>"
    ],
    "sslPorts": [
      "<sslPorts>"
    ],
    "fipId": "<fipId>",
    "serviceIPId": "<serviceIPId>",
    "mode": "tcp",
    "httpPipeline": "httpKeepAlive",
    "httpPretendKeepAlive": "false",
    "httpAcceptInvalidRequest": "false",
    "httpRequestTimeout": "true",
    "TCPKeepalive": "false",
    "maximumConnections": "40000",
    "enableClientConnTimeout": "true",
    "clientTimeout": "42s",
    "setXForwardedForHeader": "false",
    "HTTPSForceToRedirect": "false",
    "HTTPSRedirectCode": "301",
    "acceptProxyProtocol": "false",
    "HSTSenable": "false",
    "HSTSTimeout": "6",
    "headerIds": [
      "<headerIds>"
    ],
    "unixSocket": "false",
    "SSLEnable": "false",
    "SSLMinVer": "TLSv1.1",
    "SSLMaxVer": "TLSv1.3",
    "SSLTLSv130rttEnable": "false",
    "sslCerts": [
      "<sslCerts>"
    ],
    "mtlsCAId": "",
    "mtlsCRLId": "",
    "mtlsVerify": "required",
    "monitorUri": "<monitorUri>",
    "type": "frontend"
  }
}
Response
{
  "status": "success",
  "message": "Frontend Edited Successfully.",
  "data": {
    "vip": {
      "name": "testingVIP1",
      "ports": [
        7554
      ],
      "id": "5cf-0fe-9e3-985",
      "fipId": "c24-fb1-563-1c3",
      "aclIds": [],
      "mode": "tcp",
      "httpPipeLine": "httpKeepAlive",
      "httpPretendKeepalive": false,
      "httpAcceptInvalidRequest": false,
      "httpRequestTimeout": true,
      "tcpKeepalive": false,
      "maximumConnections": 40000,
      "enableClientConnTimeout": true,
      "clientTimeout": "42s",
      "setXForwardedforHeader": false,
      "httpsForceToRedirect": false,
      "httpsRedirectCode": 301,
      "acceptProxyProtocol": false,
      "hstsEnable": false,
      "hstsTimeout": 6,
      "headerIds": [],
      "unixSocket": false,
      "SSLEnable": false,
      "SSLMinVer": "TLSv1.1",
      "SSLMaxVer": "TLSv1.3",
      "SSLTLSv130rttEnable": false,
      "sslCerts": [],
      "statsId": 653199455,
      "monitorUri": "",
      "type": "frontend"
    }
  }
}

Delete a frontend from the configuration

DELETE /haproxy/frontends/{id}

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

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

const data = await response.json();
Bruno
meta {
  name: Delete a Layer 7 frontend
  type: http
  seq: 1
}

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

auth:bearer {
  token: {{token}}
}
Response
{
  "status": "success",
  "message": "Frontend config deleted successfully.",
  "data": []
}

List the ACLs of a Layer 7 frontend

Get ACLS associated with a frontends.

GET /haproxy/frontends/{id}/acls

Path parameters
id string Required

The id of the frontend.

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

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

const data = await response.json();
Bruno
meta {
  name: List the ACLs of a Layer 7 frontend
  type: http
  seq: 1
}

get {
  url: https://{{node-0}}:{{port}}/api/v1/haproxy/frontends/{id}/acls
  body: none
  auth: bearer
}

auth:bearer {
  token: {{token}}
}
Response
{
  "status": "success",
  "message": "ACL retrieved successfully",
  "data": [
    {
      "id": "111-111-111-111",
      "conditionType": "path",
      "condition": "eq",
      "conditionValues": [
        "/test.stuff",
        "/cheese.com"
      ],
      "redirectType": "backend",
      "redirectLocation": "333-333-333-333"
    }
  ]
}

Delete a Layer 7 frontend and everything attached to it

Delete a frontend and all associated from the configuration

DELETE /haproxy/frontends/{id}/all

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

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

const data = await response.json();
Bruno
meta {
  name: Delete a Layer 7 frontend and everything attached to it
  type: http
  seq: 1
}

delete {
  url: https://{{node-0}}:{{port}}/api/v1/haproxy/frontends/{id}/all
  body: none
  auth: bearer
}

auth:bearer {
  token: {{token}}
}
Response
{
  "status": "success",
  "message": "Frontend config and all associated deleted successfully.",
  "data": []
}

List the backends of a Layer 7 frontend

Get all backends linked to a frontend.

GET /haproxy/frontends/{id}/backends

Path parameters
id string Required

The id of the frontend.

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

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

const data = await response.json();
Bruno
meta {
  name: List the backends of a Layer 7 frontend
  type: http
  seq: 1
}

get {
  url: https://{{node-0}}:{{port}}/api/v1/haproxy/frontends/{id}/backends
  body: none
  auth: bearer
}

auth:bearer {
  token: {{token}}
}
Response
{
  "status": "success",
  "message": "Backends linked to frontend retrieved successfully.",
  "data": []
}

Certificates

Get the certificates associated with a frontend.

GET /haproxy/frontends/{id}/certs

Path parameters
id string Required

The id of the frontend.

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

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

const data = await response.json();
Bruno
meta {
  name: List the certificates of a Layer 7 frontend
  type: http
  seq: 1
}

get {
  url: https://{{node-0}}:{{port}}/api/v1/haproxy/frontends/{id}/certs
  body: none
  auth: bearer
}

auth:bearer {
  token: {{token}}
}
Response
{
  "status": "success",
  "message": "The associated certificates for the frontend",
  "data": {
    "certs": [
      {
        "certificateId": "123-123-123-123",
        "certMatchHostnames": [],
        "certDenyHostnames": [],
        "cipherListId": "123-123-123-123"
      }
    ]
  }
}

Add an SSL certificate to a HAProxy frontend for use with SSL Decoding.

POST /haproxy/frontends/{id}/certs

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

Path parameters
id string Required

The id of the frontend.

Body parameters
certificateId string Required

The Id of a certificate on the system.

certMatchHostnames array

Hostnames what will be used with this certificate (if unsure leave empty)

certDenyHostnames array

Hostnames that will be denied when using this certificate

cipherListId string Required

Unique Id generated for this cipherList

curl
curl -X POST "https://appliance.example.com/api/v1/haproxy/frontends/{id}/certs" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "certificateId": "<certificateId>",
  "certMatchHostnames": [
    "<certMatchHostnames>"
  ],
  "certDenyHostnames": [
    "<certDenyHostnames>"
  ],
  "cipherListId": "<cipherListId>"
}'
PHP
<?php

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

$payload = [
    'certificateId' => '<certificateId>',
    'certMatchHostnames' => [
        '<certMatchHostnames>',
    ],
    'certDenyHostnames' => [
        '<certDenyHostnames>',
    ],
    'cipherListId' => '<cipherListId>',
];

$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 = {
    "certificateId": "<certificateId>",
    "certMatchHostnames": [
        "<certMatchHostnames>"
    ],
    "certDenyHostnames": [
        "<certDenyHostnames>"
    ],
    "cipherListId": "<cipherListId>"
}

response = requests.post("https://appliance.example.com/api/v1/haproxy/frontends/{id}/certs", headers=headers, json=payload)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/haproxy/frontends/{id}/certs', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${token}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "certificateId": "<certificateId>",
  "certMatchHostnames": [
    "<certMatchHostnames>"
  ],
  "certDenyHostnames": [
    "<certDenyHostnames>"
  ],
  "cipherListId": "<cipherListId>"
}),
});

const data = await response.json();
Bruno
meta {
  name: Add a certificate to a Layer 7 frontend
  type: http
  seq: 1
}

post {
  url: https://{{node-0}}:{{port}}/api/v1/haproxy/frontends/{id}/certs
  body: json
  auth: bearer
}

headers {
  Content-Type: application/json
}

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

body:json {
  {
    "certificateId": "<certificateId>",
    "certMatchHostnames": [
      "<certMatchHostnames>"
    ],
    "certDenyHostnames": [
      "<certDenyHostnames>"
    ],
    "cipherListId": "<cipherListId>"
  }
}
Response
{
  "status": "success",
  "message": "The certificate has been added to the VIP successfully",
  "data": []
}

Certificates by ID

Edit SSL certificate options applied to a Haproxy SSL Termination.

PUT /haproxy/frontends/{id}/certs/{certId}

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

Path parameters
id string Required

The id of the frontend.

certId string Required

The id of the certificate.

Body parameters
certificateId string Required

The Id of a certificate on the system.

certMatchHostnames array

Hostnames what will be used with this certificate (if unsure leave empty)

certDenyHostnames array

Hostnames that will be denied when using this certificate

cipherListId string Required

Unique Id generated for this cipherList

curl
curl -X PUT "https://appliance.example.com/api/v1/haproxy/frontends/{id}/certs/{certId}" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "certificateId": "<certificateId>",
  "certMatchHostnames": [
    "<certMatchHostnames>"
  ],
  "certDenyHostnames": [
    "<certDenyHostnames>"
  ],
  "cipherListId": "<cipherListId>"
}'
PHP
<?php

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

$payload = [
    'certificateId' => '<certificateId>',
    'certMatchHostnames' => [
        '<certMatchHostnames>',
    ],
    'certDenyHostnames' => [
        '<certDenyHostnames>',
    ],
    'cipherListId' => '<cipherListId>',
];

$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 = {
    "certificateId": "<certificateId>",
    "certMatchHostnames": [
        "<certMatchHostnames>"
    ],
    "certDenyHostnames": [
        "<certDenyHostnames>"
    ],
    "cipherListId": "<cipherListId>"
}

response = requests.put("https://appliance.example.com/api/v1/haproxy/frontends/{id}/certs/{certId}", headers=headers, json=payload)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/haproxy/frontends/{id}/certs/{certId}', {
  method: 'PUT',
  headers: {
    Authorization: `Bearer ${token}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "certificateId": "<certificateId>",
  "certMatchHostnames": [
    "<certMatchHostnames>"
  ],
  "certDenyHostnames": [
    "<certDenyHostnames>"
  ],
  "cipherListId": "<cipherListId>"
}),
});

const data = await response.json();
Bruno
meta {
  name: Update a Layer 7 certificate
  type: http
  seq: 1
}

put {
  url: https://{{node-0}}:{{port}}/api/v1/haproxy/frontends/{id}/certs/{certId}
  body: json
  auth: bearer
}

headers {
  Content-Type: application/json
}

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

body:json {
  {
    "certificateId": "<certificateId>",
    "certMatchHostnames": [
      "<certMatchHostnames>"
    ],
    "certDenyHostnames": [
      "<certDenyHostnames>"
    ],
    "cipherListId": "<cipherListId>"
  }
}
Response
{
  "status": "success",
  "message": "The certificate has been edited successfully",
  "data": []
}

Remove and SSL certificate from the HAProxy configuration.

DELETE /haproxy/frontends/{id}/certs/{certId}

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

Path parameters
id string Required

The id of the frontend.

certId string Required

The id of the certificate.

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

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

const data = await response.json();
Bruno
meta {
  name: Remove a certificate from a Layer 7 frontend
  type: http
  seq: 1
}

delete {
  url: https://{{node-0}}:{{port}}/api/v1/haproxy/frontends/{id}/certs/{certId}
  body: none
  auth: bearer
}

auth:bearer {
  token: {{token}}
}
Response
{
  "status": "success",
  "message": "Certificate Removed Successfully.",
  "data": []
}

Drain a Layer 7 frontend

Drain all real servers linked to each backend linked to this frontend

PUT /haproxy/frontends/{id}/drain

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

Path parameters
id string Required

The id of the frontend.

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

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

const data = await response.json();
Bruno
meta {
  name: Drain a Layer 7 frontend
  type: http
  seq: 1
}

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

auth:bearer {
  token: {{token}}
}
Response
{
  "status": "success",
  "message": "The service has been drained successfully",
  "data": []
}

Halt a Layer 7 frontend

This will halt all real servers associated to every backend associated to this frontend.

PUT /haproxy/frontends/{id}/halt

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

Path parameters
id string Required

The id of the frontend.

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

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

const data = await response.json();
Bruno
meta {
  name: Halt a Layer 7 frontend
  type: http
  seq: 1
}

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

auth:bearer {
  token: {{token}}
}
Response
{
  "status": "success",
  "message": "The service has been halted successfully",
  "data": []
}

Bring a Layer 7 frontend online

Enable all real servers linked to each backend linked to this frontend

PUT /haproxy/frontends/{id}/online

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

Path parameters
id string Required

The id of the frontend.

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

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

const data = await response.json();
Bruno
meta {
  name: Bring a Layer 7 frontend online
  type: http
  seq: 1
}

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

auth:bearer {
  token: {{token}}
}
Response
{
  "status": "success",
  "message": "The service has been enabled successfully"
}