curl --request PATCH \
--url https://charts.basedash.com/api/public/organizations/{orgId}/data-sources/{id}/catalog \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"changes": [
{
"schemaName": "<string>",
"tableName": "<string>",
"columnName": "<string>",
"description": "<string>",
"expectedDescription": "<string>",
"displayName": "<string>",
"visible": true
}
]
}
'import requests
url = "https://charts.basedash.com/api/public/organizations/{orgId}/data-sources/{id}/catalog"
payload = { "changes": [
{
"schemaName": "<string>",
"tableName": "<string>",
"columnName": "<string>",
"description": "<string>",
"expectedDescription": "<string>",
"displayName": "<string>",
"visible": True
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
changes: [
{
schemaName: '<string>',
tableName: '<string>',
columnName: '<string>',
description: '<string>',
expectedDescription: '<string>',
displayName: '<string>',
visible: true
}
]
})
};
fetch('https://charts.basedash.com/api/public/organizations/{orgId}/data-sources/{id}/catalog', 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}/catalog",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'changes' => [
[
'schemaName' => '<string>',
'tableName' => '<string>',
'columnName' => '<string>',
'description' => '<string>',
'expectedDescription' => '<string>',
'displayName' => '<string>',
'visible' => true
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://charts.basedash.com/api/public/organizations/{orgId}/data-sources/{id}/catalog"
payload := strings.NewReader("{\n \"changes\": [\n {\n \"schemaName\": \"<string>\",\n \"tableName\": \"<string>\",\n \"columnName\": \"<string>\",\n \"description\": \"<string>\",\n \"expectedDescription\": \"<string>\",\n \"displayName\": \"<string>\",\n \"visible\": true\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://charts.basedash.com/api/public/organizations/{orgId}/data-sources/{id}/catalog")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"changes\": [\n {\n \"schemaName\": \"<string>\",\n \"tableName\": \"<string>\",\n \"columnName\": \"<string>\",\n \"description\": \"<string>\",\n \"expectedDescription\": \"<string>\",\n \"displayName\": \"<string>\",\n \"visible\": true\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://charts.basedash.com/api/public/organizations/{orgId}/data-sources/{id}/catalog")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"changes\": [\n {\n \"schemaName\": \"<string>\",\n \"tableName\": \"<string>\",\n \"columnName\": \"<string>\",\n \"description\": \"<string>\",\n \"expectedDescription\": \"<string>\",\n \"displayName\": \"<string>\",\n \"visible\": true\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"changes": [
{
"kind": "schema",
"id": "<string>",
"schemaName": "<string>",
"tableName": "<string>",
"columnName": "<string>",
"outcome": "updated"
}
]
}
}{
"error": {
"title": "<string>",
"detail": "<string>",
"code": "<string>",
"ip": "<string>"
}
}{
"error": {
"title": "<string>",
"detail": "<string>",
"code": "<string>",
"ip": "<string>"
}
}{
"error": {
"title": "<string>",
"detail": "<string>",
"code": "<string>",
"ip": "<string>"
}
}{
"error": {
"title": "<string>",
"detail": "<string>",
"code": "<string>",
"ip": "<string>"
}
}{
"error": {
"title": "RateLimitExceeded",
"detail": "<string>",
"retryAfterMs": 123,
"code": "<string>",
"ip": "<string>"
}
}{
"error": {
"title": "<string>",
"detail": "<string>",
"code": "<string>",
"ip": "<string>"
}
}Update data source catalog
Changes the AI context (description), display names and visibility of a data source’s schemas, tables and columns. Requires admin access to the organization.
Name each object by its schema, table and column names exactly as in the database (as listed by the catalog endpoint), and send only the fields to change. A batch takes at most 1000 changes and applies as a whole: if any change is refused, nothing changes.
By default an object the last sync did not find refuses the batch with a 400; send onMissing: "skip" to change the others and get missing for it. Run a schema sync first to pick up new objects.
To avoid overwriting a description someone else changed since you read it, send the value you read as expectedDescription; if any object has another description the batch fails with a 409.
Hiding a schema hides its tables from members and AI, and hiding a table hides its columns. Descriptions longer than AI uses are refused.
curl --request PATCH \
--url https://charts.basedash.com/api/public/organizations/{orgId}/data-sources/{id}/catalog \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"changes": [
{
"schemaName": "<string>",
"tableName": "<string>",
"columnName": "<string>",
"description": "<string>",
"expectedDescription": "<string>",
"displayName": "<string>",
"visible": true
}
]
}
'import requests
url = "https://charts.basedash.com/api/public/organizations/{orgId}/data-sources/{id}/catalog"
payload = { "changes": [
{
"schemaName": "<string>",
"tableName": "<string>",
"columnName": "<string>",
"description": "<string>",
"expectedDescription": "<string>",
"displayName": "<string>",
"visible": True
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
changes: [
{
schemaName: '<string>',
tableName: '<string>',
columnName: '<string>',
description: '<string>',
expectedDescription: '<string>',
displayName: '<string>',
visible: true
}
]
})
};
fetch('https://charts.basedash.com/api/public/organizations/{orgId}/data-sources/{id}/catalog', 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}/catalog",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'changes' => [
[
'schemaName' => '<string>',
'tableName' => '<string>',
'columnName' => '<string>',
'description' => '<string>',
'expectedDescription' => '<string>',
'displayName' => '<string>',
'visible' => true
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://charts.basedash.com/api/public/organizations/{orgId}/data-sources/{id}/catalog"
payload := strings.NewReader("{\n \"changes\": [\n {\n \"schemaName\": \"<string>\",\n \"tableName\": \"<string>\",\n \"columnName\": \"<string>\",\n \"description\": \"<string>\",\n \"expectedDescription\": \"<string>\",\n \"displayName\": \"<string>\",\n \"visible\": true\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://charts.basedash.com/api/public/organizations/{orgId}/data-sources/{id}/catalog")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"changes\": [\n {\n \"schemaName\": \"<string>\",\n \"tableName\": \"<string>\",\n \"columnName\": \"<string>\",\n \"description\": \"<string>\",\n \"expectedDescription\": \"<string>\",\n \"displayName\": \"<string>\",\n \"visible\": true\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://charts.basedash.com/api/public/organizations/{orgId}/data-sources/{id}/catalog")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"changes\": [\n {\n \"schemaName\": \"<string>\",\n \"tableName\": \"<string>\",\n \"columnName\": \"<string>\",\n \"description\": \"<string>\",\n \"expectedDescription\": \"<string>\",\n \"displayName\": \"<string>\",\n \"visible\": true\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"changes": [
{
"kind": "schema",
"id": "<string>",
"schemaName": "<string>",
"tableName": "<string>",
"columnName": "<string>",
"outcome": "updated"
}
]
}
}{
"error": {
"title": "<string>",
"detail": "<string>",
"code": "<string>",
"ip": "<string>"
}
}{
"error": {
"title": "<string>",
"detail": "<string>",
"code": "<string>",
"ip": "<string>"
}
}{
"error": {
"title": "<string>",
"detail": "<string>",
"code": "<string>",
"ip": "<string>"
}
}{
"error": {
"title": "<string>",
"detail": "<string>",
"code": "<string>",
"ip": "<string>"
}
}{
"error": {
"title": "RateLimitExceeded",
"detail": "<string>",
"retryAfterMs": 123,
"code": "<string>",
"ip": "<string>"
}
}{
"error": {
"title": "<string>",
"detail": "<string>",
"code": "<string>",
"ip": "<string>"
}
}