Version 4.0.26.18

> [!NOTE]
> **Note:** These docs are for an older version of the API. The API reference is also available for [the latest version, 4.0.26.22](https://docs.cloud.google.com/looker/docs/reference/looker-api/latest).

### Test a connection configuration.

Note that a connection's 'dialect' property has a 'connection_tests' property that lists the
specific types of tests that the connection supports.

This API is rate limited.

Unsupported tests in the request will be ignored.

## Request

PUT /connections/test Datatype Description Request HTTP Request body HTTP Body Expand HTTP Body definition... body [DBConnection](https://docs.cloud.google.com/looker/docs/reference/looker-api/4.0/26.18/types/DBConnection) Connection Expand DBConnection definition... can object Operations the current user is able to perform on this object name string Name of the connection. Also used as the unique identifier dialect [Dialect](https://docs.cloud.google.com/looker/docs/reference/looker-api/4.0/26.18/types/Dialect) (Read-only) SQL Dialect details snippets [Snippet](https://docs.cloud.google.com/looker/docs/reference/looker-api/4.0/26.18/types/Snippet)\[\] pdts_enabled boolean True if PDTs are enabled on this connection project_id string ID of the LookML project to which this connection is scoped. Excluding or passing 'NULL' in this field makes the connection global. Beware that once configured this field cannot be modified. named_driver_version_requested string Requested JDBC driver version name named_driver_version_actual string Resolved JDBC driver version host string Host name/address of server; or the string 'localhost' in case of a connection over an SSH tunnel. port string Port number on server. If the connection is over an SSH tunnel, then the local port associated with the SSH tunnel. username string Username for server authentication password string (Write-Only) Password for server authentication has_password boolean Whether or not the password is present service_account_auth_enabled boolean Whether Service Account OAuth authentication is enabled for this connection uses_oauth boolean Whether the connection uses OAuth for authentication. uses_key_pair_auth boolean Whether the connection uses key-pair for authentication. uses_instance_oauth boolean Whether the integration uses the oauth instance account. uses_service_auth boolean Whether the connection uses service authentication certificate. certificate string (Write-Only) Base64 encoded Certificate body for server authentication (when appropriate for dialect). user_attr_certificate string The name of the user attribute containing the connection certificate. file_type string (Write-Only) Certificate keyfile type - .json, .p8 or .p12 database string Database name db_timezone string Time zone of database query_timezone string Timezone to use in queries schema string Schema name max_connections integer Maximum number of concurrent connection to use max_queries integer Maximum number of concurrent queries to begin on this connection max_queries_per_user integer Maximum number of concurrent queries per user to begin on this connection max_billing_gigabytes string Maximum size of query in GBs (BigQuery only, can be a user_attribute name) ssl boolean Use SSL/TLS when connecting to server verify_ssl boolean Verify the SSL tmp_db_name string Name of temporary database (if used) tmp_db_host string Name of temporary host (if used) jdbc_additional_params string Additional params to add to JDBC connection string pool_timeout integer Connection Pool Timeout, in seconds dialect_name string (Read/Write) SQL Dialect name supports_data_studio_link boolean Database connection has the ability to support open data studio from explore created_at string Creation date for this connection user_id string Id of user who last modified this connection configuration example boolean Is this an example connection? user_db_credentials boolean (Limited access feature) Are per user db credentials enabled. Enabling will remove previously set username and password user_attribute_fields string\[\] maintenance_cron string Cron string specifying when maintenance such as PDT trigger checks and drops should be performed last_regen_at string Unix timestamp at start of last completed PDT trigger check process last_reap_at string Unix timestamp at start of last completed PDT reap process sql_runner_precache_tables boolean Precache tables in the SQL Runner sql_writing_with_info_schema boolean Fetch Information Schema For SQL Writing after_connect_statements string SQL statements (semicolon separated) to issue after connecting to the database. Requires \`custom_after_connect_statements\` license feature pdt_context_override [DBConnectionOverride](https://docs.cloud.google.com/looker/docs/reference/looker-api/4.0/26.18/types/DBConnectionOverride) db_connection_override for this connection in the \`pdt\` maintenance context managed boolean Is this connection created and managed by Looker custom_local_port integer This field is only applicable to connections over an SSH Tunnel. The value of this field would be the local port associated with the SSH tunnel if configured manually. Otherwise either enter NULL or exclude this field. tunnel_id string The Id of the ssh tunnel this connection uses uses_tns boolean Enable Transparent Network Substrate (TNS) connections pdt_concurrency integer Maximum number of threads to use to build PDTs in parallel disable_context_comment boolean When disable_context_comment is true comment will not be added to SQL oauth_application_id string An External OAuth Application to use for authenticating to the database always_retry_failed_builds boolean When true, error PDTs will be retried every regenerator cycle uses_application_default_credentials boolean Whether the connection should authenticate with the Application Default Credentials of the host environment (limited to GCP and certain dialects). impersonated_service_account string An alternative Service Account to use for querying datasets (used primarily with \`uses_application_default_credentials\`) (limited to GCP and certain dialects). cost_estimate_enabled boolean When true, query cost estimate will be displayed in explore. pdt_api_control_enabled boolean PDT builds on this connection can be kicked off and cancelled via API. connection_pooling boolean Enable database connection pooling. default_bq_connection boolean When true, represents that this connection is the default BQ connection. bq_storage_project_id string The project id of the default BigQuery storage project. bq_roles_verified boolean When true, represents that all project roles have been verified. p4sa_name string The name of P4SA service account that is associated with the Looker instance query_holding_disabled boolean Disable query holding for this connection. service_name string Service name used for connections with TNS enabled query HTTP Query Expand HTTP Query definition... tests string\[\]

## Response

### 200: Test results

Datatype Description (array) [DBConnectionTestResult](https://docs.cloud.google.com/looker/docs/reference/looker-api/4.0/26.18/types/DBConnectionTestResult)\[\] can object Operations the current user is able to perform on this object connection_string string JDBC connection string. (only populated in the 'connect' test) message string Result message of test name string Name of test status string Result code of test

### 400: Bad Request

Datatype Description (object) [Error](https://docs.cloud.google.com/looker/docs/reference/looker-api/4.0/26.18/types/Error) message string Error details documentation_url string Documentation link

### 404: Not Found

Datatype Description (object) [Error](https://docs.cloud.google.com/looker/docs/reference/looker-api/4.0/26.18/types/Error) message string Error details documentation_url string Documentation link

### 422: Validation Error

Datatype Description (object) [ValidationError](https://docs.cloud.google.com/looker/docs/reference/looker-api/4.0/26.18/types/ValidationError) message string Error details errors [ValidationErrorDetail](https://docs.cloud.google.com/looker/docs/reference/looker-api/4.0/26.18/types/ValidationErrorDetail)\[\] Expand ValidationErrorDetail definition... field string Field with error code string Error code message string Error info message documentation_url string Documentation link documentation_url string Documentation link

### 429: Too Many Requests

Datatype Description (object) [Error](https://docs.cloud.google.com/looker/docs/reference/looker-api/4.0/26.18/types/Error) message string Error details documentation_url string Documentation link