---
title: "Test new import source"
method: POST
path: "/import/test-source"
tags: ["Import Sources"]
---

# Test new import source

`POST /import/test-source`

Validate a candidate (unsaved) import source definition by probing connectivity and credentials. Does not persist the source.

## Request body

- TestNewSourceRequest
  - `source` union, required
    - object
      - `vendor` 'postgres', required
      - `postgres` PostgresSourceOptions, required
        - `host` string, required — Host address of the database.
        - `port` integer, required
        - `database` string, required — Name of the database.
        - `auth_method` 'password_auth', required — Authentication method.
        - `password_auth` PasswordAuth, required
          - `username` string, required
          - `password` 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
      - `provider_id` string, required — ID of the import provider this source belongs to.
      - `name` string, required — Unique name for this import source.
    - object
      - `vendor` 'redshift', required
      - `redshift` union, required
        - RedshiftSourceOptionsAWSAccessKeys
          - `host` string, required — Host address of the Redshift cluster.
          - `port` integer, required
          - `database` string, required — Name of the database.
          - `cluster` string, required — Redshift Cluster identifier
          - `region` string, required — AWS Region identifier
          - `username` 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
          - `connection_timeout_in_seconds` integer — Duration to wait for successful connection
          - `auth_method` 'aws_access_keys', required
          - `aws_access_keys` RedshiftAccessKeys, required
            - `password` string, required
            - `access_id` string, required
            - `secret_key` string, required
        - RedshiftSourceOptionsAWSIAMRole
          - `host` string, required — Host address of the Redshift cluster.
          - `port` integer, required
          - `database` string, required — Name of the database.
          - `cluster` string, required — Redshift Cluster identifier
          - `region` string, required — AWS Region identifier
          - `username` 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
          - `connection_timeout_in_seconds` integer — Duration to wait for successful connection
          - `auth_method` 'aws_iam_role', required
          - `aws_iam_role` AWSIAMRole, required
            - `aws_iam_role_arn` string, required
      - `provider_id` string, required — ID of the import provider this source belongs to.
      - `name` string, required — Unique name for this import source.
    - object
      - `vendor` 'redshift_serverless', required
      - `redshift_serverless` union, required
        - RedshiftServerlessSourceOptionsAWSAccessKeys
          - `host` string, required — Host address of the Redshift Serverless workgroup.
          - `port` integer, required
          - `database` string, required — Name of the database.
          - `workgroup` string, required — Redshift Serverless Workgroup name
          - `region` string, required — AWS Region identifier
          - `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
          - `connection_timeout_in_seconds` integer — Duration to wait for successful connection
          - `auth_method` 'aws_access_keys', required
          - `aws_access_keys` RedshiftAccessKeys, required
            - `password` string, required
            - `access_id` string, required
            - `secret_key` string, required
        - RedshiftServerlessSourceOptionsAWSIAMRole
          - `host` string, required — Host address of the Redshift Serverless workgroup.
          - `port` integer, required
          - `database` string, required — Name of the database.
          - `workgroup` string, required — Redshift Serverless Workgroup name
          - `region` string, required — AWS Region identifier
          - `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
          - `connection_timeout_in_seconds` integer — Duration to wait for successful connection
          - `auth_method` 'aws_iam_role', required
          - `aws_iam_role` AWSIAMRole, required
            - `aws_iam_role_arn` string, required
      - `provider_id` string, required — ID of the import provider this source belongs to.
      - `name` string, required — Unique name for this import source.
    - object
      - `vendor` 'bigquery', required
      - `bigquery` union, required
        - BigQuerySourceOptionsGCPServiceAccountRole
          - `project_id` string, required
          - `region` string, required
          - `auth_method` 'gcp_service_account_role', required
          - `gcp_service_account_role` GCPServiceAccountRole, required
            - `service_account_email` string, email, required
        - BigQuerySourceOptionsFederatedGCPServiceAccountRole
          - `project_id` string, required
          - `region` string, required
          - `auth_method` 'federated_gcp_service_account_role', required
          - `federated_gcp_service_account_role` FederatedGCPServiceAccountRole, required
            - `service_account_email` string, email, required
            - `workload_identity_federation_metadata` GcpExternalAccountMetadata
              - …
        - BigQuerySourceOptionsGCPServiceAccountKey
          - `project_id` string, required
          - `region` string, required
          - `auth_method` 'gcp_service_account_key', required
          - `gcp_service_account_key` GCPSourceServiceAccountKey, required
            - `service_account_email` string, email, required
            - `service_account_key` unknown, required
      - `provider_id` string, required — ID of the import provider this source belongs to.
      - `name` string, required — Unique name for this import source.
    - object
      - `vendor` 's3', required
      - `s3` union, required
        - S3SourceOptionsAWSIAMRole
          - `bucket_name` string, required
          - `region` string, required
          - `bucket_host` string
          - `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.
          - `auth_method` 'aws_iam_role', required
          - `aws_iam_role` AWSIAMRole, required
            - `aws_iam_role_arn` string, required
        - S3SourceOptionsAWSAccessKeys
          - `bucket_name` string, required
          - `region` string, required
          - `bucket_host` string
          - `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.
          - `auth_method` 'aws_access_keys', required
          - `aws_access_keys` AWSAccessKeys, required
            - `access_id` string, required
            - `secret_key` string, required
      - `provider_id` string, required — ID of the import provider this source belongs to.
      - `name` string, required — Unique name for this import source.
    - object
      - `vendor` 'abs', required
      - `abs` ABSSourceOptions, required
        - `bucket_name` string, required
        - `storage_account_name` string, required
        - `auth_method` 'azure_service_shared_access_signature', required
        - `azure_service_shared_access_signature` AzureServiceSharedAccessSignature, required
          - `shared_access_signature_token` string, required
      - `provider_id` string, required — ID of the import provider this source belongs to.
      - `name` string, required — Unique name for this import source.
    - object
      - `vendor` 'sftp', required
      - `sftp` SFTPSourceOptions, required
        - `username` string, required
        - `host` string, required
        - `port` integer, required
        - `auth_method` 'public_key_auth', required
        - `public_key_auth` PublicKeyAuth, required
          - `public_key` string, required — This is the PKCS8 public key generated for keypair authentication.
      - `provider_id` string, required — ID of the import provider this source belongs to.
      - `name` string, required — Unique name for this import source.
    - object
      - `vendor` 'gcs', required
      - `gcs` union, required
        - GCSSourceOptionsGCPServiceAccountRole
          - `bucket_name` string, required
          - `region` string, required
          - `auth_method` 'gcp_service_account_role', required
          - `gcp_service_account_role` GCPServiceAccountRole, required
            - `service_account_email` string, email, required
        - GCSSourceOptionsFederatedGCPServiceAccountRole
          - `bucket_name` string, required
          - `region` string, required
          - `auth_method` 'federated_gcp_service_account_role', required
          - `federated_gcp_service_account_role` FederatedGCPServiceAccountRole, required
            - `service_account_email` string, email, required
            - `workload_identity_federation_metadata` GcpExternalAccountMetadata
              - …
        - GCSSourceOptionsGCSHMACKeys
          - `bucket_name` string, required
          - `region` string, required
          - `auth_method` 'gcs_hmac_keys', required
          - `gcs_hmac_keys` GCSAccessKeys, required
            - `access_key` string, required — The access key to use for authentication.
            - `secret` string, required — The secret to use for authentication.
        - GCSSourceOptionsGCPServiceAccountKey
          - `bucket_name` string, required
          - `region` string, required
          - `auth_method` 'gcp_service_account_key', required
          - `gcp_service_account_key` GCPSourceServiceAccountKey, required
            - `service_account_email` string, email, required
            - `service_account_key` unknown, required
      - `provider_id` string, required — ID of the import provider this source belongs to.
      - `name` string, required — Unique name for this import source.
    - object
      - `vendor` 's3_compatible', required
      - `s3_compatible` S3CompatibleSourceOptions, required
        - `host` string, required
        - `port` integer, required
        - `bucket_name` string, required
        - `auth_method` 'access_keys', required
        - `aws_access_keys` AWSAccessKeys, required
          - `access_id` string, required
          - `secret_key` string, required
        - `disable_ssl` boolean
        - `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.
      - `provider_id` string, required — ID of the import provider this source belongs to.
      - `name` string, required — Unique name for this import source.
    - object
      - `vendor` 'snowflake', required
      - `snowflake` SnowflakeSourceOptions, required
        - `host` string, required — Host address of the Snowflake account.
        - `port` integer, required
        - `database` string, required — Name of the database.
        - `username` string, required
        - `auth_method` 'public_key_auth', required
        - `public_key_auth` PublicKeyAuth, required
          - `public_key` string, required — This is the PKCS8 public key generated for keypair authentication.
      - `provider_id` string, required — ID of the import provider this source belongs to.
      - `name` string, required — Unique name for this import source.
    - object
      - `vendor` 'delta_sharing', required
      - `delta_sharing` union, required
        - DeltaSharingSourceOptionsBearerToken
          - `host` string, required — Host address of the Delta Sharing server.
          - `port` integer, required
          - `auth_method` 'bearer_token', required
          - `bearer_token` BearerTokenAuth, required
            - `bearer_token` string, required
        - DeltaSharingSourceOptionsOAuth2
          - `host` string, required — Host address of the Delta Sharing server.
          - `port` integer, required
          - `auth_method` 'oauth2', required
          - `oauth2` OAuthAuth, required
            - `client_id` string, required
            - `client_secret` string, required
      - `provider_id` string, required — ID of the import provider this source belongs to.
      - `name` string, required — Unique name for this import source.

## 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)
