Endurance

ACLs

An ACL matches on properties of a request — host, path, headers — and decides which backend serves it. One is created with every Virtual Service to link its frontend to its backend.

ACLs

GET /haproxy/acls

Get all HAProxy ACLS

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

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

const data = await response.json();
Response
{
  "status": "success",
  "message": "ACL retrieved successfully",
  "data": [
    {
      "id": "5cf-7c9-e9d-908",
      "name": "Block admin from outside the office",
      "enabled": true,
      "conditionSet": {
        "operator": "or",
        "terms": [
          {
            "operator": "and",
            "conditionGroups": [
              {
                "operator": "or",
                "negate": false,
                "conditions": [
                  {
                    "conditionType": "pathBeg",
                    "condition": "eq",
                    "conditionValues": [
                      "/admin"
                    ]
                  }
                ]
              },
              {
                "operator": "or",
                "negate": true,
                "conditions": [
                  {
                    "conditionType": "srcBlk",
                    "condition": "eq",
                    "conditionValues": [
                      "10.0.0.0/8"
                    ]
                  }
                ]
              }
            ]
          }
        ]
      },
      "redirectType": "deny",
      "redirectCode": 403
    }
  ]
}

POST /haproxy/acls

Add An ACL Linking a frontend to a backend or other things like drop

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

Body parameters
name string Required

Human-readable label for the ACL (WebUI only; never the config identifier, which is derived from the id as rule__, one name per condition group of the condition set). Required and non-empty, max 255 chars.

enabled boolean default: "true"

When false the ACL is stored but omitted from the rendered config and skips structural/cross-ACL validation.

rawEnabled boolean default: "false"

Raw mode. When true the ACL renders rawBlock verbatim and its conditionSet and redirectType are retained but dormant, so clearing the flag restores the rule the ACL was before. Raw is a mode an ACL is in, not a kind of ACL. An ACL created with rawEnabled and no conditionSet is given an inert off-state (one alwaysFalse condition, no action) so turning raw off always leaves a valid rule.

rawBlock string

Hand-written HAProxy directives, newline-separated, rendered verbatim into this ACL’s frontend or backend section: the block owns its own acl declarations, its if clause and its action line. Required and non-empty when rawEnabled is set, max 8192 characters, no carriage returns or NUL bytes. Only checked further by haproxy -c before each apply, so it is HAProxy config authorship rather than ACL editing: a block can open a new section, and this endpoint’s permission is administrative in effect. In raw mode the phase, section-context, service-mode and duplicate checks do not run.

conditionSet object

The condition set. Three fixed levels: the set ORs its terms, a term ANDs its groups, a group ORs its conditions. ( a OR b ) AND c OR d is the deepest shape; an expression needing distribution must be supplied already distributed. When supplied it must hold at least one term, holding at least one group, holding at least one condition; 32 conditions per ACL maximum. On create, supply this or the deprecated conditionType, unless rawEnabled is set with a rawBlock. On edit, omit it to keep the stored set.

conditionType string

Deprecated: the pre-Condition-Set shape, accepted as one term holding one group holding one condition. A stored condition of 'ne' becomes the group’s negate. Cannot be combined with conditionSet in the same request.

conditionParam string

Deprecated: see conditionType.

conditionValues array

Deprecated: see conditionType.

condition string

Deprecated: see conditionType.

redirectType none | drop | deny | urlLoc | urlPre | backend | https | monitor | setPath | replacePath | setRequestHeader | captureHeader | replaceHeader | setVar | tcpReject | useServer | responseRedirect | expectProxy

Required on create unless rawEnabled is set with a rawBlock, whose directives carry their own action.

redirectLocation string

Context-dependent: URL, IP block, Backend/RealServer id, header/path value, replaceHeader replacement, or — for setVar — a HAProxy sample expression: a fetch, optionally followed by comma-separated converters (req.hdr(X-Test), path, req.hdr(Host),lower). A literal value must be wrapped as str(/api/v1); a bare path is not an expression.

redirectParam string

The header name for setRequestHeader/captureHeader/replaceHeader, the regex for replacePath — which must compile, or the request is refused — or the variable name (txn scope) for setVar.

redirectMatch string

