Restore Application Snapshot
curl --request POST \
--url https://api.vertracloud.app/v1/users/{id}/snapshots/{snapshot_id}/restore \
--header 'Content-Type: application/json' \
--data '
{
"resource_id": "<string>"
}
'import requests
url = "https://api.vertracloud.app/v1/users/{id}/snapshots/{snapshot_id}/restore"
payload = { "resource_id": "<string>" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({resource_id: '<string>'})
};
fetch('https://api.vertracloud.app/v1/users/{id}/snapshots/{snapshot_id}/restore', 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.vertracloud.app/v1/users/{id}/snapshots/{snapshot_id}/restore",
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([
'resource_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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://api.vertracloud.app/v1/users/{id}/snapshots/{snapshot_id}/restore"
payload := strings.NewReader("{\n \"resource_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://api.vertracloud.app/v1/users/{id}/snapshots/{snapshot_id}/restore")
.header("Content-Type", "application/json")
.body("{\n \"resource_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vertracloud.app/v1/users/{id}/snapshots/{snapshot_id}/restore")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"resource_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"response": {
"message": "Restoration started and rebuild triggered"
}
}
Snapshots
Restore Application Snapshot
Restores a specified snapshot to an application or database, then automatically rebuilds/restarts the resource.
POST
/
v1
/
users
/
{id}
/
snapshots
/
{snapshot_id}
/
restore
Restore Application Snapshot
curl --request POST \
--url https://api.vertracloud.app/v1/users/{id}/snapshots/{snapshot_id}/restore \
--header 'Content-Type: application/json' \
--data '
{
"resource_id": "<string>"
}
'import requests
url = "https://api.vertracloud.app/v1/users/{id}/snapshots/{snapshot_id}/restore"
payload = { "resource_id": "<string>" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({resource_id: '<string>'})
};
fetch('https://api.vertracloud.app/v1/users/{id}/snapshots/{snapshot_id}/restore', 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.vertracloud.app/v1/users/{id}/snapshots/{snapshot_id}/restore",
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([
'resource_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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://api.vertracloud.app/v1/users/{id}/snapshots/{snapshot_id}/restore"
payload := strings.NewReader("{\n \"resource_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://api.vertracloud.app/v1/users/{id}/snapshots/{snapshot_id}/restore")
.header("Content-Type", "application/json")
.body("{\n \"resource_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vertracloud.app/v1/users/{id}/snapshots/{snapshot_id}/restore")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"resource_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"response": {
"message": "Restoration started and rebuild triggered"
}
}
string
required
The ID of the application or database to restore the snapshot to.
string
required
The ID of the snapshot to restore.
string
required
The resource type. Possible values:
applications, databases.string
Optional. Override the target resource for cross-resource restore. If omitted, restores to the resource specified by
id.Response
object
Confirmation that the restoration process was triggered.
Show Toggle object
Show Toggle object
string
A message confirming the restore was started.
{
"response": {
"message": "Restoration started and rebuild triggered"
}
}
Error Responses
string
The error code indicating the reason for failure. Possible values:
UNAUTHORIZED: The user is not authenticated.USER_NOT_FOUND: The authenticated user was not found.APP_NOT_FOUND: The specified application does not exist.DATABASE_NOT_FOUND: The specified database does not exist.ACCESS_DENIED: The user does not own the resource or snapshot.RESTORE_COOLDOWN: A restore operation was recently performed on this resource. Wait before retrying.TYPE_MISMATCH: The snapshot resource type does not match the target resource type.SNAPSHOT_ENGINE_MISMATCH: The snapshot belongs to a different database engine than the target (400).SNAPSHOT_NOT_FOUND: The specified snapshot does not exist.OPERATION_IN_PROGRESS: Another lifecycle operation on the same resource is already running (409). Nothing was restored — wait a few seconds and retry. See Common Error Codes.SNAPSHOT_IMPORT_FAILED: The restore failed while loading the data (500). The database is left running and empty; the snapshot stays available to retry.UNKNOWN_ERROR: An unexpected platform error occurred.INTERNAL_SERVER_ERROR: An unexpected server error occurred.
{
"code": "UNAUTHORIZED"
}
{
"code": "ACCESS_DENIED"
}
{
"code": "APP_NOT_FOUND"
}
{
"code": "SNAPSHOT_NOT_FOUND"
}
{
"code": "RESTORE_COOLDOWN"
}
{
"code": "TYPE_MISMATCH",
"message": "Cannot restore snapshot to a different resource type"
}
{
"code": "SNAPSHOT_ENGINE_MISMATCH"
}
{
"code": "SNAPSHOT_IMPORT_FAILED"
}