Restaurar snapshot del stack
curl --request POST \
--url https://api.vertracloud.app/v1/stacks/{stack_id}/snapshots/{snapshot_id}/restore \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"restore_image_version": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({restore_image_version: true})
};
fetch('https://api.vertracloud.app/v1/stacks/{stack_id}/snapshots/{snapshot_id}/restore', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.vertracloud.app/v1/stacks/{stack_id}/snapshots/{snapshot_id}/restore"
payload = { "restore_image_version": True }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.vertracloud.app/v1/stacks/{stack_id}/snapshots/{snapshot_id}/restore"
payload := strings.NewReader("{\n \"restore_image_version\": true\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))
}Snapshots
Restaurar snapshot del stack
Devuelve todos los miembros de un stack a una snapshot, primero las bases de datos y después las aplicaciones.
POST
/
v1
/
stacks
/
{stack_id}
/
snapshots
/
{snapshot_id}
/
restore
Restaurar snapshot del stack
curl --request POST \
--url https://api.vertracloud.app/v1/stacks/{stack_id}/snapshots/{snapshot_id}/restore \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"restore_image_version": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({restore_image_version: true})
};
fetch('https://api.vertracloud.app/v1/stacks/{stack_id}/snapshots/{snapshot_id}/restore', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.vertracloud.app/v1/stacks/{stack_id}/snapshots/{snapshot_id}/restore"
payload = { "restore_image_version": True }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.vertracloud.app/v1/stacks/{stack_id}/snapshots/{snapshot_id}/restore"
payload := strings.NewReader("{\n \"restore_image_version\": true\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))
}Restaura todos los miembros juntos: primero las bases de datos y después las aplicaciones. Se detiene en el primer error e informa de lo que ya se restauró en
details.restored. Requiere el scope stacks:write cuando se llama con una clave de API.
string
requerido
El ID del stack.
string
requerido
El ID de la snapshot del stack.
string
El workspace al que pertenece el stack, cuando actúas sobre él como propietario del workspace.
boolean
predeterminado:"false"
Las aplicaciones que ejecutan una imagen personalizada también vuelven a la versión de imagen de la snapshot, si todavía existe.
Response
El resultado de la restauración, como en Restaurar snapshot de aplicación.Errores
| Estado | Código | Cuándo |
|---|---|---|
| 403 | WORKSPACE_OWNER_ONLY | Eres miembro del workspace, no su propietario. |
| 404 | STACK_NOT_FOUND | El stack no existe o pertenece a otra cuenta. |
Última modificación el 28 de octubre de 2026