cURL
curl --request PUT \
--url https://api.chartbrew.com/team/{team_id}/connections/{connection_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"host": "<string>",
"port": "<string>",
"username": "<string>",
"password": "<string>",
"options": {},
"authentication": {
"token": "<string>",
"user": "<string>",
"pass": "<string>"
},
"firebaseServiceAccount": {},
"ssl": false,
"sslMode": "require",
"schema": {},
"project_ids": [
"<string>"
]
}
'import requests
url = "https://api.chartbrew.com/team/{team_id}/connections/{connection_id}"
payload = {
"name": "<string>",
"host": "<string>",
"port": "<string>",
"username": "<string>",
"password": "<string>",
"options": {},
"authentication": {
"token": "<string>",
"user": "<string>",
"pass": "<string>"
},
"firebaseServiceAccount": {},
"ssl": False,
"sslMode": "require",
"schema": {},
"project_ids": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
host: '<string>',
port: '<string>',
username: '<string>',
password: '<string>',
options: {},
authentication: {token: '<string>', user: '<string>', pass: '<string>'},
firebaseServiceAccount: {},
ssl: false,
sslMode: 'require',
schema: {},
project_ids: ['<string>']
})
};
fetch('https://api.chartbrew.com/team/{team_id}/connections/{connection_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.chartbrew.com/team/{team_id}/connections/{connection_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>',
'host' => '<string>',
'port' => '<string>',
'username' => '<string>',
'password' => '<string>',
'options' => [
],
'authentication' => [
'token' => '<string>',
'user' => '<string>',
'pass' => '<string>'
],
'firebaseServiceAccount' => [
],
'ssl' => false,
'sslMode' => 'require',
'schema' => [
],
'project_ids' => [
'<string>'
]
]),
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://api.chartbrew.com/team/{team_id}/connections/{connection_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"host\": \"<string>\",\n \"port\": \"<string>\",\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"options\": {},\n \"authentication\": {\n \"token\": \"<string>\",\n \"user\": \"<string>\",\n \"pass\": \"<string>\"\n },\n \"firebaseServiceAccount\": {},\n \"ssl\": false,\n \"sslMode\": \"require\",\n \"schema\": {},\n \"project_ids\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.chartbrew.com/team/{team_id}/connections/{connection_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"host\": \"<string>\",\n \"port\": \"<string>\",\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"options\": {},\n \"authentication\": {\n \"token\": \"<string>\",\n \"user\": \"<string>\",\n \"pass\": \"<string>\"\n },\n \"firebaseServiceAccount\": {},\n \"ssl\": false,\n \"sslMode\": \"require\",\n \"schema\": {},\n \"project_ids\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chartbrew.com/team/{team_id}/connections/{connection_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"host\": \"<string>\",\n \"port\": \"<string>\",\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"options\": {},\n \"authentication\": {\n \"token\": \"<string>\",\n \"user\": \"<string>\",\n \"pass\": \"<string>\"\n },\n \"firebaseServiceAccount\": {},\n \"ssl\": false,\n \"sslMode\": \"require\",\n \"schema\": {},\n \"project_ids\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"team_id": 123,
"project_ids": [
"<string>"
],
"oauth_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"active": true,
"host": "<string>",
"dbName": "<string>",
"port": "<string>",
"username": "<string>",
"password": "<string>",
"srv": false,
"options": {},
"connectionString": "<string>",
"authentication": {
"token": "<string>",
"user": "<string>",
"pass": "<string>"
},
"firebaseServiceAccount": {},
"ssl": false,
"sslMode": "require",
"sslCa": "<string>",
"sslCert": "<string>",
"sslKey": "<string>",
"schema": {}
}Connections
Update a connection
Update a connection by ID
PUT
/
team
/
{team_id}
/
connections
/
{connection_id}
cURL
curl --request PUT \
--url https://api.chartbrew.com/team/{team_id}/connections/{connection_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"host": "<string>",
"port": "<string>",
"username": "<string>",
"password": "<string>",
"options": {},
"authentication": {
"token": "<string>",
"user": "<string>",
"pass": "<string>"
},
"firebaseServiceAccount": {},
"ssl": false,
"sslMode": "require",
"schema": {},
"project_ids": [
"<string>"
]
}
'import requests
url = "https://api.chartbrew.com/team/{team_id}/connections/{connection_id}"
payload = {
"name": "<string>",
"host": "<string>",
"port": "<string>",
"username": "<string>",
"password": "<string>",
"options": {},
"authentication": {
"token": "<string>",
"user": "<string>",
"pass": "<string>"
},
"firebaseServiceAccount": {},
"ssl": False,
"sslMode": "require",
"schema": {},
"project_ids": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
host: '<string>',
port: '<string>',
username: '<string>',
password: '<string>',
options: {},
authentication: {token: '<string>', user: '<string>', pass: '<string>'},
firebaseServiceAccount: {},
ssl: false,
sslMode: 'require',
schema: {},
project_ids: ['<string>']
})
};
fetch('https://api.chartbrew.com/team/{team_id}/connections/{connection_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.chartbrew.com/team/{team_id}/connections/{connection_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>',
'host' => '<string>',
'port' => '<string>',
'username' => '<string>',
'password' => '<string>',
'options' => [
],
'authentication' => [
'token' => '<string>',
'user' => '<string>',
'pass' => '<string>'
],
'firebaseServiceAccount' => [
],
'ssl' => false,
'sslMode' => 'require',
'schema' => [
],
'project_ids' => [
'<string>'
]
]),
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://api.chartbrew.com/team/{team_id}/connections/{connection_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"host\": \"<string>\",\n \"port\": \"<string>\",\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"options\": {},\n \"authentication\": {\n \"token\": \"<string>\",\n \"user\": \"<string>\",\n \"pass\": \"<string>\"\n },\n \"firebaseServiceAccount\": {},\n \"ssl\": false,\n \"sslMode\": \"require\",\n \"schema\": {},\n \"project_ids\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.chartbrew.com/team/{team_id}/connections/{connection_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"host\": \"<string>\",\n \"port\": \"<string>\",\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"options\": {},\n \"authentication\": {\n \"token\": \"<string>\",\n \"user\": \"<string>\",\n \"pass\": \"<string>\"\n },\n \"firebaseServiceAccount\": {},\n \"ssl\": false,\n \"sslMode\": \"require\",\n \"schema\": {},\n \"project_ids\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chartbrew.com/team/{team_id}/connections/{connection_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"host\": \"<string>\",\n \"port\": \"<string>\",\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"options\": {},\n \"authentication\": {\n \"token\": \"<string>\",\n \"user\": \"<string>\",\n \"pass\": \"<string>\"\n },\n \"firebaseServiceAccount\": {},\n \"ssl\": false,\n \"sslMode\": \"require\",\n \"schema\": {},\n \"project_ids\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"team_id": 123,
"project_ids": [
"<string>"
],
"oauth_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"active": true,
"host": "<string>",
"dbName": "<string>",
"port": "<string>",
"username": "<string>",
"password": "<string>",
"srv": false,
"options": {},
"connectionString": "<string>",
"authentication": {
"token": "<string>",
"user": "<string>",
"pass": "<string>"
},
"firebaseServiceAccount": {},
"ssl": false,
"sslMode": "require",
"sslCa": "<string>",
"sslCert": "<string>",
"sslKey": "<string>",
"schema": {}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Used for MongoDB, Postgres, and MySQL connections
Available options:
mongodb, api, mysql, postgres Used for connections based on main types
Available options:
timescaledb, supabasedb, rdsPostgres, rdsMysql, api, mongodb, api, mysql, postgres, realtimedb, firestore, googleAnalytics, customerio Used for API connections
Show child attributes
Show child attributes
JSON object containing the Firebase service account credentials
Used for Postgres and MySQL. This gets populated automatically whenever the connection is used in a chart.
Response
Updated connection
Available options:
mongodb, api, mysql, postgres, realtimedb, firestore, googleAnalytics, customerio Used for connections based on main types
Available options:
timescaledb, supabasedb, rdsPostgres, rdsMysql, api, mongodb, api, mysql, postgres, realtimedb, firestore, googleAnalytics, customerio Used for MongoDB, Postgres, and MySQL connections
Used for API connections
Show child attributes
Show child attributes
JSON object containing the Firebase service account credentials
⌘I