curl --request POST \
--url https://console.advinservers.com/api/v1/client/servers/{server}/backups/bulk/delete \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"uuids": [
"2bc92d27-f5be-4398-9dc1-7a2dc5eb9004",
"23f87b18-a320-4617-aa2c-3ed979c2b5e9",
"ae1450c7-9b31-4961-b61f-990b25447d6d"
]
}
'import requests
url = "https://console.advinservers.com/api/v1/client/servers/{server}/backups/bulk/delete"
payload = { "uuids": ["2bc92d27-f5be-4398-9dc1-7a2dc5eb9004", "23f87b18-a320-4617-aa2c-3ed979c2b5e9", "ae1450c7-9b31-4961-b61f-990b25447d6d"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
uuids: [
'2bc92d27-f5be-4398-9dc1-7a2dc5eb9004',
'23f87b18-a320-4617-aa2c-3ed979c2b5e9',
'ae1450c7-9b31-4961-b61f-990b25447d6d'
]
})
};
fetch('https://console.advinservers.com/api/v1/client/servers/{server}/backups/bulk/delete', 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://console.advinservers.com/api/v1/client/servers/{server}/backups/bulk/delete",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'uuids' => [
'2bc92d27-f5be-4398-9dc1-7a2dc5eb9004',
'23f87b18-a320-4617-aa2c-3ed979c2b5e9',
'ae1450c7-9b31-4961-b61f-990b25447d6d'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://console.advinservers.com/api/v1/client/servers/{server}/backups/bulk/delete"
payload := strings.NewReader("{\n \"uuids\": [\n \"2bc92d27-f5be-4398-9dc1-7a2dc5eb9004\",\n \"23f87b18-a320-4617-aa2c-3ed979c2b5e9\",\n \"ae1450c7-9b31-4961-b61f-990b25447d6d\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://console.advinservers.com/api/v1/client/servers/{server}/backups/bulk/delete")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"uuids\": [\n \"2bc92d27-f5be-4398-9dc1-7a2dc5eb9004\",\n \"23f87b18-a320-4617-aa2c-3ed979c2b5e9\",\n \"ae1450c7-9b31-4961-b61f-990b25447d6d\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://console.advinservers.com/api/v1/client/servers/{server}/backups/bulk/delete")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"uuids\": [\n \"2bc92d27-f5be-4398-9dc1-7a2dc5eb9004\",\n \"23f87b18-a320-4617-aa2c-3ed979c2b5e9\",\n \"ae1450c7-9b31-4961-b61f-990b25447d6d\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"deleted": 2,
"locked": 1,
"failed": 0,
"message": "Deleted 2 backups. The copies on the backup server have been removed. 1 locked backup was kept."
}{
"message": "Unauthenticated."
}{
"message": "This API key is not allowed to do that in this team. It needs the \"snapshot.delete\" permission."
}{
"message": "Not found."
}{
"message": "The request could not be carried out."
}{
"message": "The name field is required.",
"errors": {}
}{
"message": "Too Many Attempts."
}Delete multiple backups
Overview
Permanently deletes up to 100 backups. Send 1 to 100 IDs as uuids. Stored backup files are deleted and cannot be recovered. Missing or inaccessible IDs are skipped. Locked backups are kept. The response counts deleted, locked and failed deletions.
Permissions
Requires the backup.delete (Delete backups) permission for the selected team. Resources outside that team return 404.
curl --request POST \
--url https://console.advinservers.com/api/v1/client/servers/{server}/backups/bulk/delete \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"uuids": [
"2bc92d27-f5be-4398-9dc1-7a2dc5eb9004",
"23f87b18-a320-4617-aa2c-3ed979c2b5e9",
"ae1450c7-9b31-4961-b61f-990b25447d6d"
]
}
'import requests
url = "https://console.advinservers.com/api/v1/client/servers/{server}/backups/bulk/delete"
payload = { "uuids": ["2bc92d27-f5be-4398-9dc1-7a2dc5eb9004", "23f87b18-a320-4617-aa2c-3ed979c2b5e9", "ae1450c7-9b31-4961-b61f-990b25447d6d"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
uuids: [
'2bc92d27-f5be-4398-9dc1-7a2dc5eb9004',
'23f87b18-a320-4617-aa2c-3ed979c2b5e9',
'ae1450c7-9b31-4961-b61f-990b25447d6d'
]
})
};
fetch('https://console.advinservers.com/api/v1/client/servers/{server}/backups/bulk/delete', 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://console.advinservers.com/api/v1/client/servers/{server}/backups/bulk/delete",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'uuids' => [
'2bc92d27-f5be-4398-9dc1-7a2dc5eb9004',
'23f87b18-a320-4617-aa2c-3ed979c2b5e9',
'ae1450c7-9b31-4961-b61f-990b25447d6d'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://console.advinservers.com/api/v1/client/servers/{server}/backups/bulk/delete"
payload := strings.NewReader("{\n \"uuids\": [\n \"2bc92d27-f5be-4398-9dc1-7a2dc5eb9004\",\n \"23f87b18-a320-4617-aa2c-3ed979c2b5e9\",\n \"ae1450c7-9b31-4961-b61f-990b25447d6d\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://console.advinservers.com/api/v1/client/servers/{server}/backups/bulk/delete")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"uuids\": [\n \"2bc92d27-f5be-4398-9dc1-7a2dc5eb9004\",\n \"23f87b18-a320-4617-aa2c-3ed979c2b5e9\",\n \"ae1450c7-9b31-4961-b61f-990b25447d6d\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://console.advinservers.com/api/v1/client/servers/{server}/backups/bulk/delete")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"uuids\": [\n \"2bc92d27-f5be-4398-9dc1-7a2dc5eb9004\",\n \"23f87b18-a320-4617-aa2c-3ed979c2b5e9\",\n \"ae1450c7-9b31-4961-b61f-990b25447d6d\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"deleted": 2,
"locked": 1,
"failed": 0,
"message": "Deleted 2 backups. The copies on the backup server have been removed. 1 locked backup was kept."
}{
"message": "Unauthenticated."
}{
"message": "This API key is not allowed to do that in this team. It needs the \"snapshot.delete\" permission."
}{
"message": "Not found."
}{
"message": "The request could not be carried out."
}{
"message": "The name field is required.",
"errors": {}
}{
"message": "Too Many Attempts."
}Authorizations
Your API key, sent as a bearer token. Create one in the control panel under API Keys, give it only the permissions the integration needs, and copy it when it is created. It cannot be shown again. Each key is restricted to one owned team. The key determines the team for every request.
Path Parameters
The server UUID
"ecc6f4f1"
Body
Send a JSON object containing the fields below. Required fields are marked in the schema.
The resource UUIDs to act on.
1 - 100 elementsResponse
The record, as a JSON object. There is no envelope.
How many were deleted.
2
How many were locked, and so were kept.
1
How many could not be deleted and are still there.
0
The three counts as one sentence, written to be shown to a customer.
"Deleted 2 backups. The copies on the backup server have been removed. 1 locked backup was kept."