Delete Database
curl --request DELETE \
--url https://api.vertracloud.app/v1/databases/{id}import requests
url = "https://api.vertracloud.app/v1/databases/{id}"
response = requests.delete(url)
print(response.text)const options = {method: 'DELETE'};
fetch('https://api.vertracloud.app/v1/databases/{id}', 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/databases/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$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.vertracloud.app/v1/databases/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
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.vertracloud.app/v1/databases/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vertracloud.app/v1/databases/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body{
"response": "00000000000000000000000000000001"
}
Databases
Delete Database
Deletes a database by its ID after taking an automatic safety snapshot. Requires the databases:delete scope.
DELETE
/
v1
/
databases
/
{id}
Delete Database
curl --request DELETE \
--url https://api.vertracloud.app/v1/databases/{id}import requests
url = "https://api.vertracloud.app/v1/databases/{id}"
response = requests.delete(url)
print(response.text)const options = {method: 'DELETE'};
fetch('https://api.vertracloud.app/v1/databases/{id}', 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/databases/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$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.vertracloud.app/v1/databases/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
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.vertracloud.app/v1/databases/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vertracloud.app/v1/databases/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body{
"response": "00000000000000000000000000000001"
}
Deleting a database first takes an automatic safety snapshot, on every plan. If that snapshot
fails, nothing is deleted and the request answers
INTERNAL_SERVER_ERROR. An API key needs the
databases:delete scope.
string
required
The ID of the database to delete.
string
If the database belongs to a workspace, the workspace’s ID.
Response
string
The ID of the deleted database.
{
"response": "00000000000000000000000000000001"
}
Error Responses
string
DATABASE_NOT_FOUND: The database does not exist (404).ACCESS_DENIED: Your account can’t act on this database (403).FORCED_SNAPSHOT_RATE_LIMIT: Too many safety snapshots were attempted recently on this database or on your account; the database was not deleted (429).INTERNAL_SERVER_ERROR: The safety snapshot could not be taken; the database was not deleted (500).OPERATION_IN_PROGRESS: Another lifecycle operation is running on this database (409).INTERNAL_SERVER_ERROR: The platform could not remove the database; retry later (500).