Zum Hauptinhalt springen
GET
/
v2
/
databases
/
{database_id}
/
snapshots
Snapshots auflisten
curl --request GET \
  --url https://api.squarecloud.app/v2/databases/{database_id}/snapshots \
  --header 'Authorization: <authorization>'
import requests

url = "https://api.squarecloud.app/v2/databases/{database_id}/snapshots"

headers = {"Authorization": "<authorization>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: '<authorization>'}};

fetch('https://api.squarecloud.app/v2/databases/{database_id}/snapshots', 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://api.squarecloud.app/v2/databases/{database_id}/snapshots",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);

$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://api.squarecloud.app/v2/databases/{database_id}/snapshots"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "<authorization>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.squarecloud.app/v2/databases/{database_id}/snapshots")
.header("Authorization", "<authorization>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.squarecloud.app/v2/databases/{database_id}/snapshots")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'

response = http.request(request)
puts response.read_body
{
  "status":"success",
  "response":[
    {
      "name":"a14b8d5e1cb7405a851eb4c075506121",
      "size":10644463,
      "modified":"2025-08-13T13:29:11.263Z",
      "key":"AWSAccessKeyId=accesskey&Expires=1757683751&Signature=VZ03MSxcNw3%2FtPezXv0IhTs0jq4%3D&versionId=45ec0b49-9af6-445e-a55c-abd7ec5278b2"
    },
    {
      "name":"a14b8d5e1cb7405a851eb4c075506121",
      "size":2742383,
      "modified":"2025-08-13T00:01:47.010Z",
      "key":"AWSAccessKeyId=accesskey&Expires=1757683751&Signature=7zw5apjyaOd1xPZl3gRgp8Y4yEs%3D&versionId=f65e1378-8717-45c5-8aec-bb233eedb5ce"
    }
  ]
}
Authorization
string
erforderlich
Der API-Schlüssel für Ihr Konto. Sie finden ihn in Ihren Kontoeinstellungen.

Parameter

database_id
string
erforderlich
Die ID der Datenbank.

Antwort

status
string
Gibt an, ob der Aufruf erfolgreich war. success bei Erfolg, error andernfalls.
response
array
Der Inhalt der Antwort.
{
  "status":"success",
  "response":[
    {
      "name":"a14b8d5e1cb7405a851eb4c075506121",
      "size":10644463,
      "modified":"2025-08-13T13:29:11.263Z",
      "key":"AWSAccessKeyId=accesskey&Expires=1757683751&Signature=VZ03MSxcNw3%2FtPezXv0IhTs0jq4%3D&versionId=45ec0b49-9af6-445e-a55c-abd7ec5278b2"
    },
    {
      "name":"a14b8d5e1cb7405a851eb4c075506121",
      "size":2742383,
      "modified":"2025-08-13T00:01:47.010Z",
      "key":"AWSAccessKeyId=accesskey&Expires=1757683751&Signature=7zw5apjyaOd1xPZl3gRgp8Y4yEs%3D&versionId=f65e1378-8717-45c5-8aec-bb233eedb5ce"
    }
  ]
}
Das Format der URL zum Herunterladen des gewünschten Snapshots lautet: https://snapshots.squarecloud.app/databases/{accountID}/{name}.zip?{key}