Settings
Settings that apply to the whole subsystem rather than to one object.
Settings
curl
curl -X GET "https://appliance.example.com/api/v1/ipvsDirector/settings" \
-H "Authorization: Bearer $TOKEN"
PHP
<?php
$url = 'https://appliance.example.com/api/v1/ipvsDirector/settings';
$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/settings", headers=headers)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/ipvsDirector/settings', {
method: 'GET',
headers: {
Authorization: `Bearer ${token}`,
},
});
const data = await response.json();
Response
{
"status": "success",
"message": "Settings retrieved successfully",
"data": {
"checkInterval": 5,
"checkTimeout": 3,
"failureCount": 2,
"quiescent": false,
"autonatInterface": "",
"autonatRestrict": "none",
"autonatSubnet": ""
}
}
curl
curl -X PUT "https://appliance.example.com/api/v1/ipvsDirector/settings" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"checkInterval": "5",
"checkTimeout": "3",
"failureCount": "2",
"quiescent": "false",
"autonatInterface": "<autonatInterface>",
"autonatRestrict": "none",
"autonatSubnet": "<autonatSubnet>"
}'
PHP
<?php
$url = 'https://appliance.example.com/api/v1/ipvsDirector/settings';
$headers = [
'Authorization: Bearer ' . $token,
'Content-Type: application/json',
];
$payload = [
'checkInterval' => '5',
'checkTimeout' => '3',
'failureCount' => '2',
'quiescent' => 'false',
'autonatInterface' => '<autonatInterface>',
'autonatRestrict' => 'none',
'autonatSubnet' => '<autonatSubnet>',
];
$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 = {
"checkInterval": "5",
"checkTimeout": "3",
"failureCount": "2",
"quiescent": "false",
"autonatInterface": "<autonatInterface>",
"autonatRestrict": "none",
"autonatSubnet": "<autonatSubnet>"
}
response = requests.put("https://appliance.example.com/api/v1/ipvsDirector/settings", headers=headers, json=payload)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/ipvsDirector/settings', {
method: 'PUT',
headers: {
Authorization: `Bearer ${token}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"checkInterval": "5",
"checkTimeout": "3",
"failureCount": "2",
"quiescent": "false",
"autonatInterface": "<autonatInterface>",
"autonatRestrict": "none",
"autonatSubnet": "<autonatSubnet>"
}),
});
const data = await response.json();
Response
{
"status": "success",
"message": "Settings updated successfully",
"data": []
}