curl --request POST \
--url https://{organization}.admin.credibledata.com/api/v0/organizations/{organizationName}/projects/{projectName}/connections \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"resource": "<string>",
"name": "<string>",
"attributes": {
"dialectName": "<string>",
"isPool": true,
"canPersist": true,
"canStream": true
},
"postgresConnection": {
"host": "<string>",
"port": 123,
"databaseName": "<string>",
"userName": "<string>",
"password": "<string>",
"connectionString": "<string>"
},
"bigqueryConnection": {
"defaultProjectId": "<string>",
"billingProjectId": "<string>",
"location": "<string>",
"serviceAccountKeyJson": "<string>",
"maximumBytesBilled": "<string>",
"queryTimeoutMilliseconds": "<string>"
},
"snowflakeConnection": {
"account": "<string>",
"username": "<string>",
"password": "<string>",
"privateKey": "<string>",
"privateKeyPass": "<string>",
"warehouse": "<string>",
"database": "<string>",
"schema": "<string>",
"role": "<string>",
"responseTimeoutMilliseconds": 123
},
"trinoConnection": {
"server": "<string>",
"port": 123,
"catalog": "<string>",
"schema": "<string>",
"user": "<string>",
"password": "<string>",
"peakaKey": "<string>"
},
"mysqlConnection": {
"host": "<string>",
"port": 123,
"database": "<string>",
"user": "<string>",
"password": "<string>"
},
"duckdbConnection": {
"attachedDatabases": [
{
"name": "test_connection, _connection, test_connection_1",
"attributes": {
"dialectName": "<string>",
"isPool": true,
"canPersist": true,
"canStream": true
},
"bigqueryConnection": {
"defaultProjectId": "<string>",
"billingProjectId": "<string>",
"location": "<string>",
"serviceAccountKeyJson": "<string>",
"maximumBytesBilled": "<string>",
"queryTimeoutMilliseconds": "<string>"
},
"snowflakeConnection": {
"account": "<string>",
"username": "<string>",
"password": "<string>",
"privateKey": "<string>",
"privateKeyPass": "<string>",
"warehouse": "<string>",
"database": "<string>",
"schema": "<string>",
"role": "<string>",
"responseTimeoutMilliseconds": 123
},
"postgresConnection": {
"host": "<string>",
"port": 123,
"databaseName": "<string>",
"userName": "<string>",
"password": "<string>",
"connectionString": "<string>"
}
}
]
},
"motherduckConnection": {
"accessToken": "<string>",
"database": "<string>"
},
"includeTables": [
"sales.orders",
"finance.*"
],
"excludeAllTables": false,
"excludeTables": [
"backup.records",
"temp_data.*"
],
"indexingStatusLastUpdated": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://{organization}.admin.credibledata.com/api/v0/organizations/{organizationName}/projects/{projectName}/connections"
payload = {
"resource": "<string>",
"name": "<string>",
"attributes": {
"dialectName": "<string>",
"isPool": True,
"canPersist": True,
"canStream": True
},
"postgresConnection": {
"host": "<string>",
"port": 123,
"databaseName": "<string>",
"userName": "<string>",
"password": "<string>",
"connectionString": "<string>"
},
"bigqueryConnection": {
"defaultProjectId": "<string>",
"billingProjectId": "<string>",
"location": "<string>",
"serviceAccountKeyJson": "<string>",
"maximumBytesBilled": "<string>",
"queryTimeoutMilliseconds": "<string>"
},
"snowflakeConnection": {
"account": "<string>",
"username": "<string>",
"password": "<string>",
"privateKey": "<string>",
"privateKeyPass": "<string>",
"warehouse": "<string>",
"database": "<string>",
"schema": "<string>",
"role": "<string>",
"responseTimeoutMilliseconds": 123
},
"trinoConnection": {
"server": "<string>",
"port": 123,
"catalog": "<string>",
"schema": "<string>",
"user": "<string>",
"password": "<string>",
"peakaKey": "<string>"
},
"mysqlConnection": {
"host": "<string>",
"port": 123,
"database": "<string>",
"user": "<string>",
"password": "<string>"
},
"duckdbConnection": { "attachedDatabases": [
{
"name": "test_connection, _connection, test_connection_1",
"attributes": {
"dialectName": "<string>",
"isPool": True,
"canPersist": True,
"canStream": True
},
"bigqueryConnection": {
"defaultProjectId": "<string>",
"billingProjectId": "<string>",
"location": "<string>",
"serviceAccountKeyJson": "<string>",
"maximumBytesBilled": "<string>",
"queryTimeoutMilliseconds": "<string>"
},
"snowflakeConnection": {
"account": "<string>",
"username": "<string>",
"password": "<string>",
"privateKey": "<string>",
"privateKeyPass": "<string>",
"warehouse": "<string>",
"database": "<string>",
"schema": "<string>",
"role": "<string>",
"responseTimeoutMilliseconds": 123
},
"postgresConnection": {
"host": "<string>",
"port": 123,
"databaseName": "<string>",
"userName": "<string>",
"password": "<string>",
"connectionString": "<string>"
}
}
] },
"motherduckConnection": {
"accessToken": "<string>",
"database": "<string>"
},
"includeTables": ["sales.orders", "finance.*"],
"excludeAllTables": False,
"excludeTables": ["backup.records", "temp_data.*"],
"indexingStatusLastUpdated": "2023-11-07T05:31:56Z"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
resource: '<string>',
name: '<string>',
attributes: {dialectName: '<string>', isPool: true, canPersist: true, canStream: true},
postgresConnection: {
host: '<string>',
port: 123,
databaseName: '<string>',
userName: '<string>',
password: '<string>',
connectionString: '<string>'
},
bigqueryConnection: {
defaultProjectId: '<string>',
billingProjectId: '<string>',
location: '<string>',
serviceAccountKeyJson: '<string>',
maximumBytesBilled: '<string>',
queryTimeoutMilliseconds: '<string>'
},
snowflakeConnection: {
account: '<string>',
username: '<string>',
password: '<string>',
privateKey: '<string>',
privateKeyPass: '<string>',
warehouse: '<string>',
database: '<string>',
schema: '<string>',
role: '<string>',
responseTimeoutMilliseconds: 123
},
trinoConnection: {
server: '<string>',
port: 123,
catalog: '<string>',
schema: '<string>',
user: '<string>',
password: '<string>',
peakaKey: '<string>'
},
mysqlConnection: {
host: '<string>',
port: 123,
database: '<string>',
user: '<string>',
password: '<string>'
},
duckdbConnection: {
attachedDatabases: [
{
name: 'test_connection, _connection, test_connection_1',
attributes: {dialectName: '<string>', isPool: true, canPersist: true, canStream: true},
bigqueryConnection: {
defaultProjectId: '<string>',
billingProjectId: '<string>',
location: '<string>',
serviceAccountKeyJson: '<string>',
maximumBytesBilled: '<string>',
queryTimeoutMilliseconds: '<string>'
},
snowflakeConnection: {
account: '<string>',
username: '<string>',
password: '<string>',
privateKey: '<string>',
privateKeyPass: '<string>',
warehouse: '<string>',
database: '<string>',
schema: '<string>',
role: '<string>',
responseTimeoutMilliseconds: 123
},
postgresConnection: {
host: '<string>',
port: 123,
databaseName: '<string>',
userName: '<string>',
password: '<string>',
connectionString: '<string>'
}
}
]
},
motherduckConnection: {accessToken: '<string>', database: '<string>'},
includeTables: ['sales.orders', 'finance.*'],
excludeAllTables: false,
excludeTables: ['backup.records', 'temp_data.*'],
indexingStatusLastUpdated: '2023-11-07T05:31:56Z'
})
};
fetch('https://{organization}.admin.credibledata.com/api/v0/organizations/{organizationName}/projects/{projectName}/connections', 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://{organization}.admin.credibledata.com/api/v0/organizations/{organizationName}/projects/{projectName}/connections",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'resource' => '<string>',
'name' => '<string>',
'attributes' => [
'dialectName' => '<string>',
'isPool' => true,
'canPersist' => true,
'canStream' => true
],
'postgresConnection' => [
'host' => '<string>',
'port' => 123,
'databaseName' => '<string>',
'userName' => '<string>',
'password' => '<string>',
'connectionString' => '<string>'
],
'bigqueryConnection' => [
'defaultProjectId' => '<string>',
'billingProjectId' => '<string>',
'location' => '<string>',
'serviceAccountKeyJson' => '<string>',
'maximumBytesBilled' => '<string>',
'queryTimeoutMilliseconds' => '<string>'
],
'snowflakeConnection' => [
'account' => '<string>',
'username' => '<string>',
'password' => '<string>',
'privateKey' => '<string>',
'privateKeyPass' => '<string>',
'warehouse' => '<string>',
'database' => '<string>',
'schema' => '<string>',
'role' => '<string>',
'responseTimeoutMilliseconds' => 123
],
'trinoConnection' => [
'server' => '<string>',
'port' => 123,
'catalog' => '<string>',
'schema' => '<string>',
'user' => '<string>',
'password' => '<string>',
'peakaKey' => '<string>'
],
'mysqlConnection' => [
'host' => '<string>',
'port' => 123,
'database' => '<string>',
'user' => '<string>',
'password' => '<string>'
],
'duckdbConnection' => [
'attachedDatabases' => [
[
'name' => 'test_connection, _connection, test_connection_1',
'attributes' => [
'dialectName' => '<string>',
'isPool' => true,
'canPersist' => true,
'canStream' => true
],
'bigqueryConnection' => [
'defaultProjectId' => '<string>',
'billingProjectId' => '<string>',
'location' => '<string>',
'serviceAccountKeyJson' => '<string>',
'maximumBytesBilled' => '<string>',
'queryTimeoutMilliseconds' => '<string>'
],
'snowflakeConnection' => [
'account' => '<string>',
'username' => '<string>',
'password' => '<string>',
'privateKey' => '<string>',
'privateKeyPass' => '<string>',
'warehouse' => '<string>',
'database' => '<string>',
'schema' => '<string>',
'role' => '<string>',
'responseTimeoutMilliseconds' => 123
],
'postgresConnection' => [
'host' => '<string>',
'port' => 123,
'databaseName' => '<string>',
'userName' => '<string>',
'password' => '<string>',
'connectionString' => '<string>'
]
]
]
],
'motherduckConnection' => [
'accessToken' => '<string>',
'database' => '<string>'
],
'includeTables' => [
'sales.orders',
'finance.*'
],
'excludeAllTables' => false,
'excludeTables' => [
'backup.records',
'temp_data.*'
],
'indexingStatusLastUpdated' => '2023-11-07T05:31:56Z'
]),
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://{organization}.admin.credibledata.com/api/v0/organizations/{organizationName}/projects/{projectName}/connections"
payload := strings.NewReader("{\n \"resource\": \"<string>\",\n \"name\": \"<string>\",\n \"attributes\": {\n \"dialectName\": \"<string>\",\n \"isPool\": true,\n \"canPersist\": true,\n \"canStream\": true\n },\n \"postgresConnection\": {\n \"host\": \"<string>\",\n \"port\": 123,\n \"databaseName\": \"<string>\",\n \"userName\": \"<string>\",\n \"password\": \"<string>\",\n \"connectionString\": \"<string>\"\n },\n \"bigqueryConnection\": {\n \"defaultProjectId\": \"<string>\",\n \"billingProjectId\": \"<string>\",\n \"location\": \"<string>\",\n \"serviceAccountKeyJson\": \"<string>\",\n \"maximumBytesBilled\": \"<string>\",\n \"queryTimeoutMilliseconds\": \"<string>\"\n },\n \"snowflakeConnection\": {\n \"account\": \"<string>\",\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"privateKey\": \"<string>\",\n \"privateKeyPass\": \"<string>\",\n \"warehouse\": \"<string>\",\n \"database\": \"<string>\",\n \"schema\": \"<string>\",\n \"role\": \"<string>\",\n \"responseTimeoutMilliseconds\": 123\n },\n \"trinoConnection\": {\n \"server\": \"<string>\",\n \"port\": 123,\n \"catalog\": \"<string>\",\n \"schema\": \"<string>\",\n \"user\": \"<string>\",\n \"password\": \"<string>\",\n \"peakaKey\": \"<string>\"\n },\n \"mysqlConnection\": {\n \"host\": \"<string>\",\n \"port\": 123,\n \"database\": \"<string>\",\n \"user\": \"<string>\",\n \"password\": \"<string>\"\n },\n \"duckdbConnection\": {\n \"attachedDatabases\": [\n {\n \"name\": \"test_connection, _connection, test_connection_1\",\n \"attributes\": {\n \"dialectName\": \"<string>\",\n \"isPool\": true,\n \"canPersist\": true,\n \"canStream\": true\n },\n \"bigqueryConnection\": {\n \"defaultProjectId\": \"<string>\",\n \"billingProjectId\": \"<string>\",\n \"location\": \"<string>\",\n \"serviceAccountKeyJson\": \"<string>\",\n \"maximumBytesBilled\": \"<string>\",\n \"queryTimeoutMilliseconds\": \"<string>\"\n },\n \"snowflakeConnection\": {\n \"account\": \"<string>\",\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"privateKey\": \"<string>\",\n \"privateKeyPass\": \"<string>\",\n \"warehouse\": \"<string>\",\n \"database\": \"<string>\",\n \"schema\": \"<string>\",\n \"role\": \"<string>\",\n \"responseTimeoutMilliseconds\": 123\n },\n \"postgresConnection\": {\n \"host\": \"<string>\",\n \"port\": 123,\n \"databaseName\": \"<string>\",\n \"userName\": \"<string>\",\n \"password\": \"<string>\",\n \"connectionString\": \"<string>\"\n }\n }\n ]\n },\n \"motherduckConnection\": {\n \"accessToken\": \"<string>\",\n \"database\": \"<string>\"\n },\n \"includeTables\": [\n \"sales.orders\",\n \"finance.*\"\n ],\n \"excludeAllTables\": false,\n \"excludeTables\": [\n \"backup.records\",\n \"temp_data.*\"\n ],\n \"indexingStatusLastUpdated\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://{organization}.admin.credibledata.com/api/v0/organizations/{organizationName}/projects/{projectName}/connections")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"resource\": \"<string>\",\n \"name\": \"<string>\",\n \"attributes\": {\n \"dialectName\": \"<string>\",\n \"isPool\": true,\n \"canPersist\": true,\n \"canStream\": true\n },\n \"postgresConnection\": {\n \"host\": \"<string>\",\n \"port\": 123,\n \"databaseName\": \"<string>\",\n \"userName\": \"<string>\",\n \"password\": \"<string>\",\n \"connectionString\": \"<string>\"\n },\n \"bigqueryConnection\": {\n \"defaultProjectId\": \"<string>\",\n \"billingProjectId\": \"<string>\",\n \"location\": \"<string>\",\n \"serviceAccountKeyJson\": \"<string>\",\n \"maximumBytesBilled\": \"<string>\",\n \"queryTimeoutMilliseconds\": \"<string>\"\n },\n \"snowflakeConnection\": {\n \"account\": \"<string>\",\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"privateKey\": \"<string>\",\n \"privateKeyPass\": \"<string>\",\n \"warehouse\": \"<string>\",\n \"database\": \"<string>\",\n \"schema\": \"<string>\",\n \"role\": \"<string>\",\n \"responseTimeoutMilliseconds\": 123\n },\n \"trinoConnection\": {\n \"server\": \"<string>\",\n \"port\": 123,\n \"catalog\": \"<string>\",\n \"schema\": \"<string>\",\n \"user\": \"<string>\",\n \"password\": \"<string>\",\n \"peakaKey\": \"<string>\"\n },\n \"mysqlConnection\": {\n \"host\": \"<string>\",\n \"port\": 123,\n \"database\": \"<string>\",\n \"user\": \"<string>\",\n \"password\": \"<string>\"\n },\n \"duckdbConnection\": {\n \"attachedDatabases\": [\n {\n \"name\": \"test_connection, _connection, test_connection_1\",\n \"attributes\": {\n \"dialectName\": \"<string>\",\n \"isPool\": true,\n \"canPersist\": true,\n \"canStream\": true\n },\n \"bigqueryConnection\": {\n \"defaultProjectId\": \"<string>\",\n \"billingProjectId\": \"<string>\",\n \"location\": \"<string>\",\n \"serviceAccountKeyJson\": \"<string>\",\n \"maximumBytesBilled\": \"<string>\",\n \"queryTimeoutMilliseconds\": \"<string>\"\n },\n \"snowflakeConnection\": {\n \"account\": \"<string>\",\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"privateKey\": \"<string>\",\n \"privateKeyPass\": \"<string>\",\n \"warehouse\": \"<string>\",\n \"database\": \"<string>\",\n \"schema\": \"<string>\",\n \"role\": \"<string>\",\n \"responseTimeoutMilliseconds\": 123\n },\n \"postgresConnection\": {\n \"host\": \"<string>\",\n \"port\": 123,\n \"databaseName\": \"<string>\",\n \"userName\": \"<string>\",\n \"password\": \"<string>\",\n \"connectionString\": \"<string>\"\n }\n }\n ]\n },\n \"motherduckConnection\": {\n \"accessToken\": \"<string>\",\n \"database\": \"<string>\"\n },\n \"includeTables\": [\n \"sales.orders\",\n \"finance.*\"\n ],\n \"excludeAllTables\": false,\n \"excludeTables\": [\n \"backup.records\",\n \"temp_data.*\"\n ],\n \"indexingStatusLastUpdated\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{organization}.admin.credibledata.com/api/v0/organizations/{organizationName}/projects/{projectName}/connections")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"resource\": \"<string>\",\n \"name\": \"<string>\",\n \"attributes\": {\n \"dialectName\": \"<string>\",\n \"isPool\": true,\n \"canPersist\": true,\n \"canStream\": true\n },\n \"postgresConnection\": {\n \"host\": \"<string>\",\n \"port\": 123,\n \"databaseName\": \"<string>\",\n \"userName\": \"<string>\",\n \"password\": \"<string>\",\n \"connectionString\": \"<string>\"\n },\n \"bigqueryConnection\": {\n \"defaultProjectId\": \"<string>\",\n \"billingProjectId\": \"<string>\",\n \"location\": \"<string>\",\n \"serviceAccountKeyJson\": \"<string>\",\n \"maximumBytesBilled\": \"<string>\",\n \"queryTimeoutMilliseconds\": \"<string>\"\n },\n \"snowflakeConnection\": {\n \"account\": \"<string>\",\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"privateKey\": \"<string>\",\n \"privateKeyPass\": \"<string>\",\n \"warehouse\": \"<string>\",\n \"database\": \"<string>\",\n \"schema\": \"<string>\",\n \"role\": \"<string>\",\n \"responseTimeoutMilliseconds\": 123\n },\n \"trinoConnection\": {\n \"server\": \"<string>\",\n \"port\": 123,\n \"catalog\": \"<string>\",\n \"schema\": \"<string>\",\n \"user\": \"<string>\",\n \"password\": \"<string>\",\n \"peakaKey\": \"<string>\"\n },\n \"mysqlConnection\": {\n \"host\": \"<string>\",\n \"port\": 123,\n \"database\": \"<string>\",\n \"user\": \"<string>\",\n \"password\": \"<string>\"\n },\n \"duckdbConnection\": {\n \"attachedDatabases\": [\n {\n \"name\": \"test_connection, _connection, test_connection_1\",\n \"attributes\": {\n \"dialectName\": \"<string>\",\n \"isPool\": true,\n \"canPersist\": true,\n \"canStream\": true\n },\n \"bigqueryConnection\": {\n \"defaultProjectId\": \"<string>\",\n \"billingProjectId\": \"<string>\",\n \"location\": \"<string>\",\n \"serviceAccountKeyJson\": \"<string>\",\n \"maximumBytesBilled\": \"<string>\",\n \"queryTimeoutMilliseconds\": \"<string>\"\n },\n \"snowflakeConnection\": {\n \"account\": \"<string>\",\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"privateKey\": \"<string>\",\n \"privateKeyPass\": \"<string>\",\n \"warehouse\": \"<string>\",\n \"database\": \"<string>\",\n \"schema\": \"<string>\",\n \"role\": \"<string>\",\n \"responseTimeoutMilliseconds\": 123\n },\n \"postgresConnection\": {\n \"host\": \"<string>\",\n \"port\": 123,\n \"databaseName\": \"<string>\",\n \"userName\": \"<string>\",\n \"password\": \"<string>\",\n \"connectionString\": \"<string>\"\n }\n }\n ]\n },\n \"motherduckConnection\": {\n \"accessToken\": \"<string>\",\n \"database\": \"<string>\"\n },\n \"includeTables\": [\n \"sales.orders\",\n \"finance.*\"\n ],\n \"excludeAllTables\": false,\n \"excludeTables\": [\n \"backup.records\",\n \"temp_data.*\"\n ],\n \"indexingStatusLastUpdated\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"resource": "<string>",
"name": "<string>",
"attributes": {
"dialectName": "<string>",
"isPool": true,
"canPersist": true,
"canStream": true
},
"postgresConnection": {
"host": "<string>",
"port": 123,
"databaseName": "<string>",
"userName": "<string>",
"password": "<string>",
"connectionString": "<string>"
},
"bigqueryConnection": {
"defaultProjectId": "<string>",
"billingProjectId": "<string>",
"location": "<string>",
"serviceAccountKeyJson": "<string>",
"maximumBytesBilled": "<string>",
"queryTimeoutMilliseconds": "<string>"
},
"snowflakeConnection": {
"account": "<string>",
"username": "<string>",
"password": "<string>",
"privateKey": "<string>",
"privateKeyPass": "<string>",
"warehouse": "<string>",
"database": "<string>",
"schema": "<string>",
"role": "<string>",
"responseTimeoutMilliseconds": 123
},
"trinoConnection": {
"server": "<string>",
"port": 123,
"catalog": "<string>",
"schema": "<string>",
"user": "<string>",
"password": "<string>",
"peakaKey": "<string>"
},
"mysqlConnection": {
"host": "<string>",
"port": 123,
"database": "<string>",
"user": "<string>",
"password": "<string>"
},
"duckdbConnection": {
"attachedDatabases": [
{
"name": "test_connection, _connection, test_connection_1",
"attributes": {
"dialectName": "<string>",
"isPool": true,
"canPersist": true,
"canStream": true
},
"bigqueryConnection": {
"defaultProjectId": "<string>",
"billingProjectId": "<string>",
"location": "<string>",
"serviceAccountKeyJson": "<string>",
"maximumBytesBilled": "<string>",
"queryTimeoutMilliseconds": "<string>"
},
"snowflakeConnection": {
"account": "<string>",
"username": "<string>",
"password": "<string>",
"privateKey": "<string>",
"privateKeyPass": "<string>",
"warehouse": "<string>",
"database": "<string>",
"schema": "<string>",
"role": "<string>",
"responseTimeoutMilliseconds": 123
},
"postgresConnection": {
"host": "<string>",
"port": 123,
"databaseName": "<string>",
"userName": "<string>",
"password": "<string>",
"connectionString": "<string>"
},
"gcsConnection": {
"keyId": "<string>",
"secret": "<string>"
},
"s3Connection": {
"accessKeyId": "<string>",
"secretAccessKey": "<string>",
"region": "us-east-1",
"endpoint": "<string>",
"sessionToken": "<string>"
}
}
]
},
"motherduckConnection": {
"accessToken": "<string>",
"database": "<string>"
},
"includeTables": [
"sales.orders",
"finance.*"
],
"excludeAllTables": false,
"excludeTables": [
"backup.records",
"temp_data.*"
],
"indexingStatusLastUpdated": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}Create database connection
Creates a new database connection for the specified project with secure credential storage and connection validation.
Authorization: Requires project admin permissions. Validation: Tests connection before saving if dryRun is false. Security: Credentials are encrypted and stored securely.
curl --request POST \
--url https://{organization}.admin.credibledata.com/api/v0/organizations/{organizationName}/projects/{projectName}/connections \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"resource": "<string>",
"name": "<string>",
"attributes": {
"dialectName": "<string>",
"isPool": true,
"canPersist": true,
"canStream": true
},
"postgresConnection": {
"host": "<string>",
"port": 123,
"databaseName": "<string>",
"userName": "<string>",
"password": "<string>",
"connectionString": "<string>"
},
"bigqueryConnection": {
"defaultProjectId": "<string>",
"billingProjectId": "<string>",
"location": "<string>",
"serviceAccountKeyJson": "<string>",
"maximumBytesBilled": "<string>",
"queryTimeoutMilliseconds": "<string>"
},
"snowflakeConnection": {
"account": "<string>",
"username": "<string>",
"password": "<string>",
"privateKey": "<string>",
"privateKeyPass": "<string>",
"warehouse": "<string>",
"database": "<string>",
"schema": "<string>",
"role": "<string>",
"responseTimeoutMilliseconds": 123
},
"trinoConnection": {
"server": "<string>",
"port": 123,
"catalog": "<string>",
"schema": "<string>",
"user": "<string>",
"password": "<string>",
"peakaKey": "<string>"
},
"mysqlConnection": {
"host": "<string>",
"port": 123,
"database": "<string>",
"user": "<string>",
"password": "<string>"
},
"duckdbConnection": {
"attachedDatabases": [
{
"name": "test_connection, _connection, test_connection_1",
"attributes": {
"dialectName": "<string>",
"isPool": true,
"canPersist": true,
"canStream": true
},
"bigqueryConnection": {
"defaultProjectId": "<string>",
"billingProjectId": "<string>",
"location": "<string>",
"serviceAccountKeyJson": "<string>",
"maximumBytesBilled": "<string>",
"queryTimeoutMilliseconds": "<string>"
},
"snowflakeConnection": {
"account": "<string>",
"username": "<string>",
"password": "<string>",
"privateKey": "<string>",
"privateKeyPass": "<string>",
"warehouse": "<string>",
"database": "<string>",
"schema": "<string>",
"role": "<string>",
"responseTimeoutMilliseconds": 123
},
"postgresConnection": {
"host": "<string>",
"port": 123,
"databaseName": "<string>",
"userName": "<string>",
"password": "<string>",
"connectionString": "<string>"
}
}
]
},
"motherduckConnection": {
"accessToken": "<string>",
"database": "<string>"
},
"includeTables": [
"sales.orders",
"finance.*"
],
"excludeAllTables": false,
"excludeTables": [
"backup.records",
"temp_data.*"
],
"indexingStatusLastUpdated": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://{organization}.admin.credibledata.com/api/v0/organizations/{organizationName}/projects/{projectName}/connections"
payload = {
"resource": "<string>",
"name": "<string>",
"attributes": {
"dialectName": "<string>",
"isPool": True,
"canPersist": True,
"canStream": True
},
"postgresConnection": {
"host": "<string>",
"port": 123,
"databaseName": "<string>",
"userName": "<string>",
"password": "<string>",
"connectionString": "<string>"
},
"bigqueryConnection": {
"defaultProjectId": "<string>",
"billingProjectId": "<string>",
"location": "<string>",
"serviceAccountKeyJson": "<string>",
"maximumBytesBilled": "<string>",
"queryTimeoutMilliseconds": "<string>"
},
"snowflakeConnection": {
"account": "<string>",
"username": "<string>",
"password": "<string>",
"privateKey": "<string>",
"privateKeyPass": "<string>",
"warehouse": "<string>",
"database": "<string>",
"schema": "<string>",
"role": "<string>",
"responseTimeoutMilliseconds": 123
},
"trinoConnection": {
"server": "<string>",
"port": 123,
"catalog": "<string>",
"schema": "<string>",
"user": "<string>",
"password": "<string>",
"peakaKey": "<string>"
},
"mysqlConnection": {
"host": "<string>",
"port": 123,
"database": "<string>",
"user": "<string>",
"password": "<string>"
},
"duckdbConnection": { "attachedDatabases": [
{
"name": "test_connection, _connection, test_connection_1",
"attributes": {
"dialectName": "<string>",
"isPool": True,
"canPersist": True,
"canStream": True
},
"bigqueryConnection": {
"defaultProjectId": "<string>",
"billingProjectId": "<string>",
"location": "<string>",
"serviceAccountKeyJson": "<string>",
"maximumBytesBilled": "<string>",
"queryTimeoutMilliseconds": "<string>"
},
"snowflakeConnection": {
"account": "<string>",
"username": "<string>",
"password": "<string>",
"privateKey": "<string>",
"privateKeyPass": "<string>",
"warehouse": "<string>",
"database": "<string>",
"schema": "<string>",
"role": "<string>",
"responseTimeoutMilliseconds": 123
},
"postgresConnection": {
"host": "<string>",
"port": 123,
"databaseName": "<string>",
"userName": "<string>",
"password": "<string>",
"connectionString": "<string>"
}
}
] },
"motherduckConnection": {
"accessToken": "<string>",
"database": "<string>"
},
"includeTables": ["sales.orders", "finance.*"],
"excludeAllTables": False,
"excludeTables": ["backup.records", "temp_data.*"],
"indexingStatusLastUpdated": "2023-11-07T05:31:56Z"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
resource: '<string>',
name: '<string>',
attributes: {dialectName: '<string>', isPool: true, canPersist: true, canStream: true},
postgresConnection: {
host: '<string>',
port: 123,
databaseName: '<string>',
userName: '<string>',
password: '<string>',
connectionString: '<string>'
},
bigqueryConnection: {
defaultProjectId: '<string>',
billingProjectId: '<string>',
location: '<string>',
serviceAccountKeyJson: '<string>',
maximumBytesBilled: '<string>',
queryTimeoutMilliseconds: '<string>'
},
snowflakeConnection: {
account: '<string>',
username: '<string>',
password: '<string>',
privateKey: '<string>',
privateKeyPass: '<string>',
warehouse: '<string>',
database: '<string>',
schema: '<string>',
role: '<string>',
responseTimeoutMilliseconds: 123
},
trinoConnection: {
server: '<string>',
port: 123,
catalog: '<string>',
schema: '<string>',
user: '<string>',
password: '<string>',
peakaKey: '<string>'
},
mysqlConnection: {
host: '<string>',
port: 123,
database: '<string>',
user: '<string>',
password: '<string>'
},
duckdbConnection: {
attachedDatabases: [
{
name: 'test_connection, _connection, test_connection_1',
attributes: {dialectName: '<string>', isPool: true, canPersist: true, canStream: true},
bigqueryConnection: {
defaultProjectId: '<string>',
billingProjectId: '<string>',
location: '<string>',
serviceAccountKeyJson: '<string>',
maximumBytesBilled: '<string>',
queryTimeoutMilliseconds: '<string>'
},
snowflakeConnection: {
account: '<string>',
username: '<string>',
password: '<string>',
privateKey: '<string>',
privateKeyPass: '<string>',
warehouse: '<string>',
database: '<string>',
schema: '<string>',
role: '<string>',
responseTimeoutMilliseconds: 123
},
postgresConnection: {
host: '<string>',
port: 123,
databaseName: '<string>',
userName: '<string>',
password: '<string>',
connectionString: '<string>'
}
}
]
},
motherduckConnection: {accessToken: '<string>', database: '<string>'},
includeTables: ['sales.orders', 'finance.*'],
excludeAllTables: false,
excludeTables: ['backup.records', 'temp_data.*'],
indexingStatusLastUpdated: '2023-11-07T05:31:56Z'
})
};
fetch('https://{organization}.admin.credibledata.com/api/v0/organizations/{organizationName}/projects/{projectName}/connections', 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://{organization}.admin.credibledata.com/api/v0/organizations/{organizationName}/projects/{projectName}/connections",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'resource' => '<string>',
'name' => '<string>',
'attributes' => [
'dialectName' => '<string>',
'isPool' => true,
'canPersist' => true,
'canStream' => true
],
'postgresConnection' => [
'host' => '<string>',
'port' => 123,
'databaseName' => '<string>',
'userName' => '<string>',
'password' => '<string>',
'connectionString' => '<string>'
],
'bigqueryConnection' => [
'defaultProjectId' => '<string>',
'billingProjectId' => '<string>',
'location' => '<string>',
'serviceAccountKeyJson' => '<string>',
'maximumBytesBilled' => '<string>',
'queryTimeoutMilliseconds' => '<string>'
],
'snowflakeConnection' => [
'account' => '<string>',
'username' => '<string>',
'password' => '<string>',
'privateKey' => '<string>',
'privateKeyPass' => '<string>',
'warehouse' => '<string>',
'database' => '<string>',
'schema' => '<string>',
'role' => '<string>',
'responseTimeoutMilliseconds' => 123
],
'trinoConnection' => [
'server' => '<string>',
'port' => 123,
'catalog' => '<string>',
'schema' => '<string>',
'user' => '<string>',
'password' => '<string>',
'peakaKey' => '<string>'
],
'mysqlConnection' => [
'host' => '<string>',
'port' => 123,
'database' => '<string>',
'user' => '<string>',
'password' => '<string>'
],
'duckdbConnection' => [
'attachedDatabases' => [
[
'name' => 'test_connection, _connection, test_connection_1',
'attributes' => [
'dialectName' => '<string>',
'isPool' => true,
'canPersist' => true,
'canStream' => true
],
'bigqueryConnection' => [
'defaultProjectId' => '<string>',
'billingProjectId' => '<string>',
'location' => '<string>',
'serviceAccountKeyJson' => '<string>',
'maximumBytesBilled' => '<string>',
'queryTimeoutMilliseconds' => '<string>'
],
'snowflakeConnection' => [
'account' => '<string>',
'username' => '<string>',
'password' => '<string>',
'privateKey' => '<string>',
'privateKeyPass' => '<string>',
'warehouse' => '<string>',
'database' => '<string>',
'schema' => '<string>',
'role' => '<string>',
'responseTimeoutMilliseconds' => 123
],
'postgresConnection' => [
'host' => '<string>',
'port' => 123,
'databaseName' => '<string>',
'userName' => '<string>',
'password' => '<string>',
'connectionString' => '<string>'
]
]
]
],
'motherduckConnection' => [
'accessToken' => '<string>',
'database' => '<string>'
],
'includeTables' => [
'sales.orders',
'finance.*'
],
'excludeAllTables' => false,
'excludeTables' => [
'backup.records',
'temp_data.*'
],
'indexingStatusLastUpdated' => '2023-11-07T05:31:56Z'
]),
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://{organization}.admin.credibledata.com/api/v0/organizations/{organizationName}/projects/{projectName}/connections"
payload := strings.NewReader("{\n \"resource\": \"<string>\",\n \"name\": \"<string>\",\n \"attributes\": {\n \"dialectName\": \"<string>\",\n \"isPool\": true,\n \"canPersist\": true,\n \"canStream\": true\n },\n \"postgresConnection\": {\n \"host\": \"<string>\",\n \"port\": 123,\n \"databaseName\": \"<string>\",\n \"userName\": \"<string>\",\n \"password\": \"<string>\",\n \"connectionString\": \"<string>\"\n },\n \"bigqueryConnection\": {\n \"defaultProjectId\": \"<string>\",\n \"billingProjectId\": \"<string>\",\n \"location\": \"<string>\",\n \"serviceAccountKeyJson\": \"<string>\",\n \"maximumBytesBilled\": \"<string>\",\n \"queryTimeoutMilliseconds\": \"<string>\"\n },\n \"snowflakeConnection\": {\n \"account\": \"<string>\",\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"privateKey\": \"<string>\",\n \"privateKeyPass\": \"<string>\",\n \"warehouse\": \"<string>\",\n \"database\": \"<string>\",\n \"schema\": \"<string>\",\n \"role\": \"<string>\",\n \"responseTimeoutMilliseconds\": 123\n },\n \"trinoConnection\": {\n \"server\": \"<string>\",\n \"port\": 123,\n \"catalog\": \"<string>\",\n \"schema\": \"<string>\",\n \"user\": \"<string>\",\n \"password\": \"<string>\",\n \"peakaKey\": \"<string>\"\n },\n \"mysqlConnection\": {\n \"host\": \"<string>\",\n \"port\": 123,\n \"database\": \"<string>\",\n \"user\": \"<string>\",\n \"password\": \"<string>\"\n },\n \"duckdbConnection\": {\n \"attachedDatabases\": [\n {\n \"name\": \"test_connection, _connection, test_connection_1\",\n \"attributes\": {\n \"dialectName\": \"<string>\",\n \"isPool\": true,\n \"canPersist\": true,\n \"canStream\": true\n },\n \"bigqueryConnection\": {\n \"defaultProjectId\": \"<string>\",\n \"billingProjectId\": \"<string>\",\n \"location\": \"<string>\",\n \"serviceAccountKeyJson\": \"<string>\",\n \"maximumBytesBilled\": \"<string>\",\n \"queryTimeoutMilliseconds\": \"<string>\"\n },\n \"snowflakeConnection\": {\n \"account\": \"<string>\",\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"privateKey\": \"<string>\",\n \"privateKeyPass\": \"<string>\",\n \"warehouse\": \"<string>\",\n \"database\": \"<string>\",\n \"schema\": \"<string>\",\n \"role\": \"<string>\",\n \"responseTimeoutMilliseconds\": 123\n },\n \"postgresConnection\": {\n \"host\": \"<string>\",\n \"port\": 123,\n \"databaseName\": \"<string>\",\n \"userName\": \"<string>\",\n \"password\": \"<string>\",\n \"connectionString\": \"<string>\"\n }\n }\n ]\n },\n \"motherduckConnection\": {\n \"accessToken\": \"<string>\",\n \"database\": \"<string>\"\n },\n \"includeTables\": [\n \"sales.orders\",\n \"finance.*\"\n ],\n \"excludeAllTables\": false,\n \"excludeTables\": [\n \"backup.records\",\n \"temp_data.*\"\n ],\n \"indexingStatusLastUpdated\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://{organization}.admin.credibledata.com/api/v0/organizations/{organizationName}/projects/{projectName}/connections")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"resource\": \"<string>\",\n \"name\": \"<string>\",\n \"attributes\": {\n \"dialectName\": \"<string>\",\n \"isPool\": true,\n \"canPersist\": true,\n \"canStream\": true\n },\n \"postgresConnection\": {\n \"host\": \"<string>\",\n \"port\": 123,\n \"databaseName\": \"<string>\",\n \"userName\": \"<string>\",\n \"password\": \"<string>\",\n \"connectionString\": \"<string>\"\n },\n \"bigqueryConnection\": {\n \"defaultProjectId\": \"<string>\",\n \"billingProjectId\": \"<string>\",\n \"location\": \"<string>\",\n \"serviceAccountKeyJson\": \"<string>\",\n \"maximumBytesBilled\": \"<string>\",\n \"queryTimeoutMilliseconds\": \"<string>\"\n },\n \"snowflakeConnection\": {\n \"account\": \"<string>\",\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"privateKey\": \"<string>\",\n \"privateKeyPass\": \"<string>\",\n \"warehouse\": \"<string>\",\n \"database\": \"<string>\",\n \"schema\": \"<string>\",\n \"role\": \"<string>\",\n \"responseTimeoutMilliseconds\": 123\n },\n \"trinoConnection\": {\n \"server\": \"<string>\",\n \"port\": 123,\n \"catalog\": \"<string>\",\n \"schema\": \"<string>\",\n \"user\": \"<string>\",\n \"password\": \"<string>\",\n \"peakaKey\": \"<string>\"\n },\n \"mysqlConnection\": {\n \"host\": \"<string>\",\n \"port\": 123,\n \"database\": \"<string>\",\n \"user\": \"<string>\",\n \"password\": \"<string>\"\n },\n \"duckdbConnection\": {\n \"attachedDatabases\": [\n {\n \"name\": \"test_connection, _connection, test_connection_1\",\n \"attributes\": {\n \"dialectName\": \"<string>\",\n \"isPool\": true,\n \"canPersist\": true,\n \"canStream\": true\n },\n \"bigqueryConnection\": {\n \"defaultProjectId\": \"<string>\",\n \"billingProjectId\": \"<string>\",\n \"location\": \"<string>\",\n \"serviceAccountKeyJson\": \"<string>\",\n \"maximumBytesBilled\": \"<string>\",\n \"queryTimeoutMilliseconds\": \"<string>\"\n },\n \"snowflakeConnection\": {\n \"account\": \"<string>\",\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"privateKey\": \"<string>\",\n \"privateKeyPass\": \"<string>\",\n \"warehouse\": \"<string>\",\n \"database\": \"<string>\",\n \"schema\": \"<string>\",\n \"role\": \"<string>\",\n \"responseTimeoutMilliseconds\": 123\n },\n \"postgresConnection\": {\n \"host\": \"<string>\",\n \"port\": 123,\n \"databaseName\": \"<string>\",\n \"userName\": \"<string>\",\n \"password\": \"<string>\",\n \"connectionString\": \"<string>\"\n }\n }\n ]\n },\n \"motherduckConnection\": {\n \"accessToken\": \"<string>\",\n \"database\": \"<string>\"\n },\n \"includeTables\": [\n \"sales.orders\",\n \"finance.*\"\n ],\n \"excludeAllTables\": false,\n \"excludeTables\": [\n \"backup.records\",\n \"temp_data.*\"\n ],\n \"indexingStatusLastUpdated\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{organization}.admin.credibledata.com/api/v0/organizations/{organizationName}/projects/{projectName}/connections")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"resource\": \"<string>\",\n \"name\": \"<string>\",\n \"attributes\": {\n \"dialectName\": \"<string>\",\n \"isPool\": true,\n \"canPersist\": true,\n \"canStream\": true\n },\n \"postgresConnection\": {\n \"host\": \"<string>\",\n \"port\": 123,\n \"databaseName\": \"<string>\",\n \"userName\": \"<string>\",\n \"password\": \"<string>\",\n \"connectionString\": \"<string>\"\n },\n \"bigqueryConnection\": {\n \"defaultProjectId\": \"<string>\",\n \"billingProjectId\": \"<string>\",\n \"location\": \"<string>\",\n \"serviceAccountKeyJson\": \"<string>\",\n \"maximumBytesBilled\": \"<string>\",\n \"queryTimeoutMilliseconds\": \"<string>\"\n },\n \"snowflakeConnection\": {\n \"account\": \"<string>\",\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"privateKey\": \"<string>\",\n \"privateKeyPass\": \"<string>\",\n \"warehouse\": \"<string>\",\n \"database\": \"<string>\",\n \"schema\": \"<string>\",\n \"role\": \"<string>\",\n \"responseTimeoutMilliseconds\": 123\n },\n \"trinoConnection\": {\n \"server\": \"<string>\",\n \"port\": 123,\n \"catalog\": \"<string>\",\n \"schema\": \"<string>\",\n \"user\": \"<string>\",\n \"password\": \"<string>\",\n \"peakaKey\": \"<string>\"\n },\n \"mysqlConnection\": {\n \"host\": \"<string>\",\n \"port\": 123,\n \"database\": \"<string>\",\n \"user\": \"<string>\",\n \"password\": \"<string>\"\n },\n \"duckdbConnection\": {\n \"attachedDatabases\": [\n {\n \"name\": \"test_connection, _connection, test_connection_1\",\n \"attributes\": {\n \"dialectName\": \"<string>\",\n \"isPool\": true,\n \"canPersist\": true,\n \"canStream\": true\n },\n \"bigqueryConnection\": {\n \"defaultProjectId\": \"<string>\",\n \"billingProjectId\": \"<string>\",\n \"location\": \"<string>\",\n \"serviceAccountKeyJson\": \"<string>\",\n \"maximumBytesBilled\": \"<string>\",\n \"queryTimeoutMilliseconds\": \"<string>\"\n },\n \"snowflakeConnection\": {\n \"account\": \"<string>\",\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"privateKey\": \"<string>\",\n \"privateKeyPass\": \"<string>\",\n \"warehouse\": \"<string>\",\n \"database\": \"<string>\",\n \"schema\": \"<string>\",\n \"role\": \"<string>\",\n \"responseTimeoutMilliseconds\": 123\n },\n \"postgresConnection\": {\n \"host\": \"<string>\",\n \"port\": 123,\n \"databaseName\": \"<string>\",\n \"userName\": \"<string>\",\n \"password\": \"<string>\",\n \"connectionString\": \"<string>\"\n }\n }\n ]\n },\n \"motherduckConnection\": {\n \"accessToken\": \"<string>\",\n \"database\": \"<string>\"\n },\n \"includeTables\": [\n \"sales.orders\",\n \"finance.*\"\n ],\n \"excludeAllTables\": false,\n \"excludeTables\": [\n \"backup.records\",\n \"temp_data.*\"\n ],\n \"indexingStatusLastUpdated\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"resource": "<string>",
"name": "<string>",
"attributes": {
"dialectName": "<string>",
"isPool": true,
"canPersist": true,
"canStream": true
},
"postgresConnection": {
"host": "<string>",
"port": 123,
"databaseName": "<string>",
"userName": "<string>",
"password": "<string>",
"connectionString": "<string>"
},
"bigqueryConnection": {
"defaultProjectId": "<string>",
"billingProjectId": "<string>",
"location": "<string>",
"serviceAccountKeyJson": "<string>",
"maximumBytesBilled": "<string>",
"queryTimeoutMilliseconds": "<string>"
},
"snowflakeConnection": {
"account": "<string>",
"username": "<string>",
"password": "<string>",
"privateKey": "<string>",
"privateKeyPass": "<string>",
"warehouse": "<string>",
"database": "<string>",
"schema": "<string>",
"role": "<string>",
"responseTimeoutMilliseconds": 123
},
"trinoConnection": {
"server": "<string>",
"port": 123,
"catalog": "<string>",
"schema": "<string>",
"user": "<string>",
"password": "<string>",
"peakaKey": "<string>"
},
"mysqlConnection": {
"host": "<string>",
"port": 123,
"database": "<string>",
"user": "<string>",
"password": "<string>"
},
"duckdbConnection": {
"attachedDatabases": [
{
"name": "test_connection, _connection, test_connection_1",
"attributes": {
"dialectName": "<string>",
"isPool": true,
"canPersist": true,
"canStream": true
},
"bigqueryConnection": {
"defaultProjectId": "<string>",
"billingProjectId": "<string>",
"location": "<string>",
"serviceAccountKeyJson": "<string>",
"maximumBytesBilled": "<string>",
"queryTimeoutMilliseconds": "<string>"
},
"snowflakeConnection": {
"account": "<string>",
"username": "<string>",
"password": "<string>",
"privateKey": "<string>",
"privateKeyPass": "<string>",
"warehouse": "<string>",
"database": "<string>",
"schema": "<string>",
"role": "<string>",
"responseTimeoutMilliseconds": 123
},
"postgresConnection": {
"host": "<string>",
"port": 123,
"databaseName": "<string>",
"userName": "<string>",
"password": "<string>",
"connectionString": "<string>"
},
"gcsConnection": {
"keyId": "<string>",
"secret": "<string>"
},
"s3Connection": {
"accessKeyId": "<string>",
"secretAccessKey": "<string>",
"region": "us-east-1",
"endpoint": "<string>",
"sessionToken": "<string>"
}
}
]
},
"motherduckConnection": {
"accessToken": "<string>",
"database": "<string>"
},
"includeTables": [
"sales.orders",
"finance.*"
],
"excludeAllTables": false,
"excludeTables": [
"backup.records",
"temp_data.*"
],
"indexingStatusLastUpdated": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The unique identifier of the organization Standard identifier pattern for resource names
^[a-zA-Z0-9_-]+$The unique identifier of the project Standard identifier pattern for resource names
^[a-zA-Z0-9_-]+$Query Parameters
Whether to test the connection without saving it
Body
Database connection configuration and metadata
Resource path to the connection
Name of the connection
Type of database connection
postgres, bigquery, snowflake, trino, mysql, duckdb, motherduck Connection capabilities and configuration attributes
Show child attributes
Show child attributes
PostgreSQL database connection configuration
Show child attributes
Show child attributes
Google BigQuery database connection configuration
Show child attributes
Show child attributes
Snowflake database connection configuration
Show child attributes
Show child attributes
Trino database connection configuration
Show child attributes
Show child attributes
MySQL database connection configuration
Show child attributes
Show child attributes
DuckDB database connection configuration
Show child attributes
Show child attributes
MotherDuck database connection configuration
Show child attributes
Show child attributes
The list of tables to include, in the format {dataset/schema}.{table}. The first part represents the dataset or schema, and the second part is the table name. The second part can be a literal * to include all tables.
Table name pattern supporting slashes, dots, and dashes
^[a-zA-Z0-9_-]+\\.(?:[a-zA-Z0-9_-]+|\\*)$["sales.orders", "finance.*"]
Whether to exclude all tables.
The list of tables to exclude, in the format {dataset/schema}.{table}. The first part represents the dataset or schema, and the second part is the table name. The second part can be a literal * to exclude all tables.
Table name pattern supporting slashes, dots, and dashes
^[a-zA-Z0-9_-]+\\.(?:[a-zA-Z0-9_-]+|\\*)$["backup.records", "temp_data.*"]
Current indexing status of the connection. UNKNOWN means indexing has not started yet, PENDING means indexing is in progress, INDEXED means indexing finished successfully, SKIPPED means the connection is excluded from indexing, FAILED means indexing failed, RETRY means the connection was updated while indexing was in progress and will be re-indexed when the current job finishes.
UNKNOWN, PENDING, INDEXED, SKIPPED, FAILED, RETRY ISO 8601 timestamp of when the indexing status was last updated
Response
Connection created successfully
Database connection configuration and metadata
Resource path to the connection
Name of the connection
Type of database connection
postgres, bigquery, snowflake, trino, mysql, duckdb, motherduck Connection capabilities and configuration attributes
Show child attributes
Show child attributes
PostgreSQL database connection configuration
Show child attributes
Show child attributes
Google BigQuery database connection configuration
Show child attributes
Show child attributes
Snowflake database connection configuration
Show child attributes
Show child attributes
Trino database connection configuration
Show child attributes
Show child attributes
MySQL database connection configuration
Show child attributes
Show child attributes
DuckDB database connection configuration
Show child attributes
Show child attributes
MotherDuck database connection configuration
Show child attributes
Show child attributes
The list of tables to include, in the format {dataset/schema}.{table}. The first part represents the dataset or schema, and the second part is the table name. The second part can be a literal * to include all tables.
Table name pattern supporting slashes, dots, and dashes
^[a-zA-Z0-9_-]+\\.(?:[a-zA-Z0-9_-]+|\\*)$["sales.orders", "finance.*"]
Whether to exclude all tables.
The list of tables to exclude, in the format {dataset/schema}.{table}. The first part represents the dataset or schema, and the second part is the table name. The second part can be a literal * to exclude all tables.
Table name pattern supporting slashes, dots, and dashes
^[a-zA-Z0-9_-]+\\.(?:[a-zA-Z0-9_-]+|\\*)$["backup.records", "temp_data.*"]
Current indexing status of the connection. UNKNOWN means indexing has not started yet, PENDING means indexing is in progress, INDEXED means indexing finished successfully, SKIPPED means the connection is excluded from indexing, FAILED means indexing failed, RETRY means the connection was updated while indexing was in progress and will be re-indexed when the current job finishes.
UNKNOWN, PENDING, INDEXED, SKIPPED, FAILED, RETRY ISO 8601 timestamp of when the indexing status was last updated
Was this page helpful?