The match regex for replaceHeader (the second operand, between the header name and the replacement). Must compile, or the request is refused.

captureLength integer

Capture length in bytes for captureHeader.

redirectCode integer

A custom http redirect code default 301

curl
curl -X POST "https://appliance.example.com/api/v1/haproxy/acls" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "<name>",
  "enabled": "true",
  "rawEnabled": "false",
  "rawBlock": "<rawBlock>",
  "conditionSet": {},
  "conditionType": "<conditionType>",
  "conditionParam": "<conditionParam>",
  "conditionValues": [
    "<conditionValues>"
  ],
  "condition": "<condition>",
  "redirectType": "none",
  "redirectLocation": "<redirectLocation>",
  "redirectParam": "<redirectParam>",
  "redirectMatch": "<redirectMatch>",
  "captureLength": 0,
  "redirectCode": 0
}'
PHP
<?php

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

$payload = [
    'name' => '<name>',
    'enabled' => 'true',
    'rawEnabled' => 'false',
    'rawBlock' => '<rawBlock>',
    'conditionSet' => [],
    'conditionType' => '<conditionType>',
    'conditionParam' => '<conditionParam>',
    'conditionValues' => [
        '<conditionValues>',
    ],
    'condition' => '<condition>',
    'redirectType' => 'none',
    'redirectLocation' => '<redirectLocation>',
    'redirectParam' => '<redirectParam>',
    'redirectMatch' => '<redirectMatch>',
    'captureLength' => 0,
    'redirectCode' => 0,
];

$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>",
    "enabled": "true",
    "rawEnabled": "false",
    "rawBlock": "<rawBlock>",
    "conditionSet": {},
    "conditionType": "<conditionType>",
    "conditionParam": "<conditionParam>",
    "conditionValues": [
        "<conditionValues>"
    ],
    "condition": "<condition>",
    "redirectType": "none",
    "redirectLocation": "<redirectLocation>",
    "redirectParam": "<redirectParam>",
    "redirectMatch": "<redirectMatch>",
    "captureLength": 0,
    "redirectCode": 0
}

response = requests.post("https://appliance.example.com/api/v1/haproxy/acls", headers=headers, json=payload)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/haproxy/acls', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${token}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "name": "<name>",
  "enabled": "true",
  "rawEnabled": "false",
  "rawBlock": "<rawBlock>",
  "conditionSet": {},
  "conditionType": "<conditionType>",
  "conditionParam": "<conditionParam>",
  "conditionValues": [
    "<conditionValues>"
  ],
  "condition": "<condition>",
  "redirectType": "none",
  "redirectLocation": "<redirectLocation>",
  "redirectParam": "<redirectParam>",
  "redirectMatch": "<redirectMatch>",
  "captureLength": 0,
  "redirectCode": 0
}),
});

const data = await response.json();
Response
{
  "status": "success",
  "message": "ACL added successfully",
  "data": {
    "id": "5ce-68c-589-22d"
  }
}

List the Layer 7 ACLs with pending changes

GET /haproxy/acls/hanging

Get all hanging HAProxy ACLS

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

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

const data = await response.json();
Response
{
  "status": "success",
  "message": "ACL retrieved successfully",
  "data": [
    {
      "id": "5cf-7c9-e9d-908",
      "name": "Block admin from outside the office",
      "enabled": true,
      "conditionSet": {
        "operator": "or",
        "terms": [
          {
            "operator": "and",
            "conditionGroups": [
              {
                "operator": "or",
                "negate": false,
                "conditions": [
                  {
                    "conditionType": "pathBeg",
                    "condition": "eq",
                    "conditionValues": [
                      "/admin"
                    ]
                  }
                ]
              },
              {
                "operator": "or",
                "negate": true,
                "conditions": [
                  {
                    "conditionType": "srcBlk",
                    "condition": "eq",
                    "conditionValues": [
                      "10.0.0.0/8"
                    ]
                  }
                ]
              }
            ]
          }
        ]
      },
      "redirectType": "deny",
      "redirectCode": 403
    }
  ]
}

Generate a raw ACL block

POST /haproxy/acls/raw-block

