Skip to content
Helicarrier Developers

Get database connection

Read connection details and credentials for a database you can access. Treat this response as a secret.

GET /api/services/{id}/connection HTTPS
Request & response examples
Request example Server-side
curl --fail-with-body --request GET \
'https://app.helicarrier.xyz/api/services/YOUR_ID/connection' \
-H "Authorization: Bearer $HELI_API_KEY"
Response example 200
{
"engine": "postgres",
"host": "YOUR_PRIVATE_DATABASE_HOST",
"port": 5432,
"username": "app",
"password": "REDACTED",
"database": "app",
"externalAccess": false,
"tls": false,
"allowIps": []
}

Illustrative values · selected fields

Authorization

An account key with access to the resource. Project and service keys do not authorize this operation.

Authorization: Bearer <key> Key setup ↗

Path parameters

id string required

Database service id.

Response 200

This response can contain database URLs and credentials. Do not log it or commit it to source control. Database connection access is not granted by a service-scoped key.

Examples show selected response fields with illustrative values. Your response can contain additional fields.

engine string

Database engine key.

host string

Private database hostname.

port integer

Port number for the resource.

username string

Database login name.

password string

Database password. Treat this response as a secret.

database string

Database name.

externalAccess boolean

Whether external database access is enabled.

tls boolean

Whether external database TLS is enabled.

allowIps array

Allowed external source CIDRs. An empty list permits any source.

Errors

400

Invalid parameters. Check the required fields, types, and resource configuration.

401

The API key is missing, invalid, or revoked.

403

The caller or key scope does not permit this operation.

500

The operation could not be completed. Check resource state before retrying a write.

Error handling and safe retries
ALSO AVAILABLE VIA MCP

get_db_connection

Required MCP arguments: id. Send path, query, and body fields together as tool arguments.

Connect your agent ↗