Disable backups
curl --request POST \
--url https://rdp.sh/api/v1/servers/{server}/backups/disable \
--header 'Authorization: <api-key>'import requests
url = "https://rdp.sh/api/v1/servers/{server}/backups/disable"
headers = {"Authorization": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: '<api-key>'}};
fetch('https://rdp.sh/api/v1/servers/{server}/backups/disable', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://rdp.sh/api/v1/servers/{server}/backups/disable",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://rdp.sh/api/v1/servers/{server}/backups/disable"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://rdp.sh/api/v1/servers/{server}/backups/disable")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://rdp.sh/api/v1/servers/{server}/backups/disable")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"enabled": true,
"slots": {
"total": 1,
"free": 1,
"paid": false,
"paid_total": 5
},
"status": true,
"message": "Backups have been disabled and all existing backups are being removed.",
"schedule": {
"frequency": "daily",
"hour": 3,
"weekday": 123,
"retention": 1
}
}{
"status": false,
"error": "A backup or restore is currently running. Please wait for it to finish before disabling."
}Backups
Disable Backups
Disables backups and deletes every stored backup of the server. Paid slots are not refunded, and the server goes back to the free slot.
POST
/
servers
/
{server}
/
backups
/
disable
Disable backups
curl --request POST \
--url https://rdp.sh/api/v1/servers/{server}/backups/disable \
--header 'Authorization: <api-key>'import requests
url = "https://rdp.sh/api/v1/servers/{server}/backups/disable"
headers = {"Authorization": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: '<api-key>'}};
fetch('https://rdp.sh/api/v1/servers/{server}/backups/disable', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://rdp.sh/api/v1/servers/{server}/backups/disable",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://rdp.sh/api/v1/servers/{server}/backups/disable"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://rdp.sh/api/v1/servers/{server}/backups/disable")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://rdp.sh/api/v1/servers/{server}/backups/disable")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"enabled": true,
"slots": {
"total": 1,
"free": 1,
"paid": false,
"paid_total": 5
},
"status": true,
"message": "Backups have been disabled and all existing backups are being removed.",
"schedule": {
"frequency": "daily",
"hour": 3,
"weekday": 123,
"retention": 1
}
}{
"status": false,
"error": "A backup or restore is currently running. Please wait for it to finish before disabling."
}Authorizations
Your API key as it is, without Bearer. API access is off for new
accounts: until it is turned on under Settings > API, every request
answers 403 with API access is turned off for this account. Turn it on under Settings > API. If the account lists allowed IPs, a request
from any other address answers 403 with This API key is not allowed from <address>.
Response
Backups are disabled and the stored backups are being deleted.
Whether a server's backups are enabled, its slots and its schedule.