Render a structured rule as the Raw Block that expresses it, so an operator can take a builder-built rule into Raw Mode and hand-edit it. Read-only: it stores nothing, writes no config file and triggers no reload. The rule comes entirely from the request body — no stored ACL is read, and no id is accepted — so the acl names in the block are minted per call and bear no relation to the id of the ACL that eventually holds it. They only have to be unique within the section, and the block is the operator’s text to rename. This is a conversion, NOT a preview of the applied config, and the two differ. A condition matching several values renders an external file reference (-f {{directory}}/…​) in the applied config, and an ACL in Raw Mode writes no match file — so a block carrying that reference would point at a file nothing creates and fail haproxy -c for every service on the appliance. The values are inlined instead. Moving a value out of a match file and onto a configuration line changes how HAProxy reads it, because a match file is taken literally and a configuration line is lexed. Inlined values are therefore preceded by --, which stops HAProxy reading a value such as -f as an option, and a value carrying a character the lexer consumes is refused rather than escaped. The full refusal list: a value containing whitespace, #, a quote, a backslash or $ (all verified against 2.4.22 to change what the rule matches, silently); a value containing a line break, anywhere, since a Raw Block separates directives by line and the text after the break would become a directive the operator never wrote; an nbsrv condition (the ACL also contributes a monitor fail line, which the section places rather than the rule, and only for a monitor VIP — a conservative refusal rather than a technical impossibility, see ADR-0040); an action of none or monitor, which render no directive; a default rule whose action is not backend, since the default branch discards every other action; an action naming a backend or real server that does not resolve; a rule that renders nothing at all; and a block over the 8192-character rawBlock limit. The conversion is one-way: nothing parses a Raw Block back into a condition set. Both halves are retained — turning rawEnabled off does not delete the block, and turning it back on restores the hand-edits verbatim — but the two diverge permanently once the block is edited, because leaving Raw Mode brings back the condition set as it was, not as the block now reads. See ADR-0040 and ADR-0035.

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

Body parameters
conditionSet object

The condition set, in the same shape the create and edit endpoints take. Required unless the deprecated conditionType is supplied.

conditionType string

Deprecated: the pre-Condition-Set shape, accepted as one term holding one group holding one condition. Cannot be combined with conditionSet.

conditionParam string

Deprecated: see conditionType.

conditionValues array

Deprecated: see conditionType.

condition string

Deprecated: see conditionType.

redirectType string Required

The action, as on create. Required: without it the rule would fall back to a deny nobody wrote.

redirectLocation string

Context-dependent, as on create.

redirectParam string

As on create.

redirectMatch string

As on create.

captureLength integer

As on create.

redirectCode integer

As on create.

name string

Ignored: the name never reaches the block, so it is not required to see one.

enabled boolean

Ignored: whether a rule is rendered into the config is not what this answers, and an operator who switched a rule off still wants its text.

rawEnabled boolean

Rejected. An ACL already in Raw Mode has a block; read it from the ACL itself.

rawBlock string

Rejected, with or without rawEnabled.

curl
curl -X POST "https://appliance.example.com/api/v1/haproxy/acls/raw-block" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "conditionSet": {},
  "conditionType": "<conditionType>",
  "conditionParam": "<conditionParam>",
  "conditionValues": [
    "<conditionValues>"
  ],
  "condition": "<condition>",
  "redirectType": "<redirectType>",
  "redirectLocation": "<redirectLocation>",
  "redirectParam": "<redirectParam>",
  "redirectMatch": "<redirectMatch>",
  "captureLength": 0,
  "redirectCode": 0,
  "name": "<name>",
  "enabled": true,
  "rawEnabled": true,
  "rawBlock": "<rawBlock>"
}'
PHP
<?php

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

$payload = [
    'conditionSet' => [],
    'conditionType' => '<conditionType>',
    'conditionParam' => '<conditionParam>',
    'conditionValues' => [
        '<conditionValues>',
    ],
    'condition' => '<condition>',
    'redirectType' => '<redirectType>',
    'redirectLocation' => '<redirectLocation>',
    'redirectParam' => '<redirectParam>',
    'redirectMatch' => '<redirectMatch>',
    'captureLength' => 0,
    'redirectCode' => 0,
    'name' => '<name>',
    'enabled' => true,
    'rawEnabled' => true,
    'rawBlock' => '<rawBlock>',
];

