Create a Connection
Creates a new connection within a specified group in your Fivetran account. Runs setup tests and returns testing results.
Request schema
Header parameters
HTTP: basicAuth
HTTP AuthorizationScheme: basic
Request
The unique identifier for the group within the Fivetran system
The connector name within the Fivetran system
Specifies whether we should trust the certificate automatically. The default value is FALSE. If a certificate is not trusted automatically, it has to be approved with Certificates Management API Approve a destination certificate.
Specifies whether we should trust the SSH fingerprint automatically. The default value is FALSE. If a fingerprint is not trusted automatically, it has to be approved with Certificates Management API Approve a destination fingerprint.
Specifies whether the setup tests should be run automatically. The default value is TRUE.
Specifies whether the connection is paused
Specifies whether the connection should be paused after the free trial period has ended
The connection sync frequency in minutes
The level of data delay notification threshold. Possible values: LOW, NORMAL, HIGH, CUSTOM. The default value NORMAL. CUSTOM is only available for customers using the Enterprise plan or above.
Custom sync delay notification threshold in minutes. The default value is 0. This parameter is only used when data_delay_sensitivity set to CUSTOM.
The optional parameter that defines the sync start time when the sync frequency is already set or being set by the current request to 1440. It can be specified in one hour increments starting from 00:00 to 23:00. If not specified, we will use the baseline sync start time. This parameter has no effect on the 0 to 60 minutes offset used to determine the actual sync start time
The connection schedule configuration type. Supported values: auto, manual
(Deprecated) The unique identifier for the hybrid deployment agent within the Fivetran system
The unique identifier for the hybrid deployment agent within the Fivetran system
The URI on your site we redirect the end user to after successful setup. The URI must start with the https or http prefix.
An optional parameter that lets you hide the embedded setup guide in the Connect Card.
The proxy agent ID
The unique identifier for the self-served private link that is used by the connection
Publication name. Specify only for "updated_method": "WAL_PGOUTPUT".
Possible values:Directly, PrivateLink, SshTunnel. SshTunnel is used as a value if this parameter is omitted in the request and any of the following parameter's values is specified: tunnel_host, tunnel_port, tunnel_user. Otherwise, Directly is used as a value if the parameter is omitted.
The method to detect new or changed rows.
Specify only for "service": "postgres" or "service": "postgres_rds".
Supported values:
WAL - this method replicates new, changed and deleted rows by tailing the write-ahead log (WAL) via a logical slot. This is more efficient than the XMIN method, but requires more setup and monitoring.
XMIN - this method detects new or changed rows via the XMIN system column, but is not capable of detecting deleted rows.
WAL_PGOUTPUT - logical replication of the WAL using the pgoutput plugin. This method replicates new, changed, and deleted rows by tailing the write-ahead log (WAL) using a logical slot.
TELEPORT - Fivetran's proprietary replication method that uses compressed snapshots to detect and apply changes.
Require TLS through Tunnel
SSH user, specify only to connect via an SSH tunnel.
Client Certificate in .pem format.
SSH port, specify only to connect via an SSH tunnel.
Database authentication method
The database name.
The user's password.
Client Private Key in .pem format.
The port number.
DB instance host or IP address.
SSH host, specify only to connect via an SSH tunnel (do not use a load balancer).
Replication slot name. Specify only for "updated_method": "WAL" or "WAL_PGOUTPUT".
The user name.
Destination schema prefix. Prefix for each replicated schema. For example with prefix 'x', source schemas 'foo' and 'bar' get replicated as 'x_foo' and 'x_bar'. The prefix is permanent and cannot be changed after connection creation
POST /v1/connections HTTP/1.1
Accept: application/json;version=2
Authorization: Basic REPLACE_BASIC_AUTH
Content-Type: application/json
Host: api.fivetran.com
Content-Length: 1376
{
"group_id": "group_id",
"service": "postgres_rds",
"trust_certificates": true,
"trust_fingerprints": true,
"run_setup_tests": true,
"paused": false,
"pause_after_trial": false,
"sync_frequency": 1440,
"data_delay_sensitivity": "NORMAL",
"data_delay_threshold": 0,
"daily_sync_time": "14:00",
"schedule_type": "auto",
"local_processing_agent_id": "local_processing_agent_id",
"hybrid_deployment_agent_id": "hybrid_deployment_agent_id",
"connect_card_config": {
"redirect_uri": "https://your.site/path",
"hide_setup_guide": true
},
"proxy_agent_id": "proxy_agent_id",
"private_link_id": "private_link_id",
"networking_method": "Directly",
"config": {
"publication_name": "string",
"connection_type": "Directly | PrivateLink | SshTunnel | ProxyAgent",
"update_method": "WAL | XMIN | WAL_PGOUTPUT | TELEPORT",
"always_encrypted": true,
"tunnel_user": "fivetran",
"client_public_certificate": "string",
"tunnel_port": 22,
"auth_method": "PASSWORD | CLIENT_CERTIFICATE | ENTRA_ID | AWS_IAM",
"database": "postgres",
"password": "test_password",
"client_private_key": "string",
"port": 5432,
"host": "postgresinstance.mycompany.com",
"tunnel_host": "XXX.XXX.XXX.XXX",
"replication_slot": "test_replication_slot",
"user": "test_user",
"schema_prefix": "prefix"
}
}
Responses
Successful response schema
Response status code
Response status text
The unique identifier for the connection within the Fivetran system
The connector name within the Fivetran system
The name used both as the connection's name within the Fivetran system and as the source schema's name within your destination
Specifies whether the connection is paused
The collection of tasks for the connection
Code
Warning message
The collection of warnings for the connection
Code
Warning message
Schema status. Returned only for connectors that support Universal Column Masking flow.
The current data update state of the connection. The available values are:
- on_schedule - the sync is running smoothly, no delays
- delayed - the data is delayed for a longer time than expected for the update.
The current setup state of the connection. The available values are:
- incomplete - the setup config is incomplete, the setup tests never succeeded
- connected - the connection is properly set up
- broken - the connection setup config is broken.
The current sync state of the connection. The available values are:
- scheduled - the sync is waiting to be run
- syncing - the sync is currently running
- paused - the sync is currently paused
- rescheduled - the sync is waiting until more API calls are available in the source service.
The boolean specifying whether the connection should be triggered to re-sync all historical data. If you set this parameter to TRUE, the next scheduled sync will be historical. If the value is FALSE or not specified, the connection will not re-sync historical data. NOTE: When the value is TRUE, only the next scheduled sync will be historical, all subsequent ones will be incremental. This parameter is set to FALSE once the historical sync is completed.
The scheduled time for the next sync when sync_state is rescheduled. If schedule_type is manual, then the connection expects triggering the event at the designated time through the Sync Connection Data endpoint.
The connection daily sync start time that we return only when the sync frequency is set to 1440 (which means 24 hours) and the daily_sync_time parameter was set using the Create a Connection or Update a Connection request
The timestamp of the time the connection sync succeeded last time
The connection sync frequency in minutes
The unique identifier for the group within the Fivetran system
The unique identifier of the user who has created the connection in your account
Setup tests results for this connection
Setup test title
Setup test status
Setup test message
Setup test details
The additional information about the connection's state. The format of this parameter is specific for each connection type
The connector version within the Fivetran system
The timestamp of the time the connection was created in your account
The timestamp of the time the connection sync failed last time
The unique identifier for the self-served private link that is used by the connection
The proxy agent ID
The connect-card auth token
The Connect Card URI for the user interface
Specifies whether the connection should be paused after the free trial period has ended
Custom sync delay notification threshold in minutes. The default value is 0. This parameter is only used when data_delay_sensitivity set to CUSTOM.
The level of data delay notification threshold. Possible values: LOW, NORMAL, HIGH, CUSTOM. The default value NORMAL. CUSTOM is only available for customers using the Enterprise plan or above.
The connection schedule configuration type. Supported values: auto, manual
(Deprecated) The unique identifier for the hybrid deployment agent within the Fivetran system
The URI on your site we redirect the end user to after successful setup. The URI must start with the https or http prefix.
An optional parameter that lets you hide the embedded setup guide in the Connect Card.
The unique identifier for the hybrid deployment agent within the Fivetran system
Publication name. Specify only for "updated_method": "WAL_PGOUTPUT".
Possible values:Directly, PrivateLink, SshTunnel. SshTunnel is used as a value if this parameter is omitted in the request and any of the following parameter's values is specified: tunnel_host, tunnel_port, tunnel_user. Otherwise, Directly is used as a value if the parameter is omitted.
The method to detect new or changed rows.
Specify only for "service": "postgres" or "service": "postgres_rds".
Supported values:
WAL - this method replicates new, changed and deleted rows by tailing the write-ahead log (WAL) via a logical slot. This is more efficient than the XMIN method, but requires more setup and monitoring.
XMIN - this method detects new or changed rows via the XMIN system column, but is not capable of detecting deleted rows.
WAL_PGOUTPUT - logical replication of the WAL using the pgoutput plugin. This method replicates new, changed, and deleted rows by tailing the write-ahead log (WAL) using a logical slot.
TELEPORT - Fivetran's proprietary replication method that uses compressed snapshots to detect and apply changes.
Require TLS through Tunnel
SSH user, specify only to connect via an SSH tunnel.
Client Certificate in .pem format.
SSH port, specify only to connect via an SSH tunnel.
Database authentication method
The database name.
The user's password.
Client Private Key in .pem format.
The port number.
DB instance host or IP address.
SSH host, specify only to connect via an SSH tunnel (do not use a load balancer).
Replication slot name. Specify only for "updated_method": "WAL" or "WAL_PGOUTPUT".
The user name.
Public Key
{
"code": "Success",
"message": "Operation performed.",
"data": {
"id": "connection_id",
"service": "postgres_rds",
"schema": "schema.table",
"paused": false,
"status": {
"tasks": [
{
"code": "resync_table_warning",
"message": "Resync Table Warning",
"details": "string"
}
],
"warnings": [
{
"code": "resync_table_warning",
"message": "Resync Table Warning",
"details": "string"
}
],
"schema_status": "ready",
"update_state": "delayed",
"setup_state": "connected",
"sync_state": "scheduled",
"is_historical_sync": false,
"rescheduled_for": "2024-12-01T15:43:29.013729Z"
},
"daily_sync_time": "14:00",
"succeeded_at": "2024-03-17T12:31:40.870504Z",
"sync_frequency": 1440,
"group_id": "group_id",
"connected_by": "user_id",
"setup_tests": [
{
"title": "Test Title",
"status": "FAILED",
"message": "Test Message",
"details": "..."
}
],
"source_sync_details": {},
"service_version": 0,
"created_at": "2023-12-01T15:43:29.013729Z",
"failed_at": "2024-04-01T18:13:25.043659Z",
"private_link_id": "private_link_id",
"proxy_agent_id": "proxy_agent_id",
"networking_method": "Directly",
"connect_card": {
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJkIjp7ImxvZ2luIjp0cnVlLCJ1c2VyIjoiX2FjY291bnR3b3J0aHkiLCJhY2NvdW50IjoiX21vb25iZWFtX2FjYyIsImdyb3VwIjoiX21vb25iZWFtIiwiY29ubmVjdG9yIjoiY29iYWx0X2VsZXZhdGlvbiIsIm1ldGhvZCI6IlBiZkNhcmQiLCJpZGVudGl0eSI6ZmFsc2V9LCJpYXQiOjE2Njc4MzA2MzZ9.YUMGUbzxW96xsKJLo4bTorqzx8Q19GTrUi3WFRFM8BU",
"uri": "https://fivetran.com/connect-card/setup?auth=eyJ0eXAiOiJKV1QiLCJh..."
},
"pause_after_trial": false,
"data_delay_threshold": 0,
"data_delay_sensitivity": "NORMAL",
"schedule_type": "auto",
"local_processing_agent_id": "local_processing_agent_id",
"connect_card_config": {
"redirect_uri": "https://your.site/path",
"hide_setup_guide": true
},
"hybrid_deployment_agent_id": "hybrid_deployment_agent_id",
"config": {
"publication_name": "string",
"connection_type": "Directly | PrivateLink | SshTunnel | ProxyAgent",
"update_method": "WAL | XMIN | WAL_PGOUTPUT | TELEPORT",
"always_encrypted": true,
"tunnel_user": "fivetran",
"client_public_certificate": "string",
"tunnel_port": 22,
"auth_method": "PASSWORD | CLIENT_CERTIFICATE | ENTRA_ID | AWS_IAM",
"database": "postgres",
"password": "test_password",
"client_private_key": "string",
"port": 5432,
"host": "postgresinstance.mycompany.com",
"tunnel_host": "XXX.XXX.XXX.XXX",
"replication_slot": "test_replication_slot",
"user": "test_user",
"public_key": "string"
}
}
}