Retrieves the PostgreSQL connection URI for a database project. Supports selecting specific branches and pooled vs direct connections. Connection strings include credentials and should be stored securely. Use for configuring applications and deployment environments.
curl --request GET \
--url https://api.case.dev/database/v1/projects/{id}/connection \
--header 'Authorization: Bearer <token>'{
"connectionUri": "postgresql://user:password@ep-quiet-meadow-123456.us-east-1.aws.neon.tech/neondb?sslmode=require",
"branch": "main",
"pooled": false
}API key starting with sk_case_
Database project ID
Branch name (defaults to 'main')
Use pooled connection (PgBouncer)
Was this page helpful?
curl --request GET \
--url https://api.case.dev/database/v1/projects/{id}/connection \
--header 'Authorization: Bearer <token>'{
"connectionUri": "postgresql://user:password@ep-quiet-meadow-123456.us-east-1.aws.neon.tech/neondb?sslmode=require",
"branch": "main",
"pooled": false
}