SQL Connectors¶
Connect and sync data from SQL databases including MySQL, PostgreSQL, SQL Server, Oracle, and MariaDB.
Base URL¶
All endpoints are relative to this base URL.
Authentication¶
All endpoints require authentication. Use a service actor token:
Required Scopes:
connectors:read- For read endpointsconnectors:write- For write endpointsconnectors:sync- For synchronization endpoints
Supported Databases¶
- MySQL -
providerConfigKey: mysql - PostgreSQL -
providerConfigKey: postgresql - SQL Server -
providerConfigKey: mssql - Oracle -
providerConfigKey: oracle - MariaDB -
providerConfigKey: mariadb
Save SQL Connection¶
POST /connect/integrations/connect-session
Save a SQL database connection with credentials and connection details.
providerConfigKey, username, password, and metadata.host are required. An empty body can still create a connection with no host — do not rely on that; send the full payload.
Headers:
Request Body:
{
"providerConfigKey": "mysql",
"username": "dbuser",
"password": "dbpassword",
"metadata": {
"connectionName": "Production MySQL",
"host": "localhost",
"port": 3306,
"database": "mydb",
"schema": ["public"],
"description": "Production database connection",
"useSSL": true,
"sslMode": "require",
"status": "active",
"syncStatus": "never"
}
}
cURL Example:
curl --request POST \
--url "${BASE_URL}/connect/integrations/connect-session" \
--header "Authorization: Bearer <token>" \
--header "Content-Type: application/json" \
--data '{
"providerConfigKey": "mysql",
"username": "dbuser",
"password": "dbpassword",
"metadata": {
"connectionName": "Production MySQL",
"host": "localhost",
"port": 3306,
"database": "mydb",
"useSSL": true,
"description": "Production database"
}
}'
Response:
{
"success": true,
"connection": {
"connection_id": "5c096330-fc54-4144-bfec-6bd344da9586",
"provider_config_key": "mysql"
}
}
Test Database Connection¶
POST /database/test-connection
Test a database connection before saving.
Headers:
Request Body:
{
"databaseType": "mysql",
"connection": {
"host": "localhost",
"port": 3306,
"database": "mydb",
"username": "user",
"password": "password",
"useSSL": true,
"sslMode": "require"
}
}
cURL Example:
curl --request POST \
--url "${BASE_URL}/database/test-connection" \
--header "Authorization: Bearer <token>" \
--header "Content-Type: application/json" \
--data '{
"databaseType": "mysql",
"connection": {
"host": "localhost",
"port": 3306,
"database": "mydb",
"username": "user",
"password": "password",
"useSSL": true
}
}'
Response:
Update Connection Metadata¶
POST /connect/integrations/connection-metadata
Update database connection metadata (without credentials).
Headers:
Request Body:
{
"connectionId": "connection-123",
"providerConfigKey": "mysql",
"metadata": {
"connectionName": "Production MySQL",
"host": "localhost",
"port": 3306,
"database": "mydb",
"useSSL": true,
"sslMode": "require",
"schema": ["public", "analytics"],
"status": "active",
"description": "Production database connection"
}
}
cURL Example:
curl --request POST \
--url "${BASE_URL}/connect/integrations/connection-metadata" \
--header "Authorization: Bearer <token>" \
--header "Content-Type: application/json" \
--data '{
"connectionId": "connection-123",
"providerConfigKey": "mysql",
"metadata": {
"connectionName": "Production MySQL",
"host": "localhost",
"port": 3306,
"database": "mydb",
"useSSL": true,
"description": "Production database"
}
}'
Response:
List SQL Connections¶
GET /connect/integrations/connections?providerConfigKey={databaseType}
List all connections for a specific database type.
Headers:
Query Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
providerConfigKey | string | Yes | Database type: mysql, postgresql, mssql, oracle, or mariadb |
cURL Example:
curl --request GET \
--url "${BASE_URL}/connect/integrations/connections?providerConfigKey=mysql" \
--header "Authorization: Bearer <token>"
Response:
{
"connections": [
{
"id": 517,
"connection_id": "5c096330-fc54-4144-bfec-6bd344da9586",
"provider_config_key": "mysql",
"created_at": "2025-01-15T10:30:00Z",
"metadata": {
"connectionName": "Production MySQL",
"host": "localhost",
"port": 3306,
"database": "mydb",
"status": "active",
"syncStatus": "completed"
}
}
]
}
Get Connection Details¶
GET /connect/integrations/connection-metadata?connectionId={connectionId}&providerConfigKey={databaseType}
Get detailed connection information. connectionId is required. A missing or unknown id can return 500 wrapping a 404 instead of a clean 404.
Headers:
cURL Example:
curl --request GET \
--url "${BASE_URL}/connect/integrations/connection-metadata?connectionId=5c096330-fc54-4144-bfec-6bd344da9586&providerConfigKey=mysql" \
--header "Authorization: Bearer <token>"
Response:
{
"metadata": {
"connectionName": "Production MySQL",
"host": "localhost",
"port": 3306,
"database": "mydb",
"schema": ["public"],
"useSSL": true,
"sslMode": "require",
"status": "active",
"syncStatus": "completed",
"lastSyncedAt": "2025-01-15T12:00:00Z",
"description": "Production database connection"
}
}
Start Database Sync¶
POST /sync/enqueue
Start data synchronization for a SQL connection.
Headers:
Request Body:
cURL Example:
curl --request POST \
--url "${BASE_URL}/sync/enqueue" \
--header "Authorization: Bearer <token>" \
--header "Content-Type: application/json" \
--data '{
"connectionId": "5c096330-fc54-4144-bfec-6bd344da9586",
"providerKey": "mysql"
}'
Response:
Disconnect Database¶
DELETE /connect/integrations/connection/{connectionId}?integration={databaseType}
Remove a database connection.
Headers:
Query Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
integration | string | Yes | Database type: mysql, postgresql, mssql, oracle, or mariadb |
cURL Example:
curl --request DELETE \
--url "${BASE_URL}/connect/integrations/connection/5c096330-fc54-4144-bfec-6bd344da9586?integration=mysql" \
--header "Authorization: Bearer <token>"
Live: this DELETE currently returns 502 on the public path. Do not expect the success JSON below until disconnect is fixed. Remove the connection in the Fermi app if you need it gone.
Connection Configuration¶
SQL connection metadata supports the following fields:
| Field | Type | Description |
|---|---|---|
connectionName | string | Display name for the connection |
host | string | Database host address |
port | number | Database port (default varies by database) |
database | string | Database name |
username | string | Database username |
password | string | Database password |
schema | string[] | List of schemas to sync (optional) |
useSSL | boolean | Enable SSL connection |
sslMode | string | SSL mode: require, prefer, disable |
status | string | Connection status: active, inactive |
description | string | Connection description (optional) |
syncStatus | string | Sync status: never, in_progress, completed, failed |
Default Ports¶
| Database | Default Port |
|---|---|
| MySQL | 3306 |
| PostgreSQL | 5432 |
| SQL Server | 1433 |
| Oracle | 1521 |
| MariaDB | 3306 |
Endpoints Summary¶
| Method | Endpoint | Description |
|---|---|---|
| POST | /connect/integrations/connect-session | Save SQL connection with credentials |
| POST | /database/test-connection | Test database connection |
| POST | /connect/integrations/connection-metadata | Update connection metadata |
| GET | /connect/integrations/connections | List connections |
| GET | /connect/integrations/connection-metadata | Get connection details |
| POST | /sync/enqueue | Start database sync |
| DELETE | /connect/integrations/connection/{connectionId} | Disconnect database |
Schema discovery¶
These routes are Fermi app session APIs (getUser on app.fermi.dev). A service-actor Bearer token is not enough. For a partner connection check, use POST /public/v1/database/test-connection instead.
Tunnel is required: sourceConfig.tunnel_method.tunnel_method must not be NO_TUNNEL. Without a jumpbox, the API returns 400 (Connection check polling is only available when Jumpbox / SSH Tunnel is enabled.).
| Method | Path | Body |
|---|---|---|
| POST | /check-connection | organizationId, connectionId, sourceType, sourceConfig, optional deleteSourceAfterCheck |
| GET | /check-connection?checkId= | Poll the check |
| POST | /discover-streams | organizationId, connectionId, sourceType, sourceConfig |
| POST | /configure-sync | Same plus optional selectedStreams, userId |
| POST | /publish-schema | organizationId, connectionId, providerKey, airbyteConnectionId, optional database, selectedSchemas, selectedStreams |
sourceType is one of postgresql, mysql, mssql, mariadb, oracle.
Features¶
- Multiple Database Support - Connect to MySQL, PostgreSQL, SQL Server, Oracle, and MariaDB
- Connection Testing - Test connections before saving
- SSL Support - Secure connections with SSL/TLS
- Schema Selection - Choose specific schemas to sync
- Data Synchronization - Sync database tables to knowledge graph
- Connection Management - Create, update, and delete connections
Next Steps¶
- Data Connectors Overview - Return to data connectors overview
- API Reference Overview - Return to API reference index
- Scopes and Permissions - Learn about connector scopes
- Code Examples - Examples (coming soon)