Skip to content

Latest commit

 

History

History
742 lines (484 loc) · 18.6 KB

SystemApi.md

File metadata and controls

742 lines (484 loc) · 18.6 KB

MailInABoxAPI\Client\SystemApi

All URIs are relative to https://box.example.com/admin

Method HTTP request Description
getSystemBackupConfig GET /system/backup/config Get system backup config
getSystemBackupStatus GET /system/backup/status Get system backup status
getSystemPrivacyStatus GET /system/privacy Get system privacy status
getSystemRebootStatus GET /system/reboot Get system reboot status
getSystemStatus POST /system/status Get system status
getSystemUpdates GET /system/updates Get system updates
getSystemUpstreamVersion POST /system/latest-upstream-version Get system upstream version
getSystemVersion GET /system/version Get system version
rebootSystem POST /system/reboot Reboot system
updateSystemBackupConfig POST /system/backup/config Update system backup config
updateSystemPackages POST /system/update-packages Update system packages
updateSystemPrivacy POST /system/privacy Update system privacy

getSystemBackupConfig

\MailInABoxAPI\Client\Model\SystemBackupConfigResponse getSystemBackupConfig()

Get system backup config

Returns the system backup config.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure HTTP basic authorization: basicAuth
$config = MailInABoxAPI\Client\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new MailInABoxAPI\Client\Api\SystemApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);

try {
    $result = $apiInstance->getSystemBackupConfig();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SystemApi->getSystemBackupConfig: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

This endpoint does not need any parameter.

Return type

\MailInABoxAPI\Client\Model\SystemBackupConfigResponse

Authorization

basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, text/html

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getSystemBackupStatus

\MailInABoxAPI\Client\Model\SystemBackupStatusResponse getSystemBackupStatus()

Get system backup status

Returns the system backup status. If the list of backups is empty, this implies no backups have been made yet.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure HTTP basic authorization: basicAuth
$config = MailInABoxAPI\Client\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new MailInABoxAPI\Client\Api\SystemApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);

try {
    $result = $apiInstance->getSystemBackupStatus();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SystemApi->getSystemBackupStatus: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

This endpoint does not need any parameter.

Return type

\MailInABoxAPI\Client\Model\SystemBackupStatusResponse

Authorization

basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, text/html

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getSystemPrivacyStatus

bool getSystemPrivacyStatus()

Get system privacy status

Returns system privacy (new-version check) status. Response: - true: Private, new-version checks will not be performed - false: Not private, new-version checks will be performed

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure HTTP basic authorization: basicAuth
$config = MailInABoxAPI\Client\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new MailInABoxAPI\Client\Api\SystemApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);

try {
    $result = $apiInstance->getSystemPrivacyStatus();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SystemApi->getSystemPrivacyStatus: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

This endpoint does not need any parameter.

Return type

bool

Authorization

basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, text/html

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getSystemRebootStatus

bool getSystemRebootStatus()

Get system reboot status

Returns the system reboot status. Response: - true: A reboot is required - false: A reboot is not required

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure HTTP basic authorization: basicAuth
$config = MailInABoxAPI\Client\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new MailInABoxAPI\Client\Api\SystemApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);

try {
    $result = $apiInstance->getSystemRebootStatus();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SystemApi->getSystemRebootStatus: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

This endpoint does not need any parameter.

Return type

bool

Authorization

basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, text/html

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getSystemStatus

\MailInABoxAPI\Client\Model\SystemStatusResponse getSystemStatus()

Get system status

Returns an array of statuses which can include headings.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure HTTP basic authorization: basicAuth
$config = MailInABoxAPI\Client\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new MailInABoxAPI\Client\Api\SystemApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);

try {
    $result = $apiInstance->getSystemStatus();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SystemApi->getSystemStatus: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

This endpoint does not need any parameter.

Return type

\MailInABoxAPI\Client\Model\SystemStatusResponse

Authorization

basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, text/html

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getSystemUpdates

string getSystemUpdates()

Get system updates

Returns system (apt) updates.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure HTTP basic authorization: basicAuth
$config = MailInABoxAPI\Client\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new MailInABoxAPI\Client\Api\SystemApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);

try {
    $result = $apiInstance->getSystemUpdates();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SystemApi->getSystemUpdates: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

This endpoint does not need any parameter.

Return type

string

Authorization

basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/html

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getSystemUpstreamVersion

string getSystemUpstreamVersion()

Get system upstream version

Returns Mail-in-a-Box upstream version.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure HTTP basic authorization: basicAuth
$config = MailInABoxAPI\Client\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new MailInABoxAPI\Client\Api\SystemApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);

try {
    $result = $apiInstance->getSystemUpstreamVersion();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SystemApi->getSystemUpstreamVersion: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

This endpoint does not need any parameter.

Return type

string

Authorization

basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/html

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getSystemVersion

string getSystemVersion()

Get system version

Returns installed Mail-in-a-Box version.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure HTTP basic authorization: basicAuth
$config = MailInABoxAPI\Client\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new MailInABoxAPI\Client\Api\SystemApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);

try {
    $result = $apiInstance->getSystemVersion();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SystemApi->getSystemVersion: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

This endpoint does not need any parameter.

Return type

string

Authorization

basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/html

[Back to top] [Back to API list] [Back to Model list] [Back to README]

rebootSystem

string rebootSystem()

Reboot system

Reboots the system.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure HTTP basic authorization: basicAuth
$config = MailInABoxAPI\Client\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new MailInABoxAPI\Client\Api\SystemApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);

try {
    $result = $apiInstance->rebootSystem();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SystemApi->rebootSystem: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

This endpoint does not need any parameter.

Return type

string

Authorization

basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/html

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateSystemBackupConfig

string updateSystemBackupConfig($target, $targetUser, $targetPass, $minAge)

Update system backup config

Updates the system backup config.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure HTTP basic authorization: basicAuth
$config = MailInABoxAPI\Client\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new MailInABoxAPI\Client\Api\SystemApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$target = 'target_example'; // string | 
$targetUser = 'targetUser_example'; // string | 
$targetPass = 'targetPass_example'; // string | 
$minAge = 56; // int | 

try {
    $result = $apiInstance->updateSystemBackupConfig($target, $targetUser, $targetPass, $minAge);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SystemApi->updateSystemBackupConfig: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
target string
targetUser string
targetPass string
minAge int

Return type

string

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: text/html

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateSystemPackages

string updateSystemPackages()

Update system packages

Updates system (apt) packages.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure HTTP basic authorization: basicAuth
$config = MailInABoxAPI\Client\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new MailInABoxAPI\Client\Api\SystemApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);

try {
    $result = $apiInstance->updateSystemPackages();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SystemApi->updateSystemPackages: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

This endpoint does not need any parameter.

Return type

string

Authorization

basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/html

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateSystemPrivacy

string updateSystemPrivacy($value)

Update system privacy

Updates system privacy (new-version checks). Request: - value: private: Disable new version checks - value: off: Enable new version checks

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure HTTP basic authorization: basicAuth
$config = MailInABoxAPI\Client\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new MailInABoxAPI\Client\Api\SystemApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$value = new \MailInABoxAPI\Client\Model\SystemPrivacyStatus(); // \MailInABoxAPI\Client\Model\SystemPrivacyStatus | 

try {
    $result = $apiInstance->updateSystemPrivacy($value);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SystemApi->updateSystemPrivacy: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
value \MailInABoxAPI\Client\Model\SystemPrivacyStatus

Return type

string

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: text/html

[Back to top] [Back to API list] [Back to Model list] [Back to README]