Endurance

Stick tables

A stick table holds the entries that make a Layer 7 service persistent, so a client keeps returning to the same Real Server.

Clear a Layer 7 stick table

DELETE /haproxy/sticktable/{id}

Delete Stick Table data

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

Path parameters
id string Required

The id of the sticktable.

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

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

const data = await response.json();
Response
{
  "status": "success",
  "message": "All stick table entries for {id} removed successfully"
}

Get a range of stick table entries

GET /haproxy/sticktable/{id}/{start}/{end}

Get Stick Table data

Path parameters
id string Required

The id of the sticktable.

start string Required

position in the returned array.

end string Required

position in the returned array.

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

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

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

Delete a Layer 7 stick table entry

DELETE /haproxy/sticktable/{id}/{type}/{item}

Delete Stick Table data by Type

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

Path parameters
id string Required

The id of the sticktable. from the stick table or the key (as in the key from the stick table) and that can be removed as well.

type string Required

should be either rip or key to differentiate the item param.

item string Required

can be either the ripLabel/id to remove all entries of the ripLabel/id

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

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

const data = await response.json();
Response
{
  "status": "success",
  "message": "{type} entries removed from stick table successfully"
}