Database - Snapshots
List Snapshots
Get a list of all snapshots related with a single database.
GET
/
v2
/
databases
/
{database_id}
/
snapshots
List Snapshots
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_mongo_manual",
"size":10644463,
"modified":"2025-08-13T13:29:11.263Z",
"key":"AWSAccessKeyId=accesskey&Expires=1757683751&Signature=VZ03MSxcNw3%2FtPezXv0IhTs0jq4%3D&versionId=45ec0b49-9af6-445e-a55c-abd7ec5278b2",
"runtime":"mongo",
"origin":"manual"
},
{
"name":"a14b8d5e1cb7405a851eb4c075506121_mongo_automatic",
"size":2742383,
"modified":"2025-08-13T00:01:47.010Z",
"key":"AWSAccessKeyId=accesskey&Expires=1757683751&Signature=7zw5apjyaOd1xPZl3gRgp8Y4yEs%3D&versionId=f65e1378-8717-45c5-8aec-bb233eedb5ce",
"runtime":"mongo",
"origin":"automatic"
}
]
}
string
required
The API key for your account. You can find this in your account settings.
202 SNAPSHOT_PROCESSING and confirm the file has landed.
The key field in each item is a signed query string, append it to the download URL described in the note below to fetch that snapshot directly. Responses are cached for 30 minutes per user and database, so a snapshot that just finished generating may take a short while to show up here. To restore one of these snapshots, see Restore Snapshot.
Parameters
string
required
The ID of the database.
Response
string
Indicates whether the call was successful..
success if successful, error if not.array
The contents of the response.
Show Toggle object
Show Toggle object
string
The snapshot’s name: the database ID suffixed with
_<type> and, on newer snapshots, _<origin>. Pass it unchanged as snapshotId when restoring.number
Size of the backup in bytes.
string
Date of the last modification of the backup.
string
AWS access key for the backup.
string | null
Runtime the snapshot was taken from: the application’s language (
javascript, python, rust…) or the database engine (mongo, mysql, postgres, redis). null on snapshots taken before this field existed.string | null
How the snapshot was created:
manual (requested through the API, dashboard or CLI) or automatic (the daily scheduled snapshot). null on older snapshots.{
"status":"success",
"response":[
{
"name":"a14b8d5e1cb7405a851eb4c075506121_mongo_manual",
"size":10644463,
"modified":"2025-08-13T13:29:11.263Z",
"key":"AWSAccessKeyId=accesskey&Expires=1757683751&Signature=VZ03MSxcNw3%2FtPezXv0IhTs0jq4%3D&versionId=45ec0b49-9af6-445e-a55c-abd7ec5278b2",
"runtime":"mongo",
"origin":"manual"
},
{
"name":"a14b8d5e1cb7405a851eb4c075506121_mongo_automatic",
"size":2742383,
"modified":"2025-08-13T00:01:47.010Z",
"key":"AWSAccessKeyId=accesskey&Expires=1757683751&Signature=7zw5apjyaOd1xPZl3gRgp8Y4yEs%3D&versionId=f65e1378-8717-45c5-8aec-bb233eedb5ce",
"runtime":"mongo",
"origin":"automatic"
}
]
}
The format of the URL to download the desired snapshot is: https://snapshots.squarecloud.app/databases/{accountID}/{name}.zip?{key}
Common errors
| Code | HTTP | Meaning |
|---|---|---|
DATABASE_NOT_FOUND | 404 | The database does not exist or is not owned by the caller. |
⌘I
List Snapshots
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_mongo_manual",
"size":10644463,
"modified":"2025-08-13T13:29:11.263Z",
"key":"AWSAccessKeyId=accesskey&Expires=1757683751&Signature=VZ03MSxcNw3%2FtPezXv0IhTs0jq4%3D&versionId=45ec0b49-9af6-445e-a55c-abd7ec5278b2",
"runtime":"mongo",
"origin":"manual"
},
{
"name":"a14b8d5e1cb7405a851eb4c075506121_mongo_automatic",
"size":2742383,
"modified":"2025-08-13T00:01:47.010Z",
"key":"AWSAccessKeyId=accesskey&Expires=1757683751&Signature=7zw5apjyaOd1xPZl3gRgp8Y4yEs%3D&versionId=f65e1378-8717-45c5-8aec-bb233eedb5ce",
"runtime":"mongo",
"origin":"automatic"
}
]
}