$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 = {
    "conditionSet": {},
    "conditionType": "<conditionType>",
    "conditionParam": "<conditionParam>",
    "conditionValues": [
        "<conditionValues>"
    ],
    "condition": "<condition>",
    "redirectType": "<redirectType>",
    "redirectLocation": "<redirectLocation>",
    "redirectParam": "<redirectParam>",
    "redirectMatch": "<redirectMatch>",
    "captureLength": 0,
    "redirectCode": 0,
    "name": "<name>",
    "enabled": true,
    "rawEnabled": true,
    "rawBlock": "<rawBlock>"
}

response = requests.post("https://appliance.example.com/api/v1/haproxy/acls/raw-block", headers=headers, json=payload)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/haproxy/acls/raw-block', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${token}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "conditionSet": {},
  "conditionType": "<conditionType>",
  "conditionParam": "<conditionParam>",
  "conditionValues": [
    "<conditionValues>"
  ],
  "condition": "<condition>",
  "redirectType": "<redirectType>",
  "redirectLocation": "<redirectLocation>",
  "redirectParam": "<redirectParam>",
  "redirectMatch": "<redirectMatch>",
  "captureLength": 0,
  "redirectCode": 0,
  "name": "<name>",
  "enabled": true,
  "rawEnabled": true,
  "rawBlock": "<rawBlock>"
}),
});

const data = await response.json();
Response
{
  "status": "success",
  "message": "Raw block generated successfully.",
  "data": {
    "rawBlock": "acl rule_a3f-2b9-1c4-7de_1 path_beg,url_dec -m beg -i /api /shop\nuse_backend 333-333-333-333:Shop if rule_a3f-2b9-1c4-7de_1"
  }
}

By ID

GET /haproxy/acls/{id}

Get HAProxy ACL By Id

Path parameters
id string Required

The id of the acl.

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

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

const data = await response.json();
Response
{
  "status": "success",
  "message": "ACL retrieved successfully",
  "data": {
    "id": "111-111-111-111",
    "name": "Route the shop to the shop backend",
    "enabled": true,
    "conditionSet": {
      "operator": "or",
      "terms": [
        {
          "operator": "and",
          "conditionGroups": [
            {
              "operator": "or",
              "negate": false,
              "conditions": [
                {
                  "conditionType": "path",
                  "condition": "eq",
                  "conditionValues": [
                    "/test.stuff",
                    "/cheese.com"
                  ]
                }
              ]
            }
          ]
        }
      ]
    },
    "redirectType": "backend",
    "redirectLocation": "333-333-333-333"
  }
}

PUT /haproxy/acls/{id}

Edit an ACL Linking a frontend to a backend or other things like drop

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

Path parameters
id string Required

The id of the acl.

Body parameters
name string

Human-readable label (WebUI only). Non-empty and max 255 chars when supplied; omit to keep the stored value (e.g. when only toggling enabled).

enabled boolean

Toggle whether the ACL is rendered. Omit to keep the stored value.

conditionSet object

The condition set. Three fixed levels: the set ORs its terms, a term ANDs its groups, a group ORs its conditions. ( a OR b ) AND c OR d is the deepest shape; an expression needing distribution must be supplied already distributed. When supplied it must hold at least one term, holding at least one group, holding at least one condition; 32 conditions per ACL maximum. On create, supply this or the deprecated conditionType. On edit, omit it to keep the stored set.

conditionType string

Deprecated: the pre-Condition-Set shape, accepted as one term holding one group holding one condition. A stored condition of 'ne' becomes the group’s negate. Cannot be combined with conditionSet in the same request.

conditionParam string

Deprecated: see conditionType.

conditionValues array

Deprecated: see conditionType.

condition string

Deprecated: see conditionType.

redirectType none | drop | deny | urlLoc | urlPre | backend | https | monitor | setPath | replacePath | setRequestHeader | captureHeader | replaceHeader | setVar | tcpReject | useServer | responseRedirect | expectProxy

Omit to keep the stored action.

redirectLocation string

