import os
from meibel import MeibelClient
from meibel.models import UpdateDatasourceRequest, TableDescriptionUpdate, TagColumnUpdateItem
client = MeibelClient(api_key=os.environ["MEIBEL_API_KEY"])
request = UpdateDatasourceRequest(
name="Customer Support Tickets",
description="Support ticket exports with resolution metadata",
tables=[
TableDescriptionUpdate(
table_name="tickets",
description="One row per support ticket",
columns=[
TagColumnUpdateItem(
column_name="resolution_time_hours",
description="Hours between ticket creation and closure",
),
],
),
],
)
datasource = client.datasources.update("ds_8f3a1c2b", request)
print(f"{datasource.id}: {datasource.name} (updated_at={datasource.updated_at})")import { MeibelClient } from "meibel";
const client = new MeibelClient({ apiKey: process.env.MEIBEL_API_KEY });
const datasource = await client.datasources.update({
datasource_id: "ds_7f3c1a2b9e",
name: "Customer Support Tickets",
description: "Zendesk ticket exports with resolution metadata",
metadata_config: {
type: "custom",
fields: [
{
name: "priority",
type: "string",
description: "Ticket priority level",
index: true,
},
],
},
});
console.log(`${datasource.name} updated at ${datasource.updated_at}`);package main
import (
"context"
"fmt"
"os"
v2 "github.com/meibel-ai/meibel-go/v2"
)
func main() {
client := v2.NewClient(v2.WithAPIKey(os.Getenv("MEIBEL_API_KEY")))
ds, err := client.Datasources.Update(context.Background(), "ds_8f3a2b1c", v2.UpdateDatasourceRequest{
Name: v2.String("Support Tickets - Zendesk"),
Description: v2.String("Customer support tickets synced nightly from Zendesk"),
MetadataConfig: &v2.MetadataConfigRequest{
Type: "custom",
Fields: []v2.MetadataField{
{
Name: "priority",
Type: "string",
Description: "Ticket priority level",
Index: true,
},
},
},
Tables: []v2.TableDescriptionUpdate{
{
TableName: "tickets",
Description: v2.String("Support ticket records with status and priority"),
Columns: []v2.TagColumnUpdateItem{
{
ColumnName: "priority",
Description: "Urgency level assigned to the ticket",
},
},
},
},
})
if err != nil {
panic(err)
}
fmt.Printf("Updated datasource %s: %s\n", ds.ID, ds.Name)
}curl --request PUT \
--url https://api.meibel.ai/v2/datasources/{datasource_id} \
--header 'Content-Type: application/json' \
--header 'Meibel-API-Key: <api-key>' \
--data '
{
"name": "<string>",
"description": "<string>",
"connector": {
"database": {
"host": "<string>",
"port": 123,
"database": "<string>",
"schema_name": "<string>"
},
"cloud_storage": {
"bucket": "<string>",
"prefix": "<string>",
"role_arn": "<string>",
"region": "<string>"
},
"web_crawl": {
"base_url": "<string>",
"javascript_render": false,
"domains": [
{
"domain": "<string>",
"include_pattern": "<string>",
"exclude_pattern": ""
}
]
}
},
"metadata_config": {
"model_id": "<string>",
"fields": [
{
"name": "<string>",
"description": "<string>",
"index": true
}
]
},
"tables": [
{
"table_name": "<string>",
"description": "<string>",
"columns": [
{
"column_name": "<string>",
"description": "<string>"
}
]
}
]
}
'const options = {
method: 'PUT',
headers: {'Meibel-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
connector: {
database: {host: '<string>', port: 123, database: '<string>', schema_name: '<string>'},
cloud_storage: {
bucket: '<string>',
prefix: '<string>',
role_arn: '<string>',
region: '<string>'
},
web_crawl: {
base_url: '<string>',
javascript_render: false,
domains: [{domain: '<string>', include_pattern: '<string>', exclude_pattern: ''}]
}
},
metadata_config: {
model_id: '<string>',
fields: [{name: '<string>', description: '<string>', index: true}]
},
tables: [
{
table_name: '<string>',
description: '<string>',
columns: [{column_name: '<string>', description: '<string>'}]
}
]
})
};
fetch('https://api.meibel.ai/v2/datasources/{datasource_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.meibel.ai/v2/datasources/{datasource_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'connector' => [
'database' => [
'host' => '<string>',
'port' => 123,
'database' => '<string>',
'schema_name' => '<string>'
],
'cloud_storage' => [
'bucket' => '<string>',
'prefix' => '<string>',
'role_arn' => '<string>',
'region' => '<string>'
],
'web_crawl' => [
'base_url' => '<string>',
'javascript_render' => false,
'domains' => [
[
'domain' => '<string>',
'include_pattern' => '<string>',
'exclude_pattern' => ''
]
]
]
],
'metadata_config' => [
'model_id' => '<string>',
'fields' => [
[
'name' => '<string>',
'description' => '<string>',
'index' => true
]
]
],
'tables' => [
[
'table_name' => '<string>',
'description' => '<string>',
'columns' => [
[
'column_name' => '<string>',
'description' => '<string>'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Meibel-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.put("https://api.meibel.ai/v2/datasources/{datasource_id}")
.header("Meibel-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"connector\": {\n \"database\": {\n \"host\": \"<string>\",\n \"port\": 123,\n \"database\": \"<string>\",\n \"schema_name\": \"<string>\"\n },\n \"cloud_storage\": {\n \"bucket\": \"<string>\",\n \"prefix\": \"<string>\",\n \"role_arn\": \"<string>\",\n \"region\": \"<string>\"\n },\n \"web_crawl\": {\n \"base_url\": \"<string>\",\n \"javascript_render\": false,\n \"domains\": [\n {\n \"domain\": \"<string>\",\n \"include_pattern\": \"<string>\",\n \"exclude_pattern\": \"\"\n }\n ]\n }\n },\n \"metadata_config\": {\n \"model_id\": \"<string>\",\n \"fields\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"index\": true\n }\n ]\n },\n \"tables\": [\n {\n \"table_name\": \"<string>\",\n \"description\": \"<string>\",\n \"columns\": [\n {\n \"column_name\": \"<string>\",\n \"description\": \"<string>\"\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meibel.ai/v2/datasources/{datasource_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Meibel-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"connector\": {\n \"database\": {\n \"host\": \"<string>\",\n \"port\": 123,\n \"database\": \"<string>\",\n \"schema_name\": \"<string>\"\n },\n \"cloud_storage\": {\n \"bucket\": \"<string>\",\n \"prefix\": \"<string>\",\n \"role_arn\": \"<string>\",\n \"region\": \"<string>\"\n },\n \"web_crawl\": {\n \"base_url\": \"<string>\",\n \"javascript_render\": false,\n \"domains\": [\n {\n \"domain\": \"<string>\",\n \"include_pattern\": \"<string>\",\n \"exclude_pattern\": \"\"\n }\n ]\n }\n },\n \"metadata_config\": {\n \"model_id\": \"<string>\",\n \"fields\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"index\": true\n }\n ]\n },\n \"tables\": [\n {\n \"table_name\": \"<string>\",\n \"description\": \"<string>\",\n \"columns\": [\n {\n \"column_name\": \"<string>\",\n \"description\": \"<string>\"\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"connector": {
"cloud_storage": {},
"web_crawl": {
"base_url": "<string>",
"javascript_render": false,
"domains": [
{
"domain": "<string>",
"include_pattern": "<string>",
"exclude_pattern": ""
}
]
}
},
"created_at": "<string>",
"updated_at": "<string>",
"last_sync_at": "<string>",
"last_sync_status": "<string>",
"total_ingested_files": 123,
"metadata_config": {
"fields": [
{
"name": "<string>",
"description": "<string>",
"index": true
}
],
"model_id": "<string>"
},
"files": {
"total": 123,
"deleted": 123
},
"ingest_counts": {
"rag": {
"total": 123,
"new": 123,
"updated": 123
},
"tag": {
"total": 123,
"new": 123,
"updated": 123
},
"ref_graph": {
"total": 123,
"new": 123,
"updated": 123
}
},
"tables": [
{
"name": "<string>",
"column_count": 123,
"description": "<string>"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Update Datasource
import os
from meibel import MeibelClient
from meibel.models import UpdateDatasourceRequest, TableDescriptionUpdate, TagColumnUpdateItem
client = MeibelClient(api_key=os.environ["MEIBEL_API_KEY"])
request = UpdateDatasourceRequest(
name="Customer Support Tickets",
description="Support ticket exports with resolution metadata",
tables=[
TableDescriptionUpdate(
table_name="tickets",
description="One row per support ticket",
columns=[
TagColumnUpdateItem(
column_name="resolution_time_hours",
description="Hours between ticket creation and closure",
),
],
),
],
)
datasource = client.datasources.update("ds_8f3a1c2b", request)
print(f"{datasource.id}: {datasource.name} (updated_at={datasource.updated_at})")import { MeibelClient } from "meibel";
const client = new MeibelClient({ apiKey: process.env.MEIBEL_API_KEY });
const datasource = await client.datasources.update({
datasource_id: "ds_7f3c1a2b9e",
name: "Customer Support Tickets",
description: "Zendesk ticket exports with resolution metadata",
metadata_config: {
type: "custom",
fields: [
{
name: "priority",
type: "string",
description: "Ticket priority level",
index: true,
},
],
},
});
console.log(`${datasource.name} updated at ${datasource.updated_at}`);package main
import (
"context"
"fmt"
"os"
v2 "github.com/meibel-ai/meibel-go/v2"
)
func main() {
client := v2.NewClient(v2.WithAPIKey(os.Getenv("MEIBEL_API_KEY")))
ds, err := client.Datasources.Update(context.Background(), "ds_8f3a2b1c", v2.UpdateDatasourceRequest{
Name: v2.String("Support Tickets - Zendesk"),
Description: v2.String("Customer support tickets synced nightly from Zendesk"),
MetadataConfig: &v2.MetadataConfigRequest{
Type: "custom",
Fields: []v2.MetadataField{
{
Name: "priority",
Type: "string",
Description: "Ticket priority level",
Index: true,
},
},
},
Tables: []v2.TableDescriptionUpdate{
{
TableName: "tickets",
Description: v2.String("Support ticket records with status and priority"),
Columns: []v2.TagColumnUpdateItem{
{
ColumnName: "priority",
Description: "Urgency level assigned to the ticket",
},
},
},
},
})
if err != nil {
panic(err)
}
fmt.Printf("Updated datasource %s: %s\n", ds.ID, ds.Name)
}curl --request PUT \
--url https://api.meibel.ai/v2/datasources/{datasource_id} \
--header 'Content-Type: application/json' \
--header 'Meibel-API-Key: <api-key>' \
--data '
{
"name": "<string>",
"description": "<string>",
"connector": {
"database": {
"host": "<string>",
"port": 123,
"database": "<string>",
"schema_name": "<string>"
},
"cloud_storage": {
"bucket": "<string>",
"prefix": "<string>",
"role_arn": "<string>",
"region": "<string>"
},
"web_crawl": {
"base_url": "<string>",
"javascript_render": false,
"domains": [
{
"domain": "<string>",
"include_pattern": "<string>",
"exclude_pattern": ""
}
]
}
},
"metadata_config": {
"model_id": "<string>",
"fields": [
{
"name": "<string>",
"description": "<string>",
"index": true
}
]
},
"tables": [
{
"table_name": "<string>",
"description": "<string>",
"columns": [
{
"column_name": "<string>",
"description": "<string>"
}
]
}
]
}
'const options = {
method: 'PUT',
headers: {'Meibel-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
connector: {
database: {host: '<string>', port: 123, database: '<string>', schema_name: '<string>'},
cloud_storage: {
bucket: '<string>',
prefix: '<string>',
role_arn: '<string>',
region: '<string>'
},
web_crawl: {
base_url: '<string>',
javascript_render: false,
domains: [{domain: '<string>', include_pattern: '<string>', exclude_pattern: ''}]
}
},
metadata_config: {
model_id: '<string>',
fields: [{name: '<string>', description: '<string>', index: true}]
},
tables: [
{
table_name: '<string>',
description: '<string>',
columns: [{column_name: '<string>', description: '<string>'}]
}
]
})
};
fetch('https://api.meibel.ai/v2/datasources/{datasource_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.meibel.ai/v2/datasources/{datasource_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'connector' => [
'database' => [
'host' => '<string>',
'port' => 123,
'database' => '<string>',
'schema_name' => '<string>'
],
'cloud_storage' => [
'bucket' => '<string>',
'prefix' => '<string>',
'role_arn' => '<string>',
'region' => '<string>'
],
'web_crawl' => [
'base_url' => '<string>',
'javascript_render' => false,
'domains' => [
[
'domain' => '<string>',
'include_pattern' => '<string>',
'exclude_pattern' => ''
]
]
]
],
'metadata_config' => [
'model_id' => '<string>',
'fields' => [
[
'name' => '<string>',
'description' => '<string>',
'index' => true
]
]
],
'tables' => [
[
'table_name' => '<string>',
'description' => '<string>',
'columns' => [
[
'column_name' => '<string>',
'description' => '<string>'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Meibel-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.put("https://api.meibel.ai/v2/datasources/{datasource_id}")
.header("Meibel-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"connector\": {\n \"database\": {\n \"host\": \"<string>\",\n \"port\": 123,\n \"database\": \"<string>\",\n \"schema_name\": \"<string>\"\n },\n \"cloud_storage\": {\n \"bucket\": \"<string>\",\n \"prefix\": \"<string>\",\n \"role_arn\": \"<string>\",\n \"region\": \"<string>\"\n },\n \"web_crawl\": {\n \"base_url\": \"<string>\",\n \"javascript_render\": false,\n \"domains\": [\n {\n \"domain\": \"<string>\",\n \"include_pattern\": \"<string>\",\n \"exclude_pattern\": \"\"\n }\n ]\n }\n },\n \"metadata_config\": {\n \"model_id\": \"<string>\",\n \"fields\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"index\": true\n }\n ]\n },\n \"tables\": [\n {\n \"table_name\": \"<string>\",\n \"description\": \"<string>\",\n \"columns\": [\n {\n \"column_name\": \"<string>\",\n \"description\": \"<string>\"\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meibel.ai/v2/datasources/{datasource_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Meibel-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"connector\": {\n \"database\": {\n \"host\": \"<string>\",\n \"port\": 123,\n \"database\": \"<string>\",\n \"schema_name\": \"<string>\"\n },\n \"cloud_storage\": {\n \"bucket\": \"<string>\",\n \"prefix\": \"<string>\",\n \"role_arn\": \"<string>\",\n \"region\": \"<string>\"\n },\n \"web_crawl\": {\n \"base_url\": \"<string>\",\n \"javascript_render\": false,\n \"domains\": [\n {\n \"domain\": \"<string>\",\n \"include_pattern\": \"<string>\",\n \"exclude_pattern\": \"\"\n }\n ]\n }\n },\n \"metadata_config\": {\n \"model_id\": \"<string>\",\n \"fields\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"index\": true\n }\n ]\n },\n \"tables\": [\n {\n \"table_name\": \"<string>\",\n \"description\": \"<string>\",\n \"columns\": [\n {\n \"column_name\": \"<string>\",\n \"description\": \"<string>\"\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"connector": {
"cloud_storage": {},
"web_crawl": {
"base_url": "<string>",
"javascript_render": false,
"domains": [
{
"domain": "<string>",
"include_pattern": "<string>",
"exclude_pattern": ""
}
]
}
},
"created_at": "<string>",
"updated_at": "<string>",
"last_sync_at": "<string>",
"last_sync_status": "<string>",
"total_ingested_files": 123,
"metadata_config": {
"fields": [
{
"name": "<string>",
"description": "<string>",
"index": true
}
],
"model_id": "<string>"
},
"files": {
"total": 123,
"deleted": 123
},
"ingest_counts": {
"rag": {
"total": 123,
"new": 123,
"updated": 123
},
"tag": {
"total": 123,
"new": 123,
"updated": 123
},
"ref_graph": {
"total": 123,
"new": 123,
"updated": 123
}
},
"tables": [
{
"name": "<string>",
"column_count": 123,
"description": "<string>"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Path Parameters
Body
Body for updating a datasource. Omit a field to leave it unchanged.
Updated datasource name
Updated description
Updated connection configuration
Show child attributes
Show child attributes
Metadata extraction config — if changed, re-extraction triggers automatically
Show child attributes
Show child attributes
Table and column descriptions to update (structured datasources only)
Show child attributes
Show child attributes
Response
Successful Response
A datasource with its latest sync/ingest state and (optionally) table details.
Unique datasource ID
Human-readable datasource name
What this datasource contains
Connection configuration (summary — infra details like buckets, roles, and hosts are not echoed back)
Show child attributes
Show child attributes
ISO 8601 creation timestamp
ISO 8601 last-update timestamp
ISO 8601 timestamp of the most recent ingest run
Status of the most recent ingest run (e.g. 'completed', 'failed')
Total number of files ingested across all runs
Current metadata extraction configuration
Show child attributes
Show child attributes
File counts for the datasource
Show child attributes
Show child attributes
Per-method counts from the latest ingest run
Show child attributes
Show child attributes
Tables discovered on a structured datasource — only populated when include_tables=true
Show child attributes
Show child attributes
Was this page helpful?