Endurance

Layer 7

Layer 7 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 Stick Table data

DELETE /haproxy/sticktable/{id}

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();
Bruno
meta {
  name: Clear a Layer 7 stick table
  type: http
  seq: 1
}

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

auth:bearer {
  token: {{token}}
}
Response
{
  "status": "success",
  "message": "All stick table entries for {id} removed successfully"
}

Get a range of stick table entries

Get Stick Table data

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

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();
Bruno
meta {
  name: Get a range of stick table entries
  type: http
  seq: 1
}

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

auth:bearer {
  token: {{token}}
}
Response
{
  "status": "success",
  "message": "Stick table data retrieved successfully",
  "data": []
}

Delete a Layer 7 stick table entry

Delete Stick Table data by Type

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

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

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

auth:bearer {
  token: {{token}}
}
Response
{
  "status": "success",
  "message": "{type} entries removed from stick table successfully"
}