---
title: "Test source connection"
method: POST
path: "/sources/{source_id}/test-connection"
tags: ["Sources"]
---

# Test source connection

`POST /sources/{source_id}/test-connection`

Test the connection to a source.

## Path parameters

- `source_id` string, required

## Request body

- UpdateSourceRequest
  - `source` UpdateSourceOptions, required
    - `name` string — Unique name for this import source.
    - `vendor` string
    - `postgres` UpdatePostgresSourceOptions
      - `host` string — The hostname of the PostgreSQL server.
      - `port` integer — The port of the PostgreSQL server.
      - `database` string — The name of the database to connect to.
      - `auth_method` 'password_auth' — Authentication method.
      - `password_auth` UpdatePasswordAuth
        - `username` string — The username to use for authentication.
        - `password` string — The password to use for authentication.
      - `use_ssh_tunnel` boolean — Whether to use an SSH tunnel for the connection.
      - `ssh_tunnel` SSHTunnelParams
        - `ssh_tunnel_host` string, required
        - `ssh_tunnel_port` integer, required
        - `ssh_tunnel_username` string, required
        - `ssh_public_key` 'primary_public_key' | 'secondary_public_key' — This is the public SSH key that will be used to establish the SSH tunnel. It should be added to the list of authorized keys on the bastion host.
      - `disable_ssl` boolean — Whether to disable SSL for the connection.
    - `redshift` UpdateRedshiftSourceOptions
      - `host` string — The hostname of the Redshift server.
      - `port` integer — The port of the Redshift server.
      - `database` string — The name of the database to connect to.
      - `cluster` string — The name of the Redshift cluster.
      - `region` string — The AWS region of the Redshift cluster.
      - `workgroup` string — The name of the Redshift Serverless workgroup.
      - `username` string — The username for authentication.
      - `auth_method` 'aws_iam_role' | 'aws_access_keys'
      - `aws_access_keys` UpdateRedshiftAccessKeys
        - `password` string, required
        - `access_id` string, required
        - `secret_key` string, required
      - `aws_iam_role` AWSIAMRole
        - `aws_iam_role_arn` string, required
      - `use_ssh_tunnel` boolean — Whether to use an SSH tunnel for the connection.
      - `ssh_tunnel` SSHTunnelParams
        - `ssh_tunnel_host` string, required
        - `ssh_tunnel_port` integer, required
        - `ssh_tunnel_username` string, required
        - `ssh_public_key` 'primary_public_key' | 'secondary_public_key' — This is the public SSH key that will be used to establish the SSH tunnel. It should be added to the list of authorized keys on the bastion host.
      - `disable_ssl` boolean — Whether to disable SSL for the connection.
      - `connection_timeout_in_seconds` integer — Duration to wait for successful connection.
    - `redshift_serverless` UpdateRedshiftServerlessSourceOptions
      - `host` string — The hostname of the Redshift Serverless server.
      - `port` integer — The port of the Redshift Serverless server.
      - `database` string — The name of the database to connect to.
      - `workgroup` string — The name of the Redshift Serverless workgroup.
      - `region` string — The AWS region of the Redshift Serverless workgroup.
      - `auth_method` 'aws_iam_role' | 'aws_access_keys'
      - `aws_access_keys` UpdateRedshiftAccessKeys
        - `password` string, required
        - `access_id` string, required
        - `secret_key` string, required
      - `aws_iam_role` AWSIAMRole
        - `aws_iam_role_arn` string, required
      - `use_ssh_tunnel` boolean — Whether to use an SSH tunnel for the connection.
      - `ssh_tunnel` SSHTunnelParams
        - `ssh_tunnel_host` string, required
        - `ssh_tunnel_port` integer, required
        - `ssh_tunnel_username` string, required
        - `ssh_public_key` 'primary_public_key' | 'secondary_public_key' — This is the public SSH key that will be used to establish the SSH tunnel. It should be added to the list of authorized keys on the bastion host.
      - `disable_ssl` boolean — Whether to disable SSL for the connection.
      - `connection_timeout_in_seconds` integer — Duration to wait for successful connection.
    - `bigquery` UpdateBigQuerySourceOptions
      - `project_id` string
      - `region` string
      - `auth_method` 'gcp_service_account_role' | 'gcp_service_account_key' | 'federated_gcp_service_account_role' — The method of authentication to use for this source.
      - `gcp_service_account_role` UpdateGCPServiceAccountRole
        - `service_account_email` string, email — The email of the GCP service account to use for authentication.
        - `workload_identity_federation_metadata` GcpExternalAccountMetadata
          - `type` string, required
          - `audience` string, required
          - `subject_token_type` string, required
          - `service_account_impersonation_url` string, required
          - `token_url` string, required
          - `credential_source` CredentialSource, required
            - `environment_id` string, required
            - `region_url` string, required
            - `url` string, required
            - `regional_cred_verification_url` string, required
      - `federated_gcp_service_account_role` UpdateFederatedGCPServiceAccountRole
        - `service_account_email` string, email, required
        - `workload_identity_federation_metadata` GcpExternalAccountMetadata
          - `type` string, required
          - `audience` string, required
          - `subject_token_type` string, required
          - `service_account_impersonation_url` string, required
          - `token_url` string, required
          - `credential_source` CredentialSource, required
            - `environment_id` string, required
            - `region_url` string, required
            - `url` string, required
            - `regional_cred_verification_url` string, required
      - `gcp_service_account_key` UpdateGCPSourceServiceAccountKey
        - `service_account_email` string, email — The email of the GCP service account to use for authentication.
        - `service_account_key` unknown
    - `s3` UpdateS3SourceOptions
      - `bucket_name` string — The name of the S3 bucket.
      - `region` string — The AWS region of the S3 bucket.
      - `auth_method` 'aws_iam_role' | 'aws_access_keys'
      - `aws_iam_role` AWSIAMRole
        - `aws_iam_role_arn` string, required
      - `aws_access_keys` UpdateAWSAccessKeys
        - `access_id` string — The access key ID to use for authentication.
        - `secret_key` string — The secret key to use for authentication.
      - `bucket_host` string — The host address of the S3 bucket.
      - `use_ssh_tunnel` boolean — Whether to use an SSH tunnel for the connection.
      - `ssh_tunnel` SSHTunnelParams
        - `ssh_tunnel_host` string, required
        - `ssh_tunnel_port` integer, required
        - `ssh_tunnel_username` string, required
        - `ssh_public_key` 'primary_public_key' | 'secondary_public_key' — This is the public SSH key that will be used to establish the SSH tunnel. It should be added to the list of authorized keys on the bastion host.
    - `abs` UpdateABSSourceOptions
      - `bucket_name` string — The name of the ABS container.
      - `storage_account_name` string — The name of the Azure storage account.
      - `auth_method` 'azure_service_shared_access_signature' — Authentication method.
      - `azure_service_shared_access_signature` UpdateAzureServiceSharedAccessSignature
        - `shared_access_signature_token` string
    - `sftp` UpdateSFTPSourceOptions
      - `username` string — The username for the SFTP connection.
      - `host` string — The hostname of the SFTP server.
      - `port` integer — The port of the SFTP server.
      - `auth_method` 'public_key_auth' — Authentication method.
      - `public_key_auth` UpdatePublicKeyAuth
        - `public_key` string — This is the PKCS8 public key generated for keypair authentication.
    - `gcs` UpdateGCSSourceOptions
      - `bucket_name` string — The name of the GCS bucket.
      - `region` string — The GCP region of the GCS bucket.
      - `auth_method` 'gcp_service_account_role' | 'federated_gcp_service_account_role' | 'gcs_hmac_keys' | 'gcp_service_account_key' — Authentication method.
      - `gcp_service_account_role` UpdateGCPServiceAccountRole
        - `service_account_email` string, email — The email of the GCP service account to use for authentication.
        - `workload_identity_federation_metadata` GcpExternalAccountMetadata
          - `type` string, required
          - `audience` string, required
          - `subject_token_type` string, required
          - `service_account_impersonation_url` string, required
          - `token_url` string, required
          - `credential_source` CredentialSource, required
            - `environment_id` string, required
            - `region_url` string, required
            - `url` string, required
            - `regional_cred_verification_url` string, required
      - `federated_gcp_service_account_role` UpdateFederatedGCPServiceAccountRole
        - `service_account_email` string, email, required
        - `workload_identity_federation_metadata` GcpExternalAccountMetadata
          - `type` string, required
          - `audience` string, required
          - `subject_token_type` string, required
          - `service_account_impersonation_url` string, required
          - `token_url` string, required
          - `credential_source` CredentialSource, required
            - `environment_id` string, required
            - `region_url` string, required
            - `url` string, required
            - `regional_cred_verification_url` string, required
      - `gcs_hmac_keys` UpdateGCSAccessKeys
        - `access_key` string — The access key to use for authentication.
        - `secret` string — The secret to use for authentication.
      - `gcp_service_account_key` UpdateGCPSourceServiceAccountKey
        - `service_account_email` string, email — The email of the GCP service account to use for authentication.
        - `service_account_key` unknown
    - `s3_compatible` UpdateS3CompatibleSourceOptions
      - `host` string — The hostname of the S3-compatible server.
      - `port` integer — The port of the S3-compatible server.
      - `bucket_name` string — The name of the S3-compatible bucket.
      - `auth_method` 'access_keys' — Authentication method.
      - `aws_access_keys` UpdateAWSAccessKeys
        - `access_id` string — The access key ID to use for authentication.
        - `secret_key` string — The secret key to use for authentication.
      - `disable_ssl` boolean — Whether to disable SSL for the connection.
      - `use_ssh_tunnel` boolean — Whether to use an SSH tunnel for the connection.
      - `ssh_tunnel` SSHTunnelParams
        - `ssh_tunnel_host` string, required
        - `ssh_tunnel_port` integer, required
        - `ssh_tunnel_username` string, required
        - `ssh_public_key` 'primary_public_key' | 'secondary_public_key' — This is the public SSH key that will be used to establish the SSH tunnel. It should be added to the list of authorized keys on the bastion host.
    - `snowflake` UpdateSnowflakeSourceOptions
      - `host` string — The hostname of the Snowflake account.
      - `port` integer — The port of the Snowflake server.
      - `database` string — The name of the database to connect to.
      - `username` string — The username for authentication.
      - `auth_method` 'public_key_auth'
      - `public_key_auth` UpdatePublicKeyAuth
        - `public_key` string — This is the PKCS8 public key generated for keypair authentication.
    - `delta_sharing` UpdateDeltaSharingSourceOptions
      - `host` string — The hostname of the Delta Sharing server.
      - `port` integer — The port of the Delta Sharing server.
      - `auth_method` 'bearer_token' | 'oauth2'
      - `bearer_token` BearerTokenAuth
        - `bearer_token` string, required
      - `oauth2` OAuthAuth
        - `client_id` string, required
        - `client_secret` string, required

