Destination Management
REST API supports the following destination management actions:
Create a Destination
Creates a new destination within a specified group in your Fivetran account.
Request
POST https://api.fivetran.com/v1/destinations
{
"group_id":"target_group_id",
"service":"snowflake",
"region":"GCP_US_EAST4",
"time_zone_offset":"-5",
"config":{
"host":"your-account.snowflakecomputing.com",
"port":443,
"database":"fivetran",
"auth":"PASSWORD",
"user":"fivetran_user",
"password":"123456"
}
}
content_copyPayload parameters
| Name | Description | Possible Values |
|---|---|---|
group_id (required) | The unique identifier for the group within the Fivetran system. Find you group_id by fetching your account's . | |
service (required) | The name for the destination type within the Fivetran system. | |
region | Data processing location. This is where Fivetran will operate and run computation on data. | GCP_US_EAST4, GCP_US_WEST1, GCP_EUROPE_WEST3, GCP_AUSTRALIA_SOUTHEAST1, GCP_NORTHAMERICA_NORTHEAST1, GCP_EUROPE_WEST2, GCP_ASIA_SOUTHEAST1, AWS_US_EAST_1, AWS_US_EAST_2, AWS_US_WEST_2, AWS_AP_SOUTHEAST_2, AWS_EU_CENTRAL_1, AWS_EU_WEST_1, AWS_EU_WEST_2, AZURE_EASTUS2, AZURE_AUSTRALIAEAST, GCP_ASIA_SOUTH1. The default value is GCP_US_EAST4. US, EU, APAC, UK, CANADA, and SINGAPORE are deprecated. |
time_zone_offset (required) | Determines the time zone for the Fivetran sync schedule. | -11, 10 ... ,0 , ... +11, +12. |
config (required) | Destination setup configuration. The format is specific for . | |
trust_certificates | Specifies whether we should trust the certificate automatically. The default value is FALSE. If a certificate is not set to be trusted automatically, it has to be approved using the . | |
trust_fingerprints | 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 . | |
run_setup_tests | Specifies whether setup tests should be run automatically. | true or false. The default value is true (tests run automatically by default). |
Response
HTTP 201 Created
{
"code":"Success",
"message":"Destination has been created",
"data":{
"id":"decent_dropsy",
"group_id":"decent_dropsy",
"service":"snowflake",
"region":"GCP_US_EAST4",
"time_zone_offset":"-5",
"setup_status":"connected",
"setup_tests":[
{
"title":"Host Connection",
"status":"PASSED",
"message":""
},
{
"title":"Database Connection",
"status":"PASSED",
"message":""
},
{
"title":"Permission Test",
"status":"PASSED",
"message":""
}
],
"config":{
"host":"your-account.snowflakecomputing.com",
"port":443,
"database":"fivetran",
"auth": "PASSWORD",
"user":"fivetran_user",
"password":"******"
}
}
}
content_copyNOTE: You can use the for the following destinations:
If the setup tests pass successfully, the setup_status field will contain connected.
HTTP 201 Created
{
"code":"Success",
"message":"Destination has been created",
"data":{
"id":"decent_dropsy",
"group_id":"decent_dropsy",
"service":"snowflake",
"region":"GCP_US_EAST4",
"time_zone_offset":"-5",
"setup_status":"incomplete",
"setup_tests":[
{
"title":"Host Connection",
"status":"FAILED",
"message":"Host address is private and not accessible via the internet"
}
],
"config":{
"host":"your-account.snowflakecomputing.com",
"port":443,
"database":"fivetran",
"auth":"PASSWORD",
"user":"fivetran_user",
"password":"******"
}
}
}
content_copyIf the tests fail, the setup_status field will display incomplete.
HTTP 201 Created
{
"code":"Success",
"message":"Destination has been created",
"data":{
"id":"decent_dropsy",
"group_id":"decent_dropsy",
"service":"snowflake",
"region":"GCP_US_EAST4",
"time_zone_offset":"-5",
"setup_status":"incomplete",
"config":{
"host":"your-account.snowflakecomputing.com",
"port":443,
"database":"fivetran",
"auth":"PASSWORD",
"user":"fivetran_user",
"password":"******"
}
}
}
content_copyIf run_setup_tests is set to false in the request, the response will not contain the setup_tests field and the setup_status field will always contain incomplete.
Retrieve destination details
Returns a destination object if a valid identifier was provided.
Request
GET https://api.fivetran.com/v1/destinations/{destination_id}
Path parameters
| Name | Description |
|---|---|
destination_id (required) | The unique identifier for the destination within your Fivetran account. |
Response
HTTP 200 OK
{
"code":"Success",
"data":{
"id":"decent_dropsy",
"group_id":"decent_dropsy",
"service":"snowflake",
"region":"GCP_US_EAST4",
"time_zone_offset":"-5",
"setup_status":"connected",
"config":{
"host":"your-account.snowflakecomputing.com",
"port":443,
"database":"fivetran",
"auth":"PASSWORD",
"user":"fivetran_user",
"password":"******"
}
}
}
content_copyNOTE: You can use the for the following destinations:
Modify a Destination
Updates information for an existing destination within your Fivetran account.
Request
PATCH https://api.fivetran.com/v1/destinations/{destination_id}
Path parameters
| Name | Description |
|---|---|
destination_id (required) | The unique identifier for the destination within your Fivetran account. |
{
"region":"GCP_AUSTRALIA_SOUTHEAST1",
"time_zone_offset":"+10",
"config":{
"host":"your-account.snowflakecomputing.com",
"port":1433,
"database":"fivetran",
"auth":"PASSWORD",
"user":"fivetran_user",
"password":"123456"
}
}
content_copyPayload parameters
| Name | Description | Possible Values |
|---|---|---|
region | Data processing location. This is where Fivetran will operate and run computation on data. | GCP_US_EAST4, GCP_US_WEST1, GCP_EUROPE_WEST3, GCP_AUSTRALIA_SOUTHEAST1, GCP_NORTHAMERICA_NORTHEAST1, GCP_EUROPE_WEST2, GCP_ASIA_SOUTHEAST1, AWS_US_EAST_1, AWS_US_EAST_2, AWS_US_WEST_2, AWS_AP_SOUTHEAST_2, AWS_EU_CENTRAL_1, AWS_EU_WEST_1, AWS_EU_WEST_2, AZURE_EASTUS2, AZURE_AUSTRALIAEAST, GCP_ASIA_SOUTH1. US, EU, APAC, UK, CANADA, and SINGAPORE are deprecated. |
time_zone_offset | Determines the time zone for the Fivetran sync schedule. | -11, 10 ... ,0 , ... +11, +12 |
config | Destination setup configuration. The format is specific for . | |
trust_certificates | 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 . | |
trust_fingerprints | 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 . | |
run_setup_tests | Specifies whether setup tests should be run automatically. | true or false. The default value is true (tests run automatically by default). |
None of the region, time_zone_offset, and config parameters are required, but at least one of them has to be specified for the Modify a Destination request to succeed.
Response
HTTP 200 OK
{
"code":"Success",
"message":"Destination has been updated",
"data":{
"id":"decent_dropsy",
"group_id":"decent_dropsy",
"service":"snowflake",
"region":"GCP_AUSTRALIA_SOUTHEAST1",
"time_zone_offset":"+10",
"setup_status":"connected",
"setup_tests":[
{
"title":"Host Connection",
"status":"PASSED",
"message":""
},
{
"title":"Database Connection",
"status":"PASSED",
"message":""
},
{
"title":"Permission Test",
"status":"PASSED",
"message":""
}
],
"config":{
"host":"your-account.snowflakecomputing.com",
"port":1433,
"database":"fivetran",
"auth":"PASSWORD",
"user":"fivetran_user",
"password":"******"
}
}
}
content_copyNOTE: You can use the for the following destinations:
If the setup tests pass successfully, the setup_status field will contain connected.
HTTP 200 OK
{
"code":"Success",
"message":"Destination has been updated",
"data":{
"id":"decent_dropsy",
"group_id":"decent_dropsy",
"service":"snowflake",
"region":"GCP_AUSTRALIA_SOUTHEAST1",
"time_zone_offset":"+10",
"setup_status":"broken",
"setup_tests":[
{
"title":"Host Connection",
"status":"FAILED",
"message":"Host address is private and not accessible via the internet"
}
],
"config":{
"host":"your-account.snowflakecomputing.com",
"port":1443,
"database":"fivetran",
"auth":"PASSWORD",
"user":"fivetran_user",
"password":"******"
}
}
}
content_copyIf the setup tests fail, the setup_status field will display broken.
Run destination setup tests
Runs the setup tests for an existing destination within your Fivetran account.
Request
POST https://api.fivetran.com/v1/destinations/{destination_id}/test
{
"trust_certificates": true,
"trust_fingerprints": true
}
content_copyPath parameters
| Name | Description |
|---|---|
destination_id (required) | The unique identifier for the destination within your Fivetran account. |
Payload parameters
| Name | Description |
|---|---|
trust_certificates | 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 . |
trust_fingerprints | 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 . |
Response
HTTP 200 OK
{
"code": "Success",
"message": "Setup tests have been completed",
"data": {
"id": "destination_id",
"group_id": "group_id",
"service": "postgres_rds_warehouse",
"region": "GCP_US_EAST4",
"time_zone_offset": "-8",
"setup_status": "incomplete",
"setup_tests": [
{
"title": "Connecting to SSH tunnel",
"status": "FAILED",
"message": "Auth fail"
}
],
"config": {
"public_key": "ssh-rsa ... fivetran user key",
"database": "database_name",
"password": "******",
"tunnel_port": "22",
"port": "5432",
"host": "test.host.com",
"tunnel_host": "test.tunnel.host.com",
"user": "user_name",
"connection_method": "SshTunnel",
"tunnel_user": "tunnel_user_name"
}
}
}
content_copyNOTE: You can use the for the following destinations:
Delete a destination
Deletes a destination from your Fivetran account.
NOTE: Prior to performing this action, you need to remove all linked integrations with the destination by using either the or your .
Request
DELETE https://api.fivetran.com/v1/destinations/{destination_id}
Path parameters
| Name | Description |
|---|---|
destination_id (required) | The unique identifier for the destination within your Fivetran account. |
Response
HTTP 200 OK
{
"code": "Success",
"message": "Destination with id 'destination_id' has been deleted"
}
content_copyV2 destination configuration response format
We have implemented the new v2 format for consistency in the destination configuration information. This format is only valid for the following destinations:
To retrieve the destination configuration in the v2 format, you should add version=2 to the Accept request header:
--header 'Accept: application/json;version=2'
In the new V2 format, the connection_method field is renamed to connection_type.
V1 response format:
{
...
"config": {
...
"connection_method": "SshTunnel"
},
...
}
content_copyV2 response format:
{
...
"config": {
...
"connection_type": "SshTunnel"
},
...
}
content_copy
Comments
0 comments
Please sign in to leave a comment.