Restore a folder from Trash
curl --request POST \
--url https://api.getoneprofile.ai/tables/folders/{folder_id}/restore/ \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.getoneprofile.ai/tables/folders/{folder_id}/restore/"
headers = {"X-API-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.getoneprofile.ai/tables/folders/{folder_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.getoneprofile.ai/tables/folders/{folder_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 => [
"X-API-Key: <api-key>"
],
]);
$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.getoneprofile.ai/tables/folders/{folder_id}/restore/"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
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.getoneprofile.ai/tables/folders/{folder_id}/restore/")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/tables/folders/{folder_id}/restore/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"folder": {
"created_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"owner_user_id": "<string>",
"parent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"updated_at": "2023-11-07T05:31:56Z",
"folder_count": 0,
"last_viewed_at": "2023-11-07T05:31:56Z",
"nested_archived_count": 0,
"nested_table_count": 0,
"owner_display_name": "<string>",
"table_count": 0
},
"folder_count": 123,
"table_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"left_in_trash_table_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>",
"issues": [
{
"input": "<string>",
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}tables
Restore a folder from Trash
Bring a folder back with every folder and table that went to Trash with it, where it was (the top level when its own folder is gone). A table whose name a live table has taken since stays in Trash, listed there on its own, and the answer names it.
POST
/
tables
/
folders
/
{folder_id}
/
restore
/
Restore a folder from Trash
curl --request POST \
--url https://api.getoneprofile.ai/tables/folders/{folder_id}/restore/ \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.getoneprofile.ai/tables/folders/{folder_id}/restore/"
headers = {"X-API-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.getoneprofile.ai/tables/folders/{folder_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.getoneprofile.ai/tables/folders/{folder_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 => [
"X-API-Key: <api-key>"
],
]);
$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.getoneprofile.ai/tables/folders/{folder_id}/restore/"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
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.getoneprofile.ai/tables/folders/{folder_id}/restore/")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/tables/folders/{folder_id}/restore/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"folder": {
"created_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"owner_user_id": "<string>",
"parent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"updated_at": "2023-11-07T05:31:56Z",
"folder_count": 0,
"last_viewed_at": "2023-11-07T05:31:56Z",
"nested_archived_count": 0,
"nested_table_count": 0,
"owner_display_name": "<string>",
"table_count": 0
},
"folder_count": 123,
"table_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"left_in_trash_table_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>",
"issues": [
{
"input": "<string>",
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Authorizations
APIKeyHeaderHTTPBearer
Path Parameters
Response
Successful Response
What deleting or restoring a folder moved.
A workspace folder, as the Tables list draws it.
Show child attributes
Show child attributes
Folders that moved, this one included.
Tables that moved with it.
On a restore: tables that stayed in Trash because a live table has taken their name since. Each is now listed in Trash on its own.
Was this page helpful?