Sources

Connect a SQL database

Changed on

Connects a PostgreSQL, MySQL or Microsoft SQL Server database with credentials sent once. The credentials are checked against the system before the connection is saved; secrets in the body are write-only, stored encrypted and never returned. The connection string is write-only; to change it, delete the connection and connect again. A key that belongs to no person (one created before keys named their creator) is refused with 403.

Scope: sources:write. A key holding only the legacy write scope does not satisfy it.

post/v1/sources/connections/sql

Request

  • Base URL
    https://api.talonic.com
  • Auth
    HTTP bearer

Request body

object required
name, string required

Display name.

engine, 'postgres' | 'mysql' | 'mssql' required

Database engine.

connection_string, string required

Connection string including credentials. Write-only.

Response

The new connection (without its credentials).

SourceConnection required
id, string uuid required
customer_id, string uuid
type, string required

Connector type, e.g. s3, gmail, google_drive, sql.

status, 'active' | 'revoked' required
name, string required
config, object

Connector settings.

sync_status, 'idle' | 'queued' | 'syncing' | 'error'
sync_error, string nullable
last_synced_at, string date-time nullable
sync_interval, 'off' | 'hourly' | 'daily' | 'weekly' | 'every_minute'
sync_scope, object nullable
document_count, integer
connected_by, string uuid nullable

The person who connected it.

created_at, string date-time
updated_at, string date-time

Changes