Endurance

Log endpoints

Journal

List the journal servers

GET /logs/servers/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();
Bruno
meta {
  name: List the journal servers
  type: http
  seq: 1
}

get {
  url: https://{{node-0}}:{{port}}/api/v1/logs/servers/journal
  body: none
  auth: bearer
}

auth:bearer {
  token: {{token}}
}
Response
{
  "status": "success",
  "message": "Journal Server/s",
  "data": [
    {
      "id": "6e7-d6e-326-f29",
      "protocol": "http",
      "ipDomain": "100.100.100.100",
      "port": 514
    }
  ]
}

Add Journal Server

POST /logs/servers/journal

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

Body parameters
protocol string Required

Journal Protocol (http, https)

ipDomain string Required

Journal IP/Domain

port integer Required

Journal Port

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();
Bruno
meta {
  name: Create a journal server
  type: http
  seq: 1
}

post {
  url: https://{{node-0}}:{{port}}/api/v1/logs/servers/journal
  body: json
  auth: bearer
}

headers {
  Content-Type: application/json
}

auth:bearer {
  token: {{token}}
}

body:json {
  {
    "protocol": "<protocol>",
    "ipDomain": "<ipDomain>",
    "port": 0
  }
}
Response
{
  "status": "success",
  "message": "Journal Server added",
  "data": {
    "id": "5ca-35d-687-c1f"
  }
}

Journal by ID

Get Journal Server By ID

GET /logs/servers/journal/{id}

Path parameters
id string Required

Journal Server 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();
Bruno
meta {
  name: Get a journal server
  type: http
  seq: 1
}

get {
  url: https://{{node-0}}:{{port}}/api/v1/logs/servers/journal/{id}
  body: none
  auth: bearer
}

auth:bearer {
  token: {{token}}
}
Response
{
  "status": "success",
  "message": "Journal Server",
  "data": {
    "id": "6e7-d6e-326-f29",
    "protocol": "http",
    "ipDomain": "100.100.100.100",
    "port": 514
  }
}

Edit a Journal Server

PUT /logs/servers/journal/{id}

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

Path parameters
id string Required

Journal Server ID

Body parameters
protocol string Required

Journal Protocol (http, https)

ipDomain string Required

Journal IP/Domain

port integer Required

Journal Port

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();
Bruno
meta {
  name: Update a journal server
  type: http
  seq: 1
}

put {
  url: https://{{node-0}}:{{port}}/api/v1/logs/servers/journal/{id}
  body: json
  auth: bearer
}

headers {
  Content-Type: application/json
}

auth:bearer {
  token: {{token}}
}

body:json {
  {
    "protocol": "<protocol>",
    "ipDomain": "<ipDomain>",
    "port": 0
  }
}
Response
{
  "status": "success",
  "message": "Journal Server edited",
  "data": {
    "id": "5ca-35d-687-7c1"
  }
}

Delete Journal Server

DELETE /logs/servers/journal/{id}

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

Path parameters
id string Required

Journal Server ID

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();
Bruno
meta {
  name: Delete a journal server
  type: http
  seq: 1
}

delete {
  url: https://{{node-0}}:{{port}}/api/v1/logs/servers/journal/{id}
  body: none
  auth: bearer
}

auth:bearer {
  token: {{token}}
}
Response
{
  "status": "success",
  "message": "Journal Server deleted"
}

Syslog

List the syslog servers

GET /logs/servers/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();
Bruno
meta {
  name: List the syslog servers
  type: http
  seq: 1
}

get {
  url: https://{{node-0}}:{{port}}/api/v1/logs/servers/syslog
  body: none
  auth: bearer
}

auth:bearer {
  token: {{token}}
}
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"
    }
  ]
}

Add Syslog Server

POST /logs/servers/syslog

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

Body parameters
protocol string Required

Syslog Protocol (udp, tcp, tls)

ipDomain string Required

Syslog IP/Domain

port integer Required

Syslog Port

token string

Collector token, sent in the RFC 5424 structured data (tls only)

caId string

Certs-module CA id to trust for TLS (tls only; else system CA bundle)

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();
Bruno
meta {
  name: Create a syslog server
  type: http
  seq: 1
}

post {
  url: https://{{node-0}}:{{port}}/api/v1/logs/servers/syslog
  body: json
  auth: bearer
}

headers {
  Content-Type: application/json
}

auth:bearer {
  token: {{token}}
}

body:json {
  {
    "protocol": "<protocol>",
    "ipDomain": "<ipDomain>",
    "port": 0,
    "token": "<token>",
    "caId": "<caId>"
  }
}
Response
{
  "status": "success",
  "message": "Syslog Server added",
  "data": {
    "id": "5ca-35d-687-c1f"
  }
}

