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 proxy agent ID
The unique identifier for the self-served private link that is used by the connection
If you know that the source completely over-writes the same file with new data, you can append the changes instead of upserting based on filename and line number.
All files and folders under this folder path will be searched for files to sync.
All files in your search path matching this regular expression will be synced.
If your CSV generator follows non-standard rules for escaping quotation marks, you can set the escape character here.
Control how your JSON data is delivered into your destination
We will skip over the number of lines specified at the end so as to not introduce aberrant data into your destination.
You can specify the custom line separator for your CSV files. The line separator is used in files to separate one row from the next.
We will skip over the number of lines specified before syncing data.
Optional. If your CSV generating software doesn't provide header line for the documents, Fivetran can generate the generic column names and sync data rows with them.
If your CSVs use a special value indicating null, you can specify it here.
Allows the creation of connector using Merge Mode strategy.
You can specify the delimiter that your CSVs use here. Fivetran generally tries to infer the delimiter, but in some cases this is impossible.
If your files are saved with improper extensions, you can force them to be synced as the selected filetype.
If you know that your files contain some errors, you can choose to have poorly formatted lines skipped. We recommend leaving the value as fail unless you are certain that you have undesirable, malformed data.
Folder URL
The compression format is used to let Fivetran know that even files without a compression extension should be decompressed using the selected compression format.
Files inside of compressed archives with filenames matching this regular expression will be synced.
Destination schema name. Schema name is permanent and cannot be changed after connection creation
Destination table. Table 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: 1465
{
"group_id": "group_id",
"service": "box",
"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": {
"append_file_option": "upsert_file | append_file | upsert_file_with_primary_keys",
"prefix": "folder_path",
"pattern": "file_pattern",
"escape_char": "escape_char",
"json_delivery_mode": "Packed | Unpacked",
"skip_after": 0,
"line_separator": ";",
"skip_before": 0,
"empty_header": true,
"null_sequence": "string",
"is_single_table_mode": true,
"delimiter": "|",
"file_type": "csv | log | json | jsonl | infer | tsv | avro | parquet | xml | spreadsheet | unstructured",
"on_error": "fail | skip",
"folder_id": "folder_id",
"compression": "bz2 | gz | gzip | zip | tar | tar_bz2 | tar_gz | uncompressed | infer",
"archive_pattern": "regex_pattern",
"schema": "schema_name",
"table": "table_name"
}
}
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. If not specified, the agent ID from the destination will be used
If you know that the source completely over-writes the same file with new data, you can append the changes instead of upserting based on filename and line number.
All files and folders under this folder path will be searched for files to sync.
All files in your search path matching this regular expression will be synced.
If your CSV generator follows non-standard rules for escaping quotation marks, you can set the escape character here.
Control how your JSON data is delivered into your destination
We will skip over the number of lines specified at the end so as to not introduce aberrant data into your destination.
You can specify the custom line separator for your CSV files. The line separator is used in files to separate one row from the next.
We will skip over the number of lines specified before syncing data.
Optional. If your CSV generating software doesn't provide header line for the documents, Fivetran can generate the generic column names and sync data rows with them.
If your CSVs use a special value indicating null, you can specify it here.
Allows the creation of connector using Merge Mode strategy.
You can specify the delimiter that your CSVs use here. Fivetran generally tries to infer the delimiter, but in some cases this is impossible.
If your files are saved with improper extensions, you can force them to be synced as the selected filetype.
If you know that your files contain some errors, you can choose to have poorly formatted lines skipped. We recommend leaving the value as fail unless you are certain that you have undesirable, malformed data.
Folder URL
The compression format is used to let Fivetran know that even files without a compression extension should be decompressed using the selected compression format.
Files inside of compressed archives with filenames matching this regular expression will be synced.
{
"code": "Success",
"message": "Operation performed.",
"data": {
"id": "connection_id",
"service": "box",
"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": {
"append_file_option": "upsert_file | append_file | upsert_file_with_primary_keys",
"prefix": "folder_path",
"pattern": "file_pattern",
"escape_char": "escape_char",
"json_delivery_mode": "Packed | Unpacked",
"skip_after": 0,
"line_separator": ";",
"skip_before": 0,
"empty_header": true,
"null_sequence": "string",
"is_single_table_mode": true,
"delimiter": "|",
"file_type": "csv | log | json | jsonl | infer | tsv | avro | parquet | xml | spreadsheet | unstructured",
"on_error": "fail | skip",
"folder_id": "folder_id",
"compression": "bz2 | gz | gzip | zip | tar | tar_bz2 | tar_gz | uncompressed | infer",
"archive_pattern": "regex_pattern"
}
}
}