Pulse HA

PulseHA decides which appliance is active. It watches the peer and moves the Floating IPs when the active node stops answering.

PulseHA

GET /pulseha

Get PulseHA Config

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

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

const data = await response.json();
Response
{
  "status": "success",
  "message": "Successfully retrieved PulseHA config",
  "data": {
    "sipId": "352-e54-567-a5d",
    "port": 9083,
    "capacity": 0
  }
}

PUT /pulseha

Update PulseHA Configuration

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

Body parameters
sipId string Required
port integer Required
curl
curl -X PUT "https://appliance.example.com/api/v1/pulseha" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "sipId": "<sipId>",
  "port": 0
}'
PHP
<?php

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

$payload = [
    'sipId' => '<sipId>',
    'port' => 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 = {
    "sipId": "<sipId>",
    "port": 0
}

response = requests.put("https://appliance.example.com/api/v1/pulseha", headers=headers, json=payload)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/pulseha', {
  method: 'PUT',
  headers: {
    Authorization: `Bearer ${token}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "sipId": "<sipId>",
  "port": 0
}),
});

const data = await response.json();
Response
{
  "status": "success",
  "message": "Successfully updated PulseHA config"
}

Global settings

GET /pulseha/globals

Get PulseHA Global Configuration

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

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

const data = await response.json();
Response
{
  "status": "success",
  "message": "Successfully retrieved PulseHA Globals config",
  "data": {
    "hcInterval": 1000,
    "foInterval": 2000,
    "foLimit": 5000,
    "logLevel": "info"
  }
}

PUT /pulseha/globals

Update PulseHA Global Configuration

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

Body parameters
hcInterval integer Required
foInterval integer Required
foLimit integer Required
logLevel string Required
autoFailback boolean Required
curl
curl -X PUT "https://appliance.example.com/api/v1/pulseha/globals" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "hcInterval": 0,
  "foInterval": 0,
  "foLimit": 0,
  "logLevel": "<logLevel>",
  "autoFailback": true
}'
PHP
<?php

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

$payload = [
    'hcInterval' => 0,
    'foInterval' => 0,
    'foLimit' => 0,
    'logLevel' => '<logLevel>',
    'autoFailback' => true,
];

$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 = {
    "hcInterval": 0,
    "foInterval": 0,
    "foLimit": 0,
    "logLevel": "<logLevel>",
    "autoFailback": true
}

response = requests.put("https://appliance.example.com/api/v1/pulseha/globals", headers=headers, json=payload)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/pulseha/globals', {
  method: 'PUT',
  headers: {
    Authorization: `Bearer ${token}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "hcInterval": 0,
  "foInterval": 0,
  "foLimit": 0,
  "logLevel": "<logLevel>",
  "autoFailback": true
}),
});

const data = await response.json();
Response
{
  "status": "success",
  "message": "Successfully updated PulseHA Globals config"
}

Get the PulseHA configuration of a node

GET /{applianceId}/pulseha

Get a Cluster Node’s PulseHA Config

Path parameters
applianceId string Required
curl
curl -X GET "https://appliance.example.com/api/v1/{applianceId}/pulseha" \
  -H "Authorization: Bearer $TOKEN"
PHP
<?php

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

const data = await response.json();
Response
{
  "status": "success",
  "message": "Successfully retrieved PulseHA config",
  "data": {
    "sipId": "352-e54-567-a5d",
    "port": 9083,
    "capacity": 4
  }
}

Set the capacity of a node

PUT /{applianceId}/pulseha/capacity

Set a Cluster Node’s Node Capacity — the most floating IPs it may host. 0 means unlimited. Lowering a cap below what the node already holds does not move anything: the node simply stops being given new floating IPs.

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

Path parameters
applianceId string Required

.Body parameters

capacity integer Required
curl
curl -X PUT "https://appliance.example.com/api/v1/{applianceId}/pulseha/capacity" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "capacity": 0
}'
PHP
<?php

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

$payload = [
    'capacity' => 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 = {
    "capacity": 0
}

response = requests.put("https://appliance.example.com/api/v1/{applianceId}/pulseha/capacity", headers=headers, json=payload)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/{applianceId}/pulseha/capacity', {
  method: 'PUT',
  headers: {
    Authorization: `Bearer ${token}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "capacity": 0
}),
});

const data = await response.json();
Response
{
  "status": "success",
  "message": "Successfully updated PulseHA node capacity"
}