Endurance

Stick tables

Updated

By ID

Get the persistence pins this node holds for a Layer 4 backend: which real server each client is kept on, and for how much longer. mark is that real server’s firewall mark on this node, or null when it is not reported.

GET /ipvsDirector/sticktable/{id}

Path parameters
id string Required

The id of the sticktable.

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

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

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

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

auth:bearer {
  token: {{token}}
}
Response
{
  "status": "success",
  "uid": "111-111-111-111",
  "message": "Stick table data retrieved successfully",
  "data": {
    "id": "222-222-222-222",
    "elements": [
      {
        "key": "tcp-10.0.0.1-10.10.10.10-80",
        "protocol": "tcp",
        "mark": 1,
        "expires": "3d1h5m10s",
        "clientIp": "10.10.10.10",
        "serviceIp": "10.0.0.1",
        "servicePort": 80,
        "serverIp": "192.168.1.10",
        "serverPort": 80
      }
    ]
  }
}

Remove all entries from a stick table. Where Layer 4 persistence is replicated, they are removed from the other nodes too.

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

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

const data = await response.json();
Bruno
meta {
  name: Clear a Layer 4 stick table
  type: http
  seq: 1
}

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

auth:bearer {
  token: {{token}}
}
Response
{
  "status": "success",
  "uid": "111-111-111-111",
  "message": "Stick table cleared successfully",
  "data": []
}

Delete a Layer 4 stick table entry

Remove an entry from a stick table. Where Layer 4 persistence is replicated, it is removed from the other nodes too.

DELETE /ipvsDirector/sticktable/{id}/{key}

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

Path parameters
id string Required

The id of the sticktable.

key string Required

The key of the entry to remove, as the stick table reports it: <protocol>-<serviceIp>-<clientIp>-<servicePort> with each : written as ., such as tcp-10.0.0.1-10.10.10.10-80. A key in the format before protocol was added, or one whose entry has since expired, is not found (404).

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

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

const data = await response.json();
Bruno
meta {
  name: Delete a Layer 4 stick table entry
  type: http
  seq: 1
}

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

auth:bearer {
  token: {{token}}
}
Response
{
  "status": "success",
  "uid": "111-111-111-111",
  "message": "Stick table entry removed successfully",
  "data": []
}