Syslog by ID

Get Syslog Server By ID

GET /logs/servers/syslog/{id}

Path parameters
id string Required

Syslog Server 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();
Bruno
meta {
  name: Get a syslog server
  type: http
  seq: 1
}

get {
  url: https://{{node-0}}:{{port}}/api/v1/logs/servers/syslog/{id}
  body: none
  auth: bearer
}

auth:bearer {
  token: {{token}}
}
Response
{
  "status": "success",
  "message": "Syslog Server",
  "data": {
    "id": "6e7-d6e-326-f29",
    "protocol": "tls",
    "ipDomain": "collectors.example.com",
    "port": 6514,
    "token": "********",
    "caId": "ca-123"
  }
}

Edit a Syslog Server

PUT /logs/servers/syslog/{id}

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

Path parameters
id string Required

Syslog Server ID

Body parameters
protocol string Required

Syslog Protocol (udp, tcp, tls)

ipDomain string Required

Syslog IP/Domain

port integer Required

Syslog Port

token string

Collector token (tls only); blank/masked keeps the stored token

caId string

Certs-module CA id to trust for TLS (tls only; else system CA bundle)

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();
Bruno
meta {
  name: Update a syslog server
  type: http
  seq: 1
}

put {
  url: https://{{node-0}}:{{port}}/api/v1/logs/servers/syslog/{id}
  body: json
  auth: bearer
}

headers {
  Content-Type: application/json
}

auth:bearer {
  token: {{token}}
}

body:json {
  {
    "protocol": "<protocol>",
    "ipDomain": "<ipDomain>",
    "port": 0,
    "token": "<token>",
    "caId": "<caId>"
  }
}
Response
{
  "status": "success",
  "message": "Syslog Server edited",
  "data": {
    "id": "5ca-35d-687-7c1"
  }
}

Delete Syslog Server

DELETE /logs/servers/syslog/{id}

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

Path parameters
id string Required

Syslog Server ID

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();
Bruno
meta {
  name: Delete a syslog server
  type: http
  seq: 1
}

delete {
  url: https://{{node-0}}:{{port}}/api/v1/logs/servers/syslog/{id}
  body: none
  auth: bearer
}

auth:bearer {
  token: {{token}}
}
Response
{
  "status": "success",
  "message": "Syslog Server deleted"
}

Settings

Get Logs settings

GET /logs/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();
Bruno
meta {
  name: Get the logging settings
  type: http
  seq: 1
}

get {
  url: https://{{node-0}}:{{port}}/api/v1/logs/settings
  body: none
  auth: bearer
}

auth:bearer {
  token: {{token}}
}
Response
{
  "status": "success",
  "message": "Journal Setting",
  "data": {
    "maxUseGBytes": 30,
    "maxFileSizeMBytes": 500,
    "maxFiles": 61,
    "keepFreeGBytes": 1,
    "maxRetentionSecWeeks": 26
  }
}

Update Logs settings

PUT /logs/settings

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

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();
Bruno
meta {
  name: Update the logging settings
  type: http
  seq: 1
}

put {
  url: https://{{node-0}}:{{port}}/api/v1/logs/settings
  body: none
  auth: bearer
}

auth:bearer {
  token: {{token}}
}
Response
{
  "status": "success",
  "message": "Journal settings updated"
}

Read the appliance logs

Get Logs also returns the start/end date and time of the logs returned and the first/last date and time of the logs in the system

GET /{applianceId}/logs

Path parameters
applianceId string Required

The id of the cluster node the request is for.

Query parameters
services array of string

Return only rows whose comm is one of these names, as listed by /logs/services. Omit for every row.

lines integer default: "1000"
since string

format YYYY-MM-DD HH:MM:SS

until string

format YYYY-MM-DD HH:MM:SS

reverse boolean default: "false"
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();
Bruno
meta {
  name: Read the appliance logs
  type: http
  seq: 1
}

get {
  url: https://{{node-0}}:{{port}}/api/v1/{applianceId}/logs
  body: none
  auth: bearer
}

auth:bearer {
  token: {{token}}
}
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

List the names /logs can filter on: every service, then every other process name (comm) in the journal, which is listed under its own name.

GET /{applianceId}/logs/services

Path parameters
applianceId string Required

The id of the cluster node the request is for.

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();
Bruno
meta {
  name: Read the logs of a service
  type: http
  seq: 1
}

get {
  url: https://{{node-0}}:{{port}}/api/v1/{applianceId}/logs/services
  body: none
  auth: bearer
}

auth:bearer {
  token: {{token}}
}
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"
    }
  ]
}