curl --request GET \
--url https://api.rafftechnologies.com/api/v1/databases/{database_id}/connection \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.rafftechnologies.com/api/v1/databases/{database_id}/connection"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.rafftechnologies.com/api/v1/databases/{database_id}/connection', 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.rafftechnologies.com/api/v1/databases/{database_id}/connection",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.rafftechnologies.com/api/v1/databases/{database_id}/connection"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.rafftechnologies.com/api/v1/databases/{database_id}/connection")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rafftechnologies.com/api/v1/databases/{database_id}/connection")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"host": "a1b2c3d4.db.raffusercloud.com",
"port": 6432,
"username": "<string>",
"password": "<string>",
"database_name": "<string>",
"connection_uri": "<string>",
"ca_cert": "<string>",
"public_host": "a1b2c3d4.public.db.raffusercloud.com",
"public_port": 5432,
"public_connection_uri": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Get connection details
Connection details for the database: username, database name, and two endpoints.
- Private (
host,port,connection_uri): reachable from inside the database’s VPC. Without a VPC there is no private endpoint. - Public (
public_host,public_port,public_connection_uri): filled while public access is on.
The password field is empty unless you pass reveal=true. TLS is always required.
curl --request GET \
--url https://api.rafftechnologies.com/api/v1/databases/{database_id}/connection \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.rafftechnologies.com/api/v1/databases/{database_id}/connection"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.rafftechnologies.com/api/v1/databases/{database_id}/connection', 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.rafftechnologies.com/api/v1/databases/{database_id}/connection",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.rafftechnologies.com/api/v1/databases/{database_id}/connection"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.rafftechnologies.com/api/v1/databases/{database_id}/connection")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rafftechnologies.com/api/v1/databases/{database_id}/connection")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"host": "a1b2c3d4.db.raffusercloud.com",
"port": 6432,
"username": "<string>",
"password": "<string>",
"database_name": "<string>",
"connection_uri": "<string>",
"ca_cert": "<string>",
"public_host": "a1b2c3d4.public.db.raffusercloud.com",
"public_port": 5432,
"public_connection_uri": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Authorizations
API key for authentication. Each key is bound to a specific account.
Path Parameters
Database ID (UUID) or short id (the database_id field, e.g. a1b2c3d4)
Query Parameters
Set to true to include the password in the response and connection URI
Response
Connection details
Endpoint hostname
"a1b2c3d4.db.raffusercloud.com"
Endpoint port
6432
Database user
Password — empty unless the request was made with reveal=true
Default database name
Ready-to-use connection URI (includes the password only when revealed)
PEM CA that signs the database's certificate. Kafka clients must trust it; for PostgreSQL, use it with sslmode=verify-full.
Public hostname. Empty while public access is off.
"a1b2c3d4.public.db.raffusercloud.com"
Public port. PostgreSQL uses the standard direct port 5432 (routed by the hostname your client sends in TLS); ClickHouse uses its native TLS port; other engines use public_port of the database.
5432
Ready-to-use URI for the public endpoint (includes the password only when revealed). Empty while public access is off.