Delete a table
curl --request DELETE \
--url https://api.databar.ai/v1/table/{table_uuid} \
--header 'x-apikey: <x-apikey>'import requests
url = "https://api.databar.ai/v1/table/{table_uuid}"
headers = {"x-apikey": "<x-apikey>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'x-apikey': '<x-apikey>'}};
fetch('https://api.databar.ai/v1/table/{table_uuid}', 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.databar.ai/v1/table/{table_uuid}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"x-apikey: <x-apikey>"
],
]);
$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.databar.ai/v1/table/{table_uuid}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-apikey", "<x-apikey>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.databar.ai/v1/table/{table_uuid}")
.header("x-apikey", "<x-apikey>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.databar.ai/v1/table/{table_uuid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-apikey"] = '<x-apikey>'
response = http.request(request)
puts response.read_body{
"detail": "Not allowed"
}{
"detail": "Table not found"
}{
"error": "<string>",
"detail": "<string>",
"fields": [
{
"loc": [
"<string>"
],
"msg": "<string>"
}
]
}Tables
Delete a table
Permanently delete a table and all its rows by UUID.
DELETE
/
v1
/
table
/
{table_uuid}
Delete a table
curl --request DELETE \
--url https://api.databar.ai/v1/table/{table_uuid} \
--header 'x-apikey: <x-apikey>'import requests
url = "https://api.databar.ai/v1/table/{table_uuid}"
headers = {"x-apikey": "<x-apikey>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'x-apikey': '<x-apikey>'}};
fetch('https://api.databar.ai/v1/table/{table_uuid}', 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.databar.ai/v1/table/{table_uuid}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"x-apikey: <x-apikey>"
],
]);
$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.databar.ai/v1/table/{table_uuid}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-apikey", "<x-apikey>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.databar.ai/v1/table/{table_uuid}")
.header("x-apikey", "<x-apikey>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.databar.ai/v1/table/{table_uuid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-apikey"] = '<x-apikey>'
response = http.request(request)
puts response.read_body{
"detail": "Not allowed"
}{
"detail": "Table not found"
}{
"error": "<string>",
"detail": "<string>",
"fields": [
{
"loc": [
"<string>"
],
"msg": "<string>"
}
]
}Removes this table from its workbook.
The table goes to Trash for 30 days and can be restored into its workbook. If it is the only table, the whole workbook goes to Trash instead.