General Information
Connection Type
UI Documentation
Endpoints
List Connections
Get Connection
Create Connection
Update Connection
Delete Connection
List Connections
Endpoint
Request
Headers
| Header | Value |
|---|---|
| Authorization | Bearer |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectName | string | Yes | Project name |
type query parameter is required to filter connections by type.
cURL Example
Get Connection
Endpoint
Request
Headers
| Header | Value |
|---|---|
| Authorization | Bearer |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectName | string | Yes | Project name |
| connectionName | string | Yes | Connection name |
Response
Success Response (200 OK)
cURL Example
Create Connection
Endpoint
Request
Headers
| Header | Value |
|---|---|
| Authorization | Bearer |
| Content-Type | application/json |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectName | string | Yes | Project name |
| connectionName | string | Yes | Connection name |
Request Body
Full JSON Body Example - PostgreSQL Connection
Full JSON Body Example - MySQL Connection
Full JSON Body Example - Oracle Connection
Full JSON Body Example - MongoDB Connection
Full JSON Body Example - High-Performance Pool
Request Body Fields
Common Fields
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| type | string | Yes | - | Connection type discriminator field. Identifies the connection type in API requests/responses. |
| name | string | Yes | - | Connection name (must match path parameter) |
| description | string | No | - | Connection description |
| deployToWorker | boolean | No | true | Whether to deploy to worker |
| enabled | boolean | No | true | Whether connection is enabled |
Database-Specific Fields
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| dbType | string | Yes | - | Database type. See EnumDatabaseType |
| jdbcUrl | string | Yes | - | JDBC connection URL |
| useCredentials | boolean | No | true | Whether to use username/password authentication |
| username | string | No | - | Database username (required if useCredentials=true) |
| databaseName | string | No | - | Database name |
| password | string | No | - | Database password (required if useCredentials=true, secret field) |
| initialPoolSize | integer | No | 1 | Initial number of connections in pool |
| minPoolSize | integer | No | 1 | Minimum number of connections in pool |
| maxPoolSize | integer | No | 5 | Maximum number of connections in pool |
| incrementCount | integer | No | 1 | Number of connections to add when pool grows |
| maxStatements | integer | No | 100 | Maximum number of prepared statements per connection |
| idleConnectionTestPeriod | integer | No | 30000 | Period to test idle connections (milliseconds) |
| connectionTimeout | integer | No | 30000 | Maximum time to wait for connection (milliseconds) |
| testConnectionOnCheckout | boolean | No | true | Test connection when checked out from pool |
| testConnectionOnCheckin | boolean | No | false | Test connection when checked in to pool |
| maxConnectionAge | integer | No | 180000 | Maximum age of connection before closing (milliseconds) |
| maxIdleTime | integer | No | 120000 | Maximum idle time before closing connection (milliseconds) |
| selectedEnvironmentId | string | No | null | Selected environment ID |
EnumDatabaseType (dbType)
ORACLE- Oracle DatabaseMYSQL- MySQL DatabasePOSTGRES- PostgreSQL DatabaseSQL_SERVER- Microsoft SQL ServerSYBASE- Sybase DatabaseDB2- IBM DB2 DatabaseAPACHE_HIVE- Apache HiveAPACHE_IMPALA- Apache ImpalaMONGODB- MongoDB (NoSQL)TRINO- Trino (formerly PrestoSQL)
JDBC URL Examples
- PostgreSQL:
jdbc:postgresql://host:5432/database - MySQL:
jdbc:mysql://host:3306/database - Oracle:
jdbc:oracle:thin:@host:1521:SIDorjdbc:oracle:thin:@host:1521/service - SQL Server:
jdbc:sqlserver://host:1433;databaseName=database - MongoDB:
jdbc:mongodb://host:27017/database
Notes
dbTypeandjdbcUrlare required.useCredentialsdefaults totrue. Iffalse,usernameandpasswordare not used.usernameandpasswordare required ifuseCredentials: true.databaseNameis optional but recommended for clarity.- Connection pool settings control connection management:
initialPoolSize- Connections created at startupminPoolSize- Minimum connections maintainedmaxPoolSize- Maximum connections allowedincrementCount- Connections added when pool grows
- Timeout values are in milliseconds:
idleConnectionTestPeriod- How often to test idle connections (default: 30000ms = 30 seconds)connectionTimeout- Maximum wait for connection (default: 30000ms = 30 seconds)maxConnectionAge- Maximum connection lifetime (default: 180000ms = 3 minutes)maxIdleTime- Maximum idle time before closing (default: 120000ms = 2 minutes)
testConnectionOnCheckout: truevalidates connections before use (recommended).testConnectionOnCheckin: falseskips validation when returning connections (default).
Response
Success Response (200 OK)
cURL Example
Update Connection
Endpoint
Request
Headers
| Header | Value |
|---|---|
| Authorization | Bearer |
| Content-Type | application/json |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectName | string | Yes | Project name |
| connectionName | string | Yes | Connection name (must match name in body) |
Request Body
Full JSON Body Example
Response
Success Response (200 OK)
Delete Connection
Endpoint
Request
Headers
| Header | Value |
|---|---|
| Authorization | Bearer |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectName | string | Yes | Project name |
| connectionName | string | Yes | Connection name |
Response
Success Response (200 OK)
Notes and Warnings
-
Database Types:
- Supports multiple database types via JDBC
- Each database type has specific JDBC URL format
- Ensure appropriate JDBC driver is available
-
JDBC URL:
- Format varies by database type
- Include connection parameters in URL if needed
- Examples:
- PostgreSQL:
jdbc:postgresql://host:5432/database - MySQL:
jdbc:mysql://host:3306/database?useSSL=false - Oracle:
jdbc:oracle:thin:@host:1521:SID
- PostgreSQL:
-
Connection Pooling:
- Connection pooling improves performance by reusing connections
initialPoolSize- Connections created at startupminPoolSize- Minimum connections maintained (pool never goes below this)maxPoolSize- Maximum connections allowed (pool never exceeds this)incrementCount- Connections added when pool needs to grow- Balance pool size with database server capacity
-
Connection Validation:
testConnectionOnCheckout: true- Validates connection before use (recommended)testConnectionOnCheckin: false- Skips validation when returning (default)idleConnectionTestPeriod- How often to test idle connections
-
Timeouts:
- All timeout values are in milliseconds
connectionTimeout- Maximum wait for connection (default: 30 seconds)maxConnectionAge- Maximum connection lifetime (default: 3 minutes)maxIdleTime- Maximum idle time before closing (default: 2 minutes)
-
Authentication:
useCredentials: trueenables username/password authenticationuseCredentials: falsedisables authentication (not recommended)- Password is stored securely and masked in responses
-
Prepared Statements:
maxStatementslimits prepared statements per connection- Higher values improve performance but use more memory
- Default: 100 statements per connection
-
Performance Tuning:
- Increase pool sizes for high-throughput scenarios
- Adjust timeouts based on network latency
- Monitor connection pool usage
- Balance pool size with database server capacity
-
Security:
- Use strong passwords
- Use SSL/TLS connections when possible (configure in JDBC URL)
- Restrict database user permissions
- Use connection pooling to limit database connections
-
Deployment: Connection changes require deployment to take effect. Set
deployToWorker: trueor deploy manually.
Related Documentation
- List Connections - List all connections
- Get Connection - Get a specific connection
- Create Connection - General connection creation guide
- Update Connection - General connection update guide
- Delete Connection - General connection deletion guide

