Pulse HA
PulseHA decides which appliance is active. It watches the peer and moves the Floating IPs when the active node stops answering.
PulseHA
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
}
}
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
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"
}
}
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
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
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"
}