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. If not specified, the agent ID from the destination will be used
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 proxy agent within the Fivetran system
The unique identifier for the self-served private link that is used by the connection
The boolean value specifying whether the connection string has manage permissions
The IP address of the host machine which we use to connect to ASB via ssh
The authentication mode to access the topic
The sync type, which is based on the message type. For text and xml, packed is supported. For protobuf and avro, unpacked is supported. For json, both packed and unpacked are supported
The comma-separated list of topics which should be synced. Required if you do not have manage permissions
The format of messages in the topic
The connection string used for authentication. Required if the authentication type is ConnectionString
The connection method
The ASB namespace which we have to sync. Required for AzureActiveDirectory authentication.
The secret used to access the schema registry. Required for the avro and protobuf message types
The subscriber name. If the connection string does not have manage permission, you need to specify a subscriber name we can use to fetch data. If not specified, we default to fivetran_sub_<schema>
The username on the host machine which we use to connect to ASB via ssh
The IP address (or) the URL of ASB namespace
The key used to access the schema registry. Required for the avro and protobuf message types
The comma-separated list of schema registry servers in the server:port format
Destination schema name. Schema name is permanent and cannot be changed after connection creation
The refresh token. Required if the authentication type is AzureActiveDirectory
Client Secret of your Azure application. Required if the authentication type is AzureActiveDirectory
Client ID of your Azure application. Required if the authentication type is AzureActiveDirectory
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: 1547
{
"group_id": "group_id",
"service": "azure_service_bus",
"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": {
"has_manage_permissions": true,
"host_ip": "string",
"auth_type": "ConnectionString | AzureActiveDirectory",
"sync_type": "Unpacked | Packed",
"topics": [
"string"
],
"message_type": "Avro | Json | Text | Protobuf | Xml",
"connection_string": "Connection String",
"connection_method": "DIRECT | PRIVATE_LINK | SSH_TUNNEL",
"namespace": "my_namespace",
"schema_registry_secret": "schema_registry_secret",
"subscriber_name": "subscriber_name",
"host_user": "string",
"asb_ip": "string",
"schema_registry_key": "schema_registry_key",
"schema_registry_urls": [
"string"
],
"schema": "schema_name"
},
"auth": {
"refresh_token": "refresh_token",
"client_access": {
"client_secret": "my_client_secret",
"client_id": "my_client_id"
}
}
}
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 unique identifier for the proxy agent within the Fivetran system
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. If not specified, the agent ID from the destination will be used
The boolean value specifying whether the connection string has manage permissions
The IP address of the host machine which we use to connect to ASB via ssh
The authentication mode to access the topic
The sync type, which is based on the message type. For text and xml, packed is supported. For protobuf and avro, unpacked is supported. For json, both packed and unpacked are supported
The comma-separated list of topics which should be synced. Required if you do not have manage permissions
The format of messages in the topic
The connection string used for authentication. Required if the authentication type is ConnectionString
The connection method
The ASB namespace which we have to sync. Required for AzureActiveDirectory authentication.
The secret used to access the schema registry. Required for the avro and protobuf message types
The subscriber name. If the connection string does not have manage permission, you need to specify a subscriber name we can use to fetch data. If not specified, we default to fivetran_sub_<schema>
The username on the host machine which we use to connect to ASB via ssh
The IP address (or) the URL of ASB namespace
The key used to access the schema registry. Required for the avro and protobuf message types
The comma-separated list of schema registry servers in the server:port format
Public key generated by Fivetran to be copied into the host-machine's authorized keys file.
{
"code": "Success",
"message": "Operation performed.",
"data": {
"id": "connection_id",
"service": "azure_service_bus",
"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": {
"has_manage_permissions": true,
"host_ip": "string",
"auth_type": "ConnectionString | AzureActiveDirectory",
"sync_type": "Unpacked | Packed",
"topics": [
"string"
],
"message_type": "Avro | Json | Text | Protobuf | Xml",
"connection_string": "Connection String",
"connection_method": "DIRECT | PRIVATE_LINK | SSH_TUNNEL",
"namespace": "my_namespace",
"schema_registry_secret": "schema_registry_secret",
"subscriber_name": "subscriber_name",
"host_user": "string",
"asb_ip": "string",
"schema_registry_key": "schema_registry_key",
"schema_registry_urls": [
"string"
],
"public_key": "string"
}
}
}