---
title: "Test import source"
method: POST
path: "/import/sources/{id}/test-source"
tags: ["Import Sources"]
---

# Test import source

`POST /import/sources/{id}/test-source`

Probe an import source's connectivity and credentials. Optionally accepts a partial 'source' body to preview a credential change without persisting it.

## Path parameters

- `id` string, required

## Request body

- TestSourceRequest
  - `source` UpdateSourceOptions
    - `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` TestSourceResponse, required
    - `code` string
    - `message` string
  - `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)