## Response `200`

OK

- object
  - `status` 'success', required
  - `data` SourceResponse, required
    - `ssh_public_key` string
    - `source` union, required
      - object
        - `vendor` 'postgres', required
        - `postgres` PostgresSourceResource, required
          - `is_valid` boolean, required
          - `host` string, required
          - `port` integer, required
          - `database` string, required
          - `username` string, required
          - `auth_method` string, required
          - `use_ssh_tunnel` boolean, required
          - `ssh_tunnel` SSHTunnelResource
            - `ssh_tunnel_host` string
            - `ssh_tunnel_port` integer
            - `ssh_tunnel_username` string
            - `ssh_public_key` string
          - `disable_ssl` boolean, required
          - `connection_timeout_in_seconds` integer, required
        - `id` string, required
        - `provider_id` string, required
        - `name` string, required
        - `created_at` string, required
        - `updated_at` string, required
      - object
        - `vendor` 'redshift', required
        - `redshift` RedshiftSourceResource, required
          - `is_valid` boolean, required
          - `host` string, required
          - `port` integer, required
          - `database` string, required
          - `cluster` string
          - `region` string
          - `workgroup` string
          - `username` string
          - `auth_method` string, required
          - `aws_iam_role` AWSIAMRoleResource
            - `aws_iam_role` string, required
          - `aws_access_keys` RedshiftAccessKeysResource
            - `access_id` string, required
          - `use_ssh_tunnel` boolean, required
          - `ssh_tunnel` SSHTunnelResource
            - `ssh_tunnel_host` string
            - `ssh_tunnel_port` integer
            - `ssh_tunnel_username` string
            - `ssh_public_key` string
          - `disable_ssl` boolean, required
          - `connection_timeout_in_seconds` integer, required
        - `id` string, required
        - `provider_id` string, required
        - `name` string, required
        - `created_at` string, required
        - `updated_at` string, required
      - object
        - `vendor` 'redshift_serverless', required
        - `redshift_serverless` RedshiftServerlessSourceResource, required
          - `is_valid` boolean, required
          - `host` string, required
          - `port` integer, required
          - `database` string, required
          - `region` string
          - `workgroup` string, required
          - `auth_method` string, required
          - `aws_iam_role` AWSIAMRoleResource
            - `aws_iam_role` string, required
          - `aws_access_keys` RedshiftAccessKeysResource
            - `access_id` string, required
          - `use_ssh_tunnel` boolean, required
          - `ssh_tunnel` SSHTunnelResource
            - `ssh_tunnel_host` string
            - `ssh_tunnel_port` integer
            - `ssh_tunnel_username` string
            - `ssh_public_key` string
          - `disable_ssl` boolean, required
          - `connection_timeout_in_seconds` integer, required
        - `id` string, required
        - `provider_id` string, required
        - `name` string, required
        - `created_at` string, required
        - `updated_at` string, required
      - object
        - `vendor` 'bigquery', required
        - `bigquery` union, required
          - BigQuerySourceResourceGCPServiceAccountRole
            - `project_id` string, required
            - `region` string, required
            - `auth_method` 'gcp_service_account_role', required
            - `gcp_service_account_role` GCPServiceAccountRoleResource, required
              - …
          - BigQuerySourceResourceFederatedGCPServiceAccountRole
            - `project_id` string, required
            - `region` string, required
            - `auth_method` 'federated_gcp_service_account_role', required
            - `federated_gcp_service_account_role` FederatedGCPServiceAccountRoleResource, required
              - …
          - BigQuerySourceResourceGCPServiceAccountKey
            - `project_id` string, required
            - `region` string, required
            - `auth_method` 'gcp_service_account_key', required
            - `gcp_service_account_key` GCPServiceAccountKeyResource, required
              - …
        - `id` string, required
        - `provider_id` string, required
        - `name` string, required
        - `created_at` string, required
        - `updated_at` string, required
      - object
        - `vendor` 's3', required
        - `s3` S3SourceResource, required
          - `is_valid` boolean, required
          - `bucket_name` string, required
          - `region` string, required
          - `auth_method` string, required
          - `aws_iam_role` AWSIAMRoleResource
            - `aws_iam_role` string, required
          - `aws_access_keys` AWSAccessKeysResource
            - `access_key_id` string, required
          - `bucket_host` string
          - `use_ssh_tunnel` boolean, required
          - `ssh_tunnel` SSHTunnelResource
            - `ssh_tunnel_host` string
            - `ssh_tunnel_port` integer
            - `ssh_tunnel_username` string
            - `ssh_public_key` string
        - `id` string, required
        - `provider_id` string, required
        - `name` string, required
        - `created_at` string, required
        - `updated_at` string, required
      - object
        - `vendor` 'abs', required
        - `abs` ABSSourceResource, required
          - `is_valid` boolean, required
          - `bucket_name` string, required
          - `storage_account_name` string, required
          - `auth_method` string, required
        - `id` string, required
        - `provider_id` string, required
        - `name` string, required
        - `created_at` string, required
        - `updated_at` string, required
      - object
        - `vendor` 'sftp', required
        - `sftp` SFTPSourceResource, required
          - `is_valid` boolean, required
          - `username` string, required
          - `host` string, required
          - `port` integer, required
          - `auth_method` string, required
        - `id` string, required
        - `provider_id` string, required
        - `name` string, required
        - `created_at` string, required
        - `updated_at` string, required
      - object
        - `vendor` 'gcs', required
        - `gcs` GCSSourceResource, required
          - `is_valid` boolean, required
          - `bucket_name` string, required
          - `region` string, required
          - `auth_method` string, required
          - `gcp_service_account_role` GCPServiceAccountRoleResource
            - `service_account_email` string, required
          - `federated_gcp_service_account_role` FederatedGCPServiceAccountRoleResource
            - `service_account_email` string, required
          - `gcs_hmac_keys` GCSAccessKeysResource
            - `access_id` string, required
          - `gcp_service_account_key` GCPServiceAccountKeyResource
            - `service_account_email` string, required
        - `id` string, required
        - `provider_id` string, required
        - `name` string, required
        - `created_at` string, required
        - `updated_at` string, required
      - object
        - `vendor` 's3_compatible', required
        - `s3_compatible` S3CompatibleSourceResource, required
          - `is_valid` boolean, required
          - `host` string, required
          - `port` integer, required
          - `bucket_name` string, required
          - `auth_method` string, required
          - `aws_access_keys` AWSAccessKeysResource
            - `access_key_id` string, required
          - `disable_ssl` boolean, required
          - `use_ssh_tunnel` boolean, required
          - `ssh_tunnel` SSHTunnelResource
            - `ssh_tunnel_host` string
            - `ssh_tunnel_port` integer
            - `ssh_tunnel_username` string
            - `ssh_public_key` string
        - `id` string, required
        - `provider_id` string, required
        - `name` string, required
        - `created_at` string, required
        - `updated_at` string, required
      - object
        - `vendor` 'snowflake', required
        - `snowflake` SnowflakeSourceResource, required
          - `is_valid` boolean, required
          - `host` string, required
          - `port` integer, required
          - `database` string, required
          - `username` string, required
          - `auth_method` 'public_key_auth', required
          - `public_key_auth` PublicKeyAuthResource
            - `public_key` string, required
        - `id` string, required
        - `provider_id` string, required
        - `name` string, required
        - `created_at` string, required
        - `updated_at` string, required
      - object
        - `vendor` 'delta_sharing', required
        - `delta_sharing` DeltaSharingSourceResource, required
          - `is_valid` boolean, required
          - `host` string, required
          - `port` integer, required
          - `auth_method` string, required
          - `oauth_client_id` string
        - `id` string, required
        - `provider_id` string, required
        - `name` string, required
        - `created_at` string, required
        - `updated_at` string, required
  - `message` string, required

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `404` — Not Found
- `500` — Internal Server Error

---

[API](https://skmtc.dev/prequel/apis/prequel-data-export.md) · [All operations](https://skmtc.dev/prequel/apis/prequel-data-export/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/prequel/prequel-data-export/revisions/09c662a871f8/schema)
