curl --request POST \
--url https://app.base44.com/api/apps/{app_id}/entities/versions/checkpoints/{checkpoint_id}/restore \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"entity_names": [
"Invoice",
"Customer"
]
}
'import requests
url = "https://app.base44.com/api/apps/{app_id}/entities/versions/checkpoints/{checkpoint_id}/restore"
payload = { "entity_names": ["Invoice", "Customer"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({entity_names: ['Invoice', 'Customer']})
};
fetch('https://app.base44.com/api/apps/{app_id}/entities/versions/checkpoints/{checkpoint_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://app.base44.com/api/apps/{app_id}/entities/versions/checkpoints/{checkpoint_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([
'entity_names' => [
'Invoice',
'Customer'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://app.base44.com/api/apps/{app_id}/entities/versions/checkpoints/{checkpoint_id}/restore"
payload := strings.NewReader("{\n \"entity_names\": [\n \"Invoice\",\n \"Customer\"\n ]\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))
}HttpResponse<String> response = Unirest.post("https://app.base44.com/api/apps/{app_id}/entities/versions/checkpoints/{checkpoint_id}/restore")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"entity_names\": [\n \"Invoice\",\n \"Customer\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/apps/{app_id}/entities/versions/checkpoints/{checkpoint_id}/restore")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"entity_names\": [\n \"Invoice\",\n \"Customer\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"batch_id": "3f1c9a52-7b4e-4d2a-9c61-5e8f0b7a2d14",
"launched": [
{
"entity_name": "Invoice",
"operation_id": "68a1c2f0e4f5a6b7c8d9e1a2"
}
],
"skipped_entities": []
}Restore data to checkpoint
Starts putting the entities you name back the way they were at a checkpoint, and returns the restore’s ID.
The checkpoint marks a moment, so one checkpoint can restore any of the app’s entities, not only the one it belongs to. For each entity, Base44 puts changed records back to their earlier values, brings back records deleted since, and moves records created since to the entity’s trash.
The restore runs in the background, and a successful call only means it started. Poll Get data restore status with batch_id until every entity’s status is succeeded or failed. While an entity is being restored, writes to its records are refused. A restore doesn’t trigger the app’s webhooks, automations, or workflows.
A restore can be undone. Base44 saves a backup of each entity just before rewriting it, and restoring the same entities from undo_checkpoint_id in the status response puts them back the way they were.
An entity that another restore is already running on is left out and listed in skipped_entities. The call is rejected when none of the entities changed after the checkpoint.
The call has no retry protection. A retry is refused while the first restore is running, and starts a second one after it finishes. If a response is lost, look for restore backups in List data checkpoints before you send it again.
curl --request POST \
--url https://app.base44.com/api/apps/{app_id}/entities/versions/checkpoints/{checkpoint_id}/restore \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"entity_names": [
"Invoice",
"Customer"
]
}
'import requests
url = "https://app.base44.com/api/apps/{app_id}/entities/versions/checkpoints/{checkpoint_id}/restore"
payload = { "entity_names": ["Invoice", "Customer"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({entity_names: ['Invoice', 'Customer']})
};
fetch('https://app.base44.com/api/apps/{app_id}/entities/versions/checkpoints/{checkpoint_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://app.base44.com/api/apps/{app_id}/entities/versions/checkpoints/{checkpoint_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([
'entity_names' => [
'Invoice',
'Customer'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://app.base44.com/api/apps/{app_id}/entities/versions/checkpoints/{checkpoint_id}/restore"
payload := strings.NewReader("{\n \"entity_names\": [\n \"Invoice\",\n \"Customer\"\n ]\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))
}HttpResponse<String> response = Unirest.post("https://app.base44.com/api/apps/{app_id}/entities/versions/checkpoints/{checkpoint_id}/restore")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"entity_names\": [\n \"Invoice\",\n \"Customer\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/apps/{app_id}/entities/versions/checkpoints/{checkpoint_id}/restore")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"entity_names\": [\n \"Invoice\",\n \"Customer\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"batch_id": "3f1c9a52-7b4e-4d2a-9c61-5e8f0b7a2d14",
"launched": [
{
"entity_name": "Invoice",
"operation_id": "68a1c2f0e4f5a6b7c8d9e1a2"
}
],
"skipped_entities": []
}Authorizations
Personal access token, sent as Authorization: Bearer <token>.
Body
Which entities to restore to the checkpoint.
Entities to restore, as List entity schemas reports them. Name at least one and at most 300. They don't have to include the entity the checkpoint belongs to.
["Invoice", "Customer"]
Response
The restore started.
The restore that started, and which entities it covers.
ID of the restore. Pass it to Get data restore status to follow it.
"3f1c9a52-7b4e-4d2a-9c61-5e8f0b7a2d14"
The entities whose restore started, each with the ID of its own part of the restore.
Show child attributes
Show child attributes
[
{
"entity_name": "Invoice",
"operation_id": "68a1c2f0e4f5a6b7c8d9e1a2"
}
]
Entities you asked for that didn't start, because another restore was already running on them. Try them again once it finishes.
[]
Was this page helpful?