Configs

List the configuration files

GET /configs

Get config

curl
curl -X GET "https://appliance.example.com/api/v1/configs" \
  -H "Authorization: Bearer $TOKEN"
PHP
<?php

$url = 'https://appliance.example.com/api/v1/configs';
$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/configs", headers=headers)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/configs', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${token}`,
  },
});

const data = await response.json();
Response
{
  "status": "success",
  "uid": "490-15f-407-cfe",
  "message": "Configs",
  "data": [
    {
      "module": "certs",
      "moduleName": "Certs",
      "configs": [
        {
          "config": "database",
          "name": "Database"
        }
      ]
    }
  ]
}

Get a configuration file

GET /configs/{module}/{config}

Get config

Path parameters
module string Required
config string Required
curl
curl -X GET "https://appliance.example.com/api/v1/configs/{module}/{config}" \
  -H "Authorization: Bearer $TOKEN"
PHP
<?php

$url = 'https://appliance.example.com/api/v1/configs/{module}/{config}';
$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/configs/{module}/{config}", headers=headers)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/configs/{module}/{config}', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${token}`,
  },
});

const data = await response.json();
Response
{
  "status": "success",
  "uid": "490-15f-407-cfe",
  "message": "Config",
  "data": {
    "moduleName": "Certificates",
    "configName": "database",
    "config": "***** data ****"
  }
}