Logs
Journal
curl
curl -X GET "https://appliance.example.com/api/v1/logs/servers/journal" \
-H "Authorization: Bearer $TOKEN"
PHP
<?php
$url = 'https://appliance.example.com/api/v1/logs/servers/journal';
$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/logs/servers/journal", headers=headers)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/logs/servers/journal', {
method: 'GET',
headers: {
Authorization: `Bearer ${token}`,
},
});
const data = await response.json();
Response
{
"status": "success",
"message": "Journal Server/s",
"data": [
{
"id": "6e7-d6e-326-f29",
"protocol": "http",
"ipDomain": "100.100.100.100",
"port": 514
}
]
}
curl
curl -X POST "https://appliance.example.com/api/v1/logs/servers/journal" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"protocol": "<protocol>",
"ipDomain": "<ipDomain>",
"port": 0
}'
PHP
<?php
$url = 'https://appliance.example.com/api/v1/logs/servers/journal';
$headers = [
'Authorization: Bearer ' . $token,
'Content-Type: application/json',
];
$payload = [
'protocol' => '<protocol>',
'ipDomain' => '<ipDomain>',
'port' => 0,
];
$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
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 = {
"protocol": "<protocol>",
"ipDomain": "<ipDomain>",
"port": 0
}
response = requests.post("https://appliance.example.com/api/v1/logs/servers/journal", headers=headers, json=payload)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/logs/servers/journal', {
method: 'POST',
headers: {
Authorization: `Bearer ${token}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"protocol": "<protocol>",
"ipDomain": "<ipDomain>",
"port": 0
}),
});
const data = await response.json();
Response
{
"status": "success",
"message": "Journal Server added",
"data": {
"id": "5ca-35d-687-c1f"
}
}
Journal by ID
curl
curl -X GET "https://appliance.example.com/api/v1/logs/servers/journal/{id}" \
-H "Authorization: Bearer $TOKEN"
PHP
<?php
$url = 'https://appliance.example.com/api/v1/logs/servers/journal/{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/logs/servers/journal/{id}", headers=headers)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/logs/servers/journal/{id}', {
method: 'GET',
headers: {
Authorization: `Bearer ${token}`,
},
});
const data = await response.json();
Response
{
"status": "success",
"message": "Journal Server",
"data": {
"id": "6e7-d6e-326-f29",
"protocol": "http",
"ipDomain": "100.100.100.100",
"port": 514
}
}
curl
curl -X PUT "https://appliance.example.com/api/v1/logs/servers/journal/{id}" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"protocol": "<protocol>",
"ipDomain": "<ipDomain>",
"port": 0
}'
PHP
<?php
$url = 'https://appliance.example.com/api/v1/logs/servers/journal/{id}';
$headers = [
'Authorization: Bearer ' . $token,
'Content-Type: application/json',
];
$payload = [
'protocol' => '<protocol>',
'ipDomain' => '<ipDomain>',
'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 = {
"protocol": "<protocol>",
"ipDomain": "<ipDomain>",
"port": 0
}
response = requests.put("https://appliance.example.com/api/v1/logs/servers/journal/{id}", headers=headers, json=payload)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/logs/servers/journal/{id}', {
method: 'PUT',
headers: {
Authorization: `Bearer ${token}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"protocol": "<protocol>",
"ipDomain": "<ipDomain>",
"port": 0
}),
});
const data = await response.json();
Response
{
"status": "success",
"message": "Journal Server edited",
"data": {
"id": "5ca-35d-687-7c1"
}
}
curl
curl -X DELETE "https://appliance.example.com/api/v1/logs/servers/journal/{id}" \
-H "Authorization: Bearer $TOKEN"
PHP
<?php
$url = 'https://appliance.example.com/api/v1/logs/servers/journal/{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/logs/servers/journal/{id}", headers=headers)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/logs/servers/journal/{id}', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${token}`,
},
});
const data = await response.json();
Response
{
"status": "success",
"message": "Journal Server deleted"
}
Syslog
curl
curl -X GET "https://appliance.example.com/api/v1/logs/servers/syslog" \
-H "Authorization: Bearer $TOKEN"
PHP
<?php
$url = 'https://appliance.example.com/api/v1/logs/servers/syslog';
$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/logs/servers/syslog", headers=headers)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/logs/servers/syslog', {
method: 'GET',
headers: {
Authorization: `Bearer ${token}`,
},
});
const data = await response.json();
Response
{
"status": "success",
"message": "Syslog Server/s",
"data": [
{
"id": "6e7-d6e-326-f29",
"protocol": "udp",
"ipDomain": "100.100.100.100",
"port": 514,
"token": "",
"caId": ""
},
{
"id": "5ca-35d-687-c1f",
"protocol": "tls",
"ipDomain": "collectors.example.com",
"port": 6514,
"token": "********",
"caId": "ca-123"
}
]
}
curl
curl -X POST "https://appliance.example.com/api/v1/logs/servers/syslog" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"protocol": "<protocol>",
"ipDomain": "<ipDomain>",
"port": 0,
"token": "<token>",
"caId": "<caId>"
}'
PHP
<?php
$url = 'https://appliance.example.com/api/v1/logs/servers/syslog';
$headers = [
'Authorization: Bearer ' . $token,
'Content-Type: application/json',
];
$payload = [
'protocol' => '<protocol>',
'ipDomain' => '<ipDomain>',
'port' => 0,
'token' => '<token>',
'caId' => '<caId>',
];
$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
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 = {
"protocol": "<protocol>",
"ipDomain": "<ipDomain>",
"port": 0,
"token": "<token>",
"caId": "<caId>"
}
response = requests.post("https://appliance.example.com/api/v1/logs/servers/syslog", headers=headers, json=payload)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/logs/servers/syslog', {
method: 'POST',
headers: {
Authorization: `Bearer ${token}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"protocol": "<protocol>",
"ipDomain": "<ipDomain>",
"port": 0,
"token": "<token>",
"caId": "<caId>"
}),
});
const data = await response.json();
Response
{
"status": "success",
"message": "Syslog Server added",
"data": {
"id": "5ca-35d-687-c1f"
}
}
Syslog by ID
curl
curl -X GET "https://appliance.example.com/api/v1/logs/servers/syslog/{id}" \
-H "Authorization: Bearer $TOKEN"
PHP
<?php
$url = 'https://appliance.example.com/api/v1/logs/servers/syslog/{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/logs/servers/syslog/{id}", headers=headers)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/logs/servers/syslog/{id}', {
method: 'GET',
headers: {
Authorization: `Bearer ${token}`,
},
});
const data = await response.json();
Response
{
"status": "success",
"message": "Syslog Server",
"data": {
"id": "6e7-d6e-326-f29",
"protocol": "tls",
"ipDomain": "collectors.example.com",
"port": 6514,
"token": "********",
"caId": "ca-123"
}
}
curl
curl -X PUT "https://appliance.example.com/api/v1/logs/servers/syslog/{id}" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"protocol": "<protocol>",
"ipDomain": "<ipDomain>",
"port": 0,
"token": "<token>",
"caId": "<caId>"
}'
PHP
<?php
$url = 'https://appliance.example.com/api/v1/logs/servers/syslog/{id}';
$headers = [
'Authorization: Bearer ' . $token,
'Content-Type: application/json',
];
$payload = [
'protocol' => '<protocol>',
'ipDomain' => '<ipDomain>',
'port' => 0,
'token' => '<token>',
'caId' => '<caId>',
];
$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 = {
"protocol": "<protocol>",
"ipDomain": "<ipDomain>",
"port": 0,
"token": "<token>",
"caId": "<caId>"
}
response = requests.put("https://appliance.example.com/api/v1/logs/servers/syslog/{id}", headers=headers, json=payload)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/logs/servers/syslog/{id}', {
method: 'PUT',
headers: {
Authorization: `Bearer ${token}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"protocol": "<protocol>",
"ipDomain": "<ipDomain>",
"port": 0,
"token": "<token>",
"caId": "<caId>"
}),
});
const data = await response.json();
Response
{
"status": "success",
"message": "Syslog Server edited",
"data": {
"id": "5ca-35d-687-7c1"
}
}
curl
curl -X DELETE "https://appliance.example.com/api/v1/logs/servers/syslog/{id}" \
-H "Authorization: Bearer $TOKEN"
PHP
<?php
$url = 'https://appliance.example.com/api/v1/logs/servers/syslog/{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/logs/servers/syslog/{id}", headers=headers)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/logs/servers/syslog/{id}', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${token}`,
},
});
const data = await response.json();
Response
{
"status": "success",
"message": "Syslog Server deleted"
}
Settings
curl
curl -X GET "https://appliance.example.com/api/v1/logs/settings" \
-H "Authorization: Bearer $TOKEN"
PHP
<?php
$url = 'https://appliance.example.com/api/v1/logs/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/logs/settings", headers=headers)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/logs/settings', {
method: 'GET',
headers: {
Authorization: `Bearer ${token}`,
},
});
const data = await response.json();
Response
{
"status": "success",
"message": "Journal Setting",
"data": {
"maxUseGBytes": 30,
"maxFileSizeMBytes": 500,
"maxFiles": 61,
"keepFreeGBytes": 1,
"maxRetentionSecWeeks": 26
}
}
curl
curl -X PUT "https://appliance.example.com/api/v1/logs/settings" \
-H "Authorization: Bearer $TOKEN"
PHP
<?php
$url = 'https://appliance.example.com/api/v1/logs/settings';
$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/logs/settings", headers=headers)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/logs/settings', {
method: 'PUT',
headers: {
Authorization: `Bearer ${token}`,
},
});
const data = await response.json();
Response
{
"status": "success",
"message": "Journal settings updated"
}
Read the appliance logs
curl
curl -X GET "https://appliance.example.com/api/v1/{applianceId}/logs" \
-H "Authorization: Bearer $TOKEN"
PHP
<?php
$url = 'https://appliance.example.com/api/v1/{applianceId}/logs';
$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}/logs", headers=headers)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/{applianceId}/logs', {
method: 'GET',
headers: {
Authorization: `Bearer ${token}`,
},
});
const data = await response.json();
Response
{
"status": "success",
"message": "Logs",
"data": {
"logs": [
{
"datetime": "2022-01-04T14:14:52+0000",
"uid": 0,
"gid": 48,
"hostname": "mc-lbnode-1",
"pid": 27731,
"comm": "sudo",
"message": " apache : TTY=unknown ; PWD=/var/www/html/lb_api/web ; USER=root ; COMMAND=/usr/bin/systemctl is-active snmpd"
},
{
"datetime": "2022-01-05T11:49:03+0000",
"uid": 0,
"gid": 0,
"hostname": "mc-lbnode-1",
"pid": 22412,
"comm": "sudo",
"message": "pam_unix(sudo:session): session opened for user root by (uid=0)"
}
],
"start": "2022-01-04T14:14:52+00:00",
"end": "2022-01-05T11:49:03+00:00",
"first": "2022-01-04T14:14:52+00:00",
"last": "2022-01-04T14:14:52+00:00"
}
}
Read the logs of a service
curl
curl -X GET "https://appliance.example.com/api/v1/{applianceId}/logs/services" \
-H "Authorization: Bearer $TOKEN"
PHP
<?php
$url = 'https://appliance.example.com/api/v1/{applianceId}/logs/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/{applianceId}/logs/services", headers=headers)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/{applianceId}/logs/services', {
method: 'GET',
headers: {
Authorization: `Bearer ${token}`,
},
});
const data = await response.json();
Response
{
"status": "success",
"message": "Logs Service",
"data": [
{
"name": "gslb",
"nameFull": "GSLB"
},
{
"name": "haproxy",
"nameFull": "HAProxy"
},
{
"name": "nginx_fallback",
"nameFull": "Fallback Pages"
},
{
"name": "pulseha",
"nameFull": "PulseHA"
},
{
"name": "nginx",
"nameFull": "NGINX"
},
{
"name": "php-fpm",
"nameFull": "PHP"
}
]
}