don't miss out

sign-up for newsletter to stay in the loop

subscribe to our newsletter

Newsletter
download

Backuply Settings

All-in-one solution for Backup, Restore and Migration.

Backuply Settings

Overview

The Backuply Settings API allows you to programmatically manage global Backuply configuration settings through a secure API requests.

This includes updating parameters such as administrative email notifications, backup storage paths, and other configuration options available in the Backuply control panel.

Parameters

Following the list of required parameters and settings that can be updated using API.

API token

API keys/tokens allow you to log in to the server without the need for a password.

You can use an API key/token to authenticate with Backuply API. Please visit API keys/tokens for more details on how to get API key for supported panels.


Sample Code

Please refer this following PHP code to run Admin API to update global settings f

<?php

$user = 'root';
$api_token = '1eA1lWrs7mx6NtJw5K4Obq7FOcOewrhD';
$host = 'Hostname_or_IP:PORT';
$act = 'settings';
$post = [
	'apiuser' => $user,
	'apikey' => $api_token,
	'editsettings' => 1,
	'soft_email' => 'admin@example.com', // Required
	'backup_data_path' => '/home/backuplyData',
];

$url = 'https://'.$host.'/backuply/index.php?api=json&act='.$act;

$ch = curl_init();
curl_setopt_array($ch, [
	CURLOPT_URL => $url,
	CURLOPT_SSL_VERIFYPEER => false,
	CURLOPT_SSL_VERIFYHOST => false,
	CURLOPT_CONNECTTIMEOUT => 10,
	CURLOPT_RETURNTRANSFER => true,
]);

if (!empty($post)) {
	curl_setopt($ch, CURLOPT_POST, 1);
	curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post));
}

$resp = curl_exec($ch);
$error = curl_error($ch);
curl_close($ch);

if($error){
	print_r(['error' => "cURL Error: {$error}"]);
}

$res = json_decode($resp, true);

// Done ?
if(!empty($res['done'])){
	echo "<pre>";
	print_r($res['done']);
	echo "</pre>";
}else{
	print_r($res['error']);
}
This is the default Tab content. Feel free to delete it.
    Was this page helpful?
    Newsletter Subscription
    Subscribing you to the mailing list