curl --request POST \
--url https://app.base44.com/api/apps-trash/{app_id}/restore \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.base44.com/api/apps-trash/{app_id}/restore"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.base44.com/api/apps-trash/{app_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-trash/{app_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_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://app.base44.com/api/apps-trash/{app_id}/restore"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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-trash/{app_id}/restore")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/apps-trash/{app_id}/restore")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"app_id": "6820f3a4e7b91d003c45a1f2",
"entities_undeleted": 128,
"new_slug": "acme-crm-6820f3a4",
"functions_redeployed": true,
"reconnect_needed": [
"domains"
]
}Restore deleted app
Takes an app out of the trash, up to 30 days after Delete app put it there.
You can restore an app you own, and a workspace admin can restore any app in the workspace. You must still be a member of the app’s workspace, and the workspace must have room under its plan’s app limit.
The app comes back with its entity records. If its owner left the workspace while it was in the trash, the workspace owner becomes its owner, and collaborators who left don’t get their access back. If another app took its slug, it moves to a free one, returned as new_slug. Its backend functions are deployed again, and an app that was published goes live again.
reconnect_needed to see what to set up again.The whole restore runs before you get a response, so the call takes longer on an app with many backend functions. A restore can’t be repeated: once the app is out of the trash, calling this again returns a 409.
This is limited to 10 requests per minute. A signed-in session has its own limit, and every personal access token for the workspace shares one. Some workspaces have a different limit.
curl --request POST \
--url https://app.base44.com/api/apps-trash/{app_id}/restore \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.base44.com/api/apps-trash/{app_id}/restore"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.base44.com/api/apps-trash/{app_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-trash/{app_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_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://app.base44.com/api/apps-trash/{app_id}/restore"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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-trash/{app_id}/restore")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/apps-trash/{app_id}/restore")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"app_id": "6820f3a4e7b91d003c45a1f2",
"entities_undeleted": 128,
"new_slug": "acme-crm-6820f3a4",
"functions_redeployed": true,
"reconnect_needed": [
"domains"
]
}Authorizations
Personal access token, sent as Authorization: Bearer <token>.
Path Parameters
ID of the app to restore, as returned by Delete app.
Response
The app is back, and what still needs reconnecting.
ID of the restored app.
"6820f3a4e7b91d003c45a1f2"
Number of entity records brought back with the app.
128
The app's new slug when another app took its old one while it was in the trash, or null when the app kept its slug.
"acme-crm-6820f3a4"
Whether the app's backend functions were deployed again. When false, reconnect_needed includes functions. true for an app with no functions.
true
What you still need to do. It has the deleted_resources values from Delete app, which the restore doesn't rebuild, plus functions when the backend functions didn't deploy, republish when the published app needs a new deploy to run its functions, and runtime when the published app isn't reachable yet. Base44 retries that last one in the background.
["domains"]
Was this page helpful?