Get connection details
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": 5432,
"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>",
"read_host": "a1b2c3d4.db.raffusercloud.com",
"read_port": 5433,
"read_connection_uri": "<string>",
"public_read_host": "a1b2c3d4-ro.public.db.raffusercloud.com",
"public_read_port": 5432,
"public_read_connection_uri": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Connect & access
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. For PostgreSQL,portis the direct port 5432; the pooler is on 6432 of the same host. Use these only when the database has avpc_id; without a VPC there is no private endpoint you can reach. - Public (
public_host,public_port,public_connection_uri): filled while public access is on. - Read address (PostgreSQL with at least one read replica): queries sent there are spread across the replicas, and a write is refused. Private:
read_host,read_port(5433) andread_connection_uri, on the same hostname ashost. Public:public_read_host(the hostname with-ro),public_read_port(5432) andpublic_read_connection_uri, filled while public access is on. All six are empty for a database without read replicas and for other engines.
The password field is empty unless you pass reveal=true. TLS is always required: ca_cert is the database’s certificate authority, for clients that verify the server certificate (the public hostname is in the certificate).
GET
/
api
/
v1
/
databases
/
{database_id}
/
connection
Get connection details
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": 5432,
"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>",
"read_host": "a1b2c3d4.db.raffusercloud.com",
"read_port": 5433,
"read_connection_uri": "<string>",
"public_read_host": "a1b2c3d4-ro.public.db.raffusercloud.com",
"public_read_port": 5432,
"public_read_connection_uri": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Authorizations
Path Parameters
Query Parameters
Response
Connection details
Last modified on October 5, 2026