Saltar al contenido principal
GET
/
v2
/
apps
/
{app_id}
/
snapshots
Listar Snapshots
curl --request GET \
  --url https://api.squarecloud.app/v2/apps/{app_id}/snapshots \
  --header 'Authorization: <authorization>'
import requests

url = "https://api.squarecloud.app/v2/apps/{app_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/apps/{app_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/apps/{app_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/apps/{app_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/apps/{app_id}/snapshots")
.header("Authorization", "<authorization>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.squarecloud.app/v2/apps/{app_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": "1d2cdc0d6ebd435c91315c6329d12eab",
      "size": 12900705,
      "modified": "2024-06-27T06:23:42.326Z",
      "key": "AWSAccessKeyId=access key"
    },
    {
      "name": "1d2cdc0d6ebd435c91315c6329d12eab",
      "size": 12900705,
      "modified": "2024-06-26T07:05:40.000Z",
      "key": "AWSAccessKeyId=access key"
    },
    {
      "name": "1d2cdc0d6ebd435c91315c6329d12eab",
      "size": 12900705,
      "modified": "2024-06-25T05:15:51.533Z",
      "key": "AWSAccessKeyId=access key"
    },
  ]
}
Authorization
string
requerido
La clave de API de tu cuenta. Puedes encontrarla en la configuración de tu cuenta.

Parámetros

app_id
string
requerido
El ID de la aplicación. Puedes encontrarlo en la URL del panel de tu aplicación.

Respuesta

status
string
Indica si la llamada fue exitosa. success si fue exitosa, error si no.
response
object
El contenido de la respuesta.
{
  "status": "success",
  "response": [
    {
      "name": "1d2cdc0d6ebd435c91315c6329d12eab",
      "size": 12900705,
      "modified": "2024-06-27T06:23:42.326Z",
      "key": "AWSAccessKeyId=access key"
    },
    {
      "name": "1d2cdc0d6ebd435c91315c6329d12eab",
      "size": 12900705,
      "modified": "2024-06-26T07:05:40.000Z",
      "key": "AWSAccessKeyId=access key"
    },
    {
      "name": "1d2cdc0d6ebd435c91315c6329d12eab",
      "size": 12900705,
      "modified": "2024-06-25T05:15:51.533Z",
      "key": "AWSAccessKeyId=access key"
    },
  ]
}
El formato de la URL para descargar el snapshot deseado es: https://snapshots.squarecloud.app/applications/{accountID}/{name}.zip?{key}