Services
List the services and their state
curl
curl -X GET "https://appliance.example.com/api/v1/services" \
-H "Authorization: Bearer $TOKEN"
PHP
<?php
$url = 'https://appliance.example.com/api/v1/services';
$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/services", headers=headers)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/services', {
method: 'GET',
headers: {
Authorization: `Bearer ${token}`,
},
});
const data = await response.json();
Bruno
meta {
name: List the services and their state
type: http
seq: 1
}
get {
url: https://{{node-0}}:{{port}}/api/v1/services
body: none
auth: bearer
}
auth:bearer {
token: {{token}}
}
Response
{
"status": "success",
"message": "Successfully returned all services info",
"data": [
{
"name": "nftables",
"fullName": "NF Tables",
"canReload": true,
"canUpdate": true
},
{
"name": "gslb",
"fullName": "GSLB",
"canReload": false,
"canUpdate": false
}
]
}
Apply pending changes on every node
curl
curl -X PUT "https://appliance.example.com/api/v1/services/apply" \
-H "Authorization: Bearer $TOKEN"
PHP
<?php
$url = 'https://appliance.example.com/api/v1/services/apply';
$headers = [
'Authorization: Bearer ' . $token,
];
$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PUT',
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.put("https://appliance.example.com/api/v1/services/apply", headers=headers)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/services/apply', {
method: 'PUT',
headers: {
Authorization: `Bearer ${token}`,
},
});
const data = await response.json();
Bruno
meta {
name: Apply pending changes on every node
type: http
seq: 1
}
put {
url: https://{{node-0}}:{{port}}/api/v1/services/apply
body: none
auth: bearer
}
auth:bearer {
token: {{token}}
}
Response
{
"status": "success",
"message": "Successfully applied all service pending states",
"data": []
}
Reload a service on every node
curl
curl -X PUT "https://appliance.example.com/api/v1/services/{service}/reload" \
-H "Authorization: Bearer $TOKEN"
PHP
<?php
$url = 'https://appliance.example.com/api/v1/services/{service}/reload';
$headers = [
'Authorization: Bearer ' . $token,
];
$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PUT',
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.put("https://appliance.example.com/api/v1/services/{service}/reload", headers=headers)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/services/{service}/reload', {
method: 'PUT',
headers: {
Authorization: `Bearer ${token}`,
},
});
const data = await response.json();
Bruno
meta {
name: Reload a service on every node
type: http
seq: 1
}
put {
url: https://{{node-0}}:{{port}}/api/v1/services/{service}/reload
body: none
auth: bearer
}
auth:bearer {
token: {{token}}
}
Response
{
"status": "success",
"message": "Service {service} reload request sent",
"data": []
}
Restart a service on every node
curl
curl -X PUT "https://appliance.example.com/api/v1/services/{service}/restart" \
-H "Authorization: Bearer $TOKEN"
PHP
<?php
$url = 'https://appliance.example.com/api/v1/services/{service}/restart';
$headers = [
'Authorization: Bearer ' . $token,
];
$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PUT',
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.put("https://appliance.example.com/api/v1/services/{service}/restart", headers=headers)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/services/{service}/restart', {
method: 'PUT',
headers: {
Authorization: `Bearer ${token}`,
},
});
const data = await response.json();
Bruno
meta {
name: Restart a service on every node
type: http
seq: 1
}
put {
url: https://{{node-0}}:{{port}}/api/v1/services/{service}/restart
body: none
auth: bearer
}
auth:bearer {
token: {{token}}
}
Response
{
"status": "success",
"message": "Service {service} restart request sent",
"data": []
}
Apply an update to a service on every node
curl
curl -X PUT "https://appliance.example.com/api/v1/services/{service}/update" \
-H "Authorization: Bearer $TOKEN"
PHP
<?php
$url = 'https://appliance.example.com/api/v1/services/{service}/update';
$headers = [
'Authorization: Bearer ' . $token,
];
$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PUT',
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.put("https://appliance.example.com/api/v1/services/{service}/update", headers=headers)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/services/{service}/update', {
method: 'PUT',
headers: {
Authorization: `Bearer ${token}`,
},
});
const data = await response.json();
Bruno
meta {
name: Apply an update to a service on every node
type: http
seq: 1
}
put {
url: https://{{node-0}}:{{port}}/api/v1/services/{service}/update
body: none
auth: bearer
}
auth:bearer {
token: {{token}}
}
Response
{
"status": "success",
"message": "Service {service} update request sent",
"data": []
}
Apply pending changes
curl
curl -X PUT "https://appliance.example.com/api/v1/{applianceId}/services/apply" \
-H "Authorization: Bearer $TOKEN"
PHP
<?php
$url = 'https://appliance.example.com/api/v1/{applianceId}/services/apply';
$headers = [
'Authorization: Bearer ' . $token,
];
$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PUT',
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.put("https://appliance.example.com/api/v1/{applianceId}/services/apply", headers=headers)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/{applianceId}/services/apply', {
method: 'PUT',
headers: {
Authorization: `Bearer ${token}`,
},
});
const data = await response.json();
Bruno
meta {
name: Apply pending changes
type: http
seq: 1
}
put {
url: https://{{node-0}}:{{port}}/api/v1/{applianceId}/services/apply
body: none
auth: bearer
}
auth:bearer {
token: {{token}}
}
Response
{
"status": "success",
"message": "Successfully applied all service pending states",
"data": []
}
Reload a service
curl
curl -X PUT "https://appliance.example.com/api/v1/{applianceId}/services/{service}/reload" \
-H "Authorization: Bearer $TOKEN"
PHP
<?php
$url = 'https://appliance.example.com/api/v1/{applianceId}/services/{service}/reload';
$headers = [
'Authorization: Bearer ' . $token,
];
$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PUT',
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.put("https://appliance.example.com/api/v1/{applianceId}/services/{service}/reload", headers=headers)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/{applianceId}/services/{service}/reload', {
method: 'PUT',
headers: {
Authorization: `Bearer ${token}`,
},
});
const data = await response.json();
Bruno
meta {
name: Reload a service
type: http
seq: 1
}
put {
url: https://{{node-0}}:{{port}}/api/v1/{applianceId}/services/{service}/reload
body: none
auth: bearer
}
auth:bearer {
token: {{token}}
}
Response
{
"status": "success",
"message": "Service {service} reload request sent",
"data": []
}
Restart a service
curl
curl -X PUT "https://appliance.example.com/api/v1/{applianceId}/services/{service}/restart" \
-H "Authorization: Bearer $TOKEN"
PHP
<?php
$url = 'https://appliance.example.com/api/v1/{applianceId}/services/{service}/restart';
$headers = [
'Authorization: Bearer ' . $token,
];
$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PUT',
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.put("https://appliance.example.com/api/v1/{applianceId}/services/{service}/restart", headers=headers)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/{applianceId}/services/{service}/restart', {
method: 'PUT',
headers: {
Authorization: `Bearer ${token}`,
},
});
const data = await response.json();
Bruno
meta {
name: Restart a service
type: http
seq: 1
}
put {
url: https://{{node-0}}:{{port}}/api/v1/{applianceId}/services/{service}/restart
body: none
auth: bearer
}
auth:bearer {
token: {{token}}
}
Response
{
"status": "success",
"message": "Service {service} restart request sent",
"data": []
}
Apply an update to a service
curl
curl -X PUT "https://appliance.example.com/api/v1/{applianceId}/services/{service}/update" \
-H "Authorization: Bearer $TOKEN"
PHP
<?php
$url = 'https://appliance.example.com/api/v1/{applianceId}/services/{service}/update';
$headers = [
'Authorization: Bearer ' . $token,
];
$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PUT',
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.put("https://appliance.example.com/api/v1/{applianceId}/services/{service}/update", headers=headers)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/{applianceId}/services/{service}/update', {
method: 'PUT',
headers: {
Authorization: `Bearer ${token}`,
},
});
const data = await response.json();
Bruno
meta {
name: Apply an update to a service
type: http
seq: 1
}
put {
url: https://{{node-0}}:{{port}}/api/v1/{applianceId}/services/{service}/update
body: none
auth: bearer
}
auth:bearer {
token: {{token}}
}
Response
{
"status": "success",
"message": "Service {service} update request sent",
"data": []
}