Update Connector
curl --request PATCH \
--url https://app.textql.com/v2/connectors/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"config": {
"connector_type": "POSTGRES",
"name": "<string>",
"auth_strategy": "<string>"
},
"allow_sql_write_operations": true,
"include_db_session_metadata": true
}
'import requests
url = "https://app.textql.com/v2/connectors/{id}"
payload = {
"config": {
"connector_type": "POSTGRES",
"name": "<string>",
"auth_strategy": "<string>"
},
"allow_sql_write_operations": True,
"include_db_session_metadata": 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({
config: {connector_type: 'POSTGRES', name: '<string>', auth_strategy: '<string>'},
allow_sql_write_operations: true,
include_db_session_metadata: true
})
};
fetch('https://app.textql.com/v2/connectors/{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://app.textql.com/v2/connectors/{id}",
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([
'config' => [
'connector_type' => 'POSTGRES',
'name' => '<string>',
'auth_strategy' => '<string>'
],
'allow_sql_write_operations' => true,
'include_db_session_metadata' => 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://app.textql.com/v2/connectors/{id}"
payload := strings.NewReader("{\n \"config\": {\n \"connector_type\": \"POSTGRES\",\n \"name\": \"<string>\",\n \"auth_strategy\": \"<string>\"\n },\n \"allow_sql_write_operations\": true,\n \"include_db_session_metadata\": true\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://app.textql.com/v2/connectors/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"config\": {\n \"connector_type\": \"POSTGRES\",\n \"name\": \"<string>\",\n \"auth_strategy\": \"<string>\"\n },\n \"allow_sql_write_operations\": true,\n \"include_db_session_metadata\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.textql.com/v2/connectors/{id}")
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 \"config\": {\n \"connector_type\": \"POSTGRES\",\n \"name\": \"<string>\",\n \"auth_strategy\": \"<string>\"\n },\n \"allow_sql_write_operations\": true,\n \"include_db_session_metadata\": true\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"name": "<string>",
"type": "<string>"
}{
"error": {
"code": "invalid_request",
"message": "Invalid request body"
}
}{
"error": {
"code": "unauthenticated",
"message": "Authentication required"
}
}{
"error": {
"code": "permission_denied",
"message": "Insufficient permissions"
}
}{
"error": {
"code": "not_found",
"message": "Resource not found"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "Rate limit exceeded"
}
}{
"error": {
"code": "internal",
"message": "Internal server error"
}
}Connectors
Update Connector
Update an existing data connector
PATCH
/
v2
/
connectors
/
{id}
Update Connector
curl --request PATCH \
--url https://app.textql.com/v2/connectors/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"config": {
"connector_type": "POSTGRES",
"name": "<string>",
"auth_strategy": "<string>"
},
"allow_sql_write_operations": true,
"include_db_session_metadata": true
}
'import requests
url = "https://app.textql.com/v2/connectors/{id}"
payload = {
"config": {
"connector_type": "POSTGRES",
"name": "<string>",
"auth_strategy": "<string>"
},
"allow_sql_write_operations": True,
"include_db_session_metadata": 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({
config: {connector_type: 'POSTGRES', name: '<string>', auth_strategy: '<string>'},
allow_sql_write_operations: true,
include_db_session_metadata: true
})
};
fetch('https://app.textql.com/v2/connectors/{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://app.textql.com/v2/connectors/{id}",
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([
'config' => [
'connector_type' => 'POSTGRES',
'name' => '<string>',
'auth_strategy' => '<string>'
],
'allow_sql_write_operations' => true,
'include_db_session_metadata' => 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://app.textql.com/v2/connectors/{id}"
payload := strings.NewReader("{\n \"config\": {\n \"connector_type\": \"POSTGRES\",\n \"name\": \"<string>\",\n \"auth_strategy\": \"<string>\"\n },\n \"allow_sql_write_operations\": true,\n \"include_db_session_metadata\": true\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://app.textql.com/v2/connectors/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"config\": {\n \"connector_type\": \"POSTGRES\",\n \"name\": \"<string>\",\n \"auth_strategy\": \"<string>\"\n },\n \"allow_sql_write_operations\": true,\n \"include_db_session_metadata\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.textql.com/v2/connectors/{id}")
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 \"config\": {\n \"connector_type\": \"POSTGRES\",\n \"name\": \"<string>\",\n \"auth_strategy\": \"<string>\"\n },\n \"allow_sql_write_operations\": true,\n \"include_db_session_metadata\": true\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"name": "<string>",
"type": "<string>"
}{
"error": {
"code": "invalid_request",
"message": "Invalid request body"
}
}{
"error": {
"code": "unauthenticated",
"message": "Authentication required"
}
}{
"error": {
"code": "permission_denied",
"message": "Insufficient permissions"
}
}{
"error": {
"code": "not_found",
"message": "Resource not found"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "Rate limit exceeded"
}
}{
"error": {
"code": "internal",
"message": "Internal server error"
}
}Authorizations
API key or JWT token
Path Parameters
Connector ID
Body
application/json
A connector's type, display name, and type-specific connection metadata.
Set exactly one metadata field matching connector_type (e.g.
connector_type: POSTGRES ⇒ set postgres). The common database types
are documented below; every supported type follows the same shape — see
the proto ConnectorConfig for the full list (Snowflake, BigQuery,
Databricks, Tableau, PowerBI, SQL Server, Trino, etc.).
Confidential fields (passwords, keys, tokens) are write-only: they are never returned by read endpoints, and on update they are preserved from the stored connector when sent empty.
Show child attributes
Show child attributes
Allow the connector to execute write/DDL SQL.
Attach database session metadata to queries.
⌘I