Verify data source credentials
Tests database connection credentials without creating a data source. Use this endpoint to validate credentials before creating or updating a data source.
When to use
This endpoint is commonly used in combination with the create or update data source endpoints. It allows you to verify that the provided credentials can successfully connect to the database before committing to creating or updating a data source.Typical workflow
- Verify credentials - Call this endpoint with the connection details
- Check response - If successful, proceed to create/update; if failed, display field-specific errors to the user
- Create/update data source - Once verified, call the create or update endpoint with the same credentials
Field-specific errors
When a connection fails, the response includesfieldErrors that map specific fields to their errors. This allows you to display targeted feedback to users about which credential field is incorrect.
Common field errors:
host: “Host not found” - The hostname could not be resolvedport: “Incorrect port” - The connection was refused on the specified portusername/password: “Incorrect username or password” - Authentication faileddatabaseName: “Database does not exist” - The specified database was not found
IP whitelisting
If the connection times out, ensure the Basedash IP address (24.199.77.73) is whitelisted in your database firewall rules.Authorizations
API key authentication using Bearer token format: Bearer <basedash_api_key>
Path Parameters
Organization ID
Body
Database dialect/type
POSTGRES Snowflake account ID
Snowflake warehouse
Snowflake role
Snowflake private key
Snowflake private key passphrase
Database name
Database username
Database host
Database port
0 <= x <= 65535Database password
BigQuery JSON key
BigQuery project ID
Spanner instance ID
Athena workgroup
Athena output location (s3://...)
Athena catalog
Enable SSL connection
Enable SSH tunnel
SSH tunnel host
SSH tunnel port
0 <= x <= 65535SSH tunnel username
SSH tunnel password
SSH private key
SSH private key passphrase
Maximum number of connections in the pool per container
1 <= x <= 100Response
Credentials verified successfully