Delete a data source
curl --request DELETE \
--url https://charts.basedash.com/api/public/organizations/{orgId}/data-sources/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://charts.basedash.com/api/public/organizations/{orgId}/data-sources/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://charts.basedash.com/api/public/organizations/{orgId}/data-sources/{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://charts.basedash.com/api/public/organizations/{orgId}/data-sources/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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://charts.basedash.com/api/public/organizations/{orgId}/data-sources/{id}"
req, _ := http.NewRequest("DELETE", 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.delete("https://charts.basedash.com/api/public/organizations/{orgId}/data-sources/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://charts.basedash.com/api/public/organizations/{orgId}/data-sources/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"displayName": "<string>",
"description": "<string>",
"dialect": "POSTGRES",
"databaseName": "<string>",
"username": "<string>",
"host": "<string>",
"port": 123,
"sslEnabled": true,
"sslCustomCertificatesEnabled": true,
"sshEnabled": true,
"sshHost": "<string>",
"sshPort": 123,
"sshUsername": "<string>",
"bigQueryProjectId": "<string>",
"spannerInstanceId": "<string>",
"athenaWorkgroup": "<string>",
"athenaOutputLocation": "<string>",
"athenaCatalog": "<string>",
"snowflakeAccountId": "<string>",
"snowflakeWarehouse": "<string>",
"snowflakeRole": "<string>",
"lastSuccessfulSyncAt": "2023-11-07T05:31:56Z",
"lastSyncStatus": "PENDING",
"lastSyncAttemptAt": "2023-11-07T05:31:56Z",
"hasCompletedFirstSync": true,
"syncErrorMessage": "<string>",
"lastHealthyAt": "2023-11-07T05:31:56Z",
"lastHealthStatus": "HEALTHY",
"lastHealthCheckAttemptAt": "2023-11-07T05:31:56Z",
"isDemo": true,
"isBasedashWarehouse": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"error": {
"title": "<string>",
"detail": "<string>"
}
}{
"error": {
"title": "<string>",
"detail": "<string>"
}
}{
"error": {
"title": "RateLimitExceeded",
"detail": "<string>",
"retryAfterMs": 123
}
}{
"error": {
"title": "<string>",
"detail": "<string>"
}
}Data Sources
Delete a data source
Soft-deletes a data source by ID. Requires admin access to the organization. The data source will be marked as deleted and a cleanup job will be triggered to remove related entities.
DELETE
/
api
/
public
/
organizations
/
{orgId}
/
data-sources
/
{id}
Delete a data source
curl --request DELETE \
--url https://charts.basedash.com/api/public/organizations/{orgId}/data-sources/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://charts.basedash.com/api/public/organizations/{orgId}/data-sources/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://charts.basedash.com/api/public/organizations/{orgId}/data-sources/{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://charts.basedash.com/api/public/organizations/{orgId}/data-sources/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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://charts.basedash.com/api/public/organizations/{orgId}/data-sources/{id}"
req, _ := http.NewRequest("DELETE", 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.delete("https://charts.basedash.com/api/public/organizations/{orgId}/data-sources/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://charts.basedash.com/api/public/organizations/{orgId}/data-sources/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"displayName": "<string>",
"description": "<string>",
"dialect": "POSTGRES",
"databaseName": "<string>",
"username": "<string>",
"host": "<string>",
"port": 123,
"sslEnabled": true,
"sslCustomCertificatesEnabled": true,
"sshEnabled": true,
"sshHost": "<string>",
"sshPort": 123,
"sshUsername": "<string>",
"bigQueryProjectId": "<string>",
"spannerInstanceId": "<string>",
"athenaWorkgroup": "<string>",
"athenaOutputLocation": "<string>",
"athenaCatalog": "<string>",
"snowflakeAccountId": "<string>",
"snowflakeWarehouse": "<string>",
"snowflakeRole": "<string>",
"lastSuccessfulSyncAt": "2023-11-07T05:31:56Z",
"lastSyncStatus": "PENDING",
"lastSyncAttemptAt": "2023-11-07T05:31:56Z",
"hasCompletedFirstSync": true,
"syncErrorMessage": "<string>",
"lastHealthyAt": "2023-11-07T05:31:56Z",
"lastHealthStatus": "HEALTHY",
"lastHealthCheckAttemptAt": "2023-11-07T05:31:56Z",
"isDemo": true,
"isBasedashWarehouse": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"error": {
"title": "<string>",
"detail": "<string>"
}
}{
"error": {
"title": "<string>",
"detail": "<string>"
}
}{
"error": {
"title": "RateLimitExceeded",
"detail": "<string>",
"retryAfterMs": 123
}
}{
"error": {
"title": "<string>",
"detail": "<string>"
}
}Was this page helpful?
⌘I