Context-dependent: URL, IP block, Backend/RealServer id, header/path value, replaceHeader replacement, or — for setVar — a HAProxy sample expression: a fetch, optionally followed by comma-separated converters (req.hdr(X-Test), path, req.hdr(Host),lower). A literal value must be wrapped as str(/api/v1); a bare path is not an expression.

redirectParam string

The header name for setRequestHeader/captureHeader/replaceHeader, the regex for replacePath — which must compile, or the request is refused — or the variable name (txn scope) for setVar.

redirectMatch string

The match regex for replaceHeader (the second operand, between the header name and the replacement). Must compile, or the request is refused.

captureLength integer

Capture length in bytes for captureHeader.

redirectCode integer

A custom http redirect code default 301

curl
curl -X PUT "https://appliance.example.com/api/v1/haproxy/acls/{id}" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "<name>",
  "enabled": true,
  "conditionSet": {},
  "conditionType": "<conditionType>",
  "conditionParam": "<conditionParam>",
  "conditionValues": [
    "<conditionValues>"
  ],
  "condition": "<condition>",
  "redirectType": "none",
  "redirectLocation": "<redirectLocation>",
  "redirectParam": "<redirectParam>",
  "redirectMatch": "<redirectMatch>",
  "captureLength": 0,
  "redirectCode": 0
}'
PHP
<?php

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

$payload = [
    'name' => '<name>',
    'enabled' => true,
    'conditionSet' => [],
    'conditionType' => '<conditionType>',
    'conditionParam' => '<conditionParam>',
    'conditionValues' => [
        '<conditionValues>',
    ],
    'condition' => '<condition>',
    'redirectType' => 'none',
    'redirectLocation' => '<redirectLocation>',
    'redirectParam' => '<redirectParam>',
    'redirectMatch' => '<redirectMatch>',
    'captureLength' => 0,
    'redirectCode' => 0,
];

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'PUT',
    CURLOPT_HTTPHEADER => $headers,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POSTFIELDS => json_encode($payload),
]);

$response = json_decode(curl_exec($ch), true);
curl_close($ch);
Python
import requests

headers = {"Authorization": f"Bearer {token}"}
payload = {
    "name": "<name>",
    "enabled": true,
    "conditionSet": {},
    "conditionType": "<conditionType>",
    "conditionParam": "<conditionParam>",
    "conditionValues": [
        "<conditionValues>"
    ],
    "condition": "<condition>",
    "redirectType": "none",
    "redirectLocation": "<redirectLocation>",
    "redirectParam": "<redirectParam>",
    "redirectMatch": "<redirectMatch>",
    "captureLength": 0,
    "redirectCode": 0
}

response = requests.put("https://appliance.example.com/api/v1/haproxy/acls/{id}", headers=headers, json=payload)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/haproxy/acls/{id}', {
  method: 'PUT',
  headers: {
    Authorization: `Bearer ${token}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "name": "<name>",
  "enabled": true,
  "conditionSet": {},
  "conditionType": "<conditionType>",
  "conditionParam": "<conditionParam>",
  "conditionValues": [
    "<conditionValues>"
  ],
  "condition": "<condition>",
  "redirectType": "none",
  "redirectLocation": "<redirectLocation>",
  "redirectParam": "<redirectParam>",
  "redirectMatch": "<redirectMatch>",
  "captureLength": 0,
  "redirectCode": 0
}),
});

const data = await response.json();
Response
{
  "status": "success",
  "message": "ACL edited successfully",
  "data": [
    {
      "id": "5ce68c58922d8",
      "name": "Route the shop to the shop backend",
      "enabled": true,
      "conditionSet": {
        "operator": "or",
        "terms": [
          {
            "operator": "and",
            "conditionGroups": [
              {
                "operator": "or",
                "negate": false,
                "conditions": [
                  {
                    "conditionType": "path",
                    "condition": "eq",
                    "conditionValues": [
                      "/shop"
                    ]
                  }
                ]
              }
            ]
          }
        ]
      },
      "redirectType": "backend",
      "redirectLocation": "333-333-333-333"
    }
  ]
}

DELETE /haproxy/acls/{id}

Delete an ACL from the configuration.

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

Path parameters
id string Required

The id of the acl.

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